- Posts: 43
- Thank you received: 0
HikaMarket default product category
11 years 3 months ago #206201
by DavidThor
HikaMarket default product category was created by DavidThor
-- HikaMarket version -- : 1.6.3
Hi,
Currently the standard value for product category when adding a product in HikaMarket front-end is set to 'Product categories'. How do I change that to a blank value so that every vendor doesn't also add products to the root by mistake in addition to the actual/intended product category?
Not all vendors will understand the need to remove/delete the root category.
Thanks,
David
Hi,
Currently the standard value for product category when adding a product in HikaMarket front-end is set to 'Product categories'. How do I change that to a blank value so that every vendor doesn't also add products to the root by mistake in addition to the actual/intended product category?
Not all vendors will understand the need to remove/delete the root category.
Thanks,
David
Please Log in or Create an account to join the conversation.
11 years 3 months ago #206204
by Jerome
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.
Replied by Jerome on topic HikaMarket default product category
Hi,
In the view "productmarket | form", replace
By
Regards,
In the view "productmarket | form", replace
Code:
$categories = null;
if(!empty($this->product->categories))
$categories = array_keys($this->product->categories);
Code:
$categories = null;
if(!empty($this->product->categories) && !empty($this->product->product_id))
$categories = array_keys($this->product->categories);
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.
The following user(s) said Thank You: DavidThor
Please Log in or Create an account to join the conversation.
11 years 3 months ago #206229
by DavidThor
Replied by DavidThor on topic HikaMarket default product category
Thanks. Perfect! //David
Please Log in or Create an account to join the conversation.
6 years 3 months ago #319889
by liaskas
Replied by liaskas on topic HikaMarket default product category
Sorry for bringing back a 4 years old thread.
We have the same issue exactly so we applied Jerome's suggestion and the 'Product categories' indeed disappear when creating a product!
So far, so good!
Moving a little bit further we creates a test product leaving "Product categories" blank. When we saved the new product the 'Product categories' value was assigned to the product automatically.
Our question is...
Can we set the field "Product categories" to be mandatory so that the product is not created if left blank?
Thank you
We have the same issue exactly so we applied Jerome's suggestion and the 'Product categories' indeed disappear when creating a product!
So far, so good!
Moving a little bit further we creates a test product leaving "Product categories" blank. When we saved the new product the 'Product categories' value was assigned to the product automatically.
Our question is...
Can we set the field "Product categories" to be mandatory so that the product is not created if left blank?
Thank you
Please Log in or Create an account to join the conversation.
6 years 3 months ago #319930
by Jerome
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.
Replied by Jerome on topic HikaMarket default product category
Hello,
The HikaMarket (and HikaShop) algorithms are made to set-up a category if nothing is specified.
By default, HikaMarket will use the current category (you were browsing the vendor product listing) or "vendor root category".
I'm afraid that to change that, it will require to modify the HikaMarket core, the usage of the trigger "onBeforeProductCreate" could work but the way to detect that HikaMarket fill that empty field could be tricky.
Regards,
The HikaMarket (and HikaShop) algorithms are made to set-up a category if nothing is specified.
By default, HikaMarket will use the current category (you were browsing the vendor product listing) or "vendor root category".
I'm afraid that to change that, it will require to modify the HikaMarket core, the usage of the trigger "onBeforeProductCreate" could work but the way to detect that HikaMarket fill that empty field could be tricky.
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.173 seconds