Merge branch 'release' of https://github.com/PrestaShop/PrestaShop into release
This commit is contained in:
@@ -614,13 +614,21 @@ class OrderOpcControllerCore extends ParentOrderController
|
||||
|
||||
protected function _processAddressFormat()
|
||||
{
|
||||
$selectedCountry = (int)(Configuration::get('PS_COUNTRY_DEFAULT'));
|
||||
|
||||
$address_delivery = new Address((int)$this->context->cart->id_address_delivery);
|
||||
$address_invoice = new Address((int)$this->context->cart->id_address_invoice);
|
||||
|
||||
$inv_adr_fields = AddressFormat::getOrderedAddressFields((int)$address_delivery->id_country, false, true);
|
||||
$dlv_adr_fields = AddressFormat::getOrderedAddressFields((int)$address_invoice->id_country, false, true);
|
||||
$requireFormFieldsList = AddressFormat::$requireFormFieldsList;
|
||||
|
||||
// Add missing require fields for a new user susbscription form
|
||||
foreach ($requireFormFieldsList as $fieldName)
|
||||
if (!in_array($fieldName, $dlv_adr_fields))
|
||||
$dlv_adr_fields[] = trim($fieldName);
|
||||
|
||||
foreach ($requireFormFieldsList as $fieldName)
|
||||
if (!in_array($fieldName, $inv_adr_fields))
|
||||
$inv_adr_fields[] = trim($fieldName);
|
||||
|
||||
$inv_all_fields = array();
|
||||
$dlv_all_fields = array();
|
||||
|
||||
@@ -220,7 +220,6 @@
|
||||
<p class="required select">
|
||||
<label for="id_country">{l s='Country'} <sup>*</sup></label>
|
||||
<select name="id_country" id="id_country">
|
||||
<option value="">-</option>
|
||||
{foreach from=$countries item=v}
|
||||
<option value="{$v.id_country}"{if (isset($guestInformations) AND $guestInformations.id_country == $v.id_country) OR (!isset($guestInformations) && $sl_country == $v.id_country)} selected="selected"{/if}>{$v.name|escape:'htmlall':'UTF-8'}</option>
|
||||
{/foreach}
|
||||
|
||||
Reference in New Issue
Block a user