new categories activated by default

  • Posts: 621
  • Thank you received: 18
  • Hikaserial Subscription Hikashop Business
3 years 8 months ago #322909

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.

  • Posts: 26007
  • Thank you received: 4004
  • MODERATOR
3 years 8 months ago #322940

Hello,

The easier would be to override the HikaMarket view "categorymarket / form" and replace

if(hikamarket::acl('category/edit/published') && empty($this->isVendorRoot)) { ?>
By
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.

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.049 seconds
Powered by Kunena Forum