The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

JQuery version

UPUP Member
Hi, I've been successfully using FC 2.0 for some time but need some help on the JQuery version. When upgrading from 0.7.0 version of FC, I'd left JQuery as 1.7.1 since I couldn't get the sidecart to slide in when using 1.11.1. The site has always worked fine (and the cart slides in) using 1.7.1, so I've never worried about it.

Now, I need a more recent version of JQuery for other functionality on the site, but when upgrading to 1.11.1 as described in the FC documentation, the sidecart stops sliding in, instead going full screen. I have the FC loader.js included just before the closing body tag, which I understand to be correct, so wondering where I'm going wrong.

The site is formotorbikes[dot]com

  • fc_adamfc_adam FoxyCart Team

    Is there any chance you could create a test page with 1.11.1 present with an add to cart? I'm going to guess that it's a javascript error that is preventing it from loading but without seeing it in action it's hard to say 100%.
  • fc_adamfc_adam FoxyCart Team

    Thanks for whispering that page for us.

    Looking at the page, I see two issues. Firstly, you've got the loader.js file included twice at the bottom of your page. You'll just want that the once.

    More importantly though, it is a javascript error that is causing Sidecart to stop working, and it relates to your common-min.js file. Specifically the error is this:

    Uncaught TypeError: $(...).die is not a function

    jQuery removed live() and die() from the codebase in version 1.9 - and they've been replaced by on() and off(). If you update your code to match I think you should see Sidecart working correctly.
  • UPUP Member
    Hi Adam

    Many thanks for the tips. I've implemented them but I'm still seeing a full page cart on the test page. Updating the code in common-min.js file hasn't affected the cart working correctly in the non-test pages though (which are still using jQuery 1.7.1), so I've left the updated code in the common-min.js file. Do you have any other suggestions?

    Many thanks for your help.
  • fc_adamfc_adam FoxyCart Team

    A new javascript error is visible in the console for your page now - specifically this one:

    Uncaught TypeError: Cannot read property 'msie' of undefined

    jQuery removed the jQuery.browser() function in 1.9 - you can see information on that here. You could either use something like Modernizr to do browser detection, or something like jQuery Migrate which restores removed features from version 1.9 and earlier.
  • UPUP Member
    Many thanks Adam, adding jQuery Migrate sorted it.
Sign In or Register to comment.