Version 2.6: Inventory and Subscription Upgrades

Version 2.6 has added quite a few advanced features as well some improvements to subscription and inventory features. There’s also been some compatibility work completed to prepare the way for the impending WordPress 3.2. Let’s examine the new features:

Subscription Status Now Stored Locally
If you are using SSO to run a subscription-based site, things just got a whole lot easier. FoxyShop now stores a foxyshop_subscription array with the user’s meta that makes it really easy to find out whether a user has a valid subscription. Just call foxyshop_subscription_active($product_code) and you’ll get back a true or false return. Admins can now see subscriptions and the FoxyCart user ID on any user’s profile page. Note that these features are still in beta so if you find a bump in the road, please send in a report. And you’ll need to grab the new foxyshop-datafeed-endpoint.php if you have customized it.

Subscription Start and End Dates
You can now enter strtotime() arguments instead of a solid date when setting up subscriptions. So if you want to start your subscription two weeks from now, you can enter “+2 weeks”. End dates work the same. You can still use a hard date or single number for day of the month. This means that the calendar popup on these fields is a thing of the past, but it’s a small price to pay for exciting new functionality.

Inventory Updates
Previously, inventory settings weren’t too hard to get around. If there were 4 widgets available and an alert level set as 3, the customer could enter 10 and the cart would allow it. This has been corrected, though if you do want to allow back-ordering you can override this feature by passing in true forĀ  the $allowBackOrder argument. As a side-note, quantity_min and quantity_max are now being passed directly to the cart as well.

Another new inventory feature: Inventory Alert Emails. If you want to receive an email every time an item falls below the alert level, there’s a new checkbox on the settings page (and it’s checked by default).

Customer Order History
If you are using SSO and want your customers to be able to see their order history, a new function has been added which will make this a breeze. Just run this new function:

foxyshop_customer_order_history($customer_id);

and make sure that you are passing in their FoxyCart Customer ID.

WordPress 3.2 Ready
WordPress 3.2 has some some dramatically different styles and some fields widths were breaking the design. No longer! Everything has been thoroughly tested up to 3.2-RC1.

PHP 5.1.2 Required
This isn’t new, but the HMAC hash won’t work if your PHP version is lower than 5.1.2. If you are using a previous version you’ll now get a big, fat warning on your setup page. Time to upgrade! Don’t forget that WordPress itself is now requiring PHP 5.

Child Themes
Previously, customized theme files could only be placed in the theme template. Now, FoxyShop looks in the child theme, then in the template theme, and finally in the plugin’s themefiles folder. Don’t forget that if you want to have FoxyShop look in your Aunt Eliza’s basement for the theme files, put this in your wp-config file: define('FOXYSHOP_TEMPLATE_PATH', '/aunt/elizas/basement/');

Advanced Settings
FoxyShop now allows you to define some further constants in your wp-config.php file which will unlock more advanced settings to allow even more customization of your install.

  • Full-Price Bundling: By default, bundled products will have a price of $0.00 for all sub-products. If you want to switch to full-price for bundled, do this: define('FOXYSHOP_BUNDLED_PRODUCT_FULL_PRICE', 1);
  • HMAC Verification Disabling: If you absolutely need to disable the HMAC verification, you can now do so — but this is NOT recommended! define('FOXYSHOP_SKIP_VERIFICATION', 1);
  • Product Comments: If you want to allow product comments: define('FOXYSHOP_PRODUCT_COMMENTS', 1);

Upgrade now!

Leave a Reply

Your email address will not be published. Required fields are marked *