View Single Post
  #6  
Old 09-01-2009, 05:05 PM
 
Kiwami Kiwami is offline
 

Advanced Member
  
Join Date: Nov 2004
Location: Miami, FL
Posts: 69
 

Default Re: Getting RID of theQuantity 'input' field and get the dropdown

I dunno. i cant post the entire produts.tpl .. it says its too big.. hope i posted the right part
Code:
<div class="details"{if $max_image_width gt 0} style="margin-left: {$max_image_width}px;"{/if}> <form name="orderform" method="post" action="cart.php" onsubmit="javascript: return FormValidation();"> <input type="hidden" name="mode" value="add" /> <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"}" /> <div class="descr">{$product.fulldescr|default:$product.descr}</div> <table cellspacing="0" class="product-properties" summary="{$lng.lbl_details|escape}"> <tr> <td colspan="2" class="product-subtitle"> <div>{$lng.lbl_details}</div> </td> </tr> <tr> {* <td class="property-name">{$lng.lbl_sku}</td> <td class="property-value" id="product_code">{$product.productcode|escape}</td> *} </tr> {if $config.Appearance.show_in_stock eq "Y" && $config.General.unlimited_products ne "Y" && $product.distribution eq ""} <tr> <td class="property-name">{$lng.lbl_in_stock}</td> <td class="property-value" id="product_avail_txt"> {if $product.avail gt 0} {$lng.txt_items_available|substitute:"items":$product.avail} {else} {$lng.lbl_no_items_available} {/if} </td> </tr> {/if} {if $product.weight ne "0.00" || $variants ne ''} <tr id="product_weight_box"> <td class="property-name">{$lng.lbl_weight}:</td> <td class="property-value"> <span id="product_weight">{$product.weight|formatprice}</span> {$config.General.weight_symbol} </td> </tr> {/if} {if $active_modules.Extra_Fields} {include file="modules/Extra_Fields/product.tpl"} {/if} {if $active_modules.Feature_Comparison} {include file="modules/Feature_Comparison/product.tpl"} {/if} {if $active_modules.Subscriptions && $subscription} {include file="modules/Subscriptions/subscription_info.tpl"} {else} <tr class="separator"> <td>&nbsp;</td> </tr> <tr> <td class="property-name product-price">{$lng.lbl_price}:</td> <td class="property-value"> {if $product.taxed_price ne 0 || $variant_price_no_empty} <span class="product-price-value">{include file="currency.tpl" value=$product.taxed_price tag_id="product_price"}</span> <span class="product-market-price">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$product.taxed_price tag_id="product_alt_price"}</span> {if $product.taxes} {include file="customer/main/taxed_price.tpl" taxes=$product.taxes} {/if} {else} <input type="text" size="7" name="price" /> {/if} </td> </tr> {if $product.forsale ne "B"} <tr> <td colspan="2"> {include file="customer/main/product_prices.tpl"} </td> </tr> {/if} {/if} <tr> <td colspan="2" class="product-subtitle">&nbsp; </td> </tr> {if $product.forsale neq "B" || ($product.forsale eq "B" && $smarty.get.pconf ne "" && $active_modules.Product_Configurator)} {if $active_modules.Product_Options ne ""} {include file="modules/Product_Options/customer_options.tpl"} {/if} <tr> <td class="property-name product-input"> {$lng.lbl_quantity} {if $product.min_amount gt 1} <div class="product-min-amount">{$lng.txt_need_min_amount|substitute:"items":$product.min_amount}</div> {/if} </td> <td class="property-value"> {if $product.appearance.empty_stock && ($variants eq '' || ($variants ne '' && $product.avail le 0))} <script type="text/javascript"> <!-- var min_avail = 1; var avail = 0; var product_avail = 0; --> </script> <strong>{$lng.txt_out_of_stock}</strong> {elseif !$product.appearance.force_1_amount && $product.forsale ne "B"} <script type="text/javascript"> <!-- var min_avail = {$product.appearance.min_quantity|default:1}; var avail = {$product.appearance.max_quantity|default:1}; var product_avail = {$product.avail|default:"0"}; --> </script> <input type="text" id="product_avail_input" name="amount" maxlength="11" size="6" onchange="javascript: return check_quantity_input_box(this);" value="{$smarty.get.quantity|default:$product.appearance.min_quantity}"{if not $product.quantity_input_box_enabled} disabled="disabled" style="display: none;"{/if}/> <select id="product_avail" name="amount"{if $active_modules.Product_Options ne '' && ($product_options ne '' || $product_wholesale ne '')} onchange="javascript: check_wholesale(this.value);"{/if}{if $product.quantity_input_box_enabled} disabled="disabled" style="display: none;"{/if}> <option value="{$product.appearance.min_quantity}"{if $smarty.get.quantity eq $product.appearance.min_quantity} selected="selected"{/if}>{$product.appearance.min_quantity}</option> {if not $product.quantity_input_box_enabled} {section name=quantity loop=$product.appearance.loop_quantity start=$product.appearance.min_quantity} {if %quantity.index% ne $product.appearance.min_quantity} <option value="{%quantity.index%}"{if $smarty.get.quantity eq %quantity.index%} selected="selected"{/if}>{%quantity.index%}</option> {/if} {/section} {/if} </select> {else} <script type="text/javascript"> <!-- var min_avail = 1; var avail = 1; var product_avail = 1; --> </script> <span class="product-one-quantity">1</span> <input type="hidden" name="amount" value="1" /> {if $product.distribution ne ""} {$lng.txt_product_downloadable} {/if} {/if} </td> </tr> {/if} </table> {if $product.appearance.buy_now_buttons_enabled} {if $product.forsale ne "B"} <div class="buttons-row buttons-auto-separator"> {include file="customer/buttons/add_to_cart.tpl" type="input" additional_button_class="main-button"} {if $product.appearance.buy_now_add2wl_enabled && $js_enabled} {include file="customer/buttons/add_to_wishlist.tpl" href="javascript: if (FormValidation()) submitForm(document.orderform, 'add2wl', arguments[0]);" additional_button_class="simple-arrow-button" style="link"} {/if} </div> {else} {$lng.txt_pconf_product_is_bundled} {/if} {if $smarty.get.pconf ne "" && $active_modules.Product_Configurator && $js_enabled} <input type="hidden" name="slot" value="{$smarty.get.slot}" /> <input type="hidden" name="addproductid" value="{$product.productid}" /> <div class="button-row"> {include file="customer/buttons/button.tpl" button_title=$lng.lbl_pconf_add_to_configuration href="javascript: if (FormValidation()) `$ldelim`document.orderform.productid.value='`$smarty.get.pconf`'; document.orderform.action='pconf.php'; document.orderform.submit();`$rdelim`" additional_button_class="simple-arrow-button" style="link"} </div> {if $product.appearance.empty_stock} <p class="message"> <strong>{$lng.lbl_note}:</strong> {$lng.lbl_pconf_slot_out_of_stock_note} </p> {/if} <p>{$lng.txt_add_to_configuration_note}</p> {/if} {/if} </form>
__________________
Follow me on twitter www.twitter.com/kiwami
@Kiwami
X-Cart Gold 4.4.3 | Cpanel | Dedicated Server
Reply With Quote