How to update Akira theme to latest version? Click here.

Okay
  Public Ticket #3232449
Sticky Add to cart button on product pages for mobile
Closed

Comments

  • raphaelmrlc started the conversation

    Hi, 
    Hope you'r well !

    I know it's a specific question and that fonctionnality isn't added by default but I add a sticky add to cart button on my product pages on mobile.

    It's working good but the only problem is that is opening the cart page instant of the side cart and I don't found the way to just open the side cart.

    Here is my custom.js code 

    $(document).ready(function () {
      var addToCartDiv = $("#fixed-add-to-cart-div");
      var addToCartButton = $("#fixed-add-to-cart-button");
      var addToCartForm = addToCartButton.closest("form");
      var addToCartButton = $("#fixed-add-to-cart-button");
      var productAvailability = $product.quantity > 0;   $(window).scroll(function () {
        var windowHeight = $(window).height();
        var documentHeight = $(document).height();
        var scrollPercentage =
          $(window).scrollTop() / (documentHeight - windowHeight);
        if (scrollPercentage > 0.25) {
          addToCartDiv.addClass("fixed-add-to-cart-div-visible");
        } else {
          addToCartDiv
            .removeClass("fixed-add-to-cart-div-visible slide-in-up")
            .addClass("slide-out-down");
        }
      });   if (productAvailability) {
        addToCartButton.prop("disabled", false);
      } else {
        addToCartButton.prop("disabled", true);
      }   $("#fixed-add-to-cart-div").click(function () {
        addToCartForm.submit();
        $("#canvas-mini-cart").trigger("click");
      });
    });

    Could you please just help me to found the good syntahx to open the cart on side ? 

    (If you want to check the website I need you to give my your IP adress to get access)

    Have a nice day !

    Raphaël

  •  386
    Naik replied

    Unfortunately, we cannot help in this case.

    Best regards,

    Naik - Lightatend Team 

    A good review and positive comment would help us to keep doing what we do best Rate now

    Our support time Monday-Saturday (9am-6pm GMT+7)