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

"Quantity" box is removed. Now, how to remove space gap on "Feature Products" page?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-31-2007, 09:35 AM
 
TL408 TL408 is offline
 

X-Adept
  
Join Date: Jan 2005
Posts: 549
 

Default "Quantity" box is removed. Now, how to remove space gap on "Feature Products" page?

Hi guys,

Can you please point me to the right direction? I followed the instruction below to remove the "Quantity" box on my "Featured Products" page. That was in the "skin1\customer\main\buy_now.tpl" template file. Now, there is a large space gap where the "Quanity" box used to be. How do I remove this?

http://img464.imageshack.us/img464/150/quantitybox002kn4zz5.jpg


-------------------------------------------------------------------------------
To remove "Quantity" box you should in the "skin1/customer/main/buy_now.tpl" find string

<select name="amount">
{section name=quantity loop=$mq start=$start_quantity}
<option value="{%quantity.index%}"{if $smarty.get.quantity eq %quantity.index%}
selected="selected"{/if}>{%quantity.index%}</option>
{/section}
</select>


and change them to

<input name="amount" value="1" size="1" type="hidden">

Then find string

td class="BuyNowQuantity">{$lng.lbl_quantity}</td>

and delete it.
-------------------------------------------------------------------------------
__________________
Win2003 IIS6, PHP 5.2.3, MySQL 5.0.45 and X-Cart 4.1.9
Reply With Quote

The following user thanks TL408 for this useful post:
Yvonnewilt (02-07-2012)
  #2  
Old 10-31-2007, 09:38 AM
 
balinor balinor is offline
 

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

Default Re: "Quantity" box is removed. Now, how to remove space gap on "Feature Products" page?

View the source code...I bet you left an empty table row in there.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 10-31-2007, 09:52 AM
 
TL408 TL408 is offline
 

X-Adept
  
Join Date: Jan 2005
Posts: 549
 

Default Re: "Quantity" box is removed. Now, how to remove space gap on "Feature Products" page?

If I read the code above correctly.....isn't it telling the template to only hide the "Quantity" box? Is this why the white space gap is still there? So techinically, the "Quantity" box is still there, just not showing.......Hmmmmm.....Does that sound right to you?

-Tuan
__________________
Win2003 IIS6, PHP 5.2.3, MySQL 5.0.45 and X-Cart 4.1.9
Reply With Quote
  #4  
Old 10-31-2007, 09:54 AM
 
balinor balinor is offline
 

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

Default Re: "Quantity" box is removed. Now, how to remove space gap on "Feature Products" page?

No, if you commented out the code, it is hidden. What I'm saying is that you may have hidden the code, but kept an empty table cell.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 10-31-2007, 10:34 AM
 
TL408 TL408 is offline
 

X-Adept
  
Join Date: Jan 2005
Posts: 549
 

Default Re: "Quantity" box is removed. Now, how to remove space gap on "Feature Products" page?

Would you be so kind and help me take a quick look. The "Webmaster mode" point to that same "buy_now.tpl" file. But I can't seem to find it.


----------------------------------------------------------------------------------------------------------------------------
{* $Id: buy_now.tpl,v 1.30.2.4 2006/11/27 11:40:25 max Exp $ *}
{if $product.price gt 0}
{if $config.Product_Options.buynow_with_options_enable d eq 'Y' || ($product.avail eq 0 && $product.variantid && $product.product_type ne 'C')}
{assign var="buynow_enabled" value=false}
{else}
{assign var="buynow_enabled" value=true}
{/if}
<form name="orderform_{$product.productid}_{$product.add _date}" method="post" action="{if $product.is_product_options eq 'Y' && !$buynow_enabled}product.php?productid={$product.p roductid}{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}

<table 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`&c at=`$cat`&page=`$button_href`"}
</td>
</tr>
{else}
{if $product.is_product_options ne 'Y' || $buynow_enabled}
<tr>
{if $config.General.unlimited_products ne "Y" && ($product.avail le 0 or $product.avail lt $product.min_amount) && $product.variantid}

{elseif $product.distribution eq "" && !($active_modules.Subscriptions ne "" and $products[product].catalogprice)}


{* <td class="BuyNowQuantity">{$lng.lbl_quantity}</td> *}


<td width="20%" nowrap="nowrap">
{if $config.General.unlimited_products ne "Y" && ($product.avail le 0 or $product.avail lt $product.min_amount)}
<b>{$lng.txt_out_of_stock}</b>
{else}
{if $config.General.unlimited_products eq "Y"}
{assign var="mq" value=$config.Appearance.max_select_quantity}
{else}
{math equation="x/y" x=$config.Appearance.max_select_quantity y=$product.min_amount assign="tmp"}
{if $tmp<2}
{assign var="minamount" value=$product.min_amount}
{else}
{assign var="minamount" value=1}
{/if}
{math equation="min(maxquantity+minamount, productquantity+1)" assign="mq" maxquantity=$config.Appearance.max_select_quantity minamount=$minamount productquantity=$product.avail}
{/if}
{if $product.min_amount le 1}
{assign var="start_quantity" value=1}
{else}
{assign var="start_quantity" value=$product.min_amount}
{/if}
{if $config.General.unlimited_products eq "Y"}
{math equation="x+y" assign="mq" x=$mq y=$start_quantity}
{/if}


{*
<select name="amount">
{section name=quantity loop=$mq start=$start_quantity}
<option value="{%quantity.index%}"{if $smarty.get.quantity eq %quantity.index%} selected="selected"{/if}>{%quantity.index%}</option>
{/section}
</select>
*}
<input name="amount" value="1" size="1" type="hidden">


{/if}
</td>
{else}
<tr style="display: none;">
<td><input type="hidden" name="amount" value="1" /></td>
</tr>
{/if}
<td class="BuyNowPrices">
<input type="hidden" name="mode" value="add" />
{include file="customer/main/product_prices.tpl" no_span=true}
</td>
</tr>
{elseif $product.distribution eq "" && !($active_modules.Subscriptions ne "" and $products[product].catalogprice) && $config.General.unlimited_products ne "Y" && ($product.avail le 0 or $product.avail lt $product.min_amount) && !$product.variantid}
<tr>
<td colspan="3" height="25"><b>{$lng.txt_out_of_stock}</b></td>
</tr>
{/if}
<tr>
<td colspan="3">
{if $config.General.unlimited_products eq "Y" || ($product.avail gt 0 and $product.avail ge $product.min_amount) || $product.variantid}
<br />

<table cellpadding="0" cellspacing="0">
<tr>
{if $js_enabled}
{if $special_offers_add_to_cart eq 'Y'}
<td>{include file="buttons/add_to_cart.tpl" style="button" href="javascript: document.orderform_`$product.productid`_`$product. add_date`.submit();"}</td>
{else}
<td>{include file="buttons/buy_now.tpl" style="button" href="javascript: document.orderform_`$product.productid`_`$product. add_date`.submit();"}</td>
{/if}
{if ($login ne "" || $config.Wishlist.add2wl_unlogged_user eq 'Y') && $active_modules.Wishlist ne "" && $special_offers_add_to_cart eq "" && ($product.is_product_options ne 'Y' || $buynow_enabled)}
<td style="padding-left: 20px;">
{include file="buttons/add_to_wishlist.tpl" style="button" href="javascript:document.orderform_`$product.prod uctid`_`$product.add_date`.mode.value='add2wl'; document.orderform_`$product.productid`_`$product. add_date`.submit()"}
</td>
{/if}
{else}
<td>{include file="submit_wo_js.tpl" value=$lng.lbl_buy_now}</td>
{/if}
</tr>
</table>

{/if}
</td>
</tr>
{if $product.min_amount gt 1}
<tr>
<td colspan="3"><font class="ProductDetailsTitle">{$lng.txt_need_min_amo unt|substitute:"items":$product.min_amount}</font></td>
</tr>
{/if}
{/if}
</table>
{if $product.price gt 0}
</form>
{/if}
__________________
Win2003 IIS6, PHP 5.2.3, MySQL 5.0.45 and X-Cart 4.1.9
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 10:52 AM.

   

 
X-Cart forums © 2001-2020