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

#   onProductBlocksDisplay(&amp;$element,&amp;$html)

##

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

Less More

- Posts: 575
- Thank you received: 11
-
-

11 years 2 months ago [\#210428](#210428) by [ler@singmuiheng.com](/forum/user/3330-ler-singmuiheng-com "View ler@singmuiheng.com's Profile")  *[onProductBlocksDisplay(&amp;$element,&amp;$html)](/forum/31-development/878545-onproductblocksdisplay-element-html#210428 "-- HikaShop version -- : 2.5.1 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.4  Hi  We would like to add discount end date count down plugin to product listing page and product detail page  May i confirm the onProductBlocksDisplay(&amp;$element,&amp;$html) is the right API?")* was created by *[ler@singmuiheng.com](/forum/user/3330-ler-singmuiheng-com "View ler@singmuiheng.com's Profile")*

-- HikaShop version -- : 2.5.1
-- Joomla version -- : 3.4.3
-- PHP version -- : 5.4

Hi

We would like to add discount end date count down plugin to product listing page and product detail page

May i confirm the onProductBlocksDisplay(&amp;$element,&amp;$html) is the right API?

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

11 years 2 months ago [\#210429](#210429) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[onProductBlocksDisplay(&amp;$element,&amp;$html)](/forum/31-development/878545-onproductblocksdisplay-element-html#210429 "-- HikaShop version -- : 2.5.1 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.4  Hi  We would like to add discount end date count down plugin to product listing page and product detail page  May i confirm the onProductBlocksDisplay(&amp;$element,&amp;$html) is the right API?")*

Hi,

The trigger "onProductBlocksDisplay" is called for the product edition page (so in the HikaShop backend).
Depending your kind of customization ; you can use a plugin or you can use a view override.
If you want to use a plugin, the best is to use the same process that HikaMarket is using to display his special vendor content.

If you want to add elements in the front-end product page ; you need to use the trigger "onHikashopBeforeDisplayView" and use the "extraData" variable in the view as "slots" in the product page.
[ www.hikashop.com/support/support/documen...hopBeforeDisplayView](http://www.hikashop.com/support/support/documentation/62-hikashop-developer-documentation.html#onHikashopBeforeDisplayView)

For the product listing, you can use the same trigger and access to the $view-&gt;rows to list all products in the current listing.
The product listing also have extraData for the elements ; you can see how these data is display in the different views.

Regards,

---

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

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

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

[](#top)
