Skip to content

[19.0][ADD] website_sale_product_sticky_add_to_cart: sticky add-to-cart bar on product page - #1311

Open
idris-domatix wants to merge 1 commit into
OCA:19.0from
idris-domatix:19.0-add-website_sale_product_sticky_add_to_cart
Open

idris-domatix wants to merge 1 commit into
OCA:19.0from
idris-domatix:19.0-add-website_sale_product_sticky_add_to_cart

Conversation

@idris-domatix

Copy link
Copy Markdown

Description of the issue/feature

Add a sticky Add to Cart bar to the e-commerce product page. While the
visitor scrolls down, a fixed bar slides up from the bottom showing the
product thumbnail, its name, the current price and an Add to Cart button
that triggers the standard website_sale add-to-cart flow.

The bar is rendered server-side (hidden with a CSS transform so it never
affects page scrolling) and an interaction:

  • toggles its visibility past a scroll threshold;
  • keeps the price in sync with the currently selected variant via a
    MutationObserver on the standard page price;
  • forwards the button click to the regular #add_to_cart button.

The bar can be enabled/disabled per website from the Customize menu of the
product page.

This is a fresh, minimal implementation following OCA conventions; the same
behaviour has been running in production on several Odoo 19 shops.

@OCA/e-commerce-maintainers please review.

@OCA-git-bot OCA-git-bot added series:19.0 mod:website_sale_product_sticky_add_to_cart Module website_sale_product_sticky_add_to_cart labels Sep 3, 2026
@idris-domatix
idris-domatix force-pushed the 19.0-add-website_sale_product_sticky_add_to_cart branch 4 times, most recently from aebf0ee to fe54721 Compare September 3, 2026 11:52
@idris-domatix

Copy link
Copy Markdown
Author

Ready for review.

This module adds a sticky Add to Cart bar to the e-commerce product page: while scrolling, a fixed bar slides up showing the product thumbnail, name, current price and an Add to Cart button that triggers the standard website_sale flow. It is implemented with a server-side template inheritance (customizable from the product page Customize menu) plus a frontend interaction that toggles the bar on scroll and keeps the price in sync with the selected variant.

All CI checks are green (pre-commit, test with Odoo/OCB, runboat, codecov). The behaviour has also been validated on a live Odoo 19 shop.

@idris-domatix

Copy link
Copy Markdown
Author

Friendly ping for review. This is a new 19.0 module (sticky add-to-cart bar) and CI is green. @OCA/e-commerce-maintainers could someone take a look when you have a moment?

@idris-domatix
idris-domatix force-pushed the 19.0-add-website_sale_product_sticky_add_to_cart branch from fe54721 to aa9e287 Compare October 7, 2026 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:website_sale_product_sticky_add_to_cart Module website_sale_product_sticky_add_to_cart series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants