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

#   Contact us for info button on product listing page

##

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

Less More

- Posts: 14
- Thank you received: 0
-
-

8 years 5 months ago [\#294360](#294360) by [insitevision](/forum/user/35045-insitevision "View insitevision's Profile")  *[Contact us for info button on product listing page](/forum/26-product-category-display/895059-contact-us-for-info-button-on-product-listing-page#294360 "-- url of the page with the problem -- :   floors4u.nl/pvc-vloeren  -- HikaShop version -- : 3.4.0 -- Joomla version -- : 3.8.8 -- PHP version -- : 7.2.6 -- Browser(s) name and version -- : Firefox 60.0.2  Hi,  I have a menu item type product listing. It shows the image, title and price. I want to add a &quot;contact us for info&quot; button, same as which is shown on a single product page.  I added this code to product / listing&#95;img&#95;title.php:  The button is shown and links to the contact form. But there is no context from the product (no product shown). When I click the button on a single article page the name and picture is shown at the top of the contact form.  The URL ends with cid- and should be cid-### (id of the product)  How do I get the product title and image when I click on the contact button on a product listing page where more than 1 products are shown.  Regards, Eric Beernink")* was created by *[insitevision](/forum/user/35045-insitevision "View insitevision's Profile")*

-- url of the page with the problem -- : [ floors4u.nl/pvc-vloeren](https://floors4u.nl/pvc-vloeren)
-- HikaShop version -- : 3.4.0
-- Joomla version -- : 3.8.8
-- PHP version -- : 7.2.6
-- Browser(s) name and version -- : Firefox 60.0.2

Hi,

I have a menu item type product listing. It shows the image, title and price. I want to add a "contact us for info" button, same as which is shown on a single product page.

I added this code to product / listing_img_title.php:
Code:

&lt;!-- Start offerteknop bij listing --&gt; &lt;div&gt; &lt;?php $params = @$this-&gt;params; global $Itemid; $url_itemid = ''; if(!empty($Itemid)) { $url_itemid = '&amp;Itemid='.$Itemid; } echo $this-&gt;cart-&gt;displayButton( JText::_('CONTACT_US_FOR_INFO'), 'contact_us', $params, ''.hikashop_completeLink('product&amp;task=contact&amp;cid=' . $row-&gt;product_id.$url_itemid), 'window.location=\'' . hikashop_completeLink('product&amp;task=contact&amp;cid=' . $row-&gt;product_id.$url_itemid) . '\';return false;' ); ?&gt; &lt;/div&gt; &lt;!-- Einde offerteknop bij listing --&gt;

The button is shown and links to the contact form. But there is no context from the product (no product shown).
When I click the button on a single article page the name and picture is shown at the top of the contact form.

The URL ends with cid- and should be cid-### (id of the product)

How do I get the product title and image when I click on the contact button on a product listing page where more than 1 products are shown.

Regards,
Eric Beernink

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84OTUwNTktY29udGFjdC11cy1mb3ItaW5mby1idXR0b24tb24tcHJvZHVjdC1saXN0aW5nLXBhZ2U/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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14325
-
-

8 years 5 months ago [\#294362](#294362) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Contact us for info button on product listing page](/forum/26-product-category-display/895059-contact-us-for-info-button-on-product-listing-page#294362 "-- url of the page with the problem -- :   floors4u.nl/pvc-vloeren  -- HikaShop version -- : 3.4.0 -- Joomla version -- : 3.8.8 -- PHP version -- : 7.2.6 -- Browser(s) name and version -- : Firefox 60.0.2  Hi,  I have a menu item type product listing. It shows the image, title and price. I want to add a &quot;contact us for info&quot; button, same as which is shown on a single product page.  I added this code to product / listing&#95;img&#95;title.php:  The button is shown and links to the contact form. But there is no context from the product (no product shown). When I click the button on a single article page the name and picture is shown at the top of the contact form.  The URL ends with cid- and should be cid-### (id of the product)  How do I get the product title and image when I click on the contact button on a product listing page where more than 1 products are shown.  Regards, Eric Beernink")*

Hi,

That's because $row-&gt;product_id doesn't exist in that view. You should replace it by $this-&gt;row-&gt;product_id

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

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

Less More

- Posts: 14
- Thank you received: 0
-
-

8 years 5 months ago [\#294371](#294371) by [insitevision](/forum/user/35045-insitevision "View insitevision's Profile")  Replied by *[insitevision](/forum/user/35045-insitevision "View insitevision's Profile")* on topic *[Contact us for info button on product listing page](/forum/26-product-category-display/895059-contact-us-for-info-button-on-product-listing-page#294371 "-- url of the page with the problem -- :   floors4u.nl/pvc-vloeren  -- HikaShop version -- : 3.4.0 -- Joomla version -- : 3.8.8 -- PHP version -- : 7.2.6 -- Browser(s) name and version -- : Firefox 60.0.2  Hi,  I have a menu item type product listing. It shows the image, title and price. I want to add a &quot;contact us for info&quot; button, same as which is shown on a single product page.  I added this code to product / listing&#95;img&#95;title.php:  The button is shown and links to the contact form. But there is no context from the product (no product shown). When I click the button on a single article page the name and picture is shown at the top of the contact form.  The URL ends with cid- and should be cid-### (id of the product)  How do I get the product title and image when I click on the contact button on a product listing page where more than 1 products are shown.  Regards, Eric Beernink")*

Hi Nicolas,

Thank you, it works perfect now.

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

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