News:

Support the VirtueMart project and become a member

Main Menu

sort products by latest and in stock

Started by aminweb, November 22, 2018, 23:23:29 PM

Previous topic - Next topic

aminweb

hi,
how to set virtuemart config for sorting product by two value :  latest products and in stock  products.
explain :  show products list default sort by  in first list(top) latest products(in stock) ----------- in end of list product  old products(out stock)

please help me
so thanks

aminweb


aminweb

I want latest products in first list. and  out of stocks products in end of list.

aminweb


Studio 42

If you need it for all views, then you have to override the product model using a system plugin for eg.
A bad way is to modify directly the product model.
The query is not so easy to find, because using sort by latest and stock do not give the right result.