- Posts: 4
- Thank you received: 0
Show contact us button on product listing table next to add to cart
- greenlizzard
-
Topic Author
- Offline
Less
More
9 years 11 months ago #257611
by greenlizzard
-- HikaShop version -- : HikaShop Business: 2.6.4
-- Joomla version -- : 3.6.4
-- PHP version -- : 5.6.22
-- Browser(s) name and version -- : Chrome Version 55.0.2883.87 m
HI ,
how would I go about adding ght e enquire button next to the add to cart button on the product or categiry listing page, I can add to the product item page but I would like to hhave it on the listing page as well, I am using a table to display the products.
-- Joomla version -- : 3.6.4
-- PHP version -- : 5.6.22
-- Browser(s) name and version -- : Chrome Version 55.0.2883.87 m
HI ,
how would I go about adding ght e enquire button next to the add to cart button on the product or categiry listing page, I can add to the product item page but I would like to hhave it on the listing page as well, I am using a table to display the products.
Please Log in or Create an account to join the conversation.
9 years 11 months ago #257616
by nicolas
Replied by nicolas on topic Show contact us button on product listing table next to add to cart
Hi,
You can edit the file "listing_table" of the view "product" via the menu Display>Views and add such code:
after the code:
You can edit the file "listing_table" of the view "product" via the menu Display>Views and add such code:
Code:
$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;'
);
Code:
$this->setLayout('add_to_cart_listing');
echo $this->loadTemplate();
Please Log in or Create an account to join the conversation.
- greenlizzard
-
Topic Author
- Offline
Less
More
- Posts: 4
- Thank you received: 0
9 years 11 months ago #257678
by greenlizzard
Replied by greenlizzard on topic Show contact us button on product listing table next to add to cart
Hi Nicolas,
thank you for this it sort of works but whereever i place it it seems to either break or put it in the same column as the add to cart button so you are seeing the button twice.
Where exactly should I place it?
thank you for this it sort of works but whereever i place it it seems to either break or put it in the same column as the add to cart button so you are seeing the button twice.
Where exactly should I place it?
Please Log in or Create an account to join the conversation.
9 years 11 months ago #257682
by nicolas
Replied by nicolas on topic Show contact us button on product listing table next to add to cart
Hi,
As I said, you should place it after:
If you have an error when you do, please provide the error message and a screenshot of the code modification.
As I said, you should place it after:
Code:
$this->setLayout('add_to_cart_listing');
echo $this->loadTemplate();
Please Log in or Create an account to join the conversation.
Time to create page: 0.055 seconds