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

#   How to freeze front end product editing

##

- **[twscott](/forum/user/43011-twscott "View twscott's Profile")**
- [![twscott's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/beer.png)](/forum/user/43011-twscott "View twscott's Profile") Topic Author
- [ Offline](/forum/user/43011-twscott)

Less More

- Posts: 252
- Thank you received: 1
-
-
-
-

10 years 3 months ago [\#247493](#247493) by [twscott](/forum/user/43011-twscott "View twscott's Profile")  *[How to freeze front end product editing](/forum/23-market-how-to/885979-how-to-freeze-front-end-product-editing#247493 "-- HikaShop version -- : HikaShop Business 2.6.3 -- HikaMarket version -- : HikaMarket Multivendor 1.7.0 -- Joomla version -- : 3.5 -- PHP version -- : 5.5.12  Hi, Can I set the front end product editing to be read only once the product is approved by back end?  Thanks Best Regards")* was created by *[twscott](/forum/user/43011-twscott "View twscott's Profile")*

-- HikaShop version -- : HikaShop Business 2.6.3
-- HikaMarket version -- : HikaMarket Multivendor 1.7.0
-- Joomla version -- : 3.5
-- PHP version -- : 5.5.12

Hi,
Can I set the front end product editing to be read only once the product is approved by back end?

Thanks
Best Regards

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

10 years 3 months ago [\#247499](#247499) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[How to freeze front end product editing](/forum/23-market-how-to/885979-how-to-freeze-front-end-product-editing#247499 "-- HikaShop version -- : HikaShop Business 2.6.3 -- HikaMarket version -- : HikaMarket Multivendor 1.7.0 -- Joomla version -- : 3.5 -- PHP version -- : 5.5.12  Hi, Can I set the front end product editing to be read only once the product is approved by back end?  Thanks Best Regards")*

Hi,

There is no setting to do so, but it could be an interesting feature.

Still, it is possible to add that feature using a custom plugin.
The idea would be to "remove" the save/apply buttons in the toolbar and to refuse the save of an approved product in the front-end.

Thanks to the trigger "onHikamarketBeforeDisplayView(&amp;$view)", you can access to the view object before the display of the view.
You can perform a getName() and a getLayout() to confirm that the view is the product edition ; then you can modify the variable "toolbar" to hide the saving buttons.
With the trigger "onBeforeProductUpdate(&amp;$element, &amp;$do)" you can refuse the saving depending the context (front-end, the logged user is a vendor) and also add a display message. Thanks to it you will be sure that the vendor won't save the products in the front-end.

[ www.hikashop.com/support/documentation/6...ntation.html#product](https://www.hikashop.com/support/documentation/62-hikashop-developer-documentation.html#product)
[ www.hikashop.com/support/documentation/1...arket-developer.html](https://www.hikashop.com/support/documentation/163-hikamarket-developer.html)

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

- **[twscott](/forum/user/43011-twscott "View twscott's Profile")**
- [![twscott's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/beer.png)](/forum/user/43011-twscott "View twscott's Profile") Topic Author
- [ Offline](/forum/user/43011-twscott)

Less More

- Posts: 252
- Thank you received: 1
-
-
-
-

10 years 3 months ago -  10 years 3 months ago [\#247858](#247858) by [twscott](/forum/user/43011-twscott "View twscott's Profile")  Replied by *[twscott](/forum/user/43011-twscott "View twscott's Profile")* on topic *[How to freeze front end product editing](/forum/23-market-how-to/885979-how-to-freeze-front-end-product-editing#247858 "-- HikaShop version -- : HikaShop Business 2.6.3 -- HikaMarket version -- : HikaMarket Multivendor 1.7.0 -- Joomla version -- : 3.5 -- PHP version -- : 5.5.12  Hi, Can I set the front end product editing to be read only once the product is approved by back end?  Thanks Best Regards")*

Hi Jerome,
Sorry but I've read the hikamarket development document and search through the code, I did't find the "onHikamarketBeforeDisplayView" declaration. It only appear once in \administrator\components\com_hikamarket\helpers\hlper.php

> code removed by a moderator

Which folder and filename should I put my code?
Thanks for helpg me

Best regards
Scott

Last edit: 10 years 3 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile"). Reason: [code] is nice

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

10 years 3 months ago [\#247886](#247886) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[How to freeze front end product editing](/forum/23-market-how-to/885979-how-to-freeze-front-end-product-editing#247886 "-- HikaShop version -- : HikaShop Business 2.6.3 -- HikaMarket version -- : HikaMarket Multivendor 1.7.0 -- Joomla version -- : 3.5 -- PHP version -- : 5.5.12  Hi, Can I set the front end product editing to be read only once the product is approved by back end?  Thanks Best Regards")*

Hi,

If you take a look at the HikaShop doc, you will see the HikaShop trigger.
[ www.hikashop.com/support/documentation/6...hopBeforeDisplayView](https://www.hikashop.com/support/documentation/62-hikashop-developer-documentation.html#onHikashopBeforeDisplayView)
Now, HikaMarket have the exact same trigger but for HikaMarket.

> Which folder and filename should I put my code?

Like I wrote, you have to create a plugin :

> Still, it is possible to add that feature using a custom plugin.

So you need to create a Joomla custom plugin.

[ docs.joomla.org/Plugin](https://docs.joomla.org/Plugin)

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

- **[twscott](/forum/user/43011-twscott "View twscott's Profile")**
- [![twscott's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/beer.png)](/forum/user/43011-twscott "View twscott's Profile") Topic Author
- [ Offline](/forum/user/43011-twscott)

Less More

- Posts: 252
- Thank you received: 1
-
-
-
-

10 years 3 months ago [\#248211](#248211) by [twscott](/forum/user/43011-twscott "View twscott's Profile")  Replied by *[twscott](/forum/user/43011-twscott "View twscott's Profile")* on topic *[How to freeze front end product editing](/forum/23-market-how-to/885979-how-to-freeze-front-end-product-editing#248211 "-- HikaShop version -- : HikaShop Business 2.6.3 -- HikaMarket version -- : HikaMarket Multivendor 1.7.0 -- Joomla version -- : 3.5 -- PHP version -- : 5.5.12  Hi, Can I set the front end product editing to be read only once the product is approved by back end?  Thanks Best Regards")*

Hi, Jerome,
I've created a plugin and put public function onHikamarketBeforeDisplayView(&amp;$view) in it.
And I've published the plugin, but it seems never been triggered? Do I have to do other settings?

Best Regards
Scott

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

10 years 3 months ago [\#248213](#248213) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[How to freeze front end product editing](/forum/23-market-how-to/885979-how-to-freeze-front-end-product-editing#248213 "-- HikaShop version -- : HikaShop Business 2.6.3 -- HikaMarket version -- : HikaMarket Multivendor 1.7.0 -- Joomla version -- : 3.5 -- PHP version -- : 5.5.12  Hi, Can I set the front end product editing to be read only once the product is approved by back end?  Thanks Best Regards")*

Hi,

In the HikaMarket front-end product view, there is the activation of the "triggerView", so the trigger will be called by HikaMarket. Code:

class productmarketViewproductmarket extends hikamarketView { protected $triggerView = true;

Now if your plugin trigger is not called it indicates that your plugin is not published or invalid.
Please check that your plugin is right in the group "hikamarket", is right installed and see by your Joomla, that his name is right formed (so Joomla can instantiate the plugin).
You can put an "exit" (or "die") in your class constructor to right check that it is loaded by Joomla.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

The following user(s) said Thank You: [twscott](/forum/user/43011-twscott "View twscott's Profile")

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

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