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

#   onHikashopAfterDisplayView double printed

##

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

Less More

- Posts: 4
- Thank you received: 0
-
-

10 years 1 month ago [\#249508](#249508) by [shahryarjb](/forum/user/44973-shahryarjb "View shahryarjb's Profile")  *[onHikashopAfterDisplayView double printed](/forum/31-development/886343-onhikashopafterdisplayview-double-printed#249508 "hi my code  plz see pic (attached)  I need a print (1 time) in the page tnq")* was created by *[shahryarjb](/forum/user/44973-shahryarjb "View shahryarjb's Profile")*

hi
my code Code:

function onHikashopAfterDisplayView(&amp;$view) { echo "hello"; }

plz see pic (attached)

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

- [ ![Screen&#95;Shot&#95;2016-09-11&#95;at&#95;2&#95;42&#95;09&#95;am.png](/forum/attachment/33378) ](/forum/attachment/33378 "...2&#95;42&#95;09&#95;am.png") [ ](/forum/attachment/33378?download=1 "...2&#95;42&#95;09&#95;am.png")

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

10 years 1 month ago [\#249527](#249527) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[onHikashopAfterDisplayView double printed](/forum/31-development/886343-onhikashopafterdisplayview-double-printed#249527 "hi my code  plz see pic (attached)  I need a print (1 time) in the page tnq")*

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](https://www.hikashop.com/forum/orders-management/885356-add-button-after-email-invoice-shipping-invoice.html)

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

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

Less More

- Posts: 4
- Thank you received: 0
-
-

10 years 1 month ago [\#249534](#249534) by [shahryarjb](/forum/user/44973-shahryarjb "View shahryarjb's Profile")  Replied by *[shahryarjb](/forum/user/44973-shahryarjb "View shahryarjb's Profile")* on topic *[onHikashopAfterDisplayView double printed](/forum/31-development/886343-onhikashopafterdisplayview-double-printed#249534 "hi my code  plz see pic (attached)  I need a print (1 time) in the page tnq")*

hi Code:

function onHikashopAfterDisplayView(&amp;$view) { //print_r($view-&gt;getName()); or onHikashopBeforeDisplayView if($view-&gt;getName() == 'product') { if($view-&gt;getLayout() == 'show_quantity') { echo "hellow"; } }

used and worked

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

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

[](#top)
