Post by SB1777 » Wed Nov 07, 2018 8:43 pm

Hi,

Version 2.3.0.2

Struggling with this one. At the moment the category is set to sort by price. I want to keep it this way but have certain products that appear first regardless of the price. I have tried changing the Sort Order numbers in the edit product page but it does not seem to change anything.

Any help would be greatly appreciated!

Thanks
Last edited by SB1777 on Wed Nov 14, 2018 6:14 pm, edited 1 time in total.

Newbie

Posts

Joined
Tue Jul 31, 2018 1:03 am

Post by straightlight » Thu Nov 08, 2018 5:27 am

Theory posted. More information needed. Forum rules.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

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

Post by SB1777 » Thu Nov 08, 2018 7:26 pm

Okay, to better explain.

On the category page there is 'sort by' which obviously rearranges the product display order depending on price, name a-z etc.

I would just like a selected few "recommended" products to always appear first regardless of the 'sort by'.

In the admin panel under the 'data' tab when editing a product there is 'Sort Order' which i have changed but this still does not solve anything.

Am i missing something or is this a going to be a little harder than initially thought?


It is Version 2.3.0.2 with Journal Theme.

Hope that better explains.


Thanks

Newbie

Posts

Joined
Tue Jul 31, 2018 1:03 am

Post by SB1777 » Mon Nov 12, 2018 7:49 pm

Surely it should be a simple enough task but i still cant seem to figure this one!

Any help or point in right direction is appreciated.

Newbie

Posts

Joined
Tue Jul 31, 2018 1:03 am

Post by straightlight » Mon Nov 12, 2018 9:24 pm

which i have changed but this still does not solve anything.
Lack of details. More information needed. In addition, simplicity as described on the above becomes the complexity when one does not provide the full details of the results encountered.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

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

Post by SB1777 » Mon Nov 12, 2018 9:43 pm

which i have changed but this still does not solve anything.
It is a simple objective that i am trying to achieve. 'does not solve anything' i mean, it did not achieve the simple thing that i am trying to achieve which is make certain products always appear first regardless of the 'sort by' on the category page.

simplicity as described on the above becomes the complexity when one does not provide the full details of the results encountered.
I think you are over complicating it to be honest. Anyone that knows Opencart and sees what i have put should understand what i am asking for,
Sorry if i am wrong but i think it is quite clear when you read it in full context?


It is quite a straightforward issue that i was hoping would be easy to resolve.
I am now thinking i may have to add additional code to controller/product/category.php

Just a point in the right direction from someone who has some expertise would be great, i've still got a lot of learning to do!

Newbie

Posts

Joined
Tue Jul 31, 2018 1:03 am

Post by straightlight » Mon Nov 12, 2018 10:09 pm

I think you are over complicating it to be honest. Anyone that knows Opencart and sees what i have put should understand what i am asking for,
Sorry if i am wrong but i think it is quite clear when you read it in full context?
If the case, a solution would of been posted already also by those who may have the answer on what has been posted from your perception-view. Take note that I have been on this forum for a long time now and when I notice lack of details have been posted, I rather take the chance to notify the OP than leaving the topic in the dark. Forum rules.

The most generated errors being found on Opencart forum originates from contributed programming. The increased post counters are caused by redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

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

Post by SB1777 » Mon Nov 12, 2018 10:42 pm

I respect you are a Legendary Member.

After re-reading my second post which better explains, I am not quite sure how i can give more details.

it seems straightforward and to the point to me though i wrote it so i guess it would! please can you advise on what i need to put, if you read it again do you yourself understand the task i am trying to solve?

Newbie

Posts

Joined
Tue Jul 31, 2018 1:03 am

Post by Johnathan » Tue Nov 13, 2018 2:31 am

There's no way to do this in OpenCart using the settings, so you'd have to modify the controller file yourself. That would be in the controller file you mentioned, you'd have to hard-code some product_id's into the data array, based on the "path" in the URL. It's possible but not simple, so it's something you'd need to know PHP for.

Instead of doing that, I'd recommend using the Featured module to just pin some products at the top of the page. They'll still appear in the product results, but that way you can "highlight" them without modifying any code. To do that, you'd create a module for each category page where you want it to appear, and then create a Layout to host each module. Once you've done that, you can assign each category its own layout in its "Design" tab, so you can get the specific module to appear on that specific category's page.

It's a bit of set-up work depending on how many categories you're doing this for, but a better option than modifying core files, in my opinion.

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by SB1777 » Wed Nov 14, 2018 6:13 pm

I had never thought of using separate layouts and a featured module for each category, took a little time but it is working a treat!

Thank you!

Newbie

Posts

Joined
Tue Jul 31, 2018 1:03 am

Post by Johnathan » Wed Nov 14, 2018 10:30 pm

👍

Image
Image Image Image Image


User avatar
Global Moderator

Posts

Joined
Fri Dec 18, 2009 3:08 am

Who is online

Users browsing this forum: No registered users and 10 guests