1

after i change Merge CSS and JS Files to yes, the add to cart button is not working so the customer can not add products to the cart.

  • have use any jquery in your site – MeenakshiSundaram R May 19 '14 at 9:02
  • I fully agree with Dave. Some themes will not work when css & js compilation is enabled. They are usually not optimised for this or simply put: badly coded. – tecjam May 19 '14 at 14:05
2

Somtimes you'll find some errors trying to merge Prototype and jQuery librarires. If the problem isn't into your code you can try creating groups.

For example:

Into your layout definition, change the addItem action and add the instruction.

<action method="addItem"><type>skin_js</type><name>js/jquery.js</name><group>jquery</group></action>

All the files with the same group will be merged into a separated file. Some times solve this kind of problems.

1

I've always found that merging the files causes more problems then it's worth. I'd suggest just leaving this option turned of as the benefits aren't vast compared to the amount of work required to enable these features successfully.

1

First option is to go through all .js files in the /js -> /varien folder and add a semicolon ; at the very end of each file if one doesn't already exits. You may want to do this to your template .js files as well. If you can update this post with any errors you see, we all could help you pinpoint the issue. I would recommend Google PageSpeed if you can't figure out the problem. This webserver mod can minify, compress, and merge js and css files, among other things.

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.