Order of categories doesn't work.

  • Posts: 25
  • Thank you received: 0
11 years 6 months ago #138810

-- url of the page with the problem -- : www.loveat.it
-- HikaShop version -- : 2.2.2
-- Joomla version -- : 2.5
-- PHP version -- : x.x.x
-- Browser(s) name and version -- : XXXXX x.x.x
-- Error-message(debug-mod must be tuned on) -- : Error_message

Hi, i have a problem with the order of categories, the order ID is not respected
In attach you may see back office configuration and front end display of categories (in particular Sushi Nighiri and Antipasti).
You may skip 1st page block with: us:tappo pw:tappo

Attachments:

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

  • Posts: 26255
  • Thank you received: 4041
  • MODERATOR
11 years 6 months ago #138893

Hi,

Thanks to your latest screenshot, we figure it out with Nicolas the problem that we weren't able to reproduce.
The sorting a working well but only if you have few categories, when the ordering have "low" numbers (under 2 digits).

The problem come from the function _sortCategories of the file "components/com_hikashop/views/products/view.html.php"
You have to replace

$id = sprintf('0.5%d-0.5%d', $i['category']->category_ordering, $i['category']->category_id);
By:
$id = sprintf('%05d-%05d', $i['category']->category_ordering, $i['category']->category_id);

And also
$id = sprintf('0.5%d-0.5%d-0.5%d', $i['category']->category_depth, $i['category']->category_ordering, $i['category']->category_id);
By
$id = sprintf('%05d-%05d-%05d', $i['category']->category_depth, $i['category']->category_ordering, $i['category']->category_id);

And it will fix the problem.
Sorry for the delay.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 25
  • Thank you received: 0
11 years 6 months ago #138898

Thank you for your help!

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

Time to create page: 0.086 seconds
Powered by Kunena Forum