Table of Contents
Upgrading to v0.7.0
Note: This page is geared towards upgrading from v0.6.0. Please make sure you view all the version notes for versions you may be skipping (ie. from 0.5.1 → 0.6.0 → 0.7.0).
Please make sure you review the 0.7.0 changelog (available in your FoxyCart admin's Store Settings page) before upgrading. Also please ensure you've read the v070 known issues
Change of "Include" File Paths
Read this section carefully This one is a biggie. If you don't make this change, FoxyCart won't work as expected on your site.
The “includes” files necessary for FoxyCart to function on your site have been moved to our CDN (Content Delivery Network). This provides a 2-5x speed increase around the world, but in order to make it happen the paths for the “includes”
This is the what the old includes look like:
That code needs to be removed and replaced with the new code available in your FoxyCart Admin's "sample code" section, which will look like this:
Please copy the new code to use from your FoxyCart admin and not this wiki page. Also note that
YOUR_FOXYCART_DOMAIN needs to be either the
*.foxycart.com subdomain or the full checkout domain if you're using a custom subdomain. So if your checkout is at
YOUR_FOXYCART_DOMAIN should be
example. If you're using a custom subdomain like
YOUR_FOXYCART_DOMAIN should be the entire
Also, ensure that your cart, checkout, and receipt templates do not contain any of this code. It is unnecessary on the cart/checkout/receipt, and can cause problems in the template caching.
Confirm You Have the Right Includes
Check your site's template. If you have any references to
foxycart_includes.js, you have not properly completed the step above.
Your site should now be calling code that looks like this:
If you have code in your site referencing
foxybox.css your site will not work. Please go to the upgrade step above and follow the steps there to ensure you have the right code.
PayPal Express Checkout and Subscriptions
If you use PayPal Express Checkout (ie. if your cart has a “PayPal” button on it), you should set up your IPN and API access for your PayPal account to allow FoxyCart to make requests on your behalf. This step is recommended for all FoxyCart stores using PayPal Express Checkout, but if you are doing subscriptions through FoxyCart this step is required, as your subscriptions will fail through PayPal if the proper API permissions are not granted.
"Offline Processing" is no longer available
If your store is using “Offline Processing” as a payment method, that is no longer available as of v0.7.0. Please contact us for details. We will be phasing out Offline Processing over the next 6-12 months, and will give all merchants using Offline Processing plenty of time to move to a real gateway. The security and liability risks are simply too great for us to continue to offer Offline Processing as we continue to provide secure and innovative solutions to our users.
If you're currently using Offline Processing we recommend moving to a supported gateway. If your desired gateway isn't available, let us know and we can look into adding support.
- Any custom cart display using a non-default modal window or JSONP functionality
- Hack or override to get the
fcsidcookie set at a subdomain or third-level domain (like
- Anything else that's using any code from
Thickbox replaced by Colorbox
If you're just using the default
foxycart_includes.js without custom styling on the “FoxyBox” (based on Thickbox and you upgrade straight to the
foxycart.complete.js as mentioned above, this won't impact you too much. If, however, you have made customizations to the FoxyBox you'll need to re-create them using Colorbox (the new default modal window), re-implement them using your own Thickbox setup, or use another modal window as desired.
You can tell if you have custom FoxyBox styling if it doesn't look more or less like the image on the right (with your cart displaying inside the big white area). You can also check if you have any
#fc_tb_ declarations in your CSS.
Note that this doesn't affect the cart itself, which is displayed in an
iframe inside the modal window, and set in your “Cart” template in your FoxyCart admin. That page is entirely unrelated to the modal window script with holds it.
No Longer Using ''.foxycart'' Classes for Links or Forms
foxycart.js no longer relies on a class of
.foxycart, instead attaching the necessary functionality based on the
action of your links or forms actually pointing at your FoxyCart domain, like
example.foxycart.com. This change shouldn't impact the vast majority of stores, but it is sufficiently large that you should double-check to ensure that your add-to-cart links and forms continue to work as expected.
If you're relying on the
.foxycart class to actually set the
action attributes of your links and forms, you'll need to either override a function in
foxycart.js or ensure that your links and forms point to your FoxyCart domain. For example:
<!-- The following WILL NOT work --> <a class="foxycart" href="path/to/something/else?name=Test Product&price=9.99">Add To Cart</a> <form class="foxycart" action="" method="get"> <input type="hidden" name="name" value="Test Product" /> <input type="hidden" name="price" value="9.99" /> <input type="submit" value="Add to Cart" /> </form> <!-- The following WILL work --> <a href="https://example.foxycart.com/cart?name=Test Product&price=9.99">Add To Cart</a> <form action="https://example.foxycart.com/cart" method="get"> <input type="hidden" name="name" value="Test Product" /> <input type="hidden" name="price" value="9.99" /> <input type="submit" value="Add to Cart" /> </form>
fc_PreProcess(), fc_BuildFoxyCart() are replaced
If you're using
fc_BuildFoxyCart() at all you'll have to migrate those to the new
The jQuery required for
foxycart.js, the cart, checkout, and receipt is now 1.4.2 (previously 1.3.2). This shouldn't cause any problems, but take a look at the jQuery upgrade notes to make sure there are no backwards-incompatible changes that impact your site.
Coupon Code & Quantity Discount Changes
If you're using coupon codes you should check to ensure that the discounts are applying as expected. Coupon code discount behavior has been tightened up a little and now defaults to the newly created ''single'' discount type. This
single discount type is actually what may be in effect for coupon codes prior to v0.6.0, but the behavior was undocumented, and the
allunits discount type wasn't available previously.
If you use coupon codes please test them out after upgrading to ensure they are applying the correct discount.
FoxyCart v0.7.0 now allows for sections to be shown or hidden depending on the type of transaction the customer made. If you have customized your email template we recommend:
- Copying your existing email templates out of FoxyCart.
- Selecting the default email templates in FoxyCart.
- Comparing the new defaults with your old custom templates, and modifying your old templates accordingly.
- Pasting your newly updated custom templates back into your FoxyCart admin and saving.
- Test. Then test some more.
If you haven't customized your email templates just reset them to the defaults and test to ensure they're acceptable.
Link and Form Validation
You can now lock down your add-to-cart links and forms using HMAC validation, which sounds scary but you may be able to do it automatically. It is highly recommended you at least read through the documentation so you know what options you have to secure your add-to-cart links and forms.
Store-Specific Timezone Settings
Your store settings page in your FoxyCart admin now allows for selecting the timezone of your store, which will change the transaction time displayed in your admin and on your store's email receipts sent to customers.
<link> tag in your template's
Subscription Improvements, Past Due Amounts
- Past due amounts now will be automatically charged on subsequent billing attempts. This is a change to previous functionality, where the past due amount would be stored but not automatically attempted. If this impacts your billing models please make any appropriate adjustments.
- There are new subscription-specific language fields for both the checkout and emails.
^^subscription_cancel_end^^are available for placement in your receipt email templates. More info.
Email Placeholders for Improved Communication
New placeholders are available to only include blocks if the email is for an order, an update_info request, or a subscription receipt. More info.
New Button ''ID''s for "Checkout" Button
If you have CSS image replacement on the main “checkout” button you may want to add new images or styles for updating a customer's info or canceling a subscription.
- Added class
#fc_complete_order_buttonfor when the customer is updating their billing information.
- Added class
#fc_complete_order_buttonfor when the customer is cancelling a subscription.
Language Customizations and New Language Fields
If you've customized the language on your FoxyCart store you should check the changelog for a list of new language fields. If your store is not using the default English language translation this should be considered a mandatory upgrade step.
Other Notes for Advanced Users or Implementations
- If you've done crazy hacks to get categories changed depending on a product option, you can now use the
ymodifier. More info.