View Single Post
  #2  
Old 09-19-2006, 10:48 AM
  frankdux's Avatar 
frankdux frankdux is offline
 

Senior Member
  
Join Date: Jul 2004
Location: Manchester, NH, USA
Posts: 125
 

Default Re: Changing quantity selectbox amount for individual product

After a little more digging I realized that quantity changes in the dropdown selectbox are tied to inventory levels. Since I have disable inventory on this site, I decided to just go the route of replacing the dropdown select with a text input field. Here is what I did in case anyone else has this need:

I took this code in product.tpl:
HTML Code:
<SELECT id="product_avail" name="amount"{if $active_modules.Product_Options ne '' && $product_options ne ''} onchange="check_options();"{/if}> {section name=quantity loop=$mq start=$start_quantity} <OPTION value="{%quantity.index%}" {if $smarty.get.quantity eq %quantity.index%}selected{/if}>{%quantity.index%}</OPTION> {/section} </SELECT>

and replaced it with this:
HTML Code:
<input type="text" name="amount" size="3"> {* hide dropdown selectbox <SELECT id="product_avail" name="amount"{if $active_modules.Product_Options ne '' && $product_options ne ''} onchange="check_options();"{/if}> {section name=quantity loop=$mq start=$start_quantity} <OPTION value="{%quantity.index%}" {if $smarty.get.quantity eq %quantity.index%}selected{/if}>{%quantity.index%}</OPTION> {/section} </SELECT> *}

Basically I just added a text input fieLd with the same name as the selectbox, "amount". Then I just commented out the select in case I ever want to use it again.
__________________
X-Cart: 4.0.18
Linux, Apache, MySQL: 4.1.16, PHP: 4.4.2
Reply With Quote