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)
-   -   Replace Quantity drop down to text input box. 4.0+ with buy (https://forum.x-cart.com/showthread.php?t=12021)

mpj 02-07-2005 03:09 PM

Replace Quantity drop down to text input box. 4.0+ with buy
 
Been on this site for a few weeks now, it's about time to give back to the community.


This is for X-Cart 4.0+ with the buy now feature enable.



Skin1>customer>main>product.tpl

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>


Replace with

Code:

<input type="text" name="amount" size="3" value="1"> 


Skin1>customer>main>buy_now.tpl

Code:

<SELECT name="amount">
{if $product.min_amount le 1}
{assign var="start_quantity" value=1}
{else}
{assign var="start_quantity" value=$product.min_amount}
{/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>


REF: http://forum.x-cart.com/viewtopic.php?t=3117


Happy coding !

MPJ

gizmo 02-17-2005 07:33 AM

Hi
This is great, but it only applies to "Buy it now"
What about normal view of product


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

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