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

#   How to add information to component view products only?

##

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

Less More

- Posts: 34
- Thank you received: 1
-
-

9 years 6 months ago [\#268330](#268330) by [sifur](/forum/user/29143-sifur "View sifur's Profile")  *[How to add information to component view products only?](/forum/31-development/889994-how-to-add-information-to-component-view-products-only#268330 "Hello, I need to integrate an option to product listing page and mostly need to add on listing&#95;div.php But when I add something in this file it shows on both component view and module view. How can I add info so it will only show on component view not modules?")* was created by *[sifur](/forum/user/29143-sifur "View sifur's Profile")*

Hello,
I need to integrate an option to product listing page and mostly need to add on listing_div.php
But when I add something in this file it shows on both component view and module view.
How can I add info so it will only show on component view not modules?

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

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86292
- Thank you received: 14271
-
-

9 years 6 months ago [\#268380](#268380) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How to add information to component view products only?](/forum/31-development/889994-how-to-add-information-to-component-view-products-only#268380 "Hello, I need to integrate an option to product listing page and mostly need to add on listing&#95;div.php But when I add something in this file it shows on both component view and module view. How can I add info so it will only show on component view not modules?")*

Hi,

You can add your code like that: Code:

if(!$this-&gt;module){ // your code which won't run for modules }

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

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

Less More

- Posts: 34
- Thank you received: 1
-
-

9 years 5 months ago [\#268857](#268857) by [sifur](/forum/user/29143-sifur "View sifur's Profile")  Replied by *[sifur](/forum/user/29143-sifur "View sifur's Profile")* on topic *[How to add information to component view products only?](/forum/31-development/889994-how-to-add-information-to-component-view-products-only#268857 "Hello, I need to integrate an option to product listing page and mostly need to add on listing&#95;div.php But when I add something in this file it shows on both component view and module view. How can I add info so it will only show on component view not modules?")*

Thanks, it works. But how do I make it with sub modules as when I browse by category it shows products under "Sub module" instead of component.

How can I do this so it will show on "component and sub module view" but not in module?

Thanks

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

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86292
- Thank you received: 14271
-
-

9 years 5 months ago [\#268887](#268887) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How to add information to component view products only?](/forum/31-development/889994-how-to-add-information-to-component-view-products-only#268887 "Hello, I need to integrate an option to product listing page and mostly need to add on listing&#95;div.php But when I add something in this file it shows on both component view and module view. How can I add info so it will only show on component view not modules?")*

Hi,

Then, you can do like that: Code:

if(JRequest::getVar('hikashop_front_end_main', 0)){ // your code which will run only in the main area. }

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

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

[](#top)
