Author Topic: 1 product in 2 categories appears twice in vm latest products scroller  (Read 3694 times)

w-kennedy

  • Beginner
  • *
  • Posts: 1
Is there a way to have a product appear only once in the scroller if it is listed in two categories? I am building an online book club/store and have some books listed in more than one category (i.e. Geo. Washington might be in biography and history.) As it is, the book shows up side-by-side in the scroller twice! Anyone have a suggestion? view the problem at
www.theirishbookclub.com
Thanks in advance.

akeem76

  • Beginner
  • *
  • Posts: 18
Re: 1 product in 2 categories appears twice in vm latest products scroller
« Reply #1 on: December 18, 2008, 09:13:24 am »
I have the same problem too... still waiting for the solution.

kostasa01

  • Beginner
  • *
  • Posts: 3
Re: 1 product in 2 categories appears twice in vm latest products scroller
« Reply #2 on: January 05, 2009, 17:35:56 pm »
I have the same problem.. It can't be so difficult!!
It must be some changes in sql code in
modules\mod_productscroller\mod_productscroller.php

For example, if the category that i don't want to be showed in this module has the id 10, which is the code to except category id 10?

I have been googling for this answer, but no result.. 
Please help!

magicien

  • Beginner
  • *
  • Posts: 6
I've found a solution ! It's in the SQL request made to collect new products.
It selects n (defined in the conf panel) products from the database :
Code: [Select]
$query = "SELECT p.product_sku FROM #__{vm}_product AS p"; (line 257)

If you want to see only once the product, just modify the line with :

Code: [Select]
$query = "SELECT DISTINCT p.product_sku FROM #__{vm}_product AS p";
It works well on my site (http://www.magicmysteries.com) on the right column.

Have a nice day !

Julien