User Guide | Information

A list of miscellaneous information for understanding the inner workings of flexi cart.

What is 'Admin Data'?

'Admin data' is only active in the carts session array if a cart is loaded into the current session using 'load_cart_data()' to retrieve cart data saved to the database; and even then, the functions 'set_admin_data' parameter must be set as 'TRUE'.

Typically, the 'set_admin_data' parameter would only be set to 'TRUE' if the cart data being loaded is from a saved order, that is to be updated and resaved, e.g. if a customer wishes to change an item quantity from an order they have placed.


The purpose of the admin data, is to store the item quantity and discounts of the saved cart data in its original state; this then allows flexi cart to easily refer to the original data once a customer continues adding and removing items to the loaded cart.

By storing this loaded cart data, flexi cart can keep track of item stock allocation and discount usages, ensuring that if data from a saved order is resaved, that the resaved cart item quantities and discounts usages will not be deducted again from the database, and likewise, if they are removed from the cart before saving the order, their quantities will be returned to stock.

If the order detail table is setup to track the quantity of items that have been 'shipped' and 'cancelled', then flexi cart will also account for these quantities when allocating stock quantities when the order is resaved.


If your e-commerce application does not allow the loading, updating of cart content and then the resaving of a previously saved order, then admin data will not be active in your application.

What are 'Shipped' and 'Cancelled' Item Quantities?

'Shipped' and 'Cancelled' item quantities can be saved and tracked via the order details table. Their purpose is to allow admin users to track how many items from a saved order have been shipped or cancelled/returned by the customer.

These columns are not required for the cart to function and can be disabled if not required. However, if they are used, then they play an active role in the management of user reward points and stock allocation.


Shipped Item Quantities

If a saved order item is marked as having 'x' items shipped, then the cart will save the date the item was shipped, this then internally sets a countdown (defined via a config setting) until the associated reward points will become active to the customer.

The purpose of the countdown is to only activate the reward points once the items return policy date has passed. This prevents customers from purchasing items soley to earn reward points that they can then spend on other items. Once they have bought the other items, they can then return the initially purchased item for a refund.


Cancelled Item Quantities

If a saved order item is marked as having 'x' items cancelled, then depending on the carts config settings, the cart will automatically return the defined quantity of items to stock. In addition to this, the cart will also remove any reward points that were earnt in association with the cancelled items.

Note that if a customer converts reward points to a reward voucher, and then the item that earnt those points is cancelled, the cart cannot remove the related reward points as they have already been converted. This is why customer reward points should only be activated outside of the return policy date.