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

replace buy now button with regular form button

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-09-2005, 10:55 AM
 
groovedis groovedis is offline
 

Advanced Member
  
Join Date: Apr 2005
Posts: 52
 

Default replace buy now button with regular form button

Does anyone know how to get rid of the pill shaped "Buy Now" "Add to cart" and "Send to friend" buttons and just use a regular form input button? I'm looking in customer/main/buy_now.tpl but am not sure what to change. Thanks!
__________________
X-Cart version 4.0.13 (unix)
Reply With Quote
  #2  
Old 08-09-2005, 01:56 PM
 
instinctual instinctual is offline
 

eXpert
  
Join Date: Nov 2003
Posts: 247
 

Default well...

Well, what I usually do is just replace those {include}'s for the buttons altogether and just put my own image surrounded with it's own href statement. The href statement can always be found in the include tag...so pretty easy to setup. The buy now is in the products.tpl and products_t.tpl files, etc.

[img]path_to_image.gif[/img]
__________________
Instinctual
8,000 feet up in the Rocky Mountains of Colorado
X-Cart Versions 3.5.x - 4.0.x

IF you xcart, THEN you prosper, ELSE you fail. ELSEIF xcart fails, THEN you fix it, all the WHILE {loop}\'ing {section}\'s to feed your $smarty mind.
Reply With Quote
  #3  
Old 12-01-2005, 12:35 PM
 
groovedis groovedis is offline
 

Advanced Member
  
Join Date: Apr 2005
Posts: 52
 

Default

hi. i don't want to use a graphic though. just a regular html form button. any help?
__________________
X-Cart version 4.0.13 (unix)
Reply With Quote
  #4  
Old 07-24-2006, 07:01 AM
 
mocara mocara is offline
 

Advanced Member
  
Join Date: Apr 2005
Posts: 55
 

Default

Anyone found a way to do this? There is so much javascript in the button.tlp I'm fearful of touching it.

Mocara.
__________________
4.0.15
Linux
Reply With Quote
  #5  
Old 10-20-2007, 08:01 PM
 
Steel Steel is offline
 

eXpert
  
Join Date: Dec 2006
Posts: 253
 

Default Re: replace buy now button with regular form button

Hello groovedis and mocara,

I have found the following code change to work in MS IE 7.0, but do not know if it will work in other browsers. I should also mention that I have eliminated the X-Cart menu, so lines 2 through 6 of the original code may be required.

***(If anyone knows that this code change fouls the layout in other browsers, please post a reply and I will delete this post).***

File: /buttons/button.tpl

Replace the following code:
Quote:
{if $style eq 'button' && ($config.Adaptives.platform ne 'MacPPC' || $config.Adaptives.browser ne 'NN')}
{if $button_style eq "menu"}
{assign var="add_style" value="_menu"}
{else}
{assign var="add_style" value=""}
{/if}
<table cellspacing="0" cellpadding="0" onclick="{$js_link}" class="ButtonTable"{if $title ne ''} title="{$title|escape}"{/if}>
{strip}
<tr>
<td>
<{$img_type} src="{$ImagesDir}/but{$add_style}1.gif" class="ButtonSide{$add_style}" alt="{$title|escape}" />
</td>
<td class="Button{$add_style}"{$reading_direction_tag} >
<font class="Button{$add_style}">{$button_title}</font>
</td>
<td>
<img src="{$ImagesDir}/but{$add_style}2.gif" class="ButtonSide{$add_style}" alt="{$title|escape}" />
</td>
</tr>
{/strip}


With this code:
Quote:
{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>
<input type="button" value="{$button_title}" name="self.location">
</td>
</tr>
{/strip}

As for changing the other form action buttons, my thinking is that a variety of images are necessary, so there may not be any gain in having a regular html button. At this point I have just made changes to the /images/go.gif and /images/question_button.gif.

I thought I had accomplished this change (convert image button to html button with image) at one point, but have since lost my original work. Anyone know this code modification?
__________________
X-Cart Gold v4.6.6
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 02:21 PM.

   

 
X-Cart forums © 2001-2020