Author Topic: product ordering in category not consitent  (Read 502 times)


  • Contributing Developer
  • Jr. Member
  • *
  • Posts: 86
    • One Page Checkout for Virtuemart 2
product ordering in category not consitent
« on: December 05, 2018, 16:41:18 pm »
hello, i would like to mention a little bug within product ordering at category view:

1. when you order by PRICE DESC
2. and click another category, shop will order by PRICE ASC

i.e. it does remember "order by" field, but it does not remember the direction shop navigation

i would suggest either:
- it should not remember ordering at all for other categories
- or it should remember the direction as well

also as secondary ordering i would suggest to use p.pordering instead of p.virtuemart_product_id

for price ordering it would make sense not to display products which have NULL or 0 price since it is not what customers are looking for when they sort by price.

last product ordering in latest VM is handled with:
$last_ordering = $productModel->getLastProductOrdering();

but it's missing "direction" counterpart.

for my own purposes i fixed this to make it consitant with

$session->set('vmlastproductordering', 0, 'vm');

so it resets ordering to default upon each display of the category view (exception when it's included in the URL)

best regards, stan

Your customized checkout solution for Virtuemart

Ventsi Genchev

  • Jr. Member
  • **
  • Posts: 303
    • Audio Store
Re: product ordering in category not consitent
« Reply #1 on: December 05, 2018, 22:37:56 pm »
Hello Stan,

I wrote about this topic here:

It's a little longer, but it fixes the problems I've described.
Audio Store: - Bulgarian language - English