prevent product approved removal

  • Posts: 105
  • Thank you received: 2
7 years 10 months ago #258323

-- HikaMarket version -- : 1.6.7

Hello,
how can we enable a vendor to delete his products when they are not approved but prevent him to delete them once they are approved?
Regards
Richard

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 10 months ago #258324

Hi,

As you have notice, there is no such option in HikaMarket.
But it is possible to create a small custom plugin in order to authorize or not the deletion of an HikaShop product.
So the plugin could check the product and see if it is an approved product or not (and also see who is deleting it).

Thanks to that, you can let the "deletion" right to your vendors and the plugin will do the rest !

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: 105
  • Thank you received: 2
7 years 10 months ago #258356

Hi,
That is what I was expecting, unfortunately . Could you please give me some directions on how the plugin should be built?
Regards
Richard

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
7 years 10 months ago #258369

Hi,

Well, you have the HikaShop trigger "onBeforeProductDelete"
www.hikashop.com/support/documentation/6...nBeforeProductDelete

Thanks to that trigger your plugin can be call before a product is being deleted.
Then you can check if you're in the backend on in the front-end.
And if you're in the front-end you can check which vendor is connected.
Afterwards, you can perform a little query to load the data about the products which are being deleted and authorize the data in input regarding if the products are approved 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.

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