Merge branch 'ticket-ChangeDeliveryAddress' into develop
This commit is contained in:
commit
ad9113aed1
@ -55,6 +55,20 @@ class Ant_Changeaddress extends Module
|
||||
return $current_address;
|
||||
}
|
||||
|
||||
public function getAddresses($id_customer, $id_country, $id_lang)
|
||||
{
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
SELECT a.*, cl.`name` AS country, s.name AS state, s.iso_code AS state_iso
|
||||
FROM `'._DB_PREFIX_.'address` a
|
||||
LEFT JOIN `'._DB_PREFIX_.'country` c ON (a.`id_country` = c.`id_country`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'country_lang` cl ON (c.`id_country` = cl.`id_country`)
|
||||
LEFT JOIN `'._DB_PREFIX_.'state` s ON (s.`id_state` = a.`id_state`)
|
||||
WHERE `id_lang` = '.(int)($id_lang).'
|
||||
AND `id_customer` = '.(int)($id_customer).'
|
||||
AND a.`deleted` = 0
|
||||
AND c.`id_country` = '.(int)($id_country));
|
||||
}
|
||||
|
||||
public $validation = array(
|
||||
'company' => '/[<>=#{}]*/',
|
||||
'firstname' => '/[0-9!<>,;?=+()@#"°{}_$%:]*/',
|
||||
|
@ -161,9 +161,10 @@ if ($cookie->isLogged()) {
|
||||
|
||||
|
||||
$current_address = $ant_changeaddress->getAddress($order->id_address_delivery);
|
||||
$current_delivery = new Address((int)$order->id_address_delivery);
|
||||
$smarty->assign(array(
|
||||
'current_address' => $current_address,
|
||||
'addresses' => $customer->getAddresses((int)$cookie->id_lang)
|
||||
'addresses' => $ant_changeaddress->getAddresses((int)$customer->id,(int)$current_delivery->id_country,(int)$cookie->id_lang)
|
||||
));
|
||||
|
||||
$smarty->assign(array(
|
||||
|
Loading…
Reference in New Issue
Block a user