ProductCatalog.GetCategoryCustomPrice

Ee810182.c++_on(en-US,CS.10).gifEe810182.vb_off(en-US,CS.10).gif

Use this method to retrieve the custom price and custom price type for a specified custom catalog and category.

Definition

Sub GetCategoryCustomPrice(strCCName As String,strCategoryName As String,peCustomPrice As Variant,pfpCustomPriceAmount As Variant)

Parameters

strCCName

A String that contains the name of the custom catalog.

strCategoryName

A String that contains the category name for which the custom price will be returned.

peCustomPrice

A Variant used to return the type of the custom price. Valid values are from the CatalogCustomPriceEnum enumeration, and are described in the Remarks section below.

pfpCustomPriceAmount

A Variant used to return the custom price adjustment.

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 errors that this method can return.

Constant Value Description
E_CAT_CATEGORY_DOESNT_EXIST &H8898001C The specified 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 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.

If the Category has not been specified as a Custom Category then the peCustomPrice parameter and the pfpCustomPriceAmount parameter will be set to 0.

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

Example

myProductCatalog.GetCategoryCustomPrice "SeniorDiscout", "Shoes", cscPercentageMultiplier, 90

See Also

ProductCatalog Object

ProductCatalog.SetCategoryCustomPrice


All rights reserved.