{docurl}
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
Records in this category
- Prices Displaying Incorrectly
- Displaying Customer IP
- Using Tokens to Evaluate Expressions
- Using OpenUI Tokens
- Adding Additional Product Images
- Hiding Specific Product Prices
- %next% and %previous% Tokens Not Functioning After Changing %prodnameL% Token
- Using Tokens to Add Attributes Automatically
- Adding Borders and Alt Tags to Images
- Displaying Original Price As a Strike-Through If Customer's Price Is Lower
- Adding
- Adding Additional / Alternate Product Images
- Using Tokens To Conditionally Control Text Based on Price or Availability Group
- Displaying Radio Options In Rows
- Displaying Different Attributes (i.e. Colors) in 3 or More Rows
- Using "Add to Basket" AND "Buy One Now" Buttons In The Same Template
- Attributes Not Showing Within Merchant 4.00
- Displaying Related Products As Thumbnails 3 Across
- Using Pop-Up Windows to a Larger Image
- Compatibility With SB's Hi-res Image Module
- Where Can I Find The Latest Tokens?
- Is it possible to modify the contents of the "select" type attibutes?
- I would like to have my attributes display differently within a single product depending on the attribute. For example, I would like the first "select" type attribute to have a default of
- I'm not displaying the attributes on my product page so I'm not using the %attributes% token. However, I want the customer to be prompted to select the attributes when they add the product to their basket, but it isnt' working. How can I do that?
- When I use the code: %begin_if|len(OUI_Products2.d.shortdesc)|% it sometimes shows the short description for some other product.
- Is it possible to display the attribute prompt as the default message for "select" type attributes?
- Can I have a "Email for more info" link on my page which is automatically populated with the product code and name?
- Is it possible to have the module default to showing more than 10 templates at a time?
- I'm running into problems in that some of my tokens are not being processed correctly. For example, I'm trying to do this: %begin_if|%module|modcode:position%|% ... %end_if%but it just generates errors or the %module simply shows up on the page. What could be wrong?
- In the PROD TEMPLATE, is there a way to use tokens in the "Add to Basket alt:"
- I am unable to find tokens for the following fields in the Product Page. Product Display Header: Product Display Footer: Sub-Global Header: Sub-Global Footer:
- How do I conditionally test for the existence of an image on the server (not the image assigned to the product but one I upload myself)?
- I'd like to display my attribute options with their own "add to basket" button. Something like: product1 color1
color2 attribute2 color1 color2 Is this possible? - I'm using the %attrqtybox|xx|% feature for some of my products but the products are not being added to the basket correctly. Any ideas?
- I would like to control the size of the text and memo fields in my attributes. How?
- I would like to use a token within another token, such as: %begin_if|%module|mymod|1|%|% stuf %end_if% But this isn't working correctly. Why?
- I would like to use the %begin_if|expression|% token to dispaly something if the product has a value in a field stored in the Additional Fields Manager (http://vikingcoders.com/go.mv?ID=DEN_PRODFIELDS). How can I go about it?
- I'm using your Affiliate Manager module and I would like to display some text only if the customer followed a particular affiliate's referral link. How can I do that?
- 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?
- Is there a token I can us to display the fonts as I set them in admin?
- I am attempting to use a token from a third party module in the "Product template" area but it's not working. What might be causing this?
- I have a checkbox attribute that I want to default as checked. I normally would use a VMod, but can't with Cat page templates. Do you have any ideas how I could do this with your module?
- Using the new attribute quantity feature, I would like to make sure that the customer selects a set number of attributes. For example, I'm selling a three pack of soap and I would like them to select a color for each item in the "pack". How can I go about this?
- I would like to have quantity boxes for my attributes so customers can select a quantitiy for each one rather than having to add the same product several times. For example, I sell fishing flies in different sizes and I would like my customers to be able to go to a product page and enter the quantity that they want for each size. Can I do this?
- I would like to customize the titles for my Product pages. How can I do this?
- The prices displayed by the module are not properly displaying the price calculated by my discount module. How can I get it to correctly display the price?
- Is it possible to use the OpenUI's tokens in this module's templates?
- Is there any way to introduce additional product images?
- The price of some of my products is determined by the attributes but I don't want to display the 0.00 price for those products. Can I hide the price just for those products?
- I recently changed the %prodnameL% token in the Category Page Templates module with my own html so that I could add an image title:%prodname% However, now the %next% and %previous% tokens aren't working in the Product Page Templates module (i.e. they are not appearing).
- I have a module which shows the price for an attribute automatically in the attribute box (so I don't have to manually code each one). However it doesn't appear to be compatible. Can I do this with the template modules?
- Displaying Attribute Price + Product Price, with a discount
- Can I configure the module so that the Related Products are added to the basket when the main product is added
- Can I configure the module so that I can add a "add all to basket" button for the Related Products so that I can specify a quantity for each and add them all at once?














