X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Change product quantity from drop down to number input field (https://forum.x-cart.com/showthread.php?t=2428)

zilker 04-07-2005 07:55 AM

that is in products.tpl and yes, you can still use your product options with that mod.

jb5ep 04-14-2005 12:12 PM

Has anyone tried this with 4.0.13? Looking at the 2 changes:

1. products.tpl

I changed this:

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{/if}>{%quantity.index%}</OPTION>
{/section}
</SELECT>


to this:

Code:

<input name=amount type="text" value="{$product.min_amount}" size="6" maxlength="4">

That appears to work no probs. BUT...

2. form_validation.tpl

I replaced the entire contents of this file with the suggestion in zilker's post of Sun Feb 13, 2005

The problem...

Whenever I now submit the form to 'add to cart', I get the Jscript error "document.orderform.minamount.value' is null or not an object.

Has anyone else had any luck making this mod on 4.0.13?

Cheers,
JB

Tequilaboy 06-14-2005 03:52 PM

I'm looking at skin1/main/products.tpl and I can't seem to find the code to replace. Used the 'find' function with parts of the code and even scanned through the file (since file is fairly short, 3k). Still not finding it. Is this even the right products.tpl file?
Looked at products.php in the root too but code's not in there either.

Somebody please help!

jb5ep 06-15-2005 12:30 AM

sorry - maybe a typo...try product.tpl

Tequilaboy 06-19-2005 09:18 PM

Ok well, looked at both product.tpl products.tpl in the skin1/main/ directory. Search function doesn't even find the words "select" or "amount" anywhere in either document (searching code not text).

I'm using 4.0.13, why the hell can't I find that string? Is the file in another directory?

jb5ep 06-20-2005 12:41 AM

OK, i'm looking at a vanilla, XC 4.0.13 install.

1. Goto skin1/customer/main/product.tpl

2. Look at lines 92-96, for the code in my post above (or, try searching code for '<SELECT id="product_avail" ' )

3. Replace that code with the code from my post above.

Should work no probs, - i've just replicated again to test i'm not going mad. If you still don't have any luck, PM me or post your tpl here..

Cheers,

jedak 06-23-2005 10:31 AM

I tried this code because I too prefer the input field as oppose to the drop down. The problem I'm having is some of my products have variants and if that product is out of stock customers are still able to order the out of stock variant, which should not be since I have that option disable in general settings. Anyone have this problem or better yet a fix.
Thanks

jb5ep 06-23-2005 11:11 AM

Nothing to do with this fix in 4.0.14, is it?

Quote:

Wed Jun 15 10:05:37 MSD 2005 [!] - max - Bug: There was not a checkup procedure at the stage of checkout that would ensure that the quantity of product variant items in cart was not larger than the quantity of this variant in stock. As a result, several customers who added to cart a quantity of variant items that did not exceed the quantity in stock could place their orders, while in fact there were not enough variant items for all of them. Fixed.

jedak 06-24-2005 06:19 AM

Quote:

Originally Posted by jb5ep
Nothing to do with this fix in 4.0.14, is it?

Quote:

Wed Jun 15 10:05:37 MSD 2005 [!] - max - Bug: There was not a checkup procedure at the stage of checkout that would ensure that the quantity of product variant items in cart was not larger than the quantity of this variant in stock. As a result, several customers who added to cart a quantity of variant items that did not exceed the quantity in stock could place their orders, while in fact there were not enough variant items for all of them. Fixed.

No. without the above mod variants work fine and show out of stock - if thats the case - but with this mod seems as though variants are ignored.

If someone could assist me in getting the input field to work on the detail page the way it works on the shopping cart page it would be greatly appreciated.

mocara 09-07-2005 03:31 PM

Any updates to this mod for 4.0.14? Obviously ensuring that we have in stock what we sell is vital :-)

Mocara.


All times are GMT -8. The time now is 03:07 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.