Jump to content

1.7.6.9 Multistore - Unfortunately, there are no carriers available for your delivery address.


grovers
 Share

Recommended Posts

Hi. Would really appreciate some advice please:

I have a multistore (2). One shop checkout works with shipping method the other displays:

"Unfortunately, there are no carriers available for your delivery address."

I can not see any difference between the two stores settings in shipping/carriers-preferences or International/zone-country-states

grovers.biz is ok - grovers.biz/toys is not

I have seen other threads but not with a single store in multistore....

Thank you :)

Screenshot 2021-01-19 at 09.32.17.png

Edited by grovers (see edit history)

Share this post


Link to post
Share on other sites

Hi,

for this fix you can create an override for the Cart.php class

and add this inside the override file in /override/class/Cart.php:

<?php
use PrestaShop\PrestaShop\Adapter\ServiceLocator;
class Cart extends CartCore
{
    /** BEGIN PrestaChamps Override fix Unfortunately, there are no carriers available for your delivery address **/
    public function updateAddressId($id_address, $id_address_new)
    {
        $to_update = false;
        if (!isset($this->id_address_invoice) || $this->id_address_invoice == $id_address) {
            $to_update = true;
            $this->id_address_invoice = $id_address_new;
        }
        if (!isset($this->id_address_delivery) || $this->id_address_delivery == $id_address) {
            $to_update = true;
            $this->id_address_delivery = $id_address_new;
        }
        if ($to_update) {
            $this->update();
        }

        $sql = 'UPDATE `' . _DB_PREFIX_ . 'cart_product`
        SET `id_address_delivery` = ' . (int) $id_address_new . '
        WHERE  `id_cart` = ' . (int) $this->id 
        // . ' AND `id_address_delivery` = ' . (int) $id_address
        ;
        Db::getInstance()->execute($sql);

        $sql = 'UPDATE `' . _DB_PREFIX_ . 'customization`
            SET `id_address_delivery` = ' . (int) $id_address_new . '
            WHERE  `id_cart` = ' . (int) $this->id 
            // . ' AND `id_address_delivery` = ' . (int) $id_address
            ;
        Db::getInstance()->execute($sql);
    }
    /** END PrestaChamps Override fix Unfortunately, there are no carriers available for your delivery address **/
}

Kind regards, Leo.

Share this post


Link to post
Share on other sites

Hi, 

you cannot open twitce the <?php , and as I see,  you already have this override, so in this case you need to add only the function inside the class, I mean to add it at the end of the file, but inside the {} of the main class

<?php
/**
.....................

**/
class Cart extends CartCore

{

....... /** The current content of class (except the ending } of the class
/** HERE ADD MY **/

public function updateAddressId(){
.....
}

/** JUST fBEFORE THE ENDNG } of the class **/

}

Or just attach your existing Cart override file and I will add the function then re-send it to you back.

Kind regards, Leo

 

Share this post


Link to post
Share on other sites

  • 2 weeks later...

I am guessing that /override/classes/Cart.php is not the problem

When I disable the module "bvkpaymentfees" it does not alter the error

"Unfortunately, there are no carriers available for your delivery address" is the same & only in one store!

I have tried altering country/zones/enable/disable/clear cache/disable non ps modules in that store - no change

Share this post


Link to post
Share on other sites

On 1/19/2021 at 11:52 AM, grovers said:

Hi. Would really appreciate some advice please:

I have a multistore (2). One shop checkout works with shipping method the other displays:

"Unfortunately, there are no carriers available for your delivery address."

I can not see any difference between the two stores settings in shipping/carriers-preferences or International/zone-country-states

grovers.biz is ok - grovers.biz/toys is not

I have seen other threads but not with a single store in multistore....

Thank you :)

Screenshot 2021-01-19 at 09.32.17.png

So, 1) carrier is active 2) the necessary carrier's countries are enabled for its zone in Localization->Countries menu 3) the carrier is allowed for customer group 4) weight and price ranges are specified 5) package dimensions aren't out of range, correct?

Share this post


Link to post
Share on other sites

Thanks for the help: It is a multistore & the other shop works. I believe that rules out 1, 3,4 & 5 as the setting is common to both stores. The answer to 2 is yes as per the screenshots.

Very greteful for more suggestions

Screenshot 2021-02-10 at 22.09.11.png

Screenshot 2021-02-10 at 22.12.15.png

Share this post


Link to post
Share on other sites

  • 9 months later...

I have the same problem in Prestashop 1.7.7.3 

 

Unfortunately, there are no carriers available for your delivery address

 

But the funny thing is that carriers show up in the desktop version and on the mobile phone it's giving this error which lead me to a conclusion that International > Locations and International > Localization have been configured correctly. 

 

I have uploaded the override file you mentioned above and cleared the cache and nothing has changed

 

Can you please suggest where else to look ? 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More