Skip to main content

onHikashopAfterDisplayView double printed

More
10 years 1 month 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 1 month 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.

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

More
10 years 1 month 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.191 seconds
Powered by Kunena Forum