/
CartTriggerQuantity
46 lines (38 loc) · 1.5 KB
/
CartTriggerQuantity
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
__NAME__ purpose
specify whether quantity changes to cart items will cause CartTrigger subroutines to execute
__END__
__NAME__ see also
CartTrigger
__END__
__NAME__ synopsis
<group choice='plain'>
<arg choice='plain'>No</arg>
<arg choice='plain'>Yes</arg>
</group>
__END__
__NAME__ description
The directive specifies whether quantity changes on existing cart
items will cause specified &conf-CartTrigger; subroutines to execute.
</para><para>
Note, however, that a quantity change to zero will result in item deletion,
and will consequently cause &conf-CartTrigger;s to execute regardless
of &conf-CartTriggerQuantity;'s value.
__END__
__NAME__ notes
It must be noted that the &IC; 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;
<emphasis role='bold'>will not</emphasis> cause these triggers to fire. The
triggers only fire when the cart contents are modified through the standard
Interchange &glos-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.
__END__
__NAME__ example: Setting CartTriggerQuantity
<programlisting>
CartTriggerQuantity yes
</programlisting>
__END__