@tommaso_digital, la tua logica è corretta per il contenuto. Per la versione 1.7.5.2 e il tema Classic, possiamo procedere così per ottenere una barra fissa responsiva.
Innanzitutto, ti consiglio vivamente di lavorare su un child theme. Se non lo hai, creane uno e copia il file themes/classic/templates/catalog/_partials/product-add-to-cart.tpl nella sua controparte nel child theme.
Modifica il file product-add-to-cart.tpl nel tuo child theme, avvolgendo l'intero blocco product-add-to-cart in un nuovo div con un ID specifico. Questo è il contenuto che vorrai rendere "sticky":
<div id="product-actions-fixed-mobile" class="hidden-md-up">
{block name='product_add_to_cart'}
<div class="product-add-to-cart">
{block name='product_quantity'}
<div class="product-quantity">
<input
type="number"
name="qty"
id="quantity_wanted"
value="{$product.quantity_wanted}"
Poi, nel tuo file custom.css (che dovrebbe trovarsi in themes/il_tuo_child_theme/assets/css/custom.css), aggiungi queste regole CSS:
@media (max-width: 767px) {
#product-actions-fixed-mobile {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
background-color: #fff;
padding: 10px 15px;
box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
z-index: 1000;
Infine, per gestire l'apparizione e scomparsa della barra, avrai bisogno di un piccolo script JavaScript. Crea un file custom.js in themes/il_tuo_child_theme/assets/js/custom.js e aggiungi:
$(document).ready(function() {
if (window.innerWidth <= 767) {
var $addToCartBtn = $('.product-add-to-cart .add button');
var $fixedBar = $('#product-actions-fixed-mobile');
if ($addToCartBtn.length && $fixedBar.length) {
var originalBtnOffset = $addToCartBtn.offset().top + $addToCartBtn.outerHeight();
$(window).on('scroll', function() {
if ($(window).scrollTop() > originalBtnOffset) {
$fixedBar.addClass('is-visible');
} else {
Ricorda di registrare custom.js nel tuo theme.yml del child theme se non lo è già, o includerlo via hook displayHeader. Questo dovrebbe darti una barra fissa ben funzionante solo su mobile, che appare quando l'utente scrolla oltre il pulsante originale.