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

Weird space issue above "Buy Now" button

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-19-2006, 02:11 PM
 
athenarchiver athenarchiver is offline
 

Advanced Member
  
Join Date: May 2006
Posts: 31
 

Default 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?
__________________
X-cart 4.1.0
X-Configurator 4.1.0
PHP 4.4.2
Reply With Quote
  #2  
Old 05-19-2006, 04:20 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Moving to Template Editing
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 05-21-2006, 01:52 AM
 
jackel jackel is offline
 

Advanced Member
  
Join Date: May 2006
Location: United Kingdom
Posts: 48
 

Default

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?
__________________
MarkH
Web Development Manager
Jackel International Limited
X-Cart Version 4.0.13 + Customisations
http://www.tommeetippee.co.uk/
Reply With Quote
  #4  
Old 05-22-2006, 06:02 AM
 
athenarchiver athenarchiver is offline
 

Advanced Member
  
Join Date: May 2006
Posts: 31
 

Default

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?
__________________
X-cart 4.1.0
X-Configurator 4.1.0
PHP 4.4.2
Reply With Quote
  #5  
Old 05-22-2006, 07:31 AM
 
athenarchiver athenarchiver is offline
 

Advanced Member
  
Join Date: May 2006
Posts: 31
 

Default

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.
__________________
X-cart 4.1.0
X-Configurator 4.1.0
PHP 4.4.2
Reply With Quote
  #6  
Old 05-22-2006, 07:36 AM
 
athenarchiver athenarchiver is offline
 

Advanced Member
  
Join Date: May 2006
Posts: 31
 

Default

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>
__________________
X-cart 4.1.0
X-Configurator 4.1.0
PHP 4.4.2
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 01:10 PM.

   

 
X-Cart forums © 2001-2020