I'm trying to create a module with custom shipping method. So I've followed this tutorial to create it. This link and this link, to configure shipping carrier validations.

The problem is, if I change the zip/postcode, the shipping's value does not change. My question is, how can I update the shipping cost value when customer update its address information (postcode to be more specific)? Or when we use the guest-checkout and there is no address information?

Thanks in advance.


I had the same problem. The problem is on your xml definition of the rates validation:

<item name="shipping-rates-validation" xsi:type="array">
      <item name="children" xsi:type="array">
            <item name="inchoo" xsi:type="array">
                <item name="component" xsi:type="string">Inchoo_Shipping/js/view/inchoo</item>

In your xml, when you define the js validator:

<item name="inchoo" xsi:type="array">

You must change the name to:

<item name="inchoo-rates-validation" xsi:type="array">

And inchoo must be the same as carrier code of your shipping method. The problem is when magento try lo find and load all validators in :


on method processShippingChildrenComponents

private function processShippingChildrenComponents($shippingRatesLayout)
    $activeCarriers = $this->getShippingConfig()->getActiveCarriers(
    foreach (array_keys($shippingRatesLayout) as $carrierName) {
        $carrierKey = str_replace('-rates-validation', '', $carrierName);
        if (!array_key_exists($carrierKey, $activeCarriers)) {
    return $shippingRatesLayout;

If magento does not find the same name as carrier, unset the file in layout.


Mauro M. Martinez

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.