Magento 2 Shipping Table Rates

Magento 2 Shipping Table Rates helps you offer Unlimited Numbers of Shipping Options by defining different Shipping Rates based on Shipping Destination, Product Weight, Price, and Quantity.

 

Table of Content

  1. Extension Installation Guide
  2. Add Method to Import Shipping Table Rates
  3. Configuration
  4. Create Shipping Types Options
  5. Shipping Table Rates in Frontend
  6. Shipping Table Rates Details in Backend

 

  1. Extension Installation
  • For Magento Marketplace Customers
    • Find the Composer name and version of the extension in the extension’s composer.json file.
    • Login to your SSH and run:
      • composer require meetanshi/magento2-shipping-table-rates
    • Enter your authentication keys. Your public key is your username; your private key is your password.
    • Wait for Composer to finish updating your project dependencies and make sure there aren’t any errors.
    • To verify that the extension installed properly, run the command:
      • php bin/magento module:status Meetanshi_ShippingRates
    • By default, the extension is probably disabled.
    • Enable the extension and clear static view files:
      • php bin/magento module:enable Meetanshi_ShippingRates --clear-static-content
      • 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:
  • 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

 

  1. Add Method to Import Shipping Table Rates
    To import the Shipping Table Rates, go to Sales à Shipping Methods à Shipping Table Rates and add method from the “Add Method” button. All the already added and saved shipping table rates methods seen enlisted here.

 

  • Add New Rate to Import Shipping Table Rates
    Configure the following general settings to add new method.
    • Name: Add name for the shipping table rate method. Use variable {day} to show estimated delivery days along with the rates. {day} variable will only show the value if the days have been added through shipping rates CSV.
    • Status: Set the status of the Shipping Table Rates method as “Active” from here.
    • Priority: Set priority for the method.
    • For Products with Different Shipping Types:
      • Sum Up Rates: Summarize rates for products of different shipping types in the cart.
      • Select Maximal Rate: Use only rate with maximal value for shipping type.
      • Select Minimal Rate: Use only rate with minimal value for specific Shipping Type.
    • Stores: Select the store view to which the Shipping Table Rates apply.
    • Customer Groups: Select customer groups to which the Shipping Table Rates apply.

 

​​​​​​​


 

  • Import Shipping Table Rates
    Move to “Import” tab to import Shipping Table Rates using CSV. Make sure to download the sample CSV to match the format of your shipping rates CSV.
    • Delete Existing Rates: All the existing rates will be removed when you try to save changes or import CSV with rates.
    • CSV File: Upload CSV file with Shipping Table Rates in a proper formatting.

Click “Save” or “Save and Continue Edit” to save the Shipping Table Rates.

 

  • Methods and Rates
    To view the imported Shipping Table Rates, navigate to “Methods and Rates tab”. Here’s what each grid column means:
    • Country: Shows the country for which the rates will be applied.
    • State – Shows the state for which the rates will be applied.
    • City – Shows the city for which the rates will be applied.
    • Zip From - To – Indicates a specific postcode range. When it's filled like 'From: 20001 To: 30000' the rate will apply for all 1000 postcodes inside the 20001 - 30000 range. The UK postcode format is supported.
    • Price From - To – Indicates the prices for products with the same shipping type will be summarized.
    • Weight From - To - Same condition as above but for the weight attribute of the product.
    • Qty From - To - same as above but for the quantity in the shopping cart.
    • Shipping Type – All means the rate will be applied to all the products.
    • Rate – The applicable rate amount for the whole order.
    • PPP - Percentage per Product Price. Shipping will be calculated as a percentage of the product price.
    • FRPP - Indicates Fixed Rate Per Product Price. Shipping will be calculated multiplying product quantity in the cart by the value in FRPP field.
    • FRPUW - Indicates Fixed Rate Per Unit of Weight. The rate will be calculated based on the Weight of the product. For example, if FRPUW is set to 3.25 and Weight of the product in the cart is 4.15 then the calculation will be like this: 2.25*4.25=$13.48
    • Estimated Delivery (days) – Specifies the estimated delivery days for the shipping method. The days here will be inserted in the {day} variable which you can use in the Name field to show estimated delivery days in frontend.

 

  • Download Shipping Rates CSV
    Once you have saved the Shipping Table Rates method, if in future, you require to download the rates, go to Sales à Shipping Table Rates, click on an existing method for which you want to download the CSV, move to “Import” tab and click on “Download” button besides the Existing Shipping Rates CSV.

 
  1. Configuration
    To configure the shipping method, login to Magento 2, move to Stores  à Configuration  à Sales  à  Shipping Methods à Shipping Table Rates where you can find various settings to configure the extension.
  • Enabled for Checkout: Set YES to enable Shipping Table Rates.
  • Title: Enter title of the shipping method.
  • Ship to Applicable Countries: Select countries to allow use of the shipping method.
  • Displayed Error Message: Enter error message for shipping unavailability.
  • Allow Free Shipping Promotions: Select YES to allow free shipping rule from shopping cart price will be applied.
  • Ignore Price and Quantity of Virtual Products: Select YES to ignore price and quantity of virtual products while calculating shipping.
  • Compare Post Codes as: Select an option on how you want to compare the added post codes in the CSV.
    • Range: Considers added post codes as post code range. For example, from 05101 to 05109 or from AB10 to AB50.
    • Regular Expression: Considers added post codes as regular expression. For example, BB%, %1B%, B%A%
  • Use price AFTER discount: Set YES to use price after deducting the discount.
  • Use price INCLUDING tax: Set YES to use price as inclusive of tax.
  • Use only one shipping type for shipping method: When set to YES, if the shopping cart is having products with different Shipping Types, the rate with 'Shipping Types = All' will be applied instead.
  • Sort Order: Set sort order of the shipping method to show in frontend.

 

  1. Create Shipping Types Options
  • Create Shipping Type Attribute Options
    To create the options for ‘shipping type’ attribute please go to Catalog à Products à Attributes Action à Edit Product Attribute "Shipping Type“ à Manage Label/Options.

 

  • Shipping Types Options
    Navigate to Properties tab in Attribute Information menu. As shown below, click “Add Option” button to add shipping type options.

     

 

  • Assign Shipping Type to Product
    Once the shipping options are created, assign value of the attribute to the product to calculate Shipping Table Rates based on.

 

 
  1. Shipping Table Rates in Frontend
    Once the settings are configured and shipping method is enabled, add a product to cart to see Shipping Table Rates calculated and applied in the frontend.

     
  • Shipping Table Rates on Cart Page
    When a customer adds products to cart, the Shipping Table Rates is displayed on the cart page.

 

  • Shipping Table Rates on Checkout Page
    Moving further to the checkout, Shipping Table Rates are also displayed on the checkout page.

​​​​​​​

 

  • Shipping Table Rates in My Account Page
    Immediately after the order is placed successfully using Shipping Table Rates shipping method, Shipping Table Rates detail is shown in “My Orders” tab under My Account section.

​​​​​​​

 

  1. Shipping Table Rates Details in Backend
    Apart from the frontend, the admin can see Shipping Table Rates details from Sales > Orders > Order view section in the backend.