Blog posts tagged with 'Restricted'

In this scenario, our requirement is to prevent shipping certain products to cities that a vendor does not ship to. In SD, we check if both the shipping address city is not a permitted city and the cart contains an item for Vendor 1. If this condition occurs, the ErrorExit line will cause the message like "Sorry, vendor1 does not deliver in your city" to appear to the customer, and prevent them from checking out. (The double quotes are required because Description Expression is an expression)

Order Line 60 would be whatever Option(s) you would want to offer. However, if there are multiple items in the cart, the customer may wonder which product is sold by Vendor1 -so, we can let them know with a message like: "Sorry, HP Pavilion Artist Edition DV2890NR 14.1-inch Laptop is sold by vendor1, whom does not deliver in your city" . Use this expression instead:

In this scenario, our requirement is to prevent shipping certain products to countries outside of the European Union (EU 27). Similar to the last blog, you should set up an unpublished category for the restricted products. Then, in SD, we check if both the shipping address is outside the permitted countries and the cart contains restricted products. If this condition occurs, the ErrorExit line will cause the message "Sorry, we can't ship restricted products outside the EU" to appear to the customer, and prevent them from checking out. (The double quotes are required because Description Expression is an expression)