AbanteCart Community

Shopping Cart Operations => Support => General Support => Topic started by: Gordon Taylor on June 06, 2015, 12:32:56 PM

Title: Products Showing More than Once
Post by: Gordon Taylor on June 06, 2015, 12:32:56 PM
I have several instances of a product showing up in the same category twice.

In the admin panel, under products or categories, they are only listed once.

And the products, when clicked on, go to the same product page, so it's not like there are different copies of the products in question.

Any ideas guys?

+++++++++++++++++++++++++++++++ Update++++++++++++++++++++

I checked DB and nothing is duplicated there either.

I have noticed that if I change the sort option on the category view, it changes which products are duplicated. Very strange.
Title: Re: Products Showing More than Once
Post by: abantecart on June 06, 2015, 05:12:04 PM
This sounds like an incorrect sql join. Where does this happen? Is this something custom you work on?
Title: Re: Products Showing More than Once
Post by: Gordon Taylor on June 06, 2015, 05:56:23 PM
No, nothing custom at all. It seems to be dependent on the number of items the user chooses to display within the category. llegrand was able to duplicate, and it's not browser specific.

i.e. Choose to display 25 items and the duplicates change. In fact, there are even items that don't belong in that category. Go to 40 items to display and the duplicates change again.

I am running 1.2.1

Caches have been cleared also. The fact that llegrand can see it tells me it's the cart, not me.

Here's the link,

https://naturalhandcraftedsoaps.com/secure/nearly-natural-hand-crafted-soaps

Notice that Sweepea and red clover tea are repeated on the second page.

Switch the view to 45 items, the dupes are gone. Change it to 25 and you'll see a soap Vanilla Sugar Goats Milk at the bottom of the first page that is out of category, it doesn't show when the quantity to view is 40 or 45.


Title: Re: Products Showing More than Once
Post by: webdevmerc on June 07, 2015, 09:58:33 AM
I am playing around with your site and am wondering if this is due to a sort preference?

For example, when I click on your link, I see the Sweet Pea, but if you look at the sort preference of the linked page in your message, it is sorted by A-Z.

When you click on Page 2, it's sorted by Default making the Sweet Pea pop up again.

If you select sort by A-Z on Page 2, the Sweet Pea is not there anymore making me think that the Sweet Pea item was added earlier, but the sort preference is changing when you click from Page 1 to Page 2 making it look like the items are duplicated when they probably aren't.

If you keep using the same sort preference, the items don't seem to duplicate anymore.



EDIT:
Hmm, playing around with my site, I think the "bug" is that if you sort by a preference OTHER THAN default, clicking on page 2 puts your sort preferences BACK to default causing some display problems to pop up.

Title: Re: Products Showing More than Once
Post by: Gordon Taylor on June 07, 2015, 11:04:38 AM
At least I'm not alone! And yes, sort affects it too!
Title: Re: Products Showing More than Once
Post by: webdevmerc on June 07, 2015, 11:30:13 AM
Maybe this can just be reclassified and submitted as a sort bug since that seems to be the actual problem.

The arrow keys on product pages are utilizing the default sort preference, not the setting based on the "Sort Products as default by:" setting on the admin tool.

If you go to this link first and use the default sort option, page 2 won't have the problem anymore.
https://naturalhandcraftedsoaps.com/secure/nearly-natural-hand-crafted-soaps&sort=p.sort_order-ASC&limit=40
Title: Re: Products Showing More than Once
Post by: Basara on June 08, 2015, 04:20:45 AM
Bug confirmed. Thank you
https://github.com/abantecart/abantecart-src/issues/151
Title: Re: Products Showing More than Once
Post by: abolabo on June 09, 2015, 05:55:41 PM
Issue fixed https://github.com/abantecart/abantecart-src/commit/bd1f14b5411844d5f97258e0f0260f611c2b41ef