| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
removing quantity | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
removing quantity
Hello,
I'm looking to remove the quantity from my products. I've read past posts about setting the maximum quanitiy to 0 in general settings but I can not find this in the version I am running Cart: 4[1].0.1 - Xcart Gold I have a modificator dropdown in use to set the price via the quantity and basically want the basic quantity drop down off the site. Any and all help is greatly apprieciated!
__________________
my sig? |
|||||||
#2
|
|||||||
|
|||||||
Why you not just edit the tpl code of cutomers/product.tpl and set the product form of the quantity to a hidden field with 1 as value and the rest of this field you just comment out?
__________________
Thomas _______________________ X-Cart version 4.0.2 & xaffiliates PHP 4.1.2 MySQL 3.23.49 Web server Apache Operation system Debian Linux 3.0 Perl 5.006001 |
|||||||
#3
|
|||||||
|
|||||||
Just what I was about to say
__________________
x-cart 4.0.5 (live and heavily modded) Server: freebsd |
|||||||
#4
|
|||||||
|
|||||||
Re: removing quantity
Can this "fix" be done for only a select group of products? Say for one particular category rather than all of them?
I have some products that we'd like to have the quantity dropdown, but on others, we'd like to just use the add to cart button so it limits the purchase to one at a time because we are using memo fields in the product options that must be filled out per each item purchased. Thanks, lisa b. Xcart Gold v 4.1.8
__________________
Lisa B. Coresmart.com Xcart gold v 4.1.8 |
|||||||
#5
|
|||||||
|
|||||||
Re: removing quantity
bump
same question. can we limit the quantity option to specific categories? We sell mostly dvds so we want customers to only purchase 1 at a time. But we do have another category or two where customers purchase multiple items. how can I remove the quantity box on the dvd category but make it available on other categories?
__________________
Sharon vers. gold 4.0.17 to 4.1.10 (july 2008 ) |
|||||||
#6
|
|||||||||
|
|||||||||
Re: removing quantity
****make Sure You Backup Files******
to remove the quantity box - find this code in product.tpl <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> Comment it out {* <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> *} Add this just below the commented code. <input type="hidden" name="amount" value="1" /> if you want to use this for certain categories or products write an if/else statement. {if $cat eq 500} {* <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> *} <input type="hidden" name="amount" value="1" /> {else} <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> {/if} You will have to replace the cat id - 500 with whatever your cat id is.
__________________
xcart 5.1.2 |
|||||||||
#7
|
|||||||
|
|||||||
Re: removing quantity
Ashley,
I really appreciate you taking the time to answer and provide code, but it is not working for me. When I tried your first solution to comment out the code and add <input type="hidden" name="amount" value="1" /> the quantity drop down box disappeared (but the word quantity still remained) So then I tried your second solution with the if/else statement (replacing the category code with the approriate number) but nothing happened. The quantity box and drop down box still exists in all my categories. ::sigh::
__________________
Sharon vers. gold 4.0.17 to 4.1.10 (july 2008 ) |
|||||||
#8
|
|||||||||
|
|||||||||
Re: removing quantity
Ok do you know the category id that you want to comment out? You can find it in the url.
example - test/xcart/home.php?cat=3 To remove the word Quantity comment out this code. {*<td height="25" width="30%">{$lng.lbl_quantity}{if $product.min_amount gt 1}<br /><font class="ProductDetailsTitle">{$lng.txt_need_min_amo unt|substitute:"items":$product.min_amount}</font>{/if}</td>*}
__________________
xcart 5.1.2 |
|||||||||
#9
|
|||||||
|
|||||||
Re: removing quantity
I'm interested in implementing this in our store. I have just one category where I would need a quantity box, the rest from which I want it removed. I played around with Ashley's if and else statement, effectively switching it around to exclude the quantity box from all categories except the one that requires it. That's all fine.
However, how do I make the display of the quantity label conditional on whether the box is displaying or not? Surely just commenting it out would mean that in my chosen category where I am displaying the quantity drop down, the label wouldn't display...
__________________
X Cart Pro v. 4.1.9 Download Expander (from Altered Cart) X-Magnifier Dynamic Preview (from BCS Engineering) Customer Rewards Points (BCSE), used as credit purchasing system |
|||||||
#10
|
|||||||||
|
|||||||||
Re: removing quantity
use the same one you used for the drop down. just place it around the qty label.
__________________
xcart 5.1.2 |
|||||||||
|
|||
X-Cart forums © 2001-2020
|