Buy me a coffee

2nd sticky Add to Cart bar after scrolling product pages 25%

You can follow these steps to create 2nd sticky Add to Cart bar after scrolling product pages 25%.
#1. Use this code to Custom CSS box

div.sticky-atc {
  display: none;
}

3aee08a1ecb84be612a9 Min

#2. Use this code to Code Injection > Footer

<div class="sticky-atc"></div>

 

6be9e1a70bbeace0f5af Min

#3. Use this code to Code Injection > Footer, under #2 code

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $('h1.ProductItem-details-title').clone().appendTo('div.sticky-atc');
    $('div.ProductItem-quantity-add-to-cart').clone().appendTo('div.sticky-atc');
});
</script>
<script>
 $(window).on("scroll", function() {
        //Sticky Header start
   		sticky = $('header#header');
        if ($(window).scrollTop() > 150 ) {
            $('div.sticky-atc').addClass("show");
        } else {
           $('div.sticky-atc').removeClass("sticky");
        }
});
</script>
<style>
body[class*="type-products"].view-item .sticky-atc {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    width: calc(100% - 20px);
    z-index: 99999;
    justify-content: space-between;
    background-color: #f1f1f1;
    align-items: center;
    padding: 15px 10px;
    transform: translateY(100%);
    transition: all 0.1s ease;
}
div.sticky-atc h1 {
    font-size: 40px;
    margin-top: 0px;
    margin-bottom: 0px;
}
div.sticky-atc div.ProductItem-quantity-add-to-cart {
    display: flex;
    align-items: center;
    flex: 0 0 30%;
    justify-content: space-between;
}
div.show {
    transform: translateY(0) !important;
    transition: all 0.1s ease !important;
}
div.show .preFade {
opacity: 1 !important;
}
</style>

51faed3e23278479dd36 Min

#4.Result

Af7c37d8f8c15f9f06d0 Min