Skip to main content

Function for product's front page display ?

More
8 years 9 months ago #283929 by Krok
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 or Create an account to join the conversation.

More
8 years 9 months ago #283932 by nicolas
Hi,

In the onHikashopAfterDisplayView function, you have a parameter $view.
You can use:
$view->getLayout()
and :
$view->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->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 or Create an account to join the conversation.

More
8 years 9 months ago #283966 by Krok
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 or Create an account to join the conversation.

Time to create page: 0.229 seconds
Powered by Kunena Forum