Skip to main content

new categories activated by default

6 years 3 months ago #322909 by patoushka
hello,

when a vendor create a new category, by default, it is not activated.

Is there a way to make this option activated by default? If yes, how to achieve that?

Many thanks,

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

6 years 3 months ago #322940 by Jerome
Hello,

The easier would be to override the HikaMarket view "categorymarket / form" and replace
Code:
if(hikamarket::acl('category/edit/published') && empty($this->isVendorRoot)) { ?>
By
Code:
if(hikamarket::acl('category/edit/published') && empty($this->isVendorRoot)) { if(!isset($this->category->category_published)) $this->category->category_published = 1; ?>
So when the vendor will create a new category, the "published" value will be set at "yes" by default.
Please note that the override will not work if the vendor do not have the "category / edit / published" ACL.

Regards,

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

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

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