- Posts: 628
- Thank you received: 18
new categories activated by default
6 years 3 months ago #322909
by patoushka
new categories activated by default was created 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,
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
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic new categories activated by default
Hello,
The easier would be to override the HikaMarket view "categorymarket / form" and replace
By
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,
The easier would be to override the HikaMarket view "categorymarket / form" and replace
Code:
if(hikamarket::acl('category/edit/published') && empty($this->isVendorRoot)) { ?>
Code:
if(hikamarket::acl('category/edit/published') && empty($this->isVendorRoot)) {
if(!isset($this->category->category_published)) $this->category->category_published = 1;
?>
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