VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Genius WebDesign on May 25, 2012, 19:34:34 PM

Title: Sort by order in category browse view cannot be changed from ASC to DESC
Post by: Genius WebDesign on May 25, 2012, 19:34:34 PM
Hi

As many have posted before me there is an issue regarding changing the sort by direction from ASC to DESC in the category browse view.
ASC sorting is not always preferred so this is a very annoying problem.

I've tried to modify the .../administrator/components/com_virtuemart/models/product.php  file for individual "orders cases", but with no success..

Pls. advice if there is a solution to this.

Other posts regarding this issue:
http://forum.virtuemart.net/index.php?topic=100546.0
http://forum.virtuemart.net/index.php?topic=96569.0
Title: Re: Sort by order in category browse view cannot be changed from ASC to DESC
Post by: Milbo on May 25, 2012, 19:36:46 PM
Did you tried the latest 2.0.7D?
Title: Re: Sort by order in category browse view cannot be changed from ASC to DESC
Post by: Genius WebDesign on May 31, 2012, 20:24:04 PM
I'm planning on giving the v.2.0.7 a thorough test drive to see all the changes made.
One thing that hasnt changed in the 2.0.7, at least on my install, is that when you apply a %discount to a product and hit save, then the final sales price is wrong. If you hit save once more then the price is correct. This is not the case when you apply a specific amount as discount.. 
Title: Re: Sort by order in category browse view cannot be changed from ASC to DESC
Post by: slammy on June 02, 2012, 14:59:08 PM
Hi,
I have the same issue. I am searching for a solution since two month now. I have started several threats, where I mentioned this issue: I need descending ordering for default btw. case created_on.

Milbo, what do you mean with "did you tried 2.0.7_d." ? Is there a possibility to configure? I´just tried VM 2.0.7_d and can´t find a possibility to switch from asc to desc in the backend.

The only workaround/solution this time is /administrator/components/models/product.php line 343 edit the following

                       
case 'created_on':
$orderBy = ' ORDER BY p.`created_on` ';
$this->filter_order_Dir = ' DESC';               // EDIT THIS LINE BUT READ THE NEXT SENTENCE
break;


If you edit this, you´ll have descending ordering in case created_on - BUT: If you use/display the dropdown-menu for different types of sorting in the category-views (like Product-name, Articlenumber ...), the switching between asc and desc won´t work if you click it.
would be so great if vm would be capable to set up ordering direction for each category.

regards slam
Title: Re: Sort by order in category browse view cannot be changed from ASC to DESC
Post by: Peter Pillen on November 23, 2012, 18:47:10 PM
my fix

checkout http://forum.virtuemart.net/index.php?topic=97045.0 (http://forum.virtuemart.net/index.php?topic=97045.0)

Hope this helps ;)