Explorer tree not displaying set category order

  • Posts: 39
  • Thank you received: 1
9 years 9 months ago #223813

-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.5
-- PHP version -- : 5.5.30

We recently updated HikaShop from version 2.3 to version 2.6 and the ordering of the category tree ("Explorer") has changed. This is the case whether we are working in the Categories or the Products area. When expanding one of the categories in the Explorer tree it looks like the categories are now listed according to when they were set up rather than according to the order set in the categories area.

To clarify, when I am in the Categories area (Products-->Categories) and I click on a category in the Explorer tree I see our list of categories to the right correctly ordered as we originally set them (alphabetically), along with the means to set their order as we wish (using the Order column). But when I click on one of the plus signs in the Explorer tree the list of categories there follows a different and confusing order. This is important because when I switch to the Products area (Products-->Products) and click on one of the plus signs next to a category in the Explorer tree the list of categories comes up in the new confusing order (not alphabetical). Since we have a ton of product categories this is messing with our workflow as we now have to spend extra time hunting for the category we want to interact with.

How do I get it so the Explorer tree category order is the same as the order we set for the categories in the Categories area (like it was in version 2.3)?

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

  • Posts: 13201
  • Thank you received: 2322
9 years 9 months ago #223855

Hi,

Please go in "administrator/components/com_hikashop/classes/category.php" and in the function "getNameboxData()" replace the code:

		if($typeConfig['mode'] == 'list')
			$order = ' ORDER BY c.category_name ASC';
		else
			$order = ' ORDER BY c.category_left ASC';
By:
		if($typeConfig['mode'] == 'list')
			$order = ' ORDER BY c.category_name ASC';
		else
			$order = ' ORDER BY c.category_parent_id ASC, c.category_ordering';
		

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

  • Posts: 39
  • Thank you received: 1
9 years 9 months ago #223910

All better now.

I assume this is a fix I will have to perform after each HikaShop software update. Is this correct?

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

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
9 years 9 months ago #224036

Hi,

Yes.

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.

Time to create page: 0.066 seconds
Powered by Kunena Forum