The information in this article applies to:
SUMMARY
Commerce Store administrators may want to base the price of an item on a characteristic of the item; for example, charge a different price for an item based on its size or another attribute. MORE INFORMATIONTo accommodate this functionality, it is necessary to generate a site using dynamic attributes for the products in the store, and then define the dynamic attributes in the Site Manager pages with the "Attribute / Price" format. For example: define the first dynamic attribute for your product with a name of Size and with the following values: Small / $9.99When the product is displayed to the shopper, the shopper will be presented with a drop-down box that allows them to choose the desired Size/Price combination. To force the Size/Price combination that the shopper has chosen to change the actual price that is charged for the product, simply create a scriptor component in Plan.pcf and insert it right before the DefaultItemPrice component:
The key here is to substitute the correct value for attr_value1; this is just the name in the order form for the dynamic product attribute that contains the Size/Price combination that the shopper selects. It is also important that the dynamic attribute values are entered in the format "Size / $#.##" on the Manager pages for the scriptor to function correctly. This scriptor is merely setting the price of the product to the integer value of everything to the right of the dollar sign ( $ ) of the size attribute. Additional query words:
Keywords : |
Last Reviewed: May 17, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |