Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Change add to cart button

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-15-2008, 11:49 AM
 
swifty1 swifty1 is offline
 

eXpert
  
Join Date: Aug 2008
Location: UK
Posts: 327
 

Question Change add to cart button

Hi all i need to change the standard x-cart add to cart button to a different image, how do i go about it.

Swift master
__________________
4.1.11 gold
x-special offers
CDSEO Pro
Reply With Quote
  #2  
Old 10-15-2008, 01:14 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Change add to cart button

Have a look at the button classes in skin1.css.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 10-16-2008, 08:51 AM
 
swifty1 swifty1 is offline
 

eXpert
  
Join Date: Aug 2008
Location: UK
Posts: 327
 

Default Re: Change add to cart button

Thanks for that Balinor i had looked in here but changing code here changes the whole site design, what i need to do is change the look and position of the add to cart button only.
Any ideas?

swift master
__________________
4.1.11 gold
x-special offers
CDSEO Pro
Reply With Quote
  #4  
Old 10-16-2008, 09:27 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Change add to cart button

In that case, you'll need to create a new class and call that from the add to cart button template.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 10-16-2008, 09:31 AM
 
swifty1 swifty1 is offline
 

eXpert
  
Join Date: Aug 2008
Location: UK
Posts: 327
 

Default Re: Change add to cart button

Thanks for that Balinor and your updated template edititng guide is much appreciated.

Swifty
__________________
4.1.11 gold
x-special offers
CDSEO Pro
Reply With Quote
  #6  
Old 01-14-2009, 12:10 PM
 
ChristineP ChristineP is offline
 

eXpert
  
Join Date: Jul 2008
Posts: 310
 

Default Re: Change add to cart button

I was trying to find the answer to changing the "add to cart" button to a button I created. I read a study about shopping carts, that indicated the larger the add to cart button, the more products sold!

I've created a class for my new button and put the image path in the css, but I don't know how to change the button/add_ to_ cart.tpl. Does anyone know of an example that I can use to figure this out?

Quote:
Originally Posted by swifty1
Thanks for that Balinor and your updated template edititng guide is much appreciated.

Swifty
__________________
______________
version 4.1.9 Gold
Reply With Quote
  #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

The following 2 users thank ChristineP for this useful post:
Bedell (11-16-2010), SCUBA1609 (07-05-2009)
  #8  
Old 01-17-2009, 09:00 AM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

X-Man
  
Join Date: Jan 2007
Location: Pensacola, FL
Posts: 2,536
 

Default Re: Change add to cart button

that's how I do it. GOOD JOB!!!!!
__________________
xcart 5.1.2
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 08:24 AM.

   

 
X-Cart forums © 2001-2020