LNK Cart Drawer, the side cart that keeps your customers on the page
After an add to cart, the PrestaShop window mostly invites the customer to leave: to the cart, or to close it without seeing anything. LNK Cart Drawer opens the cart on the side of the page. The customer sees what they just added, changes a quantity, sees what is left for free shipping, then keeps shopping or checks out.
- Version 1.1.5 · PrestaShop 1.7.6 to 8.x
- Version 1.9.5 · PrestaShop 9
- PrestaShop 9 to 9.x
- PHP 8.1 to 8.4
- No override
Screenshots
Key points
- Side cart opened on every add, or with the cart button.
- Quantities, removal and subtotal without leaving the page.
- "Checkout" and "View cart" buttons, minimum purchase reminded.
- Free shipping bar taken from LNK Free Cart Shipping.
- Optional upsells: accessories of the products in the cart.
- Theme's cart kept silent on the page, with nothing turned off: it comes back as soon as the drawer is off.
- Drawer already rendered on load, with no server call: 1.8 KB of CSS, 5.2 KB of JavaScript.
- Accessible: modal window, focus kept, Esc, 44 pixel targets.
- Works with LNK Company Staff: no price shown to a customer whose prices it hides.
- Multistore: settings shop by shop, theme's cart kept silent wherever the drawer runs.
- French, English and Arabic (right to left).
- PrestaShop 1.7.6 to 9, no override.
A side cart on every add
The drawer slides in from the edge of the page as soon as a product is added, from the product page, a product list or any PrestaShop add to cart button. Each line shows the image, the name, the combination, the price and the quantity. The subtotal follows, with the "Checkout" and "View cart" buttons. The header cart button opens it too, with the number of items.
Quantities and removal without leaving the page
Minus, plus, or a typed quantity: the PrestaShop cart applies its rules (minimum sale quantity, stock) and everything updates, counter included. A line is removed in one click. The shop's minimum purchase is reminded as long as it is not reached.
The free shipping bar
With LNK Free Cart Shipping, a bar at the top of the drawer shows what is left before free shipping, then announces it once the threshold is reached. Threshold, rules per country, group or carrier and texts stay those of Free Cart Shipping: nothing to enter twice.
Upsells, if you want them
As an option, off by default: up to three accessories of the products in the cart, the ones you already link on the product page, with an "Add" button. Nothing made up, and nothing suggested that is out of stock or already in the cart.
The theme's cart kept silent, never doubled
On every page where it runs, the drawer keeps the theme's cart (ps_shoppingcart) silent: its button sits in the same spot and the native window no longer opens. Since 1.9.4 / 1.1.4, nothing is turned off or uninstalled: with the drawer off, the theme's cart comes back by itself.
Light and fast
Figures measured on the delivered module, compressed (zlib, level 9): 1.8 KB of CSS and 5.2 KB of JavaScript (script shared by the platforms and link with the PrestaShop cart). The drawer arrives already rendered with the cart: no server call when a page loads, nor on opening. On the cart and checkout pages, only the counter follows.
Accessible, in Arabic and on mobile
Announced modal window, focus kept in the drawer, Esc to close, 44 pixel targets, animations off for visitors who reduce them. The drawer opens on the end side of the line: on the left in Arabic. On a phone, it takes the full width.
Compatible with PrestaShop 1.7.6, 8 and 9
Two versions of the module, one per generation: 1.1 for PrestaShop 1.7.6 to 8.x, 1.9 for PrestaShop 9, with a native settings page in each back office, under Orders, and a live preview with your products. Classic and Hummingbird themes with no setting; LNK themes place the button and style the drawer through their theme contract. No override, no table.
Frequently asked questions
What does the customer see when adding a product?
The cart opens on the side of the page, without leaving it: each line with its image, its combination, its price, its quantity and a link to remove it, then the subtotal and the "Checkout" and "View cart" buttons. The customer closes the drawer and keeps shopping where they were.
Can the customer change quantities in the drawer?
Yes: minus and plus buttons, or direct typing, and removal of a line. Changes go through the PrestaShop cart, with its rules (minimum sale quantity, stock); the rest of the page follows (cart counter, other blocks). A customised line is edited on the product page.
Do I need to disable my theme's cart?
No. The theme's cart (ps_shoppingcart module: cart button and window after adding) and the drawer never show together: on every page where it runs, the drawer keeps the theme's cart silent, without turning it off. It stays installed and active: when the drawer is off (setting "The drawer holds the cart of the shop", or module disabled), it comes back by itself. A shop where an earlier version of the drawer had turned it off keeps the "Restore the theme's cart" button; uninstalling the drawer puts it back too.
How does the free shipping bar work?
It takes over LNK Free Cart Shipping: its threshold, its rules (countries, groups, carriers) and its texts. When one of its rules applies to the cart, the bar shows what is left to add, then that shipping is free. Without that module, there is no bar: no threshold to enter twice.
Does the drawer slow my pages down?
No. The stylesheet and the script are light, and the drawer arrives rendered with the page: no server call on load nor on opening, only when the cart changes. On the cart and checkout pages, which already show the cart, the drawer does not open: only the button counter follows.
Can I suggest other products in the drawer?
Yes, as an option (off by default): up to three accessories of the products in the cart, the ones you link on the product page ("Related products", Description tab, in PrestaShop 8 and 9; "Related product" in 1.7), with an "Add" button. A product already in the cart, inactive or out of stock is not suggested.
Is the drawer accessible?
Yes: modal window announced to screen readers, focus kept in the drawer, Esc key to close, focus returned to the button that opened it, 44 pixel targets, updates announced. Visitors who reduce animations get no sliding.
Does it work in Arabic and on mobile?
Yes. The drawer opens on the end side of the line: on the right in French, on the left in Arabic. It takes the full width of a phone. Texts are in French, English and Arabic.
Can my theme place and style the cart button?
Yes. The module places its button where the theme's button was; a theme can call it itself
({widget name='lnk_cartdrawer'}), override the templates, the stylesheet and the script in its
folder, and set the colours with CSS variables. Everything is described in the theme contract.
Are hidden prices and business account rights respected?
Yes. In catalogue mode, for a customer group without prices, or for an employee whose prices LNK Company Staff hides, the drawer shows no price. If they are not allowed to order, the "Checkout" button does not appear.
Which PrestaShop versions?
PrestaShop 1.7.6 to 8.x (version 1.1) and PrestaShop 9 (version 1.9), Classic and Hummingbird themes. No override, no table, no external call. Multistore: settings shop by shop; the theme's cart is kept silent on the page, without being turned off.
Release history
-
Version 1.9.5 PrestaShop 9
Fixes
- Menu name in the back office: a language added after the installation (Arabic on a shop installed in French) showed "LNK Panier en tiroir" in French. It now gets the name in its own language, and the update fixes the one that was only a copy. A name you changed is never touched.
- Settings, "Cart of the theme" section: the status line follows the switch "The drawer holds the cart of the shop". Turned off, it no longer says that the drawer keeps the cart of the theme silent; and if ps_shoppingcart is missing or turned off, a warning says that the shop has no cart button left. Subtitle "Keep it silent" instead of "Replace it".
- Extra sales help and FAQ: the product page field has its PrestaShop name ("Related products", Description tab, in 8 and 9; "Related product" in 1.7) instead of the "Associations" tab of PrestaShop 1.6. In Arabic, the "Drawer" section is called "الدرج", distinct from the module name.
- Documentation: versions up to date; the drawer content arrives rendered with the page (it is no longer requested on opening); the cart of the theme is kept silent on the page, without being turned off. Theme contract and hooks now in English and Arabic.
-
Version 1.9.4 PrestaShop 9
New
actionLnkCartDrawerInChargehook: another module can force or switch off the drawer's handling of the cart for the current request, without saving anything (for example a demo guard). Described in docs/HOOKS.md.
Changes
- Settings, "Cart of the theme" section: the switch "The drawer holds the cart of the shop" replaces the "Replace the theme's cart" button. It is turned on by the update, in every shop. A shop where an earlier version had turned off the theme's cart keeps the "Restore the theme's cart" button.
Fixes
- The drawer only took over the cart when ps_shoppingcart was disabled. With both modules active, adding to the cart opened the theme's window instead of the drawer; with ps_shoppingcart disabled and the drawer hidden, the shop had no cart button at all. The drawer now always draws its button and takes over adding to the cart, whatever the state of ps_shoppingcart: on its pages, the theme's cart stays silent (no button, no window, no script), without being turned off. When the drawer is off or hidden, the theme's cart comes back by itself.
-
Version 1.9.3 PrestaShop 9
New
- URLs of line and cross-sell templates in data-lnk-cartdrawer-tpl-href, -tpl-src or -tpl-action, set in the real attribute when filled: a theme can write <img data-lnk-cartdrawer-tpl-src="{image}"> instead of <img src="{image}">, which some theme validators refuse (Shopify). Direct href and src are still read: nothing changes for current themes.
Show the 9 previous versions
-
Version 1.9.2 PrestaShop 9
New
- Slot in the drawer footer, between the subtotal and Checkout: displayLnkCartDrawerFooter hook for other modules (express payments, order note); empty, it takes no room.
Changes
- Same drawer on every platform (theme contract lnk.cartdrawer/2): the drawer arrives rendered with the cart as the page loads, with no call to the server, not even on opening; then the shared script (views/js/lib/cartdrawer-core.js, shared with WooCommerce and Shopify) keeps it up to date from the cart state, never reading HTML from the data. PrestaShop script (views/js/cartdrawer.js) reduced to the link with the native cart.
- Templates: hook/drawer-body.tpl, hook/line.tpl and hook/upsell-item.tpl replace front/drawer.tpl (migration note in THEME-CONTRACT).
-
Version 1.9.1 PrestaShop 9
Changes
- Free shipping bar read through the
actionLnkFreeShippingStatehook of LNK Free shipping (10.9.3 / 10.1.3 and later); earlier versions of Free shipping are still read as before. - Thumbnails of the lines and of the upsells use the small image format the shop declares (Classic: small_default; Hummingbird 2.x: default_sm), or the format the theme chooses (
LNK_CD_IMAGE_TYPEin its theme.yml). - Platform-free core (lines and bar) taken from the LNK shared library, the same as in the WooCommerce version; calculations unchanged.
- Shared back-office skin updated.
- Free shipping bar read through the
-
Version 1.9.0 PrestaShop 9
New
- Cart drawer opened when a product is added (configurable) and when the cart button is clicked: lines with image, combination, price, editable quantity and removal, subtotal, Checkout and View cart buttons. Minimum purchase reminded. Content requested on opening only.
- Free shipping bar taken from LNK Free Cart Shipping when it is installed (no threshold entered in this module).
- Optional upsells, off by default: up to three accessories of the products in the cart.
- Header cart button with the number of items, and a widget for themes.
- Switch from the theme's cart (ps_shoppingcart) in the back office, shop by shop, with an exact return to the previous state (button or uninstallation).
- Accessibility: modal window, focus kept in the drawer, Esc, focus returned to the button, 44 px targets, reduced motion respected. Drawer on the end side of the line (left in Arabic).
- Contract lnk.companies.rights/1: prices hidden and Checkout button removed for the customer concerned.
- Live preview in the back office with products from the shop. French, English and Arabic.
-
Version 1.1.5 PrestaShop 1.7.6 to 8.x
Fixes
- Menu name in the back office: a language added after the installation (Arabic on a shop installed in French) showed "LNK Panier en tiroir" in French. It now gets the name in its own language, and the update fixes the one that was only a copy. A name you changed is never touched.
- Settings, "Cart of the theme" section: the status line follows the switch "The drawer holds the cart of the shop". Turned off, it no longer says that the drawer keeps the cart of the theme silent; and if ps_shoppingcart is missing or turned off, a warning says that the shop has no cart button left. Subtitle "Keep it silent" instead of "Replace it".
- Extra sales help and FAQ: the product page field has its PrestaShop name ("Related products", Description tab, in 8 and 9; "Related product" in 1.7) instead of the "Associations" tab of PrestaShop 1.6. In Arabic, the "Drawer" section is called "الدرج", distinct from the module name.
- Documentation: versions up to date; the drawer content arrives rendered with the page (it is no longer requested on opening); the cart of the theme is kept silent on the page, without being turned off. Theme contract and hooks now in English and Arabic.
-
Version 1.1.4 PrestaShop 1.7.6 to 8.x
New
actionLnkCartDrawerInChargehook: another module can force or switch off the drawer's handling of the cart for the current request, without saving anything (for example a demo guard). Described in docs/HOOKS.md.
Changes
- Settings, "Cart of the theme" section: the switch "The drawer holds the cart of the shop" replaces the "Replace the theme's cart" button. It is turned on by the update, in every shop. A shop where an earlier version had turned off the theme's cart keeps the "Restore the theme's cart" button.
Fixes
- The drawer only took over the cart when ps_shoppingcart was disabled. With both modules active, adding to the cart opened the theme's window instead of the drawer; with ps_shoppingcart disabled and the drawer hidden, the shop had no cart button at all. The drawer now always draws its button and takes over adding to the cart, whatever the state of ps_shoppingcart: on its pages, the theme's cart stays silent (no button, no window, no script), without being turned off. When the drawer is off or hidden, the theme's cart comes back by itself.
-
Version 1.1.3 PrestaShop 1.7.6 to 8.x
New
- URLs of line and cross-sell templates in data-lnk-cartdrawer-tpl-href, -tpl-src or -tpl-action, set in the real attribute when filled: a theme can write <img data-lnk-cartdrawer-tpl-src="{image}"> instead of <img src="{image}">, which some theme validators refuse (Shopify). Direct href and src are still read: nothing changes for current themes.
-
Version 1.1.2 PrestaShop 1.7.6 to 8.x
New
- Slot in the drawer footer, between the subtotal and Checkout: displayLnkCartDrawerFooter hook for other modules (express payments, order note); empty, it takes no room.
Changes
- Same drawer on every platform (theme contract lnk.cartdrawer/2): the drawer arrives rendered with the cart as the page loads, with no call to the server, not even on opening; then the shared script (views/js/lib/cartdrawer-core.js, shared with WooCommerce and Shopify) keeps it up to date from the cart state, never reading HTML from the data. PrestaShop script (views/js/cartdrawer.js) reduced to the link with the native cart.
- Templates: hook/drawer-body.tpl, hook/line.tpl and hook/upsell-item.tpl replace front/drawer.tpl (migration note in THEME-CONTRACT).
-
Version 1.1.1 PrestaShop 1.7.6 to 8.x
Changes
- Free shipping bar read through the
actionLnkFreeShippingStatehook of LNK Free shipping (10.9.3 / 10.1.3 and later); earlier versions of Free shipping are still read as before. - Thumbnails of the lines and of the upsells use the small image format the shop declares (Classic: small_default; Hummingbird 2.x: default_sm), or the format the theme chooses (
LNK_CD_IMAGE_TYPEin its theme.yml). - Platform-free core (lines and bar) taken from the LNK shared library, the same as in the WooCommerce version; calculations unchanged.
- Shared back-office skin updated.
- Free shipping bar read through the
-
Version 1.1.0 PrestaShop 1.7.6 to 8.x
New
- Cart drawer opened when a product is added (configurable) and when the cart button is clicked: lines with image, combination, price, editable quantity and removal, subtotal, Checkout and View cart buttons. Minimum purchase reminded. Content requested on opening only.
- Free shipping bar taken from LNK Free Cart Shipping when it is installed (no threshold entered in this module).
- Optional upsells, off by default: up to three accessories of the products in the cart.
- Header cart button with the number of items, and a widget for themes.
- Switch from the theme's cart (ps_shoppingcart) in the back office, shop by shop, with an exact return to the previous state (button or uninstallation).
- Accessibility: modal window, focus kept in the drawer, Esc, focus returned to the button, 44 px targets, reduced motion respected. Drawer on the end side of the line (left in Arabic).
- Contract lnk.companies.rights/1: prices hidden and Checkout button removed for the customer concerned.
- Live preview in the back office with products from the shop. French, English and Arabic.