[Skip to main content](#vessel-content)

#   new categories activated by default

##

- **[patoushka](/forum/user/6145-patoushka "View patoushka's Profile")**
- [![patoushka's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/6145-patoushka "View patoushka's Profile") Topic Author
- [ Offline](/forum/user/6145-patoushka)

Less More

- Posts: 628
- Thank you received: 18
-
-

6 years 3 months ago [\#322909](#322909) by [patoushka](/forum/user/6145-patoushka "View patoushka's Profile")  *[new categories activated by default](/forum/23-market-how-to/900582-new-categories-activated-by-default#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,")* was created by *[patoushka](/forum/user/6145-patoushka "View patoushka's Profile")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vOTAwNTgyLW5ldy1jYXRlZ29yaWVzLWFjdGl2YXRlZC1ieS1kZWZhdWx0P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

6 years 3 months ago [\#322940](#322940) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[new categories activated by default](/forum/23-market-how-to/900582-new-categories-activated-by-default#322940 "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,")*

Hello,

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

if(hikamarket::acl('category/edit/published') &amp;&amp; empty($this-&gt;isVendorRoot)) { ?&gt;

By Code:

if(hikamarket::acl('category/edit/published') &amp;&amp; empty($this-&gt;isVendorRoot)) { if(!isset($this-&gt;category-&gt;category_published)) $this-&gt;category-&gt;category_published = 1; ?&gt;

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 &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vOTAwNTgyLW5ldy1jYXRlZ29yaWVzLWFjdGl2YXRlZC1ieS1kZWZhdWx0P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

Moderators: [Obsidev](/forum/user/7040-obsidev "View Obsidev's Profile")

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.063 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
