VirtueMart Forum

VirtueMart 2 + 3 + 4 => Installation, Migration & Upgrade => Topic started by: tsapman on February 25, 2016, 23:50:34 PM

Title: Top ten products and latest products problem
Post by: tsapman on February 25, 2016, 23:50:34 PM
Hello,
i have updated a site with PHP 5.3.27
from Joomla! 2.5.28 with VirtueMart 2.6.14
to Joomla! 3.4.8 with VirtueMart 3.0.12

everything works fine but in front page top ten products are always the same with latest products.
Do you have any idea what's going wrong?
Thanks in advance.
Title: Re: Top ten products and latest products problem
Post by: PRO on February 26, 2016, 20:52:40 PM
do you have orders?

top 10 works on sales.

Title: Re: Top ten products and latest products problem
Post by: tsapman on February 27, 2016, 15:47:17 PM
@PRO
No i don't have any orders.
The previous site didn't have orders too, but worked fine.
Is there any problem with the database?

Thank you.
Title: Re: Top ten products and latest products problem
Post by: PRO on February 27, 2016, 21:57:32 PM
what do you mean worked fine?

Top 10 products works by best selling
Title: Re: Top ten products and latest products problem
Post by: GJC Web Design on February 27, 2016, 22:07:05 PM
as Pro says.. needs sales

the query snippet is

case 'topten':
               $orderBy = ' ORDER BY p.`product_sales` DESC, `virtuemart_product_id` DESC';

if there are no sales then will default to product id order

as will Latest if they are all the same date
Title: Re: Top ten products and latest products problem
Post by: tsapman on February 27, 2016, 22:15:44 PM
Ok i understand.
That way was working and the previous version of virtuemart?
I am asking because and the previous version didn't have any orders ever but the the latest and top ten products wasn't the same ever.

Thank you.
Title: Re: Top ten products and latest products problem
Post by: GJC Web Design on February 27, 2016, 22:27:29 PM
no idea... but who cares?  As soon as you add some new prods or make some sales they will be different

maybe its enough to add some "Booked, ordered" in the product status tab
Title: Re: Top ten products and latest products problem
Post by: tsapman on February 27, 2016, 22:34:10 PM
Ok thanks a lot  :)
Title: Re: Top ten products and latest products problem
Post by: PRO on February 28, 2016, 02:05:30 AM
you could always use csv improved to modify the sales of products