View Single Post
  #7  
Old 01-17-2009, 07:46 AM
 
ChristineP ChristineP is offline
 

eXpert
  
Join Date: Jul 2008
Posts: 310
 

Default Re: Change add to cart button

With thread http://forum.x-cart.com/showthread.php?t=12434&page=4
I was able to change the "add to cart" button.

I made a new IMG class in my skin1.css as IMG.AddtoCart to control the positioning of my button image. Uploaded the changed .css to skin1/skin1.css on my server.

I copied the button.tpl and named it as: atc_button.tpl
I commented out the following:

<!--<td>
<{$img_type} src="{$ImagesDir}/but1.gif" class="ButtonSide" alt="{$title|escape}" />
</td>
<td class="Button"{$reading_direction_tag}>
<font class="Button">{$button_title}</font>
</td>
<td>
<img src="{$ImagesDir}/but2.gif" class="ButtonSide" alt="{$title|escape}" />
</td>-->

and added this:

<td>
<{$img_type} src="{$ImagesDir}/addtocart.jpg" class="AddtoCart" alt="{$title|escape}" />
</td>


saved the updated atc_button.tpl and uploaded it to skin1/buttons/ folder on my server.

I changed buttons/add_to_cart.tpl as:
{include file="buttons/atc_button.tpl" button_title=$lng.lbl_add_to_cart href=$href title=$title style=$style}
<!--{include file="buttons/button.tpl" button_title=$lng.lbl_add_to_cart href=$href title=$title style=$style}-->

I also changed the following in related items modules/Upselling_Products/related_products.tpl:
{include file="buttons/atc_button.tpl" style="button" button_title=$lng.lbl_add_to_cart href="javascript: self.location='cart.php?mode=add&productid=`$produ ct_links[proid].productid`&amount=1'"}
<!--{include file="buttons/button.tpl" style="button" button_title=$lng.lbl_add_to_cart href="javascript: self.location='cart.php?mode=add&productid=`$produ ct_links[proid].productid`&amount=1'"}-->
__________________
______________
version 4.1.9 Gold

Last edited by ChristineP : 01-21-2009 at 12:47 PM. Reason: correct space in produ ct_links to product_links
Reply With Quote