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

Change QTY drop down to text field

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-12-2007, 11:46 AM
  Cyber Matrix's Avatar 
Cyber Matrix Cyber Matrix is offline
 

eXpert
  
Join Date: Dec 2006
Posts: 199
 

Default Change QTY drop down to text field

I found this post http://forum.x-cart.com/viewtopic.php?t=3117 about changing the qty field from a drop down to a text field. However, when I look in the products.tpl the information is not there.

I'm using 4.1.8 version, does any one know where I can change this?
__________________
Cyber Matrix
-------------------
X-Cart 4.1.9
Reply With Quote
  #2  
Old 07-12-2007, 11:52 AM
 
exsecror exsecror is offline
 

X-Wizard
  
Join Date: Apr 2007
Posts: 1,284
 

Default Re: Change QTY drop down to text field

Yes in skin1/customers/main/product.tpl on line 143:

Replace:
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>

With:

Code:
<input type="text" name="amount" size="4" maxlength="3" value="{$product.min_amount}" />
Reply With Quote
  #3  
Old 07-12-2007, 01:00 PM
 
nevets1219 nevets1219 is offline
 

eXpert
  
Join Date: Jun 2006
Posts: 351
 

Default Re: Change QTY drop down to text field

You should probably include some JavaScript to validate the quantity unless quantity isn't an issue or X-Cart does it in the next step.
__________________
4.1.8
Reply With Quote
  #4  
Old 07-13-2007, 03:58 AM
 
exsecror exsecror is offline
 

X-Wizard
  
Join Date: Apr 2007
Posts: 1,284
 

Default Re: Change QTY drop down to text field

x-cart validates the quantity in the cart/checkout
Reply With Quote
  #5  
Old 04-01-2009, 08:17 AM
  hoosierglass's Avatar 
hoosierglass hoosierglass is offline
 

X-Adept
  
Join Date: Aug 2006
Location: Zionsville, IN
Posts: 974
 

Default Re: Change QTY drop down to text field

This works great on the product.tpl but what about for the products.tpl, what would I change there to get rid of the drop down box and replace with a text box?
__________________
X-Cart Gold 4.7.7
Custom Work from www.luminointernet.com
www.indy-pen-dance.com
Reply With Quote
  #6  
Old 04-02-2009, 05:28 AM
  hoosierglass's Avatar 
hoosierglass hoosierglass is offline
 

X-Adept
  
Join Date: Aug 2006
Location: Zionsville, IN
Posts: 974
 

Default Re: Change QTY drop down to text field

When you have the Buy Now option active from the products list it gives you the drop down quantity box and the ability to add to your cart without viewing the complete details of the product.

Does anyone have any idea how to change that drop down quantity box in the products.tpl to a text box? I have looked at this over and over and it does not work the same as product.tpl. I beleive it is in the buy now template but I can not see what would need to change in there to make it a text box. Any ideas?

Mike
__________________
X-Cart Gold 4.7.7
Custom Work from www.luminointernet.com
www.indy-pen-dance.com
Reply With Quote
  #7  
Old 04-02-2009, 06:12 AM
 
ChristineP ChristineP is offline
 

eXpert
  
Join Date: Jul 2008
Posts: 310
 

Default Re: Change QTY drop down to text field

In Admin. > General settings > Product options options place a check in the box for " A customer using the "Buy now" button to order a product with product options must be redirected to the product details:"

Christine

Quote:
Originally Posted by hoosierglass
When you have the Buy Now option active from the products list it gives you the drop down quantity box and the ability to add to your cart without viewing the complete details of the product.

Mike
__________________
______________
version 4.1.9 Gold
Reply With Quote
  #8  
Old 04-02-2009, 06:39 AM
  hoosierglass's Avatar 
hoosierglass hoosierglass is offline
 

X-Adept
  
Join Date: Aug 2006
Location: Zionsville, IN
Posts: 974
 

Default Re: Change QTY drop down to text field

I do not want to force a customer to the details page. More clicks means less sales and more aggrivation for the buyer. All I want to do is switch the drop down box to a text box in the products lists.

Thank you for the idea though.
__________________
X-Cart Gold 4.7.7
Custom Work from www.luminointernet.com
www.indy-pen-dance.com
Reply With Quote
  #9  
Old 04-02-2009, 07:07 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Change QTY drop down to text field

In the buy now template

<input type="text" style="vertical-align: middle;" name="amount" size="3" maxlength="4" value="{$product.appearance.min_quantity}" />
{*
<select name="amount">
{section name=quantity loop=$product.appearance.loop_quantity start=$product.appearance.min_quantity}
<option value="{%quantity.index%}"{if $smarty.get.quantity eq %quantity.index%} selected="selected"{/if}>{%quantity.index%}</option>
{/section}
</select>
*}
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #10  
Old 04-02-2009, 07:17 AM
  hoosierglass's Avatar 
hoosierglass hoosierglass is offline
 

X-Adept
  
Join Date: Aug 2006
Location: Zionsville, IN
Posts: 974
 

Default Re: Change QTY drop down to text field

This is great Steve, but isn't there something that should be pulled out?

Mike
__________________
X-Cart Gold 4.7.7
Custom Work from www.luminointernet.com
www.indy-pen-dance.com
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 02:51 PM.

   

 
X-Cart forums © 2001-2020