Jump to content

Товары со скидкой на главной случайным образом?


Recommended Posts

Была тема как сделать случайную сортировку хитов продаж... а подскажите как такое же сделать но только для товаров со скидкой на главной?

Link to post
Share on other sites

точно так же, только $order = 'RAND()'; нужно вставить после if(!empty($filter['discounted']))
$discounted_filter = $this->db->placehold('AND (SELECT 1 FROM __variants pv WHERE pv.product_id=p.id AND pv.compare_price>0 LIMIT 1) = ?', intval($filter['discounted']));

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...