ProductCatalog.SetCategoryCustomPrice

Ee796615.c++_on(en-US,CS.10).gifEe796615.vb_off(en-US,CS.10).gif

Use this method to set a custom price rule for a category.

Definition

Sub SetCategoryCustomPrice(strCCName As String,strCategoryName As String,eCustomPrice As CatalogCustomPriceEnum,fpCustomPriceAmount As Double)

Parameters

strCCName

A String that contains the name of the custom catalog template for which this rule will apply.

strCategoryName

A String that contains the name of the category for which a custom price will be set.

eCustomPrice

The type of price adjustment. Valid values are from the CatalogCustomPriceEnum enumeration, and are described in the Remarks section below.

fpCustomPriceAmount

A Double that contains the custom price adjustment amount.

Error Values

This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to either standard or custom COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors.

The following table shows the custom COM error that this method can return.

Constant Value Description
E_CAT_CATEGORY_DOESNT_EXIST &H8898001C The category did not exist.
E_CAT_CUSTOMCAT_DOESNT_EXIST &H88980024 The specified custom catalog did not exist.

Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

Remarks

The SetCategoryCustomPrice method defines a custom pricing rule for a category, and all the immediate child products of that category, in the specified custom catalog. The SetCategoryCustomPrice method does not affect child categories.

If a product exists within multiple categories, each having different custom prices, the custom price will not be applied to that product for either category.

The following table shows the values of the CatalogCustomPriceEnum enumeration, their associated names, and describes their use.

Name Value Description
cscNoCustomPrice 0 The custom price is the same as the base price.
cscPercentageMultiplier 1 The custom price is the base price multiplied by the percentage value in the pfpCustomPriceAmount parameter.
cscAddFixedAmount 2 The custom price is the pfpCustomPriceAmount added to the base price.
cscReplacePrice 3 The custom price is the pfpCustomPriceAmount.
cscInvalidCustomPrice -1 Reserved for future use.

For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.

Example

myProductCatalog.SetCategoryCustomPrice "SeniorDiscountCatalog", "Apparel", cscPercentageMultiplier, 90

See Also

ProductCatalog Object

ProductCatalog.GetCategoryCustomPrice


All rights reserved.