Hi there,
I’ve successfully changed the sort order options so that it also has a Newest to Oldest sorting, by default, in categories, search, manufacturers etc.
However, when i go to any manufacturer through the shoppica top menu (under the subcategories) i have the default sorting options, and it’s no longer sorting by latest products.
I have no idea which files i would change, so i’m asking for some help.
Thanks!
|
|
You will need to register in order to post topics and read replies in the ThemeBurn.com support forums!
|
|
Ok thanks, i’ll give a try later!
|
|
The code for the sort order should be the same as for the other pages
BR,
ThemeBurn team
|
|
You woulnd’t know how to make a sort by bestselling products, would you?
I’ve been trying to make that, but as it’s not something that opencart allows you to do originally, i think you need to make a special sql query on the database..
But so far i haven’t managed to find out how… and apparently no one in the oc forum can too…
here’s the oc forum thread:
http://forum.opencart.com/viewtopic.php?f=20&t=133844
|
|
Hi,
Unfortunately, the “sort by best selling product” option will really require a custom DB query and a lot more fuss.
We’ve found a similar topic that could be useful for you (if you haven’t checked it yet):
http://stackoverflow.com/questions/16057751/opencart-sort-by-bestselling-product
BR,
ThemeBurn team
|
|
Yeah that’s what i thought. I think i got everything ready, except the sql query… but i’m no coder so i really can’t get there by myself now..
Yep i found that topic as well, but none of that really work. I’ve found a few more that were also helpful, but nothing to make it work no…
But it would be really nice to have that
|
|
Hi again,
I’ve actually changed the code in the file you said:
tb_themes/shoppica2/catalog/controller/BrandCategoryController.php
i’ve added this in my vqmod file:
<file name="tb_themes/shoppica2/catalog/controller/BrandCategoryController.php">
<operation>
<search position="replace"><![CDATA[$sort = 'p.sort_order';]]></search>
<add><![CDATA[
$sort = 'p.date_added';
]]></add>
</operation>
<operation>
<search position="replace"><![CDATA[$order = 'ASC';]]></search>
<add><![CDATA[
$order = 'DESC';
]]></add>
</operation>
</file>
But it didn’t made any difference at all.
If you check this page here:
http://www.theportugalonlineshop.com/index.php?route=category/manufacturer&c_id=20&man_id=41
You’ll see that the sorting options are completely different from the ones in categories or the manufacturers under brands…
|
|
Hi again,
But you said that the order for the manufacturers under the menu was this file:
“Hi,
The sort order of the custom filter can be changed from:
tb_themes/shoppica2/catalog/controller/BrandCategoryController.php
BR,
ThemeBurn team”
And i changed it as you said, and now you say it’s more complicated? I know how to change the sorting order, but in that file it doesn’t work at all..
So probably there are more files to change..
|
|
Sorry, we’ve meant the “sort by bestseller” option.
The “sort by date added” option should work. We’ve tested it with p.price locally and it works. Have you tried to modify the file without vQmod? Generally, all files under tb_themes should be rewritable with vQmod, but just for a case.
BR,
ThemeBurn team
|
|
Ah, yes – the sort by bestseller is tougher i know. Some sql query will be needed as well, so i’ll leave that for now.
I’ll try your suggestion for the manufacturers.
Thanks!
|
|