| | | | |

WP e-Commerce – Duplicate Products Problem Fixed

Problem: Duplicate products were being displayed when using the productspage shortcode on a Page.

Solution*: Remove any duplicate product_id rows in the wp_wpsc_product_order table in phpMyAdmin.

*This solution worked in my case. It may not work in every situation.

WordPress 3.0.1
WP e-Commerce

Similar Posts


  1. After searching for days, this one was the one that actually worked! Thanks for posting it!

    One quick question, after deleting the duplicates in the php, how long does it take to show up on the normal site? When I am logged in, the duplicate products are gone but when I am not logged in they are still there. I deleted them in the php about two hours ago and I wasn’t sure if it took a lot longer to take effect.

    I appreciate your time!

    1. Zach, the effect should be immediate. It may be that my instructions are for different versions of WordPress and WP e-Commerce than you have. Also, you mentioned “deleting the duplicates in the php”; however, my solution requires altering the MySQL database: “Remove any duplicate product_id rows in the wp_wpsc_product_order table in phpMyAdmin.”

      I hope that helps.

  2. I have to ask, did you uninstall and then reinstall the WP e-Commerce plugin at any point in time? This is the problem I’m having and I want to ensure this does not bite me again in the future. I suspect this is why this happed to me, but haven’t spent time confirming. Nor do I really care as long as it gets resolved.

    1. Hey Paul, good question. I did not uninstall/reinstall WP e-Commerce at any time while editing of my database via phpMyAdmin. This solution worked for me, but your setup may be ever-so-slightly different and not work out. I hope this helps.

  3. I’ve read elsewhere that this is supposed to work, only problem is that my database doesn’t have that table. The only table with ‘product’ in it is wp_wpsc_product_rating…

    Am I looking in the wrong place or something?

    1. Hi Angus,

      I remember at the time I was running WordPress 3.0.1 and WP e-Commerce 3.7.6. Since then, WP e-Commerce has updated many times, and they’re always changing things. I just looked at a recent version of WP e-Commerce’s tables and you’re right, there’s definitely no table named “wp_wpsc_product_order” anymore. You also must be using a recent version and that’s why neither of us is seeing that table anymore.

      It’s been a while since I’ve dug deep into WP e-Commerce and I’ve recently moved on to playing with eShop (http://wordpress.org/extend/plugins/eshop/).

      Sorry I didn’t have an answer for you, Angus.

  4. This solution will work almost every time. This issue occurs when I try to rearrange product by dragging product, after that I refresh the database and see new entries with new order..
    In short, sort ASC
    wp_wpsc_product_order by product_id and order_id. remove duplicated product_id where order_id is old or less than (because changes made assigns new order_id, so old id was for old order). Beware of deleting non-duplicate record.

Leave a Reply

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