Skip to content

Commit

Permalink
Merge pull request #28788 from okom3pom/fix-carrier-free-shipping-met…
Browse files Browse the repository at this point in the history
…hode

Fix carrier Exeption with free shipping
  • Loading branch information
Progi1984 committed Jun 21, 2022
2 parents c6565e9 + b9d5191 commit 23842fe
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions classes/Carrier.php
Expand Up @@ -185,6 +185,12 @@ public function __construct($id = null, $id_lang = null)
{
parent::__construct($id, $id_lang);
$this->image_dir = _PS_SHIP_IMG_DIR_;
/*
* keep retrocompatibility SHIPPING_METHOD_DEFAULT
*/
if ($this->shipping_method == Carrier::SHIPPING_METHOD_DEFAULT) {
$this->shipping_method = ((int) Configuration::get('PS_SHIPPING_METHOD') ? Carrier::SHIPPING_METHOD_WEIGHT : Carrier::SHIPPING_METHOD_PRICE);
}
}

public static function resetStaticCache()
Expand Down

0 comments on commit 23842fe

Please sign in to comment.