Skip to main content

onHikashopAfterDisplayView double printed

More
10 years 2 weeks ago #249508 by shahryarjb
hi
my code
Code:
function onHikashopAfterDisplayView(&$view) { echo "hello"; }
plz see pic (attached)

I need a print (1 time) in the page
tnq

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

More
10 years 2 weeks ago #249527 by Jerome
Hi,

You need to use the $view object to retrieve the current view name and current layout name in order to just display your content on the page you're targeting.
You have a sample here :
www.hikashop.com/forum/orders-management...hipping-invoice.html

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.

More
10 years 2 weeks ago #249534 by shahryarjb
hi
Code:
function onHikashopAfterDisplayView(&$view) { //print_r($view->getName()); or onHikashopBeforeDisplayView if($view->getName() == 'product') { if($view->getLayout() == 'show_quantity') { echo "hellow"; } }

used and worked

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

Time to create page: 0.190 seconds
Powered by Kunena Forum