This is the documentation for LemonStand V1, which has been discontinued. You can learn more and upgrade your store here.

LemonStand Version 1 Has Been Discontinued

This documentation is for LemonStand Version 1. LemonStand is now offered as a cloud-based eCommerce platform.
You can try the new LemonStand and learn about upgrading here.

Storing Cart Content After Customer Places Order

By default LemonStand clears the shopping cart content when a customer places an order in the end of the checkout process. This does not allow the customer to return to the previous checkout steps and update entered information. However it possible to leave content in the cart. To do so, add the empty_cart hidden field to your checkout page:

<input type="hidden" name="empty_cart" value="0"/>

This approach is especially helpful with the combined Preview and Pay pages implementation.

You can empty the cart when the order is paid by handling the shop:onOrderStatusChanged event event. You can remove all items from the cart in this event handler with the following call:

Shop_Cart::remove_active_items();

You can download the module template which empties the cart when the customer pays the order here. Please extract the archive to the /modules directory on your server. It should create the emptycartonpay directory. The module does not require any configuration.

Next: How to Integrate Downloadable Products
Previous: Displaying a List of Active Product Catalog Price Rules
Return to Tips and Tricks