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

#   Function for product's front page display ?

##

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

Less More

- Posts: 25
- Thank you received: 1
-
-

8 years 10 months ago [\#283929](#283929) by [Krok](/forum/user/49481-krok "View Krok's Profile")  *[Function for product's front page display ?](/forum/31-development/893079-function-for-products-front-page-display#283929 "Hello, i currently develop a plugin for hikashop product's but i have a problem, in my plugin I use onHikashopAfterDisplayView function for display my html but this function is triggered when all...")* was created by *[Krok](/forum/user/49481-krok "View Krok's Profile")*

Hello, i currently develop a plugin for hikashop product's but i have a problem, in my plugin I use onHikashopAfterDisplayView function for display my html but this function is triggered when all views of hikashop is loading and in my product page, 7 views of hikashop has triggered for display the informations, the image i believe, the trigger buttons (add to cart, add to wishlist, the price of product) so I woud like know if they are a function triggered when is the product front page.
Thanks for your futur replies Benjamin.

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

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86283
- Thank you received: 14262
-
-

8 years 10 months ago [\#283932](#283932) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Function for product's front page display ?](/forum/31-development/893079-function-for-products-front-page-display#283932 "Hello, i currently develop a plugin for hikashop product's but i have a problem, in my plugin I use onHikashopAfterDisplayView function for display my html but this function is triggered when all...")*

Hi,

In the onHikashopAfterDisplayView function, you have a parameter $view.
You can use:
$view-&gt;getLayout()
and :
$view-&gt;getName()
to get the task of the page and the controller of the page.
For example, on the product page main area, it will be "show" and "product".
So that way, you can check on which area to display your element.

Also, on the product page, you can use instead onHikashopBeforeDisplayView and add your HTML in the $view-&gt;extra_data array.
You can check the show_default view file for the keys you can use in the array based on where you want to add your HTML on the product page.

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

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

Less More

- Posts: 25
- Thank you received: 1
-
-

8 years 10 months ago [\#283966](#283966) by [Krok](/forum/user/49481-krok "View Krok's Profile")  Replied by *[Krok](/forum/user/49481-krok "View Krok's Profile")* on topic *[Function for product's front page display ?](/forum/31-development/893079-function-for-products-front-page-display#283966 "Hello, i currently develop a plugin for hikashop product's but i have a problem, in my plugin I use onHikashopAfterDisplayView function for display my html but this function is triggered when all...")*

Thank you so much, it's work on my product page and i don't need javascript to delete my button and my modal.
Tank you

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

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

Time to create page: 0.146 seconds

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

[](#top)
