Magento 2 Shipping Per Customer Group allows the store owner to charge different shipping rates based on the customer groups.
Table of Content
- Extension Installation Guide
- Configuration
- Shipping Per Customer Group Method in Frontend
- Shipping Per Customer Group Details in Order View Backend
-
- For Magento Marketplace Customers
- Create a folder structure in Magento root as app/code/Meetanshi/ShippingPerCustomer
- Download and extract the zip folder and upload our extension files to the app/code/Meetanshi/ShippingPerCustomer via FTP.
- Login to your SSH and run below commands step by step:
- For Magento Marketplace Customers
- php bin/magento setup:upgrade
- For Magento version 2.0.x to 2.1.x - php bin/magento setup:static-content:deploy
- For Magento version 2.2.x & above - php bin/magento setup:static-content:deploy –f
- php bin/magento cache:flush
-
- For Meetanshi Customers
- Extract the zip folder and upload our extension to the root of your Magento 2 directory via FTP.
- Login to your SSH and run below commands step by step:
- For Meetanshi Customers
- php bin/magento setup:upgrade
- For Magento version 2.0.x to 2.1.x - php bin/magento setup:static-content:deploy
- For Magento version 2.2.x & above - php bin/magento setup:static-content:deploy –f
- php bin/magento cache:flush
- Configuration
For configuring the extension, login to Magento 2, move to Sales à Shipping Methods à Shipping Per Customer Group where you can find various settings to enable the extension.
- Enabled: Set “YES” to enable Shipping Per Customer Group extension.
- Title: Enter title for the shipping method.
- Method Name: Enter the method name for the shipping method.
- Default Shipping Cost: Enter the default shipping rate to charge when individual rates are not assigned per customer group.
- Shipping Rate: Select one of the shipping rate options to charge per customer group.
- Per Item: Calculate the shipping rate per item.
- Per Order: Calculate the shipping rate per order.
- Shipping Cost Per Customer Group: Set shipping rate for individual customer group.
- Customer Group: Select the customer group for which you want to set individual shipping rate.
- Cost: Enter the shipping rate amount to be charged for the selected customer group.
- Action: Click to delete the added shipping rate setting per customer group.
- Ship to applicable countries: Select all allowed countries to enable Shipping Per Customer Group for.
- Ship to specific countries: Select countries to enable Shipping Per Customer Group for.
- Show Method if Not Applicable: Select YES to show the shipping method even if it’s not applicable.
- Sort Order: Add sort order of the shipping method.
- Shipping Per Customer Group Method in Frontend
Once you have set individual shipping rates and default rate for each customer group, you can see shipping rates per customer group extension enabled in the frontend. After adding products to cart, the Shipping Per Customer Group method is charged based on the customer group. Once it’s selected, the respective shipping rate will be applied based on the customer group.
For various customer groups, if we have set a specific shipping rate for example, the shipping rates are calculated and charged as shown in the below table.
Customer Group |
Shipping Rate per Customer Group |
Number of items |
Total Shipping Rate Per Item |
Total Shipping Rate Per Order |
Not Logged in |
50 |
3 |
150 |
50 |
Retailer |
25 |
3 |
75 |
25 |
General |
30 |
3 |
90 |
30 |
Wholesaler |
20 |
3 |
60 |
20 |
- Shipping Per Customer Group on Cart Page for Not Logged in Customers
- Shipping Per Customer Group Per Item on Cart Page for Logged in Customers
- Shipping Per Customer Group Per Item on Checkout Page for Logged in Customers
- Shipping Per Customer Group in “My Account” Section
Once the order is placed using Shipping Per Customer Group shipping method, under the “My Orders” tab of the My Account section, shipping details are seen with the name of the shipping method.
- Shipping Per Customer Group Details in Order View Backend
Apart from the frontend, the Shipping Per Customer Group method details can also be seen from the backend under Sales à Orders. The below image shows the order view where Shipping Per Customer Group shipping details are visible.