Author Topic: sort products by latest and in stock  (Read 776 times)

aminweb

  • Beginner
  • *
  • Posts: 14
  • A beginner
sort products by latest and in stock
« 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

aminweb

  • Beginner
  • *
  • Posts: 14
  • A beginner
Re: sort products by latest and in stock
« Reply #1 on: November 23, 2018, 18:21:56 pm »
nobody ? any soluation?

aminweb

  • Beginner
  • *
  • Posts: 14
  • A beginner
Re: sort products by latest and in stock
« Reply #2 on: November 24, 2018, 08:35:05 am »
I want latest products in first list. and  out of stocks products in end of list.

aminweb

  • Beginner
  • *
  • Posts: 14
  • A beginner
Re: sort products by latest and in stock
« Reply #3 on: December 18, 2018, 17:28:13 pm »

nobody ? any soluation?

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3821
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: sort products by latest and in stock
« Reply #4 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.