FoxyShop 4.7: Image Upload Update

Before upgrading, please read this carefully.

TL;DR if you allow customer uploads on your cart or have a datepicker calendar, you’ll need to add a new plugin before upgrading.

WordPress temporarily blocked access to FoxyShop from their plugin repo this week due to the fact that FoxyShop uses the flash plugin Uploadify to process our image uploads. When I first built FoxyShop, Uploadify was a great tool that was widely used, but since that time it has garnered a bad reputation as being insecure. I want to stress that our implementation of Uploadify is completely secure since we don’t use their image processing tool but use WordPress’ instead. We have the upload process fully locked down. That said, WordPress asked us to stop using Uploadify and disabled FoxyShop from the repo until we did so. I understand what they are doing and why, but it’s still a bit frustrating.

FoxyShop uses Uploadify in two places — the product upload within the product detail page and the customer upload tool (as a product variation). I have rebuilt the image upload tool using Dropzone which will allow you to upload images by dragging and dropping.

If your cart allows customers to upload images as part of their order, you will need to add a supplemental plugin called “foxyshop-uploadify” (download here). This adds the uploadify files back to WordPress and provides the theme files necessary to keep all the functionality that you’ve been using. If you have a foxyshop-custom-upload.php file in your plugin you’ll want to update the file references based on the ones that you’ll get in the foxyshop-uploadify plugin found above.

We also were alerted by the WordPress plugins team that the jQueryUI Datepicker widget is now bundled directly with WordPress. As a result, we have switched our include method to load the Datepicker directly from the WordPress files. There may be a few of you who were relying on the Datepicker files in the FoxyShop plugin. If that’s the case, you’ll want to download the files directly form jQuery UI and include them directly in your theme.

If you are confused about any of this, please write in. I’m happy to help answer any questions or help you get your site functionality upgraded. Thanks!

Other updates in 4.7:

  • Update sub start and end dates to listen for FoxyCart date format (like 1m, 10d, etc.)
  • Don’t load multiship JavaScript if multiship is not enabled

And other updates in the 4.6.x versions:

  • WP 4.3 compatibility changes with widget constructor
  • SSO endpoint now listens for update/cancellation and doesn’t query cart in those cases
  • Update PrettyPhoto to 3.1.6
  • Update Order Desk Link on Orders page
  • Removing unneeded queries when setting up images

FoxyShop 4.6: Expiration and Reverse Login

Product Expiration FunctionalityFoxyShop 4.6 includes product expiration features and the ability to provide automatic login at your site after checkout.

Here’s the list of the new features and fixes in this release:

  • Adding product expiration feature – use a number (minutes) or a date (Y-m-d in Pacific time) when setting up your products to handle time-sensitive products.
  • Adding Reverse SSO functionality – log your customers into WordPress after checkout. See this link for setup instructions.
  • Connecting featured images that weren’t uploaded to the product
  • A custom image size called “featured” won’t take over the featured image functionality any more
  • Fix to make sure that hidden required checkboxes aren’t required
  • Adding filters to disable custom category sorting and provide your own custom sorting

(continue reading…)

Supporting Wholesale Users

There are a few different ways to support wholesale users with FoxyShop. The simplest is to have a separate batch of products that your wholesale users can order. In order to support this, I’ve put together an add-on plugin for FoxyShop which you can download here. Just download this file and put it in wp-content/plugins. Then you can can go into WordPress and enable it.

This plugin requires the Advanced Custom Fields plugin (the free version is fine). Once this is installed, you’ll be able to edit your products and categories and set them with access restrictions. Then you can create your wholesale users and assign them to the Wholesale role.

You may also want to consider installing the Peter’s Login Redirect plugin to control where your wholesale visitors are sent after login.

I recommend putting this in your single product template:

//Check Access
if (get_field("access_restriction") == "wholesale" && !check_user_role(array("wholesale", "administrator"))) {
die("Please login before accessing this product.");
$product_categories = wp_get_post_terms($product['id'], 'foxyshop_categories', array("fields" => "all"));
if ($product_categories && !is_user_logged_in()) {
foreach ($product_categories as $term) {
$access_restriction = get_field("access", $term->taxonomy . "_" . $term->term_id);
if ($access_restriction == "wholesale") {
die("Please login before accessing this product.");

And this in your in your single category template (around line 25):

//Check Wholesale Access Restriction
$access_restriction = get_field("access", $term->taxonomy . "_" . $term->term_id);
if ($access_restriction == "wholesale" && !is_user_logged_in()) {
die("Please login before accessing this section.");

Adding these bits of code will further secure the wholesale categories and products from prying eyes.

Version 4.5: FoxyCart 2.0 Support

New Features in FoxyShop 4.5It’s been quite a while since I’ve released a new version of FoxyShop, but I’ve been storing up some incremental improvements. Version 4.5 has a number of upgrades and features.

FoxyCart 2.0: This new release supports the features and functionality found in FoxyCart 2.0 which is nearing public release. This means that you can select 2.0 from the FoxyCart Version dropdown and the proper includes will be bundled. If you are interested in upgrading to 2.0, please read this post.

Bundled Products: FoxyCart 2.0 supports bundled products and so if you are using 2.0, FoxyShop will now support bundles as well – letting you lock products to their parent products.

(continue reading…)

Version 4.4: FoxyCart Templates

New TemplatesVersion 4.4 includes a host of small updates, new filters, and jQuery 1.10.1 support. There’s also a few new features to help you build dynamic FoxyCart stores even faster.

Important jQuery Note: The jQuery team made a big change in the 1.9 branch, removing support for .live(). This breaks a lot of older plugins. If you are using FoxyCart 1.0 or previous, FoxyShop will attempt to use jQuery 1.8.3. If you are using FoxyCart 1.1 or newer, the latest 1.10.1 branch will be used instead. To override, you can either include jQuery yourself or set this in your wp-config.php file:


Please test your site after upgrade to make sure everything is working as expected.

Here are the highlights of this FoxyShop release:

(continue reading…)

Version 4.3.2: Custom Variation Names

DocsVersion 4.3.2 has an upgrade which will allow you a lot of flexibility with the variation field names. You can now customize the name of the fields and the value of each variation. This is very helpful if you’d like to use a variation to set the subscription frequency. Here’s an example of the new syntax:

Variation Name: Frequency{sub_frequency}

Just Once{v:}
Every 2 Weeks{v:2w}
Every Month{v:1m}

(continue reading…)

Version 4.3: Keeping Things Tidy

FoxyShop 4.3 is primarily a maintenance update but it does have some handy new features.

The new default FoxyCart store version is 1.0. (In fact, any new stores being created now won’t be able to build a 0.7.2 store.)

Native support has been added for the following fields at the product level: cart, empty, and coupon. So you can now check a box and instruct a product to add a coupon with the product or force a checkout. It should be noted that it’s generally a good idea to check the “Empty Cart” option if you are forcing a direct checkout. You can still use “cart”, “empty”, or “coupon” as a direct custom field if you want more flexibility. These new checkboxes are located under the subscription/discount information on the right side of the product page in the admin.

You can now add hidden product field variations. This gives you the flexibility to add a hidden field that will be included with the product when it goes to the cart.

(continue reading…)

Version 4.2: Variation Updates

FoxyShop hasn’t had an update for a few months but I haven’t been sitting around on my hands. In that time I’ve been hard at work on this maintenance version, preparing for the big FoxyCart changes coming with the rewritten API (exciting stuff), and working hard on Order Desk.

FoxyShop version 4.2 focuses on some improvements to the variations processor and a number of other updates and bugfixes. Here’s the rundown of what you’ll find in 4.2:

Variation Processor Updates
The variations will now allow multiple levels of d-keys to allow very complicated structures where each d-key’ed element is viewed on all previous elements instead of just a single level of dependency checking. Now you can have a shirt type which turns on embroidery type where a certain embroidery type turns on color options. The processor has also been updated to put an x: in front of hidden text and textarea input fields. This was already in place for select’s and radio buttons, but this now means that you won’t end up with text fields in your cart that weren’t viewable when the form was submitted. This also means that you can now have multiple hidden text fields that share the same name.

Updates for Multiple Products on One Page
Sometimes when showing multiple product forms on the same page there were some collisions with the galleries. PrettyPhoto galleries have been updated to include the product ID in the rel attribute so that multiple galleries won’t overlap on each other. Out of stock messages are now members of a JavaScript array so that having more than one on a single page means they won’t overwrite each other.

Google Product Feed
The Google Product Feed feature has been updated to add CDATA markup to content field and to allow for customizable target country and currency via filters. Note that this program has changed and you now have to purchase product ads. See Google’s announcement for more information. You can still submit your product feed but then you’ll go create ads in AdWords.

New Features

  • Added settings option for disabling cart validation (if cart validation was currently disabled via the wp-config constant, new setting will be set to “off”)
  • Added a filter for the post type registration argument array
  • Added filter for disabling auto-login when new user account created


  • Allow saved variations to have custom names
  • Updated hidden ikey images to be written out but hidden so cloudzoom will work properly
  • Improved inventory update matching to only update published products, not those in trash. Also improved to handle the different ways that different servers write serialized datatypes.


  • Fix for double UTF-8 encoding on foxyshop_currency() – won’t do UTF-8 encoding if the localization name ends with .utf8.
  • Fix for error/typo in customer email variable in subscription datafeed
  • Fix to accept custom field search criteria in CSV export feature
  • Fix for CSV export not showing proper amount for quantities greater than one
  • Fix for the FOXYSHOP_PRODUCT_TAGS feature

Version 4.1.5: Catching Up on Updates

Versino 4.1.5 has been released with some patches and few small feature upgrades. It’s been a little while since a big release, but there have been several maintenance releases and some new features here and there. Here’s the skinny:

Version 4.1.1

  • Added new setting so show a computed Add to Cart link with each product.
  • Line breaks now shown on order page
  • Multiship stores were seeing redundant shipping address in admin
  • Setup page cleanups and a few syntax fixes in helperfunctions.php

(continue reading…)

Version 4.1: Export CSV Transactions

This release adds a much-requested CSV export feature for transactions and has quite a few other maintenance updates.

The Orders page in the admin has been adjusted so that instead of adding buttons for each new customization, these new customizations can be placed into a dropdown menu:

(continue reading…)