Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Change product quantity from drop down to number input field

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #21  
Old 04-07-2005, 07:55 AM
 
zilker zilker is offline
 

Advanced Member
  
Join Date: Feb 2003
Posts: 89
 

Default

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

uummm...perhaps you should tell me again.

http://www.designertrends.com
Version 4.0.6
Unix
Reply With Quote
  #22  
Old 04-14-2005, 12:12 PM
 
jb5ep jb5ep is offline
 

Advanced Member
  
Join Date: Apr 2005
Location: U.K.
Posts: 65
 

Default

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
__________________
X-Cart 4.0.17
ezUpsell
PHP 4.4.1
MySQL 4.0.25-standard
Apache 1.3.34
Linux
Reply With Quote
  #23  
Old 06-14-2005, 03:52 PM
  Tequilaboy's Avatar 
Tequilaboy Tequilaboy is offline
 

Advanced Member
  
Join Date: May 2005
Posts: 45
 

Default

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!
__________________
Wicked shirts, and other assorted mayhem.
www.MadRagz.com
-----
X-Cart Gold v 4.0.13
Reply With Quote
  #24  
Old 06-15-2005, 12:30 AM
 
jb5ep jb5ep is offline
 

Advanced Member
  
Join Date: Apr 2005
Location: U.K.
Posts: 65
 

Default

sorry - maybe a typo...try product.tpl
__________________
X-Cart 4.0.17
ezUpsell
PHP 4.4.1
MySQL 4.0.25-standard
Apache 1.3.34
Linux
Reply With Quote
  #25  
Old 06-19-2005, 09:18 PM
  Tequilaboy's Avatar 
Tequilaboy Tequilaboy is offline
 

Advanced Member
  
Join Date: May 2005
Posts: 45
 

Default

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?
__________________
Wicked shirts, and other assorted mayhem.
www.MadRagz.com
-----
X-Cart Gold v 4.0.13
Reply With Quote
  #26  
Old 06-20-2005, 12:41 AM
 
jb5ep jb5ep is offline
 

Advanced Member
  
Join Date: Apr 2005
Location: U.K.
Posts: 65
 

Default

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,
__________________
X-Cart 4.0.17
ezUpsell
PHP 4.4.1
MySQL 4.0.25-standard
Apache 1.3.34
Linux
Reply With Quote
  #27  
Old 06-23-2005, 10:31 AM
  jedak's Avatar 
jedak jedak is offline
 

Senior Member
  
Join Date: Apr 2005
Location: NY
Posts: 149
 

Default

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
__________________
X-Cart pro v4.0.17
X-Cart pro v4.1.6
X-Cart pro v4.2
Reply With Quote
  #28  
Old 06-23-2005, 11:11 AM
 
jb5ep jb5ep is offline
 

Advanced Member
  
Join Date: Apr 2005
Location: U.K.
Posts: 65
 

Default

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.
__________________
X-Cart 4.0.17
ezUpsell
PHP 4.4.1
MySQL 4.0.25-standard
Apache 1.3.34
Linux
Reply With Quote
  #29  
Old 06-24-2005, 06:19 AM
  jedak's Avatar 
jedak jedak is offline
 

Senior Member
  
Join Date: Apr 2005
Location: NY
Posts: 149
 

Default

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.
__________________
X-Cart pro v4.0.17
X-Cart pro v4.1.6
X-Cart pro v4.2
Reply With Quote
  #30  
Old 09-07-2005, 03:31 PM
 
mocara mocara is offline
 

Advanced Member
  
Join Date: Apr 2005
Posts: 55
 

Default

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

Mocara.
__________________
4.0.15
Linux
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 09:08 AM.

   

 
X-Cart forums © 2001-2020