| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Change product quantity from drop down to number input field | ||||
|
|
Thread Tools | Search this Thread |
#31
|
|||||||
|
|||||||
make sure to add this to the product.tpl
<Input type="hidden" name="minamount" value="{$product.min_amount}"> That will allow the javascript toknow the minimum ammount. I placed it with the text box but you can also place it with the other hidden inputs. scott
__________________
\"Then again it could all be horse crap\" by some old Guy. 4.013 |
|||||||
#32
|
|||||||
|
|||||||
Works like a charm when the customer is viewing the product details! Thanks!
How can I make this happen when a customer is viewing all the products in a category?
__________________
Dawn X-Cart Business 5.3.6.3 Mods: Qty input - Custom Mod Part numbers near title - Custom Mod Membership approval before ordering - Custom Mod Order Forms - Custom Mod Freight on Board - Custom Mod Catalog Order Form Call For Price Template: Crisp White skin Running on Windows |
|||||||
#33
|
|||||||
|
|||||||
Quote:
I opened /skin1/customer/main/buy_now.tpl and replaced Code:
with Code:
|
|||||||
#34
|
|||||||
|
|||||||
Re: Change product quantity from drop down to number input field
Im on version 4. 0. 18,
are you guys still doing this <input name=amount type="text" value="{$product.min_amount}" size="7" maxlength="5"> In product.tpl? OR ..... is there something in tha admin panel that i can set? I tried setting the quantity select box to 0, but it just went back to 50.
__________________
X-Cart 4.0.18 DBest |
|||||||
#35
|
|||||||||
|
|||||||||
Re: Change product quantity from drop down to number input field
Quote:
Dawn, did you ever come up with a solution for this? After making all the changes previously described in this thread, I am running into the same problem. When the customer is viewing the product details page (/cart/product.php, modified using product.tpl ) the JavaScript alert works fine if they try to order below the minimum. However, when the customer is on the page that lists all the products in one category (cart/home.php?cat=255, modified using buy_now.tpl) they do not get the alert and they still get the message "You are not allowed to access that resource!". The changes I made to product.tpl and buy_now.tpl are identical. The problem seems to be that the Javascript FormValidation is not availalbe on the category listing pages. Is there an appropriate way to make this available on all pages?
__________________
X-Cart: 4.0.18 Linux, Apache, MySQL: 4.1.16, PHP: 4.4.2 |
|||||||||
#36
|
|||||||||
|
|||||||||
Re: Change product quantity from drop down to number input field
An update to this issue...it was simple enough to include the necessary JavaScript on each page by adding: {include file="form_validation_js.tpl"} to /cart/home.php .
That still didn't solve the problem. The reason the Javascript alert works on the individual detail pages is that there is only one form on these pages and its name is "orderform" and that is picked up by the "document.orderform.amount.value" in the FormValidation() function. The reason its not working on the catagory pages that list multiple products, is that there is a different form for each product. Each one has a different name that is dynamically created and is something like "orderform_16152_1154021436". The Javascript FormValidation() function will only be triggered on forms named "orderform". Anyway, if anyone has an idea how to handle this wrinkle, I would appreciate it as I am stuck at this point.
__________________
X-Cart: 4.0.18 Linux, Apache, MySQL: 4.1.16, PHP: 4.4.2 |
|||||||||
#37
|
|||||||
|
|||||||
Re: Change product quantity from drop down to number input field
I have a problem with qty's, no matter what qty you input the amount sent to cart is always 1
Any clues ? X-Cart version 4.0.18
__________________
Cheers Stuart ----------------------- X-Cart Version Gold 5.4.2 |
|||||||
#38
|
|||||||||
|
|||||||||
Re: Change product quantity from drop down to number input field
I am on version 4.1.9 - is there an update for changing the quanity from drop down to number input?
__________________
"The more you know - the less you pay" Various websites using 4.66 Pro & 5 |
|||||||||
#39
|
|||||||
|
|||||||
Re: Change product quantity from drop down to number input field
anyone? please
__________________
Version 4.1.11 |
|||||||
#40
|
|||||||
|
|||||||
Re: Change product quantity from drop down to number input field
in product template
<tr> <td width="30%">{$lng.lbl_quantity}</td> <td><input type="text" name="amount" size="2" maxlength="2" value="{$product.min_amount}"/></td> </tr>
__________________
Cheers Stuart ----------------------- X-Cart Version Gold 5.4.2 |
|||||||
|
|||
X-Cart forums © 2001-2020
|