0

The Add to cart button on my site's catalog page isn't working. A few days back I disabled the add to cart button from product page by commenting out the cart from view.phtml file in

public_html/app/design/frontend/default/perfectum/template/catalog/product/view.phtml

But after I removed the forward slashes, button was enabled and working in the product page - but in catalog page, when I click on add to cart button, it keeps on loading and loading.

Can anyone help me with this.

Thanks in advance.

0

I'm noticing an error in the javascript console when I click the 'add to cart' button:

Uncaught TypeError: Cannot read property 'is' of undefined

It's coming from the jquery-fancybox script. I believe you need to debug your setLocationAjax - the ajax query is being returned a success, I think it's failing at the try block.

4
  • I am not sure if I follow what you say. Still a newbie to magento. However, is this the file you talking about? js/lightboxes/fancybox/jquery.fancybox-1.3.4.pack.js Can you tell me if this is the file where I need to do the debugging? Also help me with how to debug setLocationAjax or provide some walkthrough. I did google it but couldn't find. Thanks – Sam Jul 27 '16 at 9:43
  • That's the location that the error is coming from directly, however since it's a library, it's more likely that something in your javascript is passing an undefined value to fancybox. That javascript is embedded in the page, not in an external javascript file. Because the fancybox library is minified, it's hard to be more specific about where the error is coming from. – Aric Watson Jul 27 '16 at 12:19
  • I compared the current code of the file with a one I downloaded from github of the same version and it was same as the current file jquery.fancybox-1.3.4.pack.js Anything that you suggest? – Sam Jul 28 '16 at 23:34
  • The bug is not in that file, it sounds like something is trying to use the fancypack library, probably with an invalid argument. – Aric Watson Jul 29 '16 at 13:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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