0

I try to save Ajax for the the 'Add to Cart' button. But to remove the class and title changes during the addition of the product. Example: when I put "Add to cart" - all time see "Add to cart", not "Adding...".

2
  • You mean you want to remove "Adding...." text while add to cart ?
    – Keyur Shah
    Commented Sep 1, 2017 at 11:09
  • I try to disable the replacement of the title and class. title="Add To Cart" class="action tocart primary"
    – Sylon
    Commented Sep 1, 2017 at 12:35

1 Answer 1

0

Copy vendor\magento\module-catalog\view\frontend\templates\product\list.phtml to app\design\frontend\Vendor\default\Magento_Catalog\templates\product\list.phtml Make changes:

    <script type="text/x-magento-init">
    {
        "[data-role=tocart-form], .form.map.checkout": {
            "catalogAddToCart": {}
        }
    }
    </script>

to

<script type="text/x-magento-init">
{
    "[data-role=tocart-form], .form.map.checkout": {
        "catalogAddToCart": {
            "addToCartButtonSelector": "",
            "addToCartButtonDisabledClass": ""
        }
    }
}
</script>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.