WP e-Commerce Cross Sales
Sunday, 21st August 2011The latest version of WP e-Commerce (3.8.x) for WordPress is a significant move on both in terms of stability and extensibility.
This is partly down to an extensive re-build on the codebase to take advantage of some of WordPress’ latest features; custom post type and taxonomies. This has the added benefit of making it much easier for plugin developers to create add-on plugin to enhance WP e-Commerce functionality.
The key objectives now seem to be to keep WP e-Commerce ‘lean and mean’ to provide a solid platform on which to develop WordPress-based e-commerce sites, and provide additional functionality through plugins.
Part of this process includes stripping out some of the less-used parts of WP e-Commerce and turning them into plugins. Once such example is the automated ‘Also Bought’ functionality which can be found in the Marketing tab of WP e-Commerce settings.
I have worked extensively with WP e-Commerce over the last 2-3 years and frequently try to get involved wether it be fixing the odd bug or helping out on the forum – when I have time ;) so I jumped on board to help separate the ‘Also Bought’ functionality into a WordPress plugin.
Also Bought > Cross Sales
The ‘Also Bought’ functionality is now available to download as the ‘Cross Sales’ plugin on WordPress Extend.
The plugin will function exactly the same way as the current Also Bought feature in WP e-Commerce. When someone buys multiple products, this information will be saved so that we can identify that “someone who bought this also bought that”.
There are few small additions though:
You will be able to set a limit for the amount of cross sales you want to show – what looks best may depend on the theme you are using.
By default, cross sale product images will be the same size as product thumbnail images, but there are now settings to override this if you want.
Installing/Upgrading
In WP e-Commerce 3.9 the also bought functionality will not be available by default, you’ll need to install the plugin. For those of you who are already using that functionality, don’t worry, I’ve made it easy for you… you’ll be able to install the plugin directly from the Marketing tab in WP e-Commerce and have it back up and running straight away.
You can even install the plugin now if you like. It won’t do anything until you upgrade to WP e-Commerce 3.9 and the transition will be seamless.

I recommend that you change the wpsc_also_bought() references in your single product theme template to the following:
<?php if ( function_exists( 'wpsc_cross_sales' ) ) wpsc_cross_sales( $product_id ); ?> |
This will ensure compatibility in the future if you deactivate the plugin, and ensure it works with future versions. You don’t need to change this as the wpsc_also_bought() function should work for the time being, but it will cease to work in a future version of this plugin so do get around to changing it sooner rather than later.
What next…?
Expect to see other areas of WP e-Commerce being moved to separate plugins. My guess is the following features may at some point find themselves moved to external plugins:
- Social Integration, Like, Tweet etc…
- Intense Debate comment integration
- Custom survey
- Off site product links
- Personalisation options





December 14th, 2011 at 10:18 pm
Hi, Ben. Quick question here, hope you can spare some tiem to help. My client loves this option and wants to be able to add it to the checkout page. However, try as aI might, I am not able to do so. What am I doing wrong? I simply take your template code and drop it where i think it should go, but NADA.
Thanks in advance.
December 15th, 2011 at 6:59 am
The cross sales are only built to show on product pages so that when you are viewing a product it shows you other products the people have also bought at the same time – “People who bought this also bought this…”
February 7th, 2012 at 9:29 pm
Ben,
Thanks for the writeup. How does the plugin work if it’s a new store with no sales? Does it still work?
Thank You
February 8th, 2012 at 8:29 am
If it is a new store with no sales it will not display any cross sells. The plugin relies on the being sales of multiple products so it can show “people who night this also bought…”
It is exactly the same functionality that is in the current version of WP e-Commerce (in the Marketing settings) but there are plans to remove it in a future version at which point you can continue to use this plugin to provide the same functionality.
March 29th, 2012 at 1:50 pm
My site is still new…. so this does not show up as yet…. is it possible to have an option to show random products for the time being if related products do not exist? or can you advise me of an appropriate plugin?
May 9th, 2012 at 10:05 pm
Ben this looks great. You mentioned that it works in WP E-Commerce 3.9 yet they are only up to 3.8.8. How are we to use this plugin if 3.9 is not out. Is this for “when” it comes out we will use this plugin?
May 9th, 2012 at 10:22 pm
Tony, It is essentially the same functionality as the “Also Bought” functionality in the current version of WP e-Commerce.
There are plans for this to be removed in the next major version of WPEC at which point you will be able to use this plugin instead.
May 10th, 2012 at 3:16 pm
Thank you Ben for clearing that up. I’ll be sure to install the plugin once they go 3.9 which it sounds as though it’s right around the corner.