Example - Adding a catalog rule

The example demonstrates how you can add a catalog rule that uses data available for this type of discount rules, i.e. SKU and its properties. Your eligible customers receive a 10% discount on all products supplied by MySupplier, Ltd.

The example uses the sample E-commerce Site.

Please refer to Example - Adding an order rulefor an example of adding a discount rule with a macro condition calling a custom method.

Adding a catalog rule

This section demonstrates how you can add a catalog rule limiting the application of catalog discounts. Eligible customers receive a discount on all products supplied by a selected supplier (if the rule is used in an active catalog discount).

  1. Open the Store configuration application.
  2. Switch to the Discount rules -> Catalog rules tab.
  3. Click New catalog rule.
    • The system opens a page where you can specify the catalog rule properties and define the rule’s parameters.

      Specifying the rule’s properties

    1. Enter the following values for the rule’s properties:

      • Display name: Product supplier is

      • User text: Product supplier {_is} {supplier}

      • Condition: {_is}(SKU.SKUSupplier == “{supplier}”)

        Specifying catalog rule properties

    2. Click Save.

      • The system saves the catalog rule, leaving it open for further editing.

        Defining the rule’s parameters

    3. Switch to the Parameters tab.

      • You specified two parameters that modify the rule’s condition (_is, supplier). That’s why the system automatically adds two parameters. You can now adjust the parameters’ settings.

        The _is parameter allows you to select between a positive and negative meaning of the condition, i.e. is and is not. The parameter is predefined so you can leave its default settings.

    4. Select supplier from the parameters list and enter (verify) the following values for its properties:

      • Field name: supplier

      • Field type: Text

      • Field size: 100

      • Required: Yes (checked)

      • Display field in the editing form: Yes (checked)

      • Field caption: select supplier

      • Form control: Supplier selector

        Specifying parameter properties

    5. Click Save.

The system adds a new catalog rule with two parameters. You can now use the rule in catalog discounts.

Available catalog rules

Adding a catalog discount

This section demonstrates how you can add a catalog discount allowing the customers to receive a 10% discount on all products supplied by MySupplier, Ltd.

You can add suppliers to the system in the Suppliers application.

You can add suppliers to products in the Products application while editing the products on the General tab.

  1. Open the Catalog discounts applications.

  2. ClickNew catalog discount.

    • The system opens a page where you can specify the catalog discount properties.
  3. Enter the following values for the catalog discount’s general properties:

    • Name: Products by MySupplier, Ltd.

    • Enabled: Yes (checked)

    • Discount: By %

    • Value: 10

      Adding a catalog discount

  4. Specify the discount’s condition:

    1. Click Edit to edit the discount’s Apply to property.

      • This opens the Edit macro condition dialog on the Rule designer tab.
    2. Select the Product supplier is rule in the right part of the dialog.

    3. Click Add rule () to add the rule to the condition.

    4. Click select in the left part of the dialog.

      • The system opens the Set parameter value dialog for the supplier parameter.
    5. Use the drop-down list to select the MySupplier, Ltd. supplier.

    6. Click OK.

      • The system closes the Set parameter value dialog for the supplier parameter. The Edit macro condition dialog is open for editing.
    7. Click Save & Close to save the rule’s condition and leave the Edit macro condition dialog.

      Specifying the discount’s condition

  5. Click Save.

The system saves the catalog discount. Your customers now receive a 10% discount on products supplied by MySupplier, Ltd.

Reviewing the catalog discount’s application

Make sure the Apple iPad 16GB tablet computer has the MySupplier, Ltd. supplier assigned.

  1. View the live site.

  2. Select Computers ->** Tablets** in your on-line store main menu.

    • The system displays a list of all tablet computers that you offer in your on-line store.
  3. Click Add to cart in the Samsung 16GB Galaxy Tab section.

    The product has product options. That’s why the system now displays the product’s details page.

    Here you can specify the amount of product items.

  4. Enter 1 for the amount of product items.

  5. Click Add to cart.

    • The system displays the content of your shopping cart. The shopping cart doesn’t contain any product supplied by MySupplier, Ltd. That’s why the system doesn’t apply the Products by MySupplier, Ltd. catalog discount.

      Viewing the shopping cart content

  6. Repeat steps 2 through 5 to add to the shopping cart the Apple iPad 16GB tablet supplied by MySupplier, Ltd.

    • The system displays the content of your shopping cart with the Products by MySupplier, Ltd. catalog discount applied on this product.

      The catalog discount is applied on the product

If you now click Check out, you can continue in the checkout process.