How to Block Checkout on Customer Country in CartBlock

Explain step-by-step how to block checkout based on the customer's country in CartBlock
Written by Abhi Jain
Updated 1 week ago

In this tutorial, we'll guide you through the process of restricting customers from specific countries during checkout using CartBlock by Nextools.

To begin, navigate to Validation Rules and click the Create button.

Once you select Create, a configuration window will appear asking you to choose a validation mode. For this tutorial, we will proceed with Basic Validation.

After choosing Basic Validation, you'll be directed to the validation setup page, which provides several customisation options.

The first step is to assign a Validation title. This title is for internal reference only and will help you manage your rules more efficiently.

Note: You can choose a validation title as per your choice

Following the step, we will define the Error Message 

Next, determine where the validation should be applied. CartBlock offers three scopes: interactions with the cart, checkout completion and interaction within the checkout process. You can enable one, two or all three, depending on your requirements.

For example, we will enable completing the checkout and interacting with it.

Following this, decide which part of the checkout flow should be restricted. The app provides multiple points of control, but for this tutorial, we will apply the block at the Cart level.

Finally, configure a custom error message. This message will be displayed on the checkout page whenever a shopper attempts to proceed with a restricted country in their personal information.

In this step, you'll need to define the Function Input. This setting determines which data fields can be used to customise your rule.

Since our goal is to restrict customers by country, we'll select Standard Input, though the platform also provides additional options to give merchants greater flexibility.

Next, configure the conditions that will trigger this rule.

CartBlock allows you to set up to five conditions within a single validation rule. You can apply either AND or OR logic to determine how multiple conditions should work together.

Adding conditions is straightforward; click the button to reveal a drop-down menu of available options.

You can also select between "any" or "not any".

Country options!

For this tutorial, we'll keep it simple by creating a single condition: blocking the checkout for customers located in Spain, Italy, or France. If a shopper selects any of these countries, their cart will be restricted.

As you configure conditions, a summary panel appears just below the Save button, providing a clear overview of the rules you've set.

Once you're done setting everything up, click Save to apply the rule.

This is how the functionality will work on the checkout of your store.

Activate any plan today and enjoy a 7-day free trial to explore all the features risk-free.

If you need further assistance, feel free to contact us via support email or connect with us directly through HelpCrunch

 

Did this answer your question?