Ordering products after brand

  • Posts: 299
  • Thank you received: 2
10 years 5 months ago #199466

-- url of the page with the problem -- : www.bil-filtertjanst.se
-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.4.39
-- Browser(s) name and version -- : No browser issue

Hi,
On my new website I am using a customized module to filter Brands + models + build year in order to get the correct products displayed. This filter is working fine but how can I order the Brands in the first filter box the way I want them?
It looks like this now: http://www.awesomescreenshot.com/image/117639/ebcaa15fe3485677cfeee84efb073825

In backend I have it sorted like this in the Products => Brands.
http://www.awesomescreenshot.com/image/117660/2e74b627394e288d33426174c901efd3

So my question is why doesn't frontend display it that way also?

Best regards
Micke

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
10 years 5 months ago #199481

Hello Micke,

how can I order the Brands in the first filter box the way I want them?

A solution can be to directly use the "Order" option through your back-end brand listing page.

So my question is why doesn't frontend display it that way also?

I didn't totally understood your question, do you want your front-end filter do display like the default back-end filter of the product listing page ("Hikashop->Products") ?

Please Log in or Create an account to join the conversation.

  • Posts: 299
  • Thank you received: 2
10 years 5 months ago #199611

Hi Mohamed,

In the first screen shot there is the listing as it is now in the front end for a customer who visits the web shop.
That order is not correct, the order we want is like the second screen shot that is taken from the backend config of the Products => Brands.
I have used the Direct sub elements option from the drop-down to make this ordering.
But this won't have any effect on the displaying in the front end. :(

Please Log in or Create an account to join the conversation.

  • Posts: 84323
  • Thank you received: 13715
  • MODERATOR
10 years 5 months ago #199698

Hi,

I'm not able to look at the page of your screenshot on your website. Could you provide an access/link to it ?
If you use a standard HikaShop brand filter, the brands have to be ordered in the way you ordered them in the backend because the code the code is done, I don't see how it would not be the case.
Now if you have a custom module and don't use the standard filters of HikaShop, it means that there is an "order by" missing in the query loading the brands in that selector and you should see with the developer of the module to add that. It should be really simple.

Please Log in or Create an account to join the conversation.

  • Posts: 299
  • Thank you received: 2
10 years 5 months ago #199736

Hi,
I see what you mean so then the custom module is not totally ok.
Problem is that the developer I used won't do anyting to help me so I guess I have to set my hope on you guys that you one day will adopt this module. Otherwise I will have to live with it as it is.

Please Log in or Create an account to join the conversation.

  • Posts: 84323
  • Thank you received: 13715
  • MODERATOR
10 years 5 months ago #199779

Hi,

I didn't understood that your were the same person that sent us a filter module. I had a quick look.
Change the line:

$query->clear()->select('`category_name`')->from('#__hikashop_category')->where('`category_id`='.$query->quote($jform['filter_0']));
to:
$query->clear()->select('`category_name`')->from('#__hikashop_category')->where('`category_id`='.$query->quote($jform['filter_0']))->order('category_ordering ASC');
in the helper.php file of the module and that will do the ordering on the brands.

The following user(s) said Thank You: LAMF

Please Log in or Create an account to join the conversation.

  • Posts: 299
  • Thank you received: 2
10 years 4 months ago #199948

Hi Nicolas,
Yes it's me :-)
I have made the changes to the helper.php file and it sort of helped but strangely not all of them....
See this screenshot: docs.google.com/file/d/0B1796ZOMWxCJdnk1...VU/edit?usp=drivesdk

I have in backend set the Brands ordering up like this and it all looks just fine:
docs.google.com/file/d/0B1796ZOMWxCJUzkz...kE/edit?usp=drivesdk
So what can be wrong with the ordering?
Best regards,
Micke

Please Log in or Create an account to join the conversation.

  • Posts: 84323
  • Thank you received: 13715
  • MODERATOR
10 years 4 months ago #200026

Hi,

Try to also change the line:

$query->clear() ->select('category_id AS value, category_name AS text') ->from('#__hikashop_category') ->where('category_parent_id IN ('.$filter_value.')') ;
to:
$query->clear() ->select('category_id AS value, category_name AS text') ->from('#__hikashop_category') ->where('category_parent_id IN ('.$filter_value.')') ->order('category_ordering ASC');
Otherwise, I'm afraid it would require proper testing and glancing at your email it looks complex to set that all up to try and reproduce the problem.
Providing support on a custom module we didn't work on is obviously outside what this forum is about.

Please Log in or Create an account to join the conversation.

  • Posts: 299
  • Thank you received: 2
10 years 4 months ago #200039

Hi,
Thanks it helped almost...
It orders all of them but two.. So I guess those two must be some kind of weird.
Anyway thanks for helping with this custom made module even though it is out of the standard box.

Best regards
Micke

Please Log in or Create an account to join the conversation.

Time to create page: 0.170 seconds
Powered by Kunena Forum