שתף באמצעות


RemovePriceRule Method

Removes a pricing rule from the current virtual catalog.

Namespace:  Microsoft.CommerceServer.Catalog
Assembly:  Microsoft.CommerceServer.Catalog (in Microsoft.CommerceServer.Catalog.dll)

Syntax

'Declaration
Public Sub RemovePriceRule ( _
    catalogName As String, _
    categoryName As String, _
    productId As String, _
    variantId As String _
)
'Usage
Dim instance As VirtualCatalog
Dim catalogName As String
Dim categoryName As String
Dim productId As String
Dim variantId As String

instance.RemovePriceRule(catalogName, _
    categoryName, productId, variantId)
public void RemovePriceRule(
    string catalogName,
    string categoryName,
    string productId,
    string variantId
)
public:
void RemovePriceRule(
    String^ catalogName, 
    String^ categoryName, 
    String^ productId, 
    String^ variantId
)
public function RemovePriceRule(
    catalogName : String, 
    categoryName : String, 
    productId : String, 
    variantId : String
)

Parameters

Exceptions

Exception Condition
ValidationException

The price rule is invalid.

EntityDoesNotExistException

The price rule does not exist.

Remarks

Use this method to remove price rules from the current virtual catalog. To remove a price rule, set the categoryName, productId, variantId to nullNothingnullptra null reference (Nothing in Visual Basic). To remove a category rule, set categoryName to the category name and the parameters productId, variantId to nullNothingnullptra null reference (Nothing in Visual Basic). To remove a product rule, set productId to the product ID and the parameters categoryName, variantId to nullNothingnullptra null reference (Nothing in Visual Basic). To remove a variant rule, set the productId to the product ID, variantId to the variant ID and the parameter categoryName to nullNothingnullptra null reference (Nothing in Visual Basic). Call the Save method to save the changes to the catalog system. Call the Rebuild method to apply the rules to the virtual catalog.

Permissions

See Also

Reference

VirtualCatalog Class

VirtualCatalog Members

Microsoft.CommerceServer.Catalog Namespace