Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I recently became an admin of a WordPress site, for the purpose of setting up a store. I have little WordPress knowledge, so I will try to be as specific as I can. I am using the WP e-commerce plug in, version 3.7.6.7

Someone else was originally in charge of the store and added some items, since then we updated the word press version and I added many more items. The store page was set to display all items and it displayed them alphabetically.....

While I was adding it items, editing stock #s, etc, at some point some items started showing up twice in the store. I also noticed it wasn't showing up all of the items, while duplicating others. In the admin section, all of my items are listed correctly - just on the products-page there are duplicates. Not knowing any better solution, I duplicated several items and deleted the originals and everything was showing up only once.

Having grown the store in # of items, I went into appearance settings and changed it to be listed 10 items per page. Then selected "drag and drop" to arrange the items. When I went to arrange them, only a partial list of items came up, so I changed it back to alpha. When I did this, all of the items that were on my partial list from the drag and drop section were now duplicated in the store.

So in two completely different scenarios, I've somehow ended up with items showing up twice. How can I fix this and prevent it from happening again when I make changes?

share|improve this question

2 Answers 2

First, I'd verify that whether or not there are duplicates in the database. If so, then it may be the plugin that has a bug. You can remove the duplicates from MySQL.

If not, then it may be that the template that has problems.

Most definitely, always, always, always backup your MySQL tables prior to switching versions of wordpress or database affecting plugins.

share|improve this answer

It seems to stem from when you try to drag and drop to rearrange the order of your products. There is a bug with this and it often ends up creating a second copy of the product in the database.

If you do require a specific order for your products, you will have to filter the category view right down to the specific category you want to reorder. If you are in the product view that shows all products regardless of category, then this will just cause the problem to reoccur if you rearrange products in this view.

Also, DO NOT set your presentation view to "Drag and Drop". Try setting it to "Time Uploaded" and then drag and drop on a per category view.

Ok so the above is the cause and the prevention, now for the cure;

You need to edit the DB tables via PHPMyAdmin, on the wp_wpsc_product_order. Sort by Product ID and you will see there are duplicates, but only of the products you tried to rearrange. There will be a different Order ID to reflect the ones you tried to rearrange. Delete one of them.

Of course, make a backup before you start meddling ;)

Michael

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.