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

Removing Quantity Box in Products_t.tpl?

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

Advanced Member
  
Join Date: Nov 2007
Posts: 32
 

Default Removing Quantity Box in Products_t.tpl?

Can someone please help me remove the quantity box in the products_t.tpl? The method for 4.0 doesn't really work in 4.1.


EDIT: I can either remove the box and have ERRORS and no "buy it now" button or have both the box and the button.


Thank you in advance.
__________________
Young Reinette: What do monsters have nightmares about?
The Doctor: Me!

X-Cart Gold 4.1.10
X-Cart Gold 4.2
Mac OS X 10.5.7
Reply With Quote
  #2  
Old 12-13-2007, 08:17 AM
 
artuli artuli is offline
 

Advanced Member
  
Join Date: Nov 2007
Posts: 32
 

Default Re: Removing Quantity Box in Products_t.tpl?

I also wanted to add a "buy now" button to the related prducts, but when ever I do, the buy now button just becomes a link to the product and the maths stop working.

Any help is greatly appreciated. Thanks.
__________________
Young Reinette: What do monsters have nightmares about?
The Doctor: Me!

X-Cart Gold 4.1.10
X-Cart Gold 4.2
Mac OS X 10.5.7
Reply With Quote
  #3  
Old 12-13-2007, 08:47 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: Removing Quantity Box in Products_t.tpl?

You may try to apply the technique used in this post:

http://forum.x-cart.com/showthread.php?p=196619#post196619

The code will not be the same, but the technique will apply. (that is, use a hidden input tag, pre-defined with value="1")

That's how I would do it.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #4  
Old 12-13-2007, 10:53 AM
 
artuli artuli is offline
 

Advanced Member
  
Join Date: Nov 2007
Posts: 32
 

Default Re: Removing Quantity Box in Products_t.tpl?

Thanks Carpeperdiem, but none of that post makes sense to me. I want to remove the quantity box on all products in the products_t.tpl. I tried using a similar mod with "<input type="hidden" name="amount" value="1">" but it doesn't really work.

Quote:
{* $Id: products_t.tpl,v 1.10.2.10 2005/10/17 07:54:19 max Exp $ *}
<table border="0" width="100%" align="center" cellpadding="0" cellspacing="0"><tr><td class="TableThumbnailBorder">
<table border="0" align="center" cellpadding="5" cellspacing="1">
{math equation="floor(100/x)" x=$config.Appearance.products_per_row assign="width"}
{section name=product loop=$products}
{assign var="discount" value=0}
{if %product.index% is div by $config.Appearance.products_per_row}
<tr>
{assign var="cell_counter" value=0}
{/if}
{math equation="x+1" x=$cell_counter assign="cell_counter" }
<td align="center" valign="top" width="{$width}%" class="DialogBox">
<br>
{*$lng.lbl_sku*} {*$products[product].productcode*}
{if $active_modules.Special_Offers ne "" and $products[product].have_offers}
{include file="modules/Special_Offers/customer/product_offer_thumb.tpl" product=$products[product]}
{else}
<TABLE cellpadding="3" cellspacing="0" border="0"><TR><TD height="100">
<A href="product.php?productid={$products[product].productid}&cat={$cat}&page={$navigation_page}">{i nclude file="product_thumbnail.tpl" productid=$products[product].productid image_x=$config.Appearance.thumbnail_width product=$products[product].product tmbn_url=$products[product].tmbn_url}</A><BR>
</TD></TR>
</TABLE>
{/if}
<A href="product.php?productid={$products[product].productid}&cat={$cat}&page={$navigation_page}">{$ lng.lbl_see_details}</A><BR><BR>
{if $active_modules.Subscriptions ne "" and $products[product].catalogprice}
{include file="modules/Subscriptions/subscription_info_inlist.tpl"}
{else}
{if $products[product].taxed_price ne 0}
{if $products[product].list_price gt 0 and $products[product].taxed_price lt $products[product].list_price}
{math equation="100-(price/lprice)*100" price=$products[product].taxed_price lprice=$products[product].list_price format="%3.0f" assign=discount}
{if $discount gt 0}
<FONT class="MarketPrice">{$lng.lbl_market_price}: <S>
{include file="currency.tpl" value=$products[product].list_price}
</S></FONT><BR>
<input type="hidden" name="amount" value="1">
{/if}
{/if}
<FONT class="ProductPrice">{$lng.lbl_our_price}: {include file="currency.tpl" value=$products[product].taxed_price}</FONT><BR><FONT class="MarketPrice">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$products[product].taxed_price}</FONT>{if $discount gt 0}{if $config.General.alter_currency_symbol ne ""}, {/if}{$lng.lbl_save_price} {$discount}%{/if}
{if $products[product].taxes}<BR>{include file="customer/main/taxed_price.tpl" taxes=$products[product].taxes}{/if}
{else}
<FONT class="ProductPrice">{$lng.lbl_enter_your_price}</FONT>
{/if}
{/if}
{if $active_modules.Feature_Comparison ne '' && $products[product].fclassid > 0}
<BR>
{include file="modules/Feature_Comparison/compare_checkbox.tpl" id=$products[product].productid}
{/if}
{*** Uncomment it if you need 'Buy Now' button ***}
{if $usertype eq "C" and $config.Appearance.buynow_button_enabled eq "Y"}
{include file="customer/main/buy_now.tpl" product=$products[product]}
{/if}
{*** Uncomment it if you need 'Buy Now' button ***}
</TD>
{capture name=prod_index}
{math equation="index+x+1" index=%product.index% x=$config.Appearance.products_per_row}
{/capture}
{if $smarty.capture.prod_index is div by $config.Appearance.products_per_row }
</TR>
{/if}
{/section}
{if $cell_counter lt $config.Appearance.products_per_row}
{section name=rest_cells loop=$config.Appearance.products_per_row start=$cell_counter}
<TD class="DialogBox">&nbsp;</TD>
{/section}
</TR>
{/if}
</TABLE>
</TD></TR></TABLE>
{if $active_modules.Feature_Comparison ne '' && $products && $printable ne 'Y'}
{include file="modules/Feature_Comparison/compare_selected_button.tpl"}
{/if}
__________________
Young Reinette: What do monsters have nightmares about?
The Doctor: Me!

X-Cart Gold 4.1.10
X-Cart Gold 4.2
Mac OS X 10.5.7
Reply With Quote
  #5  
Old 12-13-2007, 10:56 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: Removing Quantity Box in Products_t.tpl?

Quote:
I tried using a similar mod with "<input type="hidden" name="amount" value="1">" but it doesn't really work.

if you identify the code in products_t.tpl that makes the qty, then you're golden. I am on deadline now, or else I'd figure it out for you. Keep plugging away at it...
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
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 06:12 AM.

   

 
X-Cart forums © 2001-2020