Right after applying the SUPEE-9767 patch on our Magento 1.9.0.1 site, every time when I try to put a product to cart by clicking the Add to cart button on the product page, I get the following errors (partavaahto.html is the product url):

TypeError: element.attachEvent is not a function

bf802dc...e879.js (line 5653, col 9)

TypeError: Mage is undefined

partavaahto.html (line 40, col 1)

TypeError: Translate is not a constructor

partavaahto.html (line 52, col 26)

TypeError: element.attachEvent is not a function

bf802dc...e879.js (line 5653, col 9)

TypeError: Product is undefined

partavaahto.html (line 221, col 9)

ReferenceError: VarienForm is not defined

partavaahto.html (line 347, col 17)

TypeError: Mage is undefined

partavaahto.html (line 431, col 9)

TypeError: element.dispatchEvent is not a function

bf802dc...e879.js (line 5734, col 7) 4

detailed error: TypeError: productAddToCartForm is undefined

Strangely, on the category listing page Add to cart button still works fine.

I have applied all the previous security patches and they have worked without errors.

Any idea what could cause this and how could it be fixed?

有帮助吗?

解决方案

According to the following js file name: bf802dc...e879.js it seems like you have merged and minified js/css files enabled.

Depending if it's done via the Magento out of the box or via an extension. In both cases I suggest you refresh the cache that generates those JS/CSS files as it could be the reason why you're getting JS errors

许可以下: CC-BY-SA归因
scroll top