What it does
- The bar slides in when the real Add to Cart button is off screen and slides away when it is back in view.
- Its button presses the real button, so the shop's own checks (options, quantity, stock) all still apply. If an option is missing, the page scrolls to the message.
- Shows the product name, the price (with tax as your shop shows it), the old price crossed out when there is a special, and a small picture (can be switched off).
- Position at the bottom or the top of the screen, accent colour, your own button text (or the standard text, translatable in a language file).
- Option for phones and small tablets only (the bar is hidden on screens of 768 pixels and wider).
- If the real button is hidden on a page (for example by a quote or wholesale module that turns buying off), the bar stays hidden too.
- Status switch. No database tables; uninstall removes its event and settings.
What it does not do
- The price in the bar is the price when the page loaded. It does not change when a shopper picks an option that changes the price.
- Themes that already have their own sticky buy bar will show two bars; switch one off.
- The bar presses the button with the id button-cart, which the standard OpenCart themes use. A theme without that button gets no bar.
Tested
Installed and used through the real admin installer on OpenCart 2.3.0.2, 3.0.5.1, 4.0.2.3 and 4.1.0.4 (41 to 46 checks each, 0 failures): settings cleaning, the script on product pages only, the name, price, picture and special price, a product name that tries to break out of the script, the injected script checked with Node, status off and on, uninstall and reinstall. The slide in and out and the Add to Cart click were also tried in a real browser on the 3.0 store only.
Note
Screenshots are not included yet.