Author Topic: Sort by order in category browse view cannot be changed from ASC to DESC  (Read 3648 times)

Genius WebDesign

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 175
    • Genius WebDesign
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

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10070
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Did you tried the latest 2.0.7D?
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Genius WebDesign

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 175
    • Genius WebDesign
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.. 

slammy

  • Jr. Member
  • **
  • Posts: 169
  • vm supporter member
  • VirtueMart Version: vm 3.0.x and jml 3.4.5
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

Code: [Select]
                       
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

Peter Pillen

  • Jr. Member
  • **
  • Posts: 223