Computers & Internet Wordpress

Updating to E-commerce v3.8 – Errors & Resolutions

A few days ago released a new update for WP E-Commerce, plug-in version 3.8. Although the update brings lots of improvements, it also brings some glitches as well.

First of all, the structure of the plug-in changes with v3.8. Seems that decided to get rid of handling the date in seperate tables in SQL. They decided to manage the each product and category as a Custom Post. As a result of this change, the plug-in had some major changes. Okay now let’s get into the issues I experienced…

Problem #1: Error message Fatal Error: Call to undefinede function wpsc_total_prodcut_count()…..

Following error message appears in Product page & Single Product Page:

Fatal error: Call to undefined function wpsc_total_product_count() in /home/folder/public_html/wordpress folder/wp-content/themes/your theme folder/wpsc-products_page.php on line 75

Seems that there is something wrong with the wpsc_total_product_count() in new plugin.



I found a temporary solution , which made me lose my own theme settings .  I copied the php files in ‘/public_html/wordpress/wp-content/plugins/wp-e-commerce/wpsc-theme’ to my WordPress theme location and renamed the old theme folders.  Error messages dissapeared.


Problem #2: Permalinks can not be changed

Settings\Permalinks does not operate properly. When a new permalink configuration is selected on Permalinks screen, following error messages appears:

Permalinks - Error Message


Some other blogs suggest to flush the ‘register_post_type’ with code: ‘$wp_rewrite->flush_rules() ‘ .

My trials were unsuccessful so far. I hope to find a way to fix this later.



Problem #3: Internal Server Error Message after deactivation & activation

This was a major issue for me! After I spend some hours on the issues I listed above, I decided to inactivate and then re-activate the WP E-commerce plug-in.  During the activation process, an error messages appeared and i could no longer activate the plug-in.


Internal Server Error - Screenshot


After spending more hours, I figured out walk around and activated the plugin. Here are the steps I followed:

  1. First of all, backup your website. (You should not skip this first step! )
  2. Go to your phpMyAdmin database
  3. Find the database where WP tables are kept. You should see a table named : wp_posts
  4. Rename the table to ‘wp_posts_backup’.  To rename the table you may want to run this simple sql (this will temporarily hide all your posts and pages, don’t worry if you dont see them) :

    ALTER TABLE wp_posts RENAME TO  wp_posts_backup;

  5. Login to WP admin page and activate the WP E-commerce plugin. This time WP  E-commerce plugin will be activated without any issue.
  6. Go to phpMyAdmin page again to make the post and pages visible again:
  7. ALTER TABLE  wp_posts_backup RENAME TO  wp_posts;

  8. Check your categories and products on your webpage.
  9. Log off from phpMyAdmin.


This worked for me!  Hope it works for you too!

3 replies on “Updating to E-commerce v3.8 – Errors & Resolutions”

Hi there,

I work for getshopped development team and would like to say thanks for documenting your issues and resolutions – The permalinks issue you speak of is currently been fixed and discussed.

As for wpsc_total_prodcut_count()….. – this function is meant to be deprecated but some issues are coming from people using old theme files from 3.7 anyway a new function has been written for this so you can just put that into your theme functions.php file if it helps see the function below, please get in contact with me if you find any more issues or would to discuss anything you have found so far!

Once again thanks for the great post

if( !function_exists( ‘wpsc_total_product_count’ ) ) {
function wpsc_total_product_count() {
global $wpdb;

$count = $wpdb->get_var( “SELECT COUNT( ID )
FROM $wpdb->posts
WHERE post_type = ‘wpsc-product’
AND post_status = ‘publish’
AND post_parent = 0 ” );

return $count;


Comments are closed.