Chapter 9
162
Shopping Cart Events
Two events are available for the Shopping Cart:
Server()
The is the 'main event' for the shopping cart. The majority of the current
contracts are executed in this event. In some cases, the order in which contracts
are applied is important. For instance, it is important that 'Update' contracts are
executed before order-level adjustments are applied/updated, so that the
adjustments can be determined against an accurate order subtotal.
PostServer()
As you might guess from the name, this event is executed after the Server event.
Several contracts make use of the PostProcess event:
Line item discounts, in which the discount needs to be calculated after a
product is added to the cart, since the calculation depends on the quantity and/
or total of the added item.
Setting the value of the shopping cart shipping and sales tax properties,
which depend on the adjusted total after order-level discounts are applied to
the subtotal.
Updating the cart. The UpdateAdjustments method is called in the
PostServer() event, after the cart has been updated via the Update() method in
the Server() event.
Summary of Contents for DRUMBEAT 2000 ECOMMERCE EDITION
Page 1: ...Users Guide macromedia DRUMBEAT 2000 eCOMMERCE EDITION ...
Page 6: ...Contents 6 ...
Page 12: ...Introduction 12 ...
Page 90: ...Chapter 2 90 ...
Page 110: ...Chapter 3 110 ...
Page 124: ...Chapter 5 124 ...
Page 142: ...Chapter 7 142 ...
Page 152: ...Chapter 8 152 ...
Page 236: ...Chapter 10 236 ...