I would like to use the "attribute quantity" feature that you recently added to the module to let my customers select quantities for each attribute. However, instead of text fields, I would like to use drop down lists so that they can select the quantities. Can this be done?
(2003/08/30)I modified the module so that you can do this. Here's how to go about it:
To the "Attributes main template" area of the template that you want to use, add (anywhere in the template works but put it at the top so you'll see it there):
<input type="hidden" name="AttributeQuantities" value="1">
<input type="hidden" name="BROK_FROM" value="PRODTEMPLATES">
and in the attribute template that you want to display the quantity select list add:
<input type="hidden" name="AttributeHasQuantity[%var|g.Total_Attributes|%]" value="1">
and the html for the drop down select list (using whatever options that you want:
<select name="AttributeQuantity[%var|g.Total_Attributes|%]">
<option value="0">0</option>
<option value="4">4</option>
<option value="6">6</option>
<option value="8">8</option>
</select>
make sure that the name for the select field is AttributeQuantity[%var|g.Total_Attributes|%]
As an example, in my store, I wanted a quantity selection list for quantities 0, 2, 4, 6, and 8. I modified the "Checkbox attr. template" so that it displayed the drop down select field next to the prompt and I wanted to hide the checkbox itself (using the %fields_hidden% token as described below). So in the "Checkbox attr. template" area I have:
<TR>
<TD ALIGN = "left" VALIGN = "top">
</TD>
<TD ALIGN = "left" VALIGN = "middle">
<TABLE BORDER = "0">
<TR><TD>
%fields_hidden%
<select name="AttributeQuantity[%var|g.Total_Attributes|%]">
<option value="0">0</option>
<option value="4">4</option>
<option value="6">6</option>
<option value="8">8</option>
</select>
<input type="hidden" name="AttributeHasQuantity[%var|g.Total_Attributes|%]" value="1">
</TD><TD>
%prompt%
</TD></TR>
</TABLE>
</TD></TR>
Keep in mind that this will cause all checkbox attributes of products that are assigned to this template to display in the same manner.
Last update: 2004-12-07 14:08
Author: Support
Revision: 1.0
You cannot comment on this entry
Most Recent FAQ Entries: 
- When adding a product to the basket from an ... (2008-08-27 19:02)
- I have the module configured to add the key ... (2008-08-13 14:50)
- What is the format for the htaccess file if ... (2008-08-12 14:50)
- Is there any way to look up a customer's ... (2008-08-06 18:04)
- I am looking for a module that will allow ... (2008-08-06 18:00)
Top 10 
- 2852 views:
Adding Tokens to Evaluate Expressions - 2784 views:
Is there a way to "Limit" the number of ... - 2729 views:
Why won't you call me for technical support? I ... - 2619 views:
Are license keys valid for more than one store? ... - 2512 views:
I'm trying to enter a license key and get ... - 2496 views:
How do I install a module? - 2349 views:
How do I check for a module upgrade? - 2316 views:
How can display and change the parameters of an ... - 2164 views:
The total on my checkout pages are not correct. ... - 1976 views:
I have select and radio type attributes in my ...
















