Have the add category unpublished by default when creating in front

  • Posts: 1025
  • Thank you received: 11
  • Hikashop Business
4 years 6 months ago #310629

Hi Jerome
I m strungling to make it less dangerous from th front end. I mean a vendor can create a category but its published by default . I tried with Jquery to have this button disabled and status (0) .
When I save its pubished even if I can see it that it is to state unpublished before saving.

I need that because I need the vendor to add the categories an the right parent category (not theirs vendor category), but I dont want to let them destroy my categories

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

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
4 years 6 months ago #310634

Hello,

If you remove the ACL for the category publish ; your vendors would be able to create new categories but won't be able to change that state. And, in such case, the category will be unpublish by default.
You will have the control for the validation (and publishing) of the category but you will be sure that you keep a control on the category creation.

Otherwise, I would suggest a view override if you want to change the default state ; in PHP you can detect if you're creating a category or not (because you have a category_id, or not).

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.

  • Posts: 1025
  • Thank you received: 11
  • Hikashop Business
4 years 6 months ago #310647

I tried but its bydefault published

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

  • Posts: 1025
  • Thank you received: 11
  • Hikashop Business
4 years 6 months ago #310648
Attachments:

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

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
4 years 6 months ago #310682

Hello,

Your screenshot is to small to be able to read your ACL configuration ; but I suppose that you wanted to show me that you remove 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.066 seconds
Powered by Kunena Forum