Post by Troublemaker213 » Mon May 09, 2016 10:27 pm

Hello everyone,
im just wondering how can i add a query to sorting system.
I want to sort my products by order which is default, but if a product's quantity is = 0(which means not in stock), show it last on it's own category.
how can i do this special query?

New member

Posts

Joined
Mon May 09, 2016 10:21 pm

Post by straightlight » Fri May 13, 2016 5:55 am

In Opencart v2.x releases from the category page, products can be filtered by quantity and descending mode.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Troublemaker213 » Fri May 13, 2016 5:56 pm

Hey, thank you very much for your answer but i think i could not explain myself correctly.
I can sort them by quantity and descandable, but then all the products are being sorted Z to A as well.
I dont want that, i just need to display the products that are out of stock which means products that quantity = 0, should be sorted at the and of the category and by ASC.

I thnik that can be done with 5-10 lines of code in product.tpl or category.php :(

New member

Posts

Joined
Mon May 09, 2016 10:21 pm
Who is online

Users browsing this forum: No registered users and 21 guests