Note: This page is geared towards upgrading from v1.1. Please make sure you view all the version notes for versions you may be skipping (ie. from 1.0 → 1.1 → 2.0).
FoxyCart v2.0 has some big, big changes from previous versions, but some things remain almost entirely unchanged. First, what's changed:
Please make sure you review the full v2.0 changelog (available in your FoxyCart admin's Store Settings page before upgrading. Also please ensure you've read the known issues.
If you'd like to have certain products expire, you can now use the expires
parameter. More in the cheat sheet.
Product quantity discounts now apply to all products with the same code. So if you have multiple sizes of shirts and want a quantity discount to apply to all of them grouped together, you can give them the same code and it'll group them together for the purposes of a quantity discount.
Products can now be grouped together in a few interesting ways. More in the cheat sheet.
The biggie is Amazon's new payment method, which allows using an Amazon account right from within the FoxyCart-hosted checkout. Very cool. As with all of our payment methods, documentation is on our wiki.
There are a handful of bug fixes to v2.0 noted on the changelog, but none of them should cause problems for upgrading unless you were specifically working around the incorrect behavior. (And if you were, please in the future just let us know so we can correct the issue :)
Log into your FoxyCart admin and go to the “sample code” section to get the latest “includes”. This will likely be the last time you'll ever have to do this, as the new include is a single line of javascript that contains a script loader. Future upgrades will likely not require you to update your includes anymore.
If you're using an integration that inserts code into your templates automatically, this may be done for you, but check with your integration developer to be sure.
We've completely rewritten our templates for v2.0. Unfortunately, all customizations will need to be redone. You can get started here
As a starting point to update your email templates, make these changes:
^^receipt^^
to {% include 'address.email.inc.txt.twig' %}
or ^^cart^^
to {% include 'cart.inc.txt.twig' %}
^^receipt^^
to {% include 'address.email.inc.twig' %}
or ^^cart^^
to {% include 'cart.inc.twig' %}
^^checkout^^
to {% include 'checkout.inc.twig' %}
With v2.0's new script loader, it will include jQuery if not already included, but it will do so after document ready. If you have jQuery javascript you need to run on pageload, it will likely error after upgrading to v2.0. If that's the case, just insert jQuery where you need it. We recommend pulling it from Google's CDN.
If you were using customizations to append the fcsid
to your add-to-cart links and forms, you'll need to change that up.
fcc.session_get()
to FC.session.get()
There may be additional changes as well, but that's the biggie.
With the rewrite of our JavaScript, any snippets you previously had will most likely not work on 2.0. We're porting across snippets and they will be listed on https://wiki.foxycart.com/v/2.0/snippets.
Way easier and built-in now. More info here.
If you're using a non-English language file, there have been new language strings added:
checkout_copy_billing_to_shipping