Basket and mini basket
The basket is kept in the database; a cookie of its own (consho_cart) assigns it to the visitor. It is only set once someone puts something in the basket.
The elements
| Basket | shows articles, quantities and totals, with “Update”, “Remove” and “Proceed to checkout”. As a result the page is never cached, whatever its cache setting – every visitor only sees their own basket. |
|---|---|
| Mini basket | count and total, also in a layout section. It is loaded separately, so catalogue pages still come from the cache. |
On the start point, under “Consho”, you choose the Basket page – that is where “Add to basket” leads. In the basket the customer also redeems discount codes and gift vouchers. It does not show shipping costs yet: the shipping method is only chosen in the checkout.
After adding
In the shop configuration, in the “Checkout” section, After adding decides where the visitor goes: “to the basket” (default) or “back to the page”. If they stay on the page, a mini basket is needed – otherwise they cannot see that something landed in the basket.
How long a basket lives
- An open basket stays for 30 days from the last change, and so does the cookie.
- A basket that became an order, and the entries made in the checkout, stay for 7 days.
- Contao's cron cleans up daily – without the cron, old baskets stay where they are.
Findings and pitfalls
- No basket page, or no basket element on it: blocks the checkout.
- “Back to the page” without a mini basket (note): put a mini basket into a layout section or switch to “to the basket”.
- If
QUERY_PARAMS_ALLOW_LISTfilters out Consho's parameters, messages such as “added to the basket” disappear: addconsho_.*to the list. - A proxy or CDN in front of the site without ESI support cannot load the mini basket.