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 QTY drop down to text field (https://forum.x-cart.com/showthread.php?t=32508)

Cyber Matrix 07-12-2007 11:46 AM

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?

exsecror 07-12-2007 11:52 AM

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}" />

nevets1219 07-12-2007 01:00 PM

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.

exsecror 07-13-2007 03:58 AM

Re: Change QTY drop down to text field
 
x-cart validates the quantity in the cart/checkout

hoosierglass 04-01-2009 08:17 AM

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?

hoosierglass 04-02-2009 05:28 AM

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

ChristineP 04-02-2009 06:12 AM

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


hoosierglass 04-02-2009 06:39 AM

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. :-)

cflsystems 04-02-2009 07:07 AM

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>
*}

hoosierglass 04-02-2009 07:17 AM

Re: Change QTY drop down to text field
 
This is great Steve, but isn't there something that should be pulled out?

Mike


All times are GMT -8. The time now is 12:31 PM.

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