Sort by latest in manufacturer under menu?

ThemeBurn SupportForumsOpenCart ThemesShoppica 2 OpenCart ThemeSort by latest in manufacturer under menu?

This topic has been marked as not a support question.

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!

November 17, 2014 at 10:29 pm #34473
You will need to register in order to post topics and read replies in the ThemeBurn.com support forums!
November 24, 2014 at 4:19 pm #34804

Ok thanks, i’ll give a try later!

November 24, 2014 at 4:22 pm #34806

The code for the sort order should be the same as for the other pages :)

BR,
ThemeBurn team

November 24, 2014 at 4:24 pm #34808

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

November 24, 2014 at 4:28 pm #34809

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

November 24, 2014 at 4:39 pm #34811

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

November 24, 2014 at 4:50 pm #34815

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…

November 24, 2014 at 6:32 pm #34822

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..

December 16, 2014 at 5:42 pm #35728

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

December 17, 2014 at 6:35 pm #35790

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!

December 18, 2014 at 11:36 am #35821
Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.