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

Replace Quantity drop down to text input box. 4.0+ with buy

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-07-2005, 03:09 PM
 
mpj mpj is offline
 

Senior Member
  
Join Date: Feb 2005
Posts: 106
 

Default 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
__________________
X-Cart 4.0.11


{My simple mods}
Adding Market list and % save on product detail
Quantity input box
Reply With Quote
  #2  
Old 02-17-2005, 07:33 AM
  gizmo's Avatar 
gizmo gizmo is offline
 

X-Adept
  
Join Date: Jan 2005
Location: Crawley : UK
Posts: 618
 

Default

Hi
This is great, but it only applies to "Buy it now"
What about normal view of product
__________________
Thank You - Alan
Don't be like me, and keep saying "Nearly did it" go do it!!
Version: 4.4.4 Gold -
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 11:15 PM.

   

 
X-Cart forums © 2001-2020