Category view when the vendor add a product

  • Posts: 31
  • Thank you received: 3
2 years 5 months ago #342317

Hi

Questions about the view when the vendor is adding a new product

a) Is it possible to redesign / overide category view in front for the vendor ?

b) I would like to limit the choice of the vendor to the final level of the category tree ?
Is it possble by configuration ?

Regards

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
2 years 5 months ago #342332

Hello,

a - You can override and customize every HikaMarket views (and every HikaShop views).

b - HikaMarket have a hidden configuration setting "products_only_leaf_categories" which is specially made for that.
(Hidden settings need to be added directly in the configuration table in your database.)

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: 31
  • Thank you received: 3
2 years 5 months ago #342348

Thanks

I inserted the value in table as below
INSERT INTO `xxx_hikamarket_config` (`config_namekey`, `config_value`, `config_default`) VALUES
('products_only_leaf_categories', '1', '1');

But I can always choose any category (from the frontend screen) ...

Is that correct ?

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
2 years 5 months ago #342349

Hello,

The feature do not change the behavior of the "namebox" system, the user can still select any category he wants.
But the option should perform a filtering and remove all new categories which are not leaf categories.

I checked the code and saw that there was a regression in recent release.
Please edit the file "administrator/components/com_hikamarket/classes/product.php" and replace the lines

	$keepCategories = array_intersect($categories, $oldCategories);
	$addedCategories = array_intersect($categories, $leafCategories);
By
	$keepCategories = array_intersect($product->categories, $oldCategories);
	$addedCategories = array_intersect($product->categories, $leafCategories);
It should restore the filtering while saving the product.

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.

Moderators: Obsidev
Time to create page: 0.059 seconds
Powered by Kunena Forum