Basket, checkout and orders
This page is for website creators who build the buying path of a shop, from the add-to-basket button to the order the shop staff process.
Contents
Add to basket
The product's full template posts to content/action with the button ActionAddToBasket (the form of the ezwebin and
simple themes' product templates):
<form method="post" action={'content/action'|ezurl}>
<input type="hidden" name="ContentNodeID" value="{$node.node_id}">
<input type="hidden" name="ContentObjectID" value="{$node.object.id}">
<input type="hidden" name="ViewMode" value="full">
<button type="submit" name="ActionAddToBasket">{'Add to basket'|i18n( 'design/mysite' )}</button>
</form>Options are posted along with it when the product has option fields.
The basket
shop/basket (renamable with [BasketSettings] BasketViewName, see Shop basket view name)
lists the items; shop/updatebasket changes quantities. The pagelayout can show a basket count from
fetch( shop, basket ), as the simple theme does. Old baskets are removed by the basket_cleanup cron part.
Checkout
| Step | View | Template |
|---|---|---|
| Customer data | shop/register (or shop/userregister) | shop/register.tpl, shop/userregister.tpl |
| Confirmation with shipping and VAT | shop/confirmorder | shop/confirmorder.tpl |
| Checkout and payment | shop/checkout | the gateway's pages |
| The order | shop/orderview or shop/orderreceipt/<token> | shop/orderview.tpl |
How customer data is handled is decided by the shop account handler (shopaccount.ini).
Workflow triggers
settings/workflow.ini offers shop operations as triggers: shop_addtobasket, shop_updatebasket,
before_shop_confirmorder and shop_checkout. A payment gateway event goes on shop_checkout (before); shipping
cost on before_shop_confirmorder (Workflows).
Orders
- Store opens the dashboard; the order list (
shop/orderlist) and order view (shop/orderview) are one click away. - Each order has a status; the release with the dashboard added a status for every stage (Store dashboard and order statuses).
- Orders can be archived (
shop/archiveorder) and removed. - Permanent receipts: with
[OrderViewSettings] OrderLinkView=orderreceiptinshop.ini, the confirmation page and mail link toshop/orderreceipt/<token>instead ofshop/orderview(Permanent order receipts). - Customers:
shop/customerlist; statistics:shop/statistics.
Test order checklist
- To do: Add to basket from a product page, change the quantity, remove an item.
- To do: Check out as a visitor and as a logged-in customer.
- To do: VAT and shipping on the confirmation page are right for two countries.
- To do: Payment in the gateway's test mode succeeds and fails as expected.
- To do: The order appears in Store with the right status; the mail arrives.
- To do: The receipt link works for the customer and not for others.
Related pages
- Running a shop: overview
- Payment gateways
- Order list sorting
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.