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)
-   -   Removing quantity drop down & adding quantity box. (https://forum.x-cart.com/showthread.php?t=17643)

Debra 10-31-2005 02:06 PM

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.

balinor 10-31-2005 02:17 PM

You mean this one?

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

Debra 10-31-2005 03:22 PM

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?

balinor 10-31-2005 05:07 PM

Ok, how about something like this?

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

Debra 10-31-2005 06:26 PM

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.

balinor 11-01-2005 03:15 AM

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.

Debra 12-27-2005 10:34 AM

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!

paperlion 01-01-2007 05:33 PM

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.

paperlion 01-01-2007 10:16 PM

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?

paperlion 01-02-2007 11:45 AM

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.


All times are GMT -8. The time now is 04:30 PM.

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