change add to cart button in views-view-fields--products--block-17.tpl.php

kpatsali's picture
kpatsali
Mon, 02/01/2016 - 06:08
#1
change add to cart button in views-view-fields--products--block-17.tpl.php

Hi,

is it possible to change add to cart button so that would be a link to the product itself and not adding this product to the cart (the job that fa-eye is doing)?

i figured out how to hide all other buttons... and found the way to change fa fa-cart-plus and <?php print $fields['add_to_cart_form']->content;?> so that "add to cart" linking to the product under:

in /md-orenmode/sites/all/themes/md_orenmode/template/views/products/home_sale_products/v2

What i am asking is: if it 's possible for this button to remain the same with it's text inside (add to cart) in both languages and not only be an icon

thank you in advance

phuonght's picture
phuonght
Mon, 02/01/2016 - 22:52

Hi,

Please send us some screenshots of section that you would like to change "ADD TO CART" button to link. 

kpatsali's picture
kpatsali
Tue, 02/02/2016 - 07:27

Image title

hi,

I would like to change "ADD TO CART" button in views "Sales", "Featured", "Best Sellers" and "New Arrivals", shown in home version 2 (my front page)... 

see previous image...

thank you in advance

khoa's picture
khoa
Wed, 02/03/2016 - 16:22

Hello,

+ Please open views-view-fields--products--block-17.tpl.php file.

+ Go to line 9 you remove the old code:

<div class="btn btn-14 add-cart text-uppercase"><i class="fa fa-cart-plus"></i><?php print $fields['add_to_cart_form']->content;?></div>

and replace it by :

<a class="btn btn-14 add-cart text-uppercase" href="<?php print $fields['path']->content;?>"><?php print t('See detail') ?></a>

Thanks!

kpatsali's picture
kpatsali
Thu, 02/04/2016 - 08:40

thank you!

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.