CartTriggerQuantity — specify whether quantity changes to cart items will cause CartTrigger subroutines to execute
The directive specifies whether quantity changes on existing cart
items will cause specified CartTrigger
subroutines to execute.
Note, however, that a quantity change to zero will result in item deletion,
and will consequently cause CartTrigger
s to execute regardless
of CartTriggerQuantity
's value.
It must be noted that the Interchange cart subsystem is based on arrayrefs of hashrefs (all Perl programming terms) — there is no object encapsulation for limiting or monitoring program access to the contents of any cart. Consequently, direct manipulation of the cart from within Perl will not cause these triggers to fire. The triggers only fire when the cart contents are modified through the standard Interchange CGI-based variable processing. Therefore, it is assumed (for the moment, at least) that any programmer sufficiently comfortable or confident to manipulate cart contents directly can also be given the responsibility of deciding whether or not it is appropriate to invoke cart triggers along the way.
Interchange 5.9.0:
Source: lib/Vend/Config.pm
Line 5434 (context shows lines 5434-5446)
sub parse_yesno { my($var, $value) = @_; $_ = $value; if (m/^y/i || m/^t/i || m/^1/ || m/^on/i) { return 1; } elsif (m/^n/i || m/^f/i || m/^0/ || m/^of/i) { return 0; } else { config_error("Use 'yes' or 'no' for the $var directive\n"); } }