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)
-   -   Weird space issue above "Buy Now" button (https://forum.x-cart.com/showthread.php?t=21924)

athenarchiver 05-19-2006 02:11 PM

Weird space issue above "Buy Now" button
 
With 2 of my products I have about half an inch of white space above the "Buy Now" button in the products/features view.

I've turned on borders for all the tables in "/customer/main/buy_now.tpl" and see there is an empty row (the buy it now buton is actuall a table within a table.) I've tried deleting the contents of that row just to see what happens and my "Buy Now" button stops working. Anybody else have this issue and know a quick fix?

balinor 05-19-2006 04:20 PM

Moving to Template Editing

jackel 05-21-2006 01:52 AM

By not working do you mean:

- Image disappears?
- Image link fails to correctly go to basket?
- some other issue?

When you delete the row are you sure that the table structure isn't being broken? i.e. removing a <td></td> but leaving <tr> or something on the code?

athenarchiver 05-22-2006 06:02 AM

Hi jackel,

By not working, I mean the button is there but clicking on it does nothing. It doesn't process the "Buy Now" and go to a new page. I reverted back to the original so that it works again but I still have the spacing issue with these two products.

I did some further adjusting and found that the two items that have the white space above are electronic items. When I took the electronic link off of the item a "quantity" drop down box appears in the white space.

I added a new product and made it an electronic download and sure enough, same thing. I noticed when I add a product option to the product the white spacing goes away. :O Has anybody experienced this? Any ideas how to fix it?

athenarchiver 05-22-2006 07:31 AM

The answer is partially fixed here:
http://forum.x-cart.com/viewtopic.php?t=17262&highlight=hide+quantity

except the "buy now" is centered. I will post again when I've fixed it.

athenarchiver 05-22-2006 07:36 AM

Ok here's the code if any one else ever has the same problem. Just replace /customer/main/buy_now.tpl with this (and thanks to Jon who pretty much did all the work for this in another thread):

Code:

{* $Id: buy_now.tpl,v 1.15.2.7 2004/12/01 15:15:49 mclap Exp $ *}
<TABLE border="0" width="100%" cellpadding="0" cellspacing="0" >
{if $product.price eq 0}
<TR>
<TD height="25">
{assign var="button_href" value=$smarty.get.page|escape:"html"}
{include file="buttons/buy_now.tpl" style="button" href="product.php?productid=`$product.productid`&cat=`$cat`&page=`$button_href`"}
</TD>
</TR>
{else}
<FORM name="orderform_{$product.productid}_{$product.add_date}" method="post" action="{if $product.is_product_options eq 'Y' && $config.Appearance.buynow_with_options_enabled eq 'Y'}product.php?productid={$product.productid}{else}cart.php?mode=add{/if}">
<INPUT type="hidden" name="productid" value="{$product.productid}">
<INPUT type="hidden" name="cat" value="{$smarty.get.cat|escape:"html"}">
<INPUT type="hidden" name="page" value="{$smarty.get.page|escape:"html"}">
{if $product.is_product_options ne 'Y' || $config.Appearance.buynow_with_options_enabled ne 'Y'}
<TR>
<INPUT type="hidden" name="amount" value="1">
<TD width="100%" valign="middle">
<INPUT type="hidden" name="mode" value="add">
{include file="customer/main/product_prices.tpl"}
</TD>
</TR>
{/if}
<TR>
<TD align="center">


<div align="left">
{if $config.General.unlimited_products eq "Y" or ($product.avail gt 0 and $product.avail ge $product.min_amount)}
<TABLE border="0" cellpadding="0" cellspacing="0"><TR>
{if $js_enabled}
{if $special_offers_add_to_cart eq 'Y'}
<TD align="center"><center>{include file="buttons/add_to_cart.tpl" style="button" href="javascript: document.orderform_`$product.productid`_`$product.add_date`.submit();"}</TD>
{else}
<TD align="center"><center>{include file="buttons/buy_now.tpl" style="button" href="javascript: document.orderform_`$product.productid`_`$product.add_date`.submit();"}
{/if}
{if $login ne "" and $active_modules.Wishlist ne "" and $special_offers_add_to_cart eq ""}
{if $product.is_product_options ne 'Y' || $config.Appearance.buynow_with_options_enabled ne 'Y'}

{include file="buttons/add_to_wishlist.tpl" style="button" href="javascript:document.orderform_`$product.productid`_`$product.add_date`.mode.value='add2wl'; document.orderform_`$product.productid`_`$product.add_date`.submit()"}
</center>
</TD>
{/if}
{/if}
{else}
<TD align="center">{include file="submit_wo_js.tpl" value=$lng.lbl_buy_now}</TD>
{/if}
</TR></TABLE></div>
{/if}
</TD>
</TR>
</FORM>
{if $product.min_amount gt 1}
<TR>
<TD><FONT class="ProductDetailsTitle">{$lng.txt_need_min_amount} {$product.min_amount} {$lng.lbl_items}</FONT>
</TD>
</TR>
{/if}
{/if}
</TABLE>



All times are GMT -8. The time now is 05:45 PM.

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