Contact us for more information button placement

  • Posts: 32
  • Thank you received: 0
11 years 5 months ago #150492

-- HikaShop version -- : HikaShop Essential: 2.3.0
-- Joomla version -- : 3.2

Hi,

I want to display "Contact us for more information" button in Product Display under Category layout. So this button will show under Price or Add to Cart button.

I have copied this code and pasted under "listing-img-title.php"

<div id="hikashop_product_contact" >
				<?php

					if (hikashop_level(1) && ($contact == 2 || ($contact == 1 && !empty ($this->element->main->product_contact)))) {
						$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=' . $variant->product_id.$url_itemid),
							'window.location=\'' . hikashop_completeLink('product&task=contact&cid=' . $variant->product_id.$url_itemid) . '\';return false;'
						);
					}
	?>
				</div>

But it's showing error:
C:\xampp\htdocs\hikashop\components\com_hikashop\views\product\tmpl\listing_img_title.php on line 87 Notice: Undefined variable: contact in C:\xampp\htdocs\hikashop\components\com_hikashop\views\product\tmpl\listing_img_title.php on line 87

How to fix this?

Thanks

Last edit: 11 years 5 months ago by drock.

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

  • Posts: 12953
  • Thank you received: 1778
11 years 5 months ago #150496

Hi,
Can you revert your changes, and show me some screenshots of how you want your "contact button" to be displayed ?
Thanks.

The following user(s) said Thank You: drock

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

  • Posts: 32
  • Thank you received: 0
11 years 5 months ago #150547

Hi,

I have tried to make a screenshot attached. Its the same Contact for more information button as into product details page. I want to display as the blue buttons into products display of a category.

Thanks

Attachments:

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

  • Posts: 13201
  • Thank you received: 2322
11 years 5 months ago #150566

Thanks to avoid many topics for one question.
www.hikashop.com/forum/product-category-...he-product-page.html

The following user(s) said Thank You: drock

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

  • Posts: 32
  • Thank you received: 0
11 years 5 months ago #150800

Hi,

Sorry for my previous topic. I thought to place with more organised details and cant find any option to delete a topic.

Can you please suggest the solution as the code you mentioned I posted is not working.

Thanks and regards

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

  • Posts: 84290
  • Thank you received: 13691
  • MODERATOR
11 years 5 months ago #150802

The code proposed by Xavier on the other thread is correct as far as I can see.

Your code from your first message of this thread however is not correct. It cannot work like that in the listing_img_title file. Please user Xavier's code and if you have an error with it, please report the error and we can tell you if you're missing something.

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

Time to create page: 0.062 seconds
Powered by Kunena Forum