"Contact us for more information" - Product List

  • Posts: 260
  • Thank you received: 25
11 years 2 months ago #161702

-- url of the page with the problem -- :http://www.simonbayliss.com.au/manly-northern-beaches.html
-- HikaShop version -- : HikaShop Business: 2.3.1
-- Joomla version -- : 3.3
-- PHP version -- : 5.3.26

Hi,

I am wanting to put the "Contact us for more information" button (that normally displays on the product page) on the Product Listing page as I am not using the 'Link to Product Page'

eg: www.simonbayliss.com.au/manly-northern-beaches.html

I know I can create a custom field to dislay, but I want it to be able to 'link/relate' to the specific product.

Is that possible?

Thanks in advance!


Don't look at what is and ask 'why?'; look at what isn't and ask 'Why Not!'

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 2 months ago #161712

Hi,

Yes it is possible, you have to edit the view "product / listing_img_title" and add custom code to have a button.
In the url of this button you have to add dynamically the product id with some code like:

<input type="button" value="<?php echo JText::_('CONTACT_US_FOR_MORE_INFORMATION'); ?>" onclick="window.location.href='index.php?option=com_hikashop&ctrl=product&task=contact&cid=<?php echo $this->row->product_id.$this->itemid; ?>' "/>

The following user(s) said Thank You: sambob

Please Log in or Create an account to join the conversation.

  • Posts: 260
  • Thank you received: 25
11 years 2 months ago #162331

Hi Xavier,

Thanks for that, I really appreciate it.

My coding skills are not too advanced but I added the code you mentioned but ended up with the following error:
Parse error: syntax error, unexpected T_NS_SEPARATOR, expecting T_STRING in /websites/si/simonbayliss.com.au/templates/js_techie/html/com_hikashop/product/listing_img_title.php on line 9

Any thoughts?


Don't look at what is and ask 'why?'; look at what isn't and ask 'Why Not!'

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 2 months ago #162332

Hi,

That's potentially because you have put the code between php tags.

Thanks to try:

?><input type="button" value="<?php echo JText::_('CONTACT_US_FOR_MORE_INFORMATION'); ?>" onclick="window.location.href='index.php?option=com_hikashop&ctrl=product&task=contact&cid=<?php echo $this->row->product_id.$this->itemid; ?>' "/><?php

The following user(s) said Thank You: sambob

Please Log in or Create an account to join the conversation.

  • Posts: 260
  • Thank you received: 25
11 years 2 months ago #162448

thanks Xavier, appreciate it!

That worked.


Don't look at what is and ask 'why?'; look at what isn't and ask 'Why Not!'

Please Log in or Create an account to join the conversation.

Time to create page: 0.077 seconds
Powered by Kunena Forum