Select Quantity

Hi guy





i want to make SELECT list instead of Checkbox



eg



1

2

3

4



that will be show in the select area, if i chosse 1 they automatically add in the cart

and if click 2 in the select list, they aumatically add 2 products in the cart,



Thanks

This is my code below, but i will not shown in the page





{if $product.qty_content}



{assign var=“a_name” value=“product_amount_$obj_prefix``$obj_id”}

{assign var=“selected_amount” value=false}

{foreach name=“$a_name” from=$product.qty_content item=“var”}

Where is your qty_content filled and how is it passed to the template?

Hello thanks for the reply





here is my complete code, i dont know why is not showing in the page,



```php







{if !empty($product.selected_amount)}

{assign var=“default_amount” value=$product.selected_amount}

{elseif !empty($product.min_qty)}

{assign var=“default_amount” value=$product.min_qty}

{else}

{assign var=“default_amount” value=“1”}

{/if}



{if ($product.qty_content || $show_qty) && $product.is_edp !== “Y” && $cart_button_exists == true && ($settings.General.allow_anonymous_shopping == “Y” || $auth.user_id)}



{$quantity_text|default:$lang.quantity}:

{if $product.qty_content}



{assign var=“a_name” value=“product_amount_$obj_prefix``$obj_id”}

{assign var=“selected_amount” value=false}

{foreach name=“$a_name” from=$product.qty_content item=“var”}



{if $product.prices}

{include file=“views/products/components/products_qty_discounts.tpl”}

{/if}

{elseif !$bulk_add}



{/if}

```

Please edit it and used code tags and formatting. It’s unreadable.

hi



here now the code



Thanks

this code is from product_data.tpl



im gonna that code at, view_main_info.override.tpl



beside of Memory Modules, so client can chosse how many memory they want to put in their systems



Thanks





this is the link of my site

[url]http://dev.amadiinc.com/amadi/index.php?dispatch=products.view&product_id=1110[/url]

Do you know that your override is being loaded or that this code segment is being loaded?

Add a {debug} to the top of the code and see if you get a debug window. Then check that you have values for the things you are conditional upon.



I’d definitely verify that values for all of the variables in this conditional (so glad this is a UI and not business logic).


{if ($product.qty_content || $show_qty) && $product.is_edp !== "Y" && $cart_button_exists == true && ($settings.General.allow_anonymous_shopping == "Y" || $auth.user_id)}

it is possible to put select menu at the right of the check box?/



then if click the select automatically add into the cart



i hope you can help me here, cause i tried my code but its not working,



Thanks for the help, i aprreciatte you help. God bless you



see my updated link

[url]http://dev.amadiinc.com/amadi/index.php?dispatch=products.view&product_id=1110[/url]

bump



guys please help