LiteCommerce:Shopping cart class

From X-Cart 4 Classic
Revision as of 16:36, 5 February 2010 by Admin (talk | contribs) (Created page with 'LiteCommerce shopping cart class provides an interface for adding various items, like products, gift certificates, etc. and a way to proceed to checkout. The Cart class is an Ord…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

LiteCommerce shopping cart class provides an interface for adding various items, like products, gift certificates, etc. and a way to proceed to checkout. The Cart class is an Order derived class and it has a special status “T” (“carT”). When a buyer opens LiteCommerce customer zone, a shopping cart instance is created for the current session. Every time a customer adds a product into the shopping cart, Cart object puts a new OrderItem record containing information about the product into the database. If the customer leaves the store without checking out, his Cart details remain in the store database until the LiteCommerce garbage collector removes all expired (by default, older than 1 day) cart/order/items records. After the customer adds some products into the shopping cart and proceeds to checkout, before the payment processor is called, cart status is changes to “I” (“Incomplete”) and Cart becomes and “incomplete” Order.

Example 6.1 Shopping cart lifecycle.

Embim4.png