Page 1 of 1

[SOLVED] Different sort_order for specific category

Posted: Thu Apr 08, 2021 5:55 pm
by prototype0104
Hi guys! I'm using OpenCart 3.0.3.2
I have some products that need different sort_order by category
Example:
Product 1 in category 1 need sort_order 1
Product 1 in category 2 need sort_order 2
I found some topics here but nothing solved..
I added sort_order column in product_to category to have:
id_product id_category and sort_order
Now I think to edit getProducts function and include JOIN function to get sort_order from o2c.
so I can order by sort_order from oc2.
What do you think?
Any other idea?

Re: Different sort_order for specific category

Posted: Thu Apr 08, 2021 6:49 pm
by paulfeakins
prototype0104 wrote:
Thu Apr 08, 2021 5:55 pm
Any other idea?
If you can't find an extension, you could pay a developer such as ourselves or post a job in the Commercial Support Forum.

Re: Different sort_order for specific category

Posted: Thu Apr 08, 2021 8:02 pm
by prototype0104
Paying for what? I just requested an opinion.
I added order by p2c.part_number in model and it's all good..

Re: Different sort_order for specific category

Posted: Thu Apr 08, 2021 8:32 pm
by straightlight
prototype0104 wrote:
Thu Apr 08, 2021 8:02 pm
Paying for what? I just requested an opinion.
I added order by p2c.part_number in model and it's all good..
Now that you have resolved your own issue, please add [SOLVED] at the front of the subject line on the first post.