Home Integration Methods Wordpress ecommerce Plugin

Wordpress ecommerce Plugin

This integration was successfully tested on WP ecommerce plugin v

You can track per product information with this integration method.
Edit template
In your wordpress installation, open and edit the file: wp-content/plugins/wp-e-commerce/wpsc-theme/functions/wpsc-transaction_results_functions.php

Find function transaction_results. Right below the line with function definition, there are global variables listed. Add another one there:
Then find the last line of the function:
return $message_html;
Put the following integration code ABOVE the line:
In case you want to use tax and shipping variables, here you are:
Per product integration
If you want to track commissions per product, just use this code instead:
If you want to use category name for the product ID, this is how to get it:
$category = wp_get_object_terms($item['prodid'],'wpsc_product_category',array( 'orderby' => 'count', 'order' => 'DESC', 'fields' => 'all_with_object_id'));
Then, the name is defined in:

In case you want to use item name, use variable $item['name'] instead of $item['prodid'].

In case you want to use SKU, use this code first:
$item['sku'] = get_post_meta($item['prodid'], '_wpsc_sku', true);
Place it below the line with "array_map" and then, simply replace $item['prodid'] with $item['sku'].
Do not forget to integrate your WordPress with the click tracking code. You can do it by placing the click tracking cade to your WP footer file, in Appearance> Edit menu of your WP.

Keeping it up to date

2 years ago Martin Pullmann
Hi all, if you find any issue, please contact our support so we could fix the issue and update the integration method to keep it up to date.

Right now, the instructions are up to date and fully working.