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

Make Add To Cart Button Bigger

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-07-2009, 12:44 PM
 
tahirfayyaz tahirfayyaz is offline
 

Senior Member
  
Join Date: May 2006
Posts: 125
 

Default Make Add To Cart Button Bigger

I am looking to make the add to cart button a lot bigger than the default button.

Do you what files I need to modify to add my own add to cart button image?

Thanks

Tahir
__________________
Tahir
X-Cart Gold v4.4.4 [win]
Reply With Quote
  #2  
Old 11-07-2009, 03:07 PM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

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

Default Re: Make Add To Cart Button Bigger

is this for 4.1 branch?

Ash
__________________
xcart 5.1.2
Reply With Quote
  #3  
Old 11-07-2009, 03:08 PM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

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

Default Re: Make Add To Cart Button Bigger

Moving to template editing. This forum is for product management only.
__________________
xcart 5.1.2
Reply With Quote
  #4  
Old 11-07-2009, 04:31 PM
 
tahirfayyaz tahirfayyaz is offline
 

Senior Member
  
Join Date: May 2006
Posts: 125
 

Default Re: Make Add To Cart Button Bigger

Yes it is for the 4.1 branch. Do you know which templates I will need to edit?
__________________
Tahir
X-Cart Gold v4.4.4 [win]
Reply With Quote
  #5  
Old 11-07-2009, 05:41 PM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

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

Default Re: Make Add To Cart Button Bigger

skin1/buttons/button.tpl
__________________
xcart 5.1.2
Reply With Quote
  #6  
Old 11-09-2009, 01:23 PM
 
tahirfayyaz tahirfayyaz is offline
 

Senior Member
  
Join Date: May 2006
Posts: 125
 

Default Re: Make Add To Cart Button Bigger

What exactly do I edit in that file to only change the add to cart button as I do not want to mess up all the other buttons.

Thanks

Tahir
__________________
Tahir
X-Cart Gold v4.4.4 [win]
Reply With Quote
  #7  
Old 11-09-2009, 01:51 PM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

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

Default Re: Make Add To Cart Button Bigger

*******MAKE A BACK UP FIRST*****************

first change the style of the add to cart button.

in skin1/customer/main/product.tpl

change this
{include file="buttons/add_to_cart.tpl" style="button" href="javascript: if(FormValidation()) document.orderform.submit();"}

to this
{include file="buttons/add_to_cart.tpl" style="atcButton" href="javascript: if(FormValidation()) document.orderform.submit();"}


then in buttons/button.tpl
change this

{if $style eq 'button' && ($config.Adaptives.platform ne 'MacPPC' || $config.Adaptives.browser ne 'NN')}
<table cellspacing="0" cellpadding="0" onclick="{$js_link}" class="ButtonTable"{if $title ne ''} title="{$title|escape}"{/if}>
{strip}
<tr>
<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>
</tr>
{/strip}
</table>
{elseif $image_menu}

to this

{if $style eq 'atcButton' && ($config.Adaptives.platform ne 'MacPPC' || $config.Adaptives.browser ne 'NN')}
<table cellspacing="0" cellpadding="0" onclick="{$js_link}" class="ButtonTable"{if $title ne ''} title="{$title|escape}"{/if}>
{strip}
<tr>
<td>
<{$img_type} src="{$ImagesDir}/but1newbutton.gif" class="atcSide" alt="{$title|escape}" />
</td>
<td class="atcButton"{$reading_direction_tag}>
<font class="atcButton">{$button_title}</font>
</td>
<td>
<img src="{$ImagesDir}/but2newbutton.gif" class="atcSide" alt="{$title|escape}" />
</td>
</tr>
{/strip}
</table>
{else if $style eq 'button' && ($config.Adaptives.platform ne 'MacPPC' || $config.Adaptives.browser ne 'NN')}
<table cellspacing="0" cellpadding="0" onclick="{$js_link}" class="ButtonTable"{if $title ne ''} title="{$title|escape}"{/if}>
{strip}
<tr>
<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>
</tr>
{/strip}
</table>
{elseif $image_menu}

You will then need to add the new styles to the CSS highlighted in red ablove.

Then up load new iamges.

That's it. Simple!!! HA!

Changing the buttons can be bit of a hassle.

Ash
__________________
xcart 5.1.2
Reply With Quote
  #8  
Old 11-09-2009, 02:22 PM
 
tahirfayyaz tahirfayyaz is offline
 

Senior Member
  
Join Date: May 2006
Posts: 125
 

Default Re: Make Add To Cart Button Bigger

Awesome thanks for your help on that will get it a try tonight.

Just one quick question. The current add to cart button uses actual text but the add to cart button that I have created will be just a image (see attached). Do I need to do anything differently in that case to what you have mentioned??

Tahir
Attached Thumbnails
Click image for larger version

Name:	add-to-cart.jpg
Views:	154
Size:	8.8 KB
ID:	1708  
__________________
Tahir
X-Cart Gold v4.4.4 [win]
Reply With Quote
  #9  
Old 11-09-2009, 02:33 PM
  ARW VISIONS's Avatar 
ARW VISIONS ARW VISIONS is offline
 

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

Default Re: Make Add To Cart Button Bigger

yes you should change this

<tr>
<td>
<{$img_type} src="{$ImagesDir}/but1newbutton.gif" class="atcSide" alt="{$title|escape}" />
</td>
<td class="atcButton"{$reading_direction_tag}>
<font class="atcButton">{$button_title}</font>
</td>
<td>
<img src="{$ImagesDir}/but2newbutton.gif" class="atcSide" alt="{$title|escape}" />
</td>
</tr>

to this

<tr>
<td class="atcButton"{$reading_direction_tag}>
<div><img src="{$ImagesDir}/mybuttonimage.gif" alt= add to cart" />
</td>
</tr>
__________________
xcart 5.1.2
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 03:48 PM.

   

 
X-Cart forums © 2001-2020