View Single Post
  #4  
Old 12-13-2007, 08:42 AM
 
carpeperdiem carpeperdiem is offline
 

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

Default Re: how to delete this (with pic)

This is super easy...

in /skin1/customer/main/product.tpl

FIND:

Code:
<select id="product_avail" name="amount"{if $active_modules.Product_Options ne '' && $product_options ne ''} onchange="check_wholesale(this.value);"{/if}> {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>

BEFORE this codeblock, insert:
Code:
{* BEGIN change qty to 1 for product 29 or 30 *} {if $product.productid eq '29' or $product.productid eq '30'} <input type="hidden" name="amount" value="1"> {else} {* END change qty to 1 for product 29 or 30 *}

AFTER the </select> in the first codeblock, add:

Code:
{/if}{* added for change qty to 1 for product 29 or 30 *}

I used this for two products... product id 29 and 30. You will have to adjust for your own products.

NOW, if you have many products to do this for (i.e. your entire site) then simply replace the code...

The thing I learned is that a value must always be passed -- if it's 1 that's ok, but it must be a positive integer. So, make it hidden and constrain it to value="1".

OK?
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote