PointRetrait : on démarre sur le frontOffice

This commit is contained in:
2021-03-04 17:33:34 +01:00
parent b98e6f7590
commit 06d7ce53f2
10 changed files with 145 additions and 25 deletions

View File

@@ -6,6 +6,7 @@ use Propel\Runtime\Connection\ConnectionInterface;
use Propel\Runtime\Propel;
use Thelia\Core\Translation\Translator;
use Thelia\Install\Database;
use Thelia\Model\AddressQuery;
use Thelia\Model\Country;
use Thelia\Model\OrderPostage;
use Thelia\Module\AbstractDeliveryModule;
@@ -65,12 +66,12 @@ class PointRetrait extends AbstractDeliveryModule
$price = 0;
$con = Propel::getConnection();
// $currentAddressId = $this->getRequest()->getSession()->getOrder()->getChoosenDeliveryAddress();
// if (!empty($currentAddressId)) {
// $zipcode = AddressQuery::create()->filterById($currentAddressId)->findOne($con)->getZipcode();
$currentAddressId = $this->getRequest()->getSession()->getOrder()->getChoosenDeliveryAddress();
if (!empty($currentAddressId)) {
$zipcode = AddressQuery::create()->filterById($currentAddressId)->findOne($con)->getZipcode();
// $areaId = LpsAreaCityQuery::create()->findOneByZipcode($zipcode)->getIdArea();
// $price = LpsAreaQuery::create()->findOneById($areaId)->getPrice();
// }
}
return $price;
}