Logo
Eolia @eolia
a répondu au Message de Eolia - 1 jour
Patch pour votre version (mais qui ne résoud pas le pb de la configuration de vos pays):

CODE
private function setShippingAddress(&$fields, $id_address)
{
$address = new Address($id_address);

//We allow address modification when using express checkout shortcut
if ($this->type != 'payment_cart') {
$fields['ADDROVERRIDE'] = '0';
$fields['NOSHIPPING'] = '0';
} else {
$fields['ADDROVERRIDE'] = '1';
}

$fields['EMAIL'] = $this->context->customer->email;
$fields['PAYMENTREQUEST_0_SHIPTONAME'] = trim($address->firstname . ' ' . $address->lastname);
$fields['PAYMENTREQUEST_0_SHIPTOPHONENUM'] = (empty($address->phone)) ? $address->phone_mobile : $address->phone;
$fields['PAYMENTREQUEST_0_SHIPTOSTREET'] = !empty($address->address1) ? trim($address->address1) : '';
$fields['PAYMENTREQUEST_0_SHIPTOSTREET2'] = !empty($address->address2) ? trim($address->address2) : '';
$fields['PAYMENTREQUEST_0_SHIPTOCITY'] = !empty($address->city) ? trim($address->city) : '';

$country = new Country((int) $address->id_country);
if ($address->id_state) {
$state = new State((int) $address->id_state);
$fields['PAYMENTREQUEST_0_SHIPTOSTATE'] = $state->iso_code;
} else {
$fields['PAYMENTREQUEST_0_SHIPTOSTATE'] = $country->iso_code;
}
$fields['PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE'] = $country->iso_code;
$fields['PAYMENTREQUEST_0_SHIPTOZIP'] = !empty($address->postcode) ? trim($address->postcode) : '';
}