Admin left sidebar manufacturer tree explorer

  • Posts: 42
  • Thank you received: 1
9 years 4 months ago #208763

-- url of the page with the problem -- : localhost
-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.3
-- PHP version -- : 5.5.12
-- Browser(s) name and version -- : Firefox 37.0.2
-- Error-message(debug-mod must be tuned on) -- : Console says each time:
empty string passed to getelementbyid() :: jquery.min.js:2:0

Hi,

as you will see at prntscr one, I have many manufacturers created, manufacturers have series, so for example manufacturer tree looks like this:

manufacturers
- Some manufacturer name1
-- Some series name1
...
- some manufacturer name2
-- some series name2
...

and so on...

While browsing manufacturer tree (under explorer /left sidebar/) I have a plus sign [+] opposite to manufacturer name if it has series inside (print screen one) - that's ok.
If I click that plus sign no series are appearing and plus sign is disappearing (print screen two) - that's not ok.

If I click on manufacturer name (not plus sign) you can see on the righ all series from this manufacturer /the plus sign is reappearing/ (print screen three).
Still while in manufacturer which has series inside, clicking on plus sign just hides it and no manufacturer categories from level2 are appearing.

For product category tree all plus signs are working fine.

What's wrong? :(

EDIT:
also I noticed I can't choose manfuacturer name while creating products (only series are available/visible) inside Brand input field.

Best regards,
Chris

Attachments:
Last edit: 9 years 4 months ago by Gnsbud.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
9 years 4 months ago #208772

Hi,

The thing is that you're not supposed to have several layers of brands.
I've actually spent the time to look at that and display properly the brands in the explorer, but you might experience other issues when doing that so I would recommend against it.
The modifications to do are:

if($typeConfig['mode'] == 'list')
to:
$mode = !empty($options['mode']) ? $options['mode'] : @$typeConfig['mode'];
	if($mode == 'list')
(3 itmes in the file) in the file administrator/components/com_hikashop/classes/category.php
$ret = $nameboxType->getValues($search, 'category', $options);
to:
		$type = 'category';
		if($category_id){
			$categoryClass = hikashop_get('class.category');
			$category = $categoryClass->get($category_id);
			if($category->category_type=='manufacturer'){
				$type = 'brand';
				$options['mode'] = 'tree';
			}
		}


		$ret = $nameboxType->getValues($search, $type, $options);
in the file adminsitrator/components/com_hikashop/controllers/category.php
and:
if((!empty($typeConfig['mode']) && $typeConfig['mode'] == 'list') && empty($typeConfig['options']['olist']['table']) && !is_string(reset($elements))) {
to:
$mode = !empty($options['mode']) ? $options['mode'] : @$typeConfig['mode'];
		if($mode == 'list' && empty($typeConfig['options']['olist']['table']) && !is_string(reset($elements))) {
in the file administrator/components/com_hikashop/types/namebox.php

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

  • Posts: 42
  • Thank you received: 1
9 years 4 months ago #209051

Hi Nicolas,

thanks to your codes explorer is working fine now, however still I can't add manufacturer to product (while crating product on backend), I have available only my series (level two of brand tree), there're no level 1 brands (manufacturers).

Best regards,
Chris

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

  • Posts: 42
  • Thank you received: 1
9 years 4 months ago #209059

... What's more, the series whcih I have visible in brand input field while creating product - now I can see that some brands have the same series, so I have double entries and I don't know which one is from which manufacturer :( Maybe I'm wrong, but in Hikashop 2.4.0 wasn't possible to choose manufacturer categories in the same input field as categories from "product category"?

To be honest, it's wired that such great eCommerce solution like Hikashop doesn't have possibility to choose many manufacturers to one product. Things like two manufactuers to one product are happening for example if you're selling books, you will have co-edition of two manufacturers which are quite equal each to another, so selecting only one is not true.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 4 months ago #209062

Hi,

The manufacturer is stored in the database, in the column "product_manufacturer_id".
This field only accept one manufacturer and it allows to perform filters (and more).
Allowing several manufacturer is possible but it will require some modifications in the core and it could break how some plugins are working (when they are dealing with manufacturers). It will also need modifications in all different parts in HikaShop to handle the core modification.

We are aware of that like we are aware that the manufacturer system was not design to allow tree organization of the brands.
Because even if a manufacturer is stored as a category in the database, in the same way than the order statuses, the goal is not to organize them in tree.
Even in the front-end, when you create a manufacturer filter, the filter is just a dropdown and it won't manage the tree structure.

So, that's right that we authorized that tree organization in the interface but at the beginning, it hasn't been design to be used like that.

One interesting point with the namebox system, is that it manage different modes. So with some little modification it could be possible to select the brands like you can select a category (with a "tree" display and not a "list" one).
And like I start to write in the beginning, the multi-manufacturer is in our TODO list but it will require some time to do it right.

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: 42
  • Thank you received: 1
9 years 4 months ago #209199

Hi Jerome,

ok, thank you for clarifying the situation. I guess I'll have to rebuild my category tree, I'll not use manufacturer multi-levels for now.

Best regards,
Chris

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

Time to create page: 0.066 seconds
Powered by Kunena Forum