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

Removing quantity drop down & adding quantity box.

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-31-2005, 02:06 PM
  Debra's Avatar 
Debra Debra is offline
 

Advanced Member
  
Join Date: Aug 2005
Posts: 44
 

Default Removing quantity drop down & adding quantity box.

I know that I have seen this posted...cannot find it now. But from what I remember there was no solution to exactly what I needed. I sell products that I have 1000's of in stock and I do not want a drop down box that goes to 1000! I see that when you look at a detailed description of the item you can enter in the quantity of the item that you want in the box and I would like that to be in place of the drop down quantity box.
__________________
X-Cart version 4.0.14
Reply With Quote
  #2  
Old 10-31-2005, 02:17 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

You mean this one?

http://forum.x-cart.com/viewtopic.php?t=3117
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 10-31-2005, 03:22 PM
  Debra's Avatar 
Debra Debra is offline
 

Advanced Member
  
Join Date: Aug 2005
Posts: 44
 

Default

No, that's not exactly what I am looking for, I actually already have used this on the page that has the 'detailed description of the item' (product.tpl). I need to know how and where to implement this on the previous page that lists all the items for that category.
For instance:
1. A user cicks on the category 'Bead Mixes'
2. The user then gets a product list of all of the bead mixes in that category.
3. The user decides that he/she wants to add 3 of the blue bead mixes into his/her cart without clicking on the detailed description of that item.
4. The user maunally types in the number '3' and clicks 'add to cart'.

I was thinking maybe this was in products.tpl, but I just couldn't find it.

This was the code that I replaced in product.tpl to get the desired effect:
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>

I cannot find this code in products.tpl, what should I be looking for?
__________________
X-Cart version 4.0.14
Reply With Quote
  #4  
Old 10-31-2005, 05:07 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

Ok, how about something like this?

http://forum.x-cart.com/viewtopic.php?t=3130
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 10-31-2005, 06:26 PM
  Debra's Avatar 
Debra Debra is offline
 

Advanced Member
  
Join Date: Aug 2005
Posts: 44
 

Default

I don't even really need anything that complicated, I just want a quantity box beside each product and the user should be able to click add to cart for each individual product instead of adding them all together at one time...although that is something that I may decide that I do want to add in, good post, just not what I was thinking of.
__________________
X-Cart version 4.0.14
Reply With Quote
  #6  
Old 11-01-2005, 03:15 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

My thinking was that although it may not be the EXACT solution you want, you can use pieces of it to achieve what you are looking for.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #7  
Old 12-27-2005, 10:34 AM
  Debra's Avatar 
Debra Debra is offline
 

Advanced Member
  
Join Date: Aug 2005
Posts: 44
 

Default

Just an update, the code I was looking for was in buy_now.tpl. This will replace that annoying drop down box in the subcatagories template. I replaced:

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>

With this:

Code:
<input type="text" name=amount size="4" value="{$product.min_amount}">

Now I have a box to input the quantity instead of that drop down box! Works so far, it's good!
__________________
X-Cart version 4.0.14
Reply With Quote
  #8  
Old 01-01-2007, 05:33 PM
 
paperlion paperlion is offline
 

Advanced Member
  
Join Date: Jun 2006
Posts: 89
 

Default Re: Removing quantity drop down & adding quantity box.

This looks like a great mod.

Did this file move though in 4.0.19?

buy_now.tpl only has a reference line for the Buy Now button and label, and those have been giving me the runaround trying to trace them to the actual drop down box.

webmaster mode didn't seem to locate anything except these either.
__________________
Gold 4.0.19
Reply With Quote
  #9  
Old 01-01-2007, 10:16 PM
 
paperlion paperlion is offline
 

Advanced Member
  
Join Date: Jun 2006
Posts: 89
 

Default Re: Removing quantity drop down & adding quantity box.

I replaced this section near line 95 of product.tpl in the template editor (under the ...), commenting out the original replaced code as shown {* *}:
(version is 4.0.19)

{* $Id: product.tpl,v 1.96.2.29 2006/06/28 08:13:11 svowl Exp $ *}
...
{* <SELECT id="product_avail" name="amount"{if $active_modules.Product_Options ne '' && $product_options ne ''} onchange="check_options();"{/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> *}
<INPUT type="text" name=amount size="4" value="{$product.min_amount}">

When I call up the product pages though, they look the same as before. Can someone please tell me if I mussed up?
__________________
Gold 4.0.19
Reply With Quote
  #10  
Old 01-02-2007, 11:45 AM
 
paperlion paperlion is offline
 

Advanced Member
  
Join Date: Jun 2006
Posts: 89
 

Default Re: Removing quantity drop down & adding quantity box.

Found it. I was modifying main/product.tpl instead of main/customer...

Seems to work okay, but cart prices are not reflecting wholesale discounts. Changed the file back to the original vers. and found the same thing though. Hmm.
__________________
Gold 4.0.19
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 11:31 AM.

   

 
X-Cart forums © 2001-2020