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