thelia/custom-shipping-zone-fees-module

dev-master 2021-10-11 15:36 UTC

This package is auto-updated.

Last update: 2024-09-19 14:06:47 UTC


README

This module allow you to modify the shipping fee of an order base on the zip code of the address.

Installation

Manually

  • Copy the module into <thelia_root>/local/modules/ directory and be sure that the name of the module is CustomShippingZones.
  • Activate it in your thelia administration panel

Composer

Add it in your main thelia composer.json file

composer require thelia/custom-shipping-zone-fees-module:~0.0.1

Usage

Go to the module configuration to create a custom shipping zone and add the price and the zip codes you want. Then go in the shipping zone of your delivery modules to add your new shipping zone.

The module will add the price of your custom shipping zone to the postage of your delivery module when the zip code of an order address is one of the zip code you specify in your custom shipping zone.

Loop

[custom_shipping_zone_fees]

Input arguments

Output arguments

Exemple

<table>
    <thead>
        <tr>
            <th>Zip code</th>
            <th>Country</th>
        </tr>
    </thead>
    <tbody>
        {loop name='my_loop' type='custom_shipping_zone_fees' locale=$locale  id=$shippingZoneId}
            {foreach $ZIP_CODES as $zipCode}
                <tr>
                    <td>{$zipCode->getZipCode()}</td>
                    <td>{$zipCode->getCountry()->setLocale($locale)->getTitle()}</td>
                </tr>
            {/foreach}
        {/loop}
    </tbody>
</table>