grovers 0 Posted January 19 Posted January 19 (edited) 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 Edited January 19 by grovers (see edit history) Share this post Link to post Share on other sites
Prestachamps 179 Posted January 19 Posted January 19 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
grovers 0 Posted January 19 Posted January 19 (edited) Hi Leo Thank you for the reply Is this the right place?: /override/classes/Cart.php (not class) Does it simply go at the very top? Can you help me understand why it has happened? Thank you Edited January 19 by grovers (see edit history) Share this post Link to post Share on other sites
Prestachamps 179 Posted January 19 Posted January 19 (edited) Hi, yes, it's the /httpdocs/override/classes/Cart.php this is a bug of Prestashop. Kind regards, Leo. Edited January 19 by Prestachamps (see edit history) Share this post Link to post Share on other sites
grovers 0 Posted January 19 Posted January 19 (edited) Hi Leo copied into page & I got white pages on the front & a 500 error on back office. I have you some screen shots if that helps? #3 is Cart.php before pasting Edited January 19 by grovers (see edit history) Share this post Link to post Share on other sites
Prestachamps 179 Posted January 22 Posted January 22 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
grovers 0 Posted January 22 Posted January 22 Thank you Leo. It is very much appreciated (attached) Cart.php Share this post Link to post Share on other sites
Prestachamps 179 Posted January 22 Posted January 22 Hi, here is the override with the fix in it. Cart.php Kind regards, Leo Share this post Link to post Share on other sites
grovers 0 Posted January 22 Posted January 22 Hi Leo Sorry but, that does not alter the error (checkout still works in our other store). I am attaching the cPanel screenshote for you & I have clear/turn off all cache. Any ideas please? Thanks Share this post Link to post Share on other sites
grovers 0 Posted February 5 Posted February 5 If anyone can help me with this please? Share this post Link to post Share on other sites
grovers 0 Posted February 7 Posted February 7 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
Constantino 8 Posted February 10 Posted February 10 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 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
grovers 0 Posted February 10 Posted February 10 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 Share this post Link to post Share on other sites
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now