Thread: button graphics
View Single Post
  #34  
Old 01-15-2009, 07:47 AM
 
ChristineP ChristineP is offline
 

eXpert
  
Join Date: Jul 2008
Posts: 310
 

Default Re: button graphics

With the combined input from several experts on this thread, I have my custom add to cart button (working on other buttons). One problem that I've run into, the button is not clickable with only the products that have variants. Can someone point me to the file that I need to change for this.

Here's what I've done with my "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>
</tr>

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'"}-->


Christine
__________________
______________
version 4.1.9 Gold
Reply With Quote