VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: aminweb on November 22, 2018, 23:23:29 PM

Title: sort products by latest and in stock
Post by: aminweb on November 22, 2018, 23:23:29 PM
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
Title: Re: sort products by latest and in stock
Post by: aminweb on November 23, 2018, 18:21:56 PM
nobody ? any soluation?
Title: Re: sort products by latest and in stock
Post by: aminweb on November 24, 2018, 08:35:05 AM
I want latest products in first list. and  out of stocks products in end of list.
Title: Re: sort products by latest and in stock
Post by: aminweb on December 18, 2018, 17:28:13 PM

nobody ? any soluation?
Title: Re: sort products by latest and in stock
Post by: Studio 42 on December 18, 2018, 22:02:32 PM
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.