You are currently viewing the article on an older Shopware version!

Rule Builder - Example rules

In this article we will explain different ways of using the Rule Builder using some example rules.

Shipping

Freight forwarding

If certain products are shipped by a forwarding agent and you want to use your own shipping method, you can solve this by using the tags on the product.
First create a tag for the desired products, e.g. with the title "shipping company". You can find more information about the tags on products here.
You can integrate these tags in the Rule Builder via the condition Position with tag.

In our example the rule is as shown below:

  • Name: Forwarding
  • Priority: 1 (if you wish to prioritise when using several shipping methods, please adjust the value accordingly)
  • Type (optional): shipping method (if you want to use the rule in other areas as well, you can add more types or leave the selection blank)
  • Conditions:
    • Position with tag | Is one of | Forwarding

You can now select this rule in the desired shipping method in the item availability rule.

If you want to block other existing shipping methods if there is at least one product with the tag "Forwarder" in the shopping cart, you can add the rules used for the other shipping methods.
Add an AND link and enter the following in the now additionally available condition

  • Position with tag | Is none of | Forwarder

Cash on delivery

If you want to use the cash on delivery service of DHL or another shipping service provider, it is not sufficient to have a cash on delivery shipping method. Since payment is also processed via this cash on delivery service and a payment method and a shipping method are always required for an order, it is necessary to create both a new payment method and a new shipping method.
First, you create a payment method and a shipping method for cash on delivery. These can be called, for example, both cash on delivery or DHL cash on delivery
You then create a new rule for the availability rule in the Rule Builder:

  • Name: Cash on delivery
  • Priority: 1 (If you wish to prioritize the use of several shipping methods, please adjust the value accordingly.)
  • Type (optional): Shipping type (if you want to use the rule in other areas as well, you can add more types or leave the selection empty)
  • Conditions:
    • Payment method | Is one of | Cash on delivery (Name of the Payment method)

You can now select this rule in the desired Cash on Demand shipping method in the availability rule item. 

You then add the additional charges for Cash on Demand shipping to the price matrix of the shipping method.  

Payment methods

Payment method depending on customer group

If you want to release a certain payment method only for a certain customer group, you can create a rule with the condition Customer group.

In our example the rule is as shown below:

  • Name: Customer group retailers
  • Priority: 1 (if you wish to prioritise when using several shipping methods, please adjust the value accordingly)
  • Type (optional): payment method (if you want to use the rule in other areas as well, you can add more types or leave the selection blank)
  • Conditions:
    • Cumstomer group| Is one of | Retailer

You can now select the rule in the desired payment method in the item availability rule.

It is also conceivable to add a further condition to the rule above, e.g. to make the payment method additionally possible only from a certain purchase value (e.g. 250€).
In this case, add another condition using the AND link and insert the following in the second condition

  • Price shopping basket goods | greater than/equal | 250

Promotions

Discount from basket value x

If you want your customers to receive a discount from a certain shopping cart value, you can use a condition of the type Cart amount or Goods price. The difference between the two conditions is that the shopping basket value is calculated including shipping costs and less any discounts and the price of the goods in the basket is the sum of the prices of all the products in the basket.

The rule could be as shown below:

  • Name: Discount from basket value x
  • Priority: 1 (if you wish to prioritise when using several shipping methods, please adjust the value accordingly)
  • Conditions:
    • Cart amount | greater than/equal | 100

or

  • Conditions:
    • Goods price | greater than/equal | 100

You can now select the rule in the desired discount action in the tab Preconditions in the item Baskets.
 

Was this article helpful?