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)
-   -   replace buy now button with regular form button (https://forum.x-cart.com/showthread.php?t=15789)

groovedis 08-09-2005 10:55 AM

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!

instinctual 08-09-2005 01:56 PM

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]

groovedis 12-01-2005 12:35 PM

hi. i don't want to use a graphic though. just a regular html form button. any help?

mocara 07-24-2006 07:01 AM

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

Mocara.

Steel 10-20-2007 08:01 PM

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?


All times are GMT -8. The time now is 09:27 AM.

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