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

#   prevent product approved removal

##

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

Less More

- Posts: 105
- Thank you received: 2
-
-

9 years 10 months ago [\#258323](#258323) by [rfonta](/forum/user/30933-rfonta "View rfonta's Profile")  *[prevent product approved removal](/forum/23-market-how-to/888059-prevent-product-approved-removal#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")* was created by *[rfonta](/forum/user/30933-rfonta "View rfonta's Profile")*

-- 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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODg4MDU5LXByZXZlbnQtcHJvZHVjdC1hcHByb3ZlZC1yZW1vdmFsP3RtcGw9bWFya2Rvd24=) 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)
-

9 years 10 months ago [\#258324](#258324) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[prevent product approved removal](/forum/23-market-how-to/888059-prevent-product-approved-removal#258324 "-- 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")*

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

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

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

Less More

- Posts: 105
- Thank you received: 2
-
-

9 years 10 months ago [\#258356](#258356) by [rfonta](/forum/user/30933-rfonta "View rfonta's Profile")  Replied by *[rfonta](/forum/user/30933-rfonta "View rfonta's Profile")* on topic *[prevent product approved removal](/forum/23-market-how-to/888059-prevent-product-approved-removal#258356 "-- 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")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODg4MDU5LXByZXZlbnQtcHJvZHVjdC1hcHByb3ZlZC1yZW1vdmFsP3RtcGw9bWFya2Rvd24=) 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)
-

9 years 10 months ago [\#258369](#258369) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[prevent product approved removal](/forum/23-market-how-to/888059-prevent-product-approved-removal#258369 "-- 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")*

Hi,

Well, you have the HikaShop trigger "onBeforeProductDelete"
[ www.hikashop.com/support/documentation/6...nBeforeProductDelete](https://www.hikashop.com/support/documentation/62-hikashop-developer-documentation.html#onBeforeProductDelete)

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIzLW1hcmtldC1ob3ctdG8vODg4MDU5LXByZXZlbnQtcHJvZHVjdC1hcHByb3ZlZC1yZW1vdmFsP3RtcGw9bWFya2Rvd24=) 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.092 seconds

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