# Overview

Fully customize existing shipping methods for your customers based on size, date, time, ordered products, etc.

## Description

The Shipping Restrictions plugin for nopCommerce allows customization of shipping methods based on predefined conditions. This plugin enables users to create an unlimited amount of rules for any number of shipping methods, and offers the ability to modify shipping fees by replacing, discounting, or surcharging them. With cumulative discounts, multiple rules can apply to a single order.

{% hint style="warning" %}
Plugin does not create new shipping methods, it changes existing ones according to your conditions. If you would like to create new shipping methods, you need another our plugin [Table Rate Shipping](https://www.foxnetsoft.com/tablerateshipping).
{% endhint %}

## Features

* Customize price, or prohibit usage of a shipping method for any order based on predefined conditions
* Create unlimited amount of rules for any amount of shipping methods
* Change shipping fee (replace, discount, surchange)
* Cumulative discounts, if several rules are valid
* Several shipping methods in one rule
* Optimized for performance

### Supported conditions

* Store, the order was placed in
* Customer role
* Date and time, when the order was placed
* Customer address
* Checkout attributes
* Products in the cart, product attributes, product specification
* Categories, manufacturers, vendors
* Order total amount
* Size of the shipment
* Whether a coupon code was used in the order
* Whether a discount has been applied to an order
* And many more with advanced requirements builder

{% hint style="info" %}
In case you encounter an issue, you can contact us via <support@foxnetsoft.com>
{% endhint %}


# Installation process

## Supported versions

Currently Order Export Manager supports following versions of nopCommerce: 4.80, 4.70, 4.60, 4.50, 4.40, 4.30, 4.20, 4.10, 4.00. With new releases of nopCommerce we will try to update our plugin as soon as possible.

## Installation

After downloading plugin, head to **Configuration** section of your nopCommerce **Admin Pannel**. Select **Local Plugins** page and click on **Upload plugin on theme**. Locate Shipping Restrictions ZIP file and upload it to your website. Reload your nopCommerce website and go to the same **Local Plugins** page. Scroll to locate **Shipping Restrictions** and click **Install** next to it.

After successful installation a **FoxNetSoft** section would appear in your **Admin Panel**. Click on it to reveal **Shipping Restrictions** and its settings.

{% hint style="danger" %}
Unregistered version would work only for 30 days.
{% endhint %}

{% hint style="info" %}
In case you encounter an issue, you can contact us via <support@foxnetsoft.com>
{% endhint %}


# Updating plugin

## Why updating?

Although any version of the plugin that was released on our website is fully operational, we constantly add new features and fix existing issues.&#x20;

It is worth to update your plugin in the following scenarios:

1. When you update nopCommerce
2. When you encounter any issues with the plugin
3. A month after a new release of a nopCommerce, even if you are not updating nopCommerce

This would ensure that you are using the best version of the plugin.&#x20;

{% hint style="info" %}
Updating will not erase any data that you created for your imports
{% endhint %}

## Where to download the latest version?

You can find the latest version on our plugin page, by clicking Download Trial. Note, if you have bought the plugin, a full version will be downloaded.

## How to update the plugin

Process of updating the plugin is exactly the same as the first plugin installation. You can navigate to [this section of documentation](/installation-process#installation).


# Rules

General logic of the rules. More detailed explanation of each section can be found in next pages

## General information

Each rule is applied to one, or many shipping methods.&#x20;

Rule can:

* Hide shipping methods it's applied to
* Change shipping fee of all rules it's applied to
* Hide all rules, except the ones it's applied to

## Order of rules

Each rule has admin-defined parameter **Priority**. This parameter determines the order, in which rules are applied, starting with rules with **lowest Priority**.

{% hint style="info" %}
Rules can be cumulative, meaning that multiple rules can be applied to the same shipping method.
{% endhint %}

{% hint style="warning" %}
If rule **B** is applied *after* rule **A**, and rule **A** is not cumulative, rule **B** *will not be applied*.
{% endhint %}


# Main section

## Overview

The main section consists of 4 subsections, it defines the general behavior of the rule, shipping methods it's applied to, and action of the rule.

## Section 1 - General information

<table><thead><tr><th width="132">Parameter</th><th>Explanation</th></tr></thead><tbody><tr><td>Is active</td><td>Wheather the rule is active</td></tr><tr><td>Priority</td><td>Order, in which rules will be applied. Rules are applied starting with <strong>lower priority</strong>.<br><br>If two rules have same priority, they will be applied in order of creation time.</td></tr><tr><td>Name</td><td>Rule display name for administrators of the website</td></tr></tbody></table>

## Section 2 - Shipping methods

{% hint style="info" %}
A shipping carrier can have multiple shipping methods. While our plugin is able to retrieve all carriers installed in your store automatically, it is imposible to get list of shipping methods for each carrier. For this reason, you will need to input shippnig methods manually. Name of each shipping method can be found on your carrier's website.
{% endhint %}

<table><thead><tr><th width="191">Field</th><th>Explanation</th></tr></thead><tbody><tr><td>Shipping carriers</td><td>Select shipping carriers that have shipping methods this rule should be applied to.<br><br>If you list the shipping method in a field below, but do not include shipping carrier in this field, rule will not be applied to that shipping method.</td></tr><tr><td>Include shipping methods</td><td>List shipping methods that this rule should apply to. Each shipping method <em>should be in its own line</em>.<br><br>If left empty, the rule will be applied to all shipping methods from carriers selected above, except those shipping methods listed below.</td></tr><tr><td>Exclude shipping methods</td><td>Fill this section only if you left <strong>Include shipping</strong> methods empty.<br><br>List shipping methods that this rule should not be applied to. Each shipping method <em>should be in its own line</em>.</td></tr></tbody></table>

{% hint style="info" %}
If you leave **Include shipping methods** and **Exclude shipping methods** empty, the rule will be *applied to all* shipping methods from selected carriers.
{% endhint %}

{% hint style="warning" %}
If you list the shipping method, but do not select shipping carrier, rule will not be applied to that shipping method.
{% endhint %}

## Section 3 - Action

This section has only one field - Action.

It defines the behavior of the rule, if it is valid/invalid for this shipping method.

<table><thead><tr><th width="181">Action</th><th>Explanation</th></tr></thead><tbody><tr><td>Next Step</td><td>If the rule is valid, shipping methods will be altered, and following rules <strong>will not</strong> be validated for these shipping methods. Following rules will be applied only to other shipping methods.<br><br>Except when rule has a cumulative parameter turned on (see <a href="/rules/rates-section">Rates section</a>).</td></tr><tr><td>Exit</td><td>If the rule is valid, shipping methods will be altered, and all following rules <strong>will not</strong> be validated. Even rules that do not include this shipping method will not be validated after exit.</td></tr><tr><td>Exit and Remove</td><td>If the rule is valid, shipping methods will be altered, and all following rules <strong>will not</strong> be validated. <br>Shipping methods that are not listed in this rule <strong>will be removed</strong>.</td></tr><tr><td>Goto Rule</td><td>You can select the rule that will be applied next, i.e. skip some rules.<br><br>Logic is the same as Next Step.<br><br>You <em>must</em> select a rule with higher Priority.</td></tr><tr><td>Hide if Valid</td><td>If the rule is valid, shipping methods that this rule is applied to will be removed. Following rules will not be able to unhide these shipping methods.</td></tr><tr><td>Hide if Not Valid</td><td>If the rule is <strong>not</strong> valid, shipping methods that this rule is applied to will be removed. Following rules will not be able to unhide these shipping methods.</td></tr></tbody></table>

## Section 4 - Admin comment

This section is for admins only. You can briefly describe the logic of this rule for future reference.


# Conditions section

Size, Weight, Subtotal, Customer roles, Stores, Discounts conditions

{% hint style="warning" %}
If any of the conditions will fail, the rule will be invalid, and change will not be executed. In order to make "OR" comparisons, go to [Requirements section](/rules/requirements-section) (more advanced conditions).&#x20;
{% endhint %}

{% hint style="info" %}
If a condition is left empty, it will not be applied.
{% endhint %}

<table><thead><tr><th width="179">Parameter</th><th>Explanation</th></tr></thead><tbody><tr><td>Weight and Size</td><td>Input the minimum and/or maximum weight or size in fields</td></tr><tr><td>Apply checking dimensions for each product in the cart</td><td>If enabled, dimensions and weight mentioned before will be applied to all products individually, otherwise checks will be applied to summarized dimensions.</td></tr><tr><td>Order Subtotal</td><td>Input the minimum and/or maximum subtotal in fields</td></tr><tr><td>Customer role</td><td>Rule will be valid only if customer has one of the roles selected in this field. </td></tr><tr><td>Limited to stores</td><td>Rule will be valid only if customer is in one of stores selected in this field.</td></tr><tr><td>Limited to warehouse</td><td>Rule will be valid only if product is in the warehouse</td></tr><tr><td>Apply rule for discounts</td><td>Rule will be valid only if <strong>any</strong> of the discounts selected here is applied to the cart.</td></tr><tr><td>Skip rule for discounts</td><td>If <strong>any</strong> of the discounts selected here is applied to the cart, the rule will be <strong>invalid</strong>.</td></tr></tbody></table>


# Date and Time section

You can select the weekdays this rule will be valid.

You can select the time of the day this rule will be valid.

You can select a certain range of dates this rule will be valid.

{% hint style="info" %}
Time, that is set in this section should be in the timezone of a customer.
{% endhint %}


# Coupon codes section

If customer does not apply **at least one** coupon from the **Apply** section, the rule will be invalid.

If customer uses **any** of the coupons from the **Skip** section, the rule will be invalid.


# Rates section

This section defines how will rates change after the rule is validated

## Type of calculation

<table><thead><tr><th width="197">Option</th><th>Explanation</th></tr></thead><tbody><tr><td>Replace</td><td>A rate will be replaced with a new one</td></tr><tr><td>Discount percent</td><td>Specified percentage will be discounted from the shipping fee</td></tr><tr><td>Surcharge percent</td><td>Specified percentage will be added to the shipping fee</td></tr><tr><td>Don't replace</td><td>Shipping fee will not change</td></tr><tr><td>Discount fixed</td><td>Specified amount will be substracted from the shipping fee</td></tr><tr><td>Surcharge fixed</td><td>Specified amount will be added to the shipping fee</td></tr></tbody></table>

## Maximum/Minimum rate

If a rate drops below, or rises above specified amount, it will be set to maximum/minimum rate.

## Cumulative rates

This parameter allows next rule to alter shipping methods that have been altered by this rule.

Furthermore, discount/surcharge will be accumulated.

### Examples

The priority of rules in following examples is A -> B -> C

Rule A applies 10% discount to shipping method FedEx\
Rule B applies 20% discount to shipping method FedEx\
Rule C applies 30% discount to shipping method FedEx and USPS

* Rule A does not allow cumulative rates.\
  \
  In this case rule B will not be applied because rule A does not allow cumulative rates. Only 10% discount will be applied.
* Rule A allows cumulative rates.\
  \
  In tihs case rule A will be applied making a 10% discount. Then rule B will be applied making another 20% discount to the result of rule A. Bringing total discount to 28%.
* Rule A allows cumulative rates.\
  Rule B doesn't allow cumulative rates.\
  \
  In tihs case rule A will be applied making a 10% discount. Then rule B will be applied making another 20% discount to the result of rule A. Rule C will not be applied because rule B does not allow cumulative discounts for shipping method FedEx.\
  A 30% discount will be applied by rule C for shipping method USPS.
* Rule A allows cumulative rates.\
  Rule B doesn't allow cumulative rates.\
  \
  In tihs case rule A will be applied making a 10% discount. Then rule B will be applied making another 20% discount to the result of rule A. Then rule C will be applied making another 30% discount to the result of rule B. Bringing the total discount to 49.6% for shipping method FedEx.\
  For shipping method USPS a 30$ discount will be applied by USPS.


# Products section

You can require certain products to be purchased

The rule will be valid only if **at least one** of the products in this section is in customer's cart.

If left empty, this check will not be performed.


# Requirements section

Advanced requirements

## Overview

This section allows to build advanced logical expressions based on values of the order.

A requirement can evaluate to either True or False value.

A group is a requirement that is evaluated based on the requirements that are contained in this group. AND/OR operator can be used to evaluate the group.

All requirements are placed in the root group called *DefaultRequirementGroup*.&#x20;

## Entities

Requirements can be placed on following entities:

* Billing address
* Shipping address
* Checkout attributes
* Order totals
* Specification attributes
* Shipping methods *(not aplacible)*
* Product Category, Manufacturer, Vendor

## Operators

| Operator    | Meaning                                                                                        |
| ----------- | ---------------------------------------------------------------------------------------------- |
| ==          | equals to                                                                                      |
| !=          | not equals to                                                                                  |
| >           | greater than                                                                                   |
| >=          | greater than or equal to                                                                       |
| <           | less than                                                                                      |
| <=          | less than or equal to                                                                          |
| in          | <p>the value is contained in the list<br><br>use a list of values separated with comma</p>     |
| not in      | <p>the value is not contained in the list<br><br>use a list of values separated with comma</p> |
| contain     | the value contains                                                                             |
| starts with | the value starts with                                                                          |

{% hint style="warning" %}
If you are using in/not in parameter, input a list of values separated with comma.
{% endhint %}

## Creating a requirement (not group)

1. Select requirement type
2. Select a group, to which a requirement will be added *(hidden if only root group is present)*
3. Select the property, value of this property will be compared
4. Select operator for comparison
5. Input a value for comparison. If you are using in/not in parameter, input a list of values separated with comma.
6. Click save.

## Creating a requirement (group)

1. Select Add requirement group in requirement type field.
2. Select a group, to which a requirement will be added *(hidden if only root group is present)*
3. Input a group name. It's recommended to have group names unique for your clarity.
4. Click save.
5. Select whether elements in this group will be compared by AND or OR operator.


