Add to cart button is not working

Created by Nicole Le, Modified on Fri, 20 Oct 2017 at 05:53 PM by Nicole Le

Issue:  The add to cart button is not working after we enable the defer javascript extension


Solution:

Remove code

<!-- <script>

(function() {

  var _fbq = window._fbq || (window._fbq = []);

  if (!_fbq.loaded) {

    var fbds = document.createElement('script');

    fbds.async = true;

    fbds.src = '//connect.facebook.net/en_US/fbds.js';

    var s = document.getElementsByTagName('script')[0];

    s.parentNode.insertBefore(fbds, s);

    _fbq.loaded = true;

  }

  _fbq.push(['addPixelId', '903143773051497']);

})();

window._fbq = window._fbq || [];

window._fbq.push(['track', 'ViewContent', {

content_type: 'product',

content_ids: ['<?php echo $_product->getSku(); ?>'],

product_catalog_id: '800958149940258'

}]);

</script>


 -->

line 368 on /app/design/frontend/default/default/template/catalog/product/view.phtml file


For more information about product, please refer Defer JavaScript page.

If you need any further assistance, please feel free to contact us.

Please visit our site for more useful Magento 1 Extensions: https://bsscommerce.com/extensions.html

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article