News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Order category - products by newest product first

Started by FICBA, May 13, 2012, 12:03:26 PM

Previous topic - Next topic

FICBA

Hi All,

I've looked and looked but I dont seem to be able to find a way of automatically displaying the products in a category by the newest added product first....

For example:-

Category (Summer) -

Product3
Product2
Product1

I know you can click the +/- to reorder the list, but I would like it to show the latest producted added at the top of the list automatically.

Thanks in advance.

Using VM 2.0.0 on Joomla 1.7.3

Julian


renegadesk

Hey buddy, you probably already have this fixed (or gave up!) by now but here's a solution that's worked for me based on the help within this thread http://forum.virtuemart.net/index.php?topic=97284.0

In Product Order Settings I've got Default product sort order set to Creation date and Default category sort order set to Creation Date.

Within /administrator/components/com_virtuemart/models/product.php on after line 366 add this:
$this->filter_order_Dir = 'DESC';   //PL temporary bug fix

so it WAS:


case 'created_on':
$orderBy = ' ORDER BY p.`created_on` ';
break;


NOW it's:


case 'created_on':
$orderBy = ' ORDER BY p.`created_on` ';
$this->filter_order_Dir = 'DESC';   //PL temporary bug fix
break;


That's working for me for showing latest products within category view. Hope that helps and I hope if I need to do this again I can find this post.

giupi

Hello,

(Joomla 2.5.6 + VM 2.0.10)

I would also like to get the products view with the latest on top... this fix it didn't worked for me: no matter if I put DESC or ASC I always get the ordering from oldest to latest and it does not make sense... I have to click on the "order" to get the latest on top.

From what I've read on the forum it seems a VM bug that (maybe) will be fixed on 2.1.

Can someone confirm that or there is something I still miss in renegadesc fixing?

Thanks


namangarg88

@ renegadesk
Your solution is working for back end of Virtuemart product listing but in the front end it is not working.