I am trying to create a sort by feature for "recommended" on my ecommerce site using the Orderby. Here's a sample of a simple orderby: if($params['sortby'] == 'numpricehl') $query->orderBy('price','desc');
what I am hoping to do is order by rotating values example would be if i have 10 products priced at: (10,20,30,....100) then it would order them like this (low,mid,high,low,mid,high) etc. so that the products would display like this (10,50,100,20,60,80) for example, what would be the best way to go about doing this?
Thanks!
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2Hi28O7
via IFTTT
Aucun commentaire:
Enregistrer un commentaire