onHikashopAfterDisplayView double printed

  • Posts: 4
  • Thank you received: 0
7 years 7 months ago #249508

hi
my code

function onHikashopAfterDisplayView(&$view) {
echo "hello";
}
plz see pic (attached)

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

Attachments:

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

  • Posts: 26004
  • Thank you received: 4004
  • MODERATOR
7 years 7 months ago #249527

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.

  • Posts: 4
  • Thank you received: 0
7 years 7 months ago #249534

hi

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.058 seconds
Powered by Kunena Forum