X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Change add to cart button (https://forum.x-cart.com/showthread.php?t=42999)

swifty1 10-15-2008 11:49 AM

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

balinor 10-15-2008 01:14 PM

Re: Change add to cart button
 
Have a look at the button classes in skin1.css.

swifty1 10-16-2008 08:51 AM

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

balinor 10-16-2008 09:27 AM

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.

swifty1 10-16-2008 09:31 AM

Re: Change add to cart button
 
Thanks for that Balinor and your updated template edititng guide is much appreciated.

Swifty

ChristineP 01-14-2009 12:10 PM

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


ChristineP 01-17-2009 07:46 AM

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

ARW VISIONS 01-17-2009 09:00 AM

Re: Change add to cart button
 
that's how I do it. GOOD JOB!!!!!


All times are GMT -8. The time now is 02:53 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.