// #PSCFV-3619
This commit is contained in:
@@ -515,28 +515,30 @@ class AdminStoresControllerCore extends AdminController
|
|||||||
|
|
||||||
protected function _buildOrderedFieldsShop($formFields)
|
protected function _buildOrderedFieldsShop($formFields)
|
||||||
{
|
{
|
||||||
$associatedOrderKey = array(
|
// You cannot do that, because the fields must be sorted for the country you've selected.
|
||||||
'PS_SHOP_NAME' => 'company',
|
// Simple example: the current country is France, where we don't display the state. You choose "US" as a country in the form. The state is not dsplayed at the right place...
|
||||||
'PS_SHOP_ADDR1' => 'address1',
|
|
||||||
'PS_SHOP_ADDR2' => 'address2',
|
// $associatedOrderKey = array(
|
||||||
'PS_SHOP_CITY' => 'city',
|
// 'PS_SHOP_NAME' => 'company',
|
||||||
'PS_SHOP_STATE_ID' => 'State:name',
|
// 'PS_SHOP_ADDR1' => 'address1',
|
||||||
'PS_SHOP_CODE' => 'postcode',
|
// 'PS_SHOP_ADDR2' => 'address2',
|
||||||
'PS_SHOP_COUNTRY_ID' => 'Country:name',
|
// 'PS_SHOP_CITY' => 'city',
|
||||||
'PS_SHOP_PHONE' => 'phone');
|
// 'PS_SHOP_STATE_ID' => 'State:name',
|
||||||
|
// 'PS_SHOP_CODE' => 'postcode',
|
||||||
$fields = array();
|
// 'PS_SHOP_COUNTRY_ID' => 'Country:name',
|
||||||
$orderedFields = AddressFormat::getOrderedAddressFields(Configuration::get('PS_SHOP_COUNTRY_ID'), false, true);
|
// 'PS_SHOP_PHONE' => 'phone');
|
||||||
|
// $fields = array();
|
||||||
foreach ($orderedFields as $lineFields)
|
// $orderedFields = AddressFormat::getOrderedAddressFields(Configuration::get('PS_SHOP_COUNTRY_ID'), false, true);
|
||||||
if (($patterns = explode(' ', $lineFields)))
|
// foreach ($orderedFields as $lineFields)
|
||||||
foreach ($patterns as $pattern)
|
// if (($patterns = explode(' ', $lineFields)))
|
||||||
if (($key = array_search($pattern, $associatedOrderKey)))
|
// foreach ($patterns as $pattern)
|
||||||
$fields[$key] = $formFields[$key];
|
// if (($key = array_search($pattern, $associatedOrderKey)))
|
||||||
foreach ($formFields as $key => $value)
|
// $fields[$key] = $formFields[$key];
|
||||||
if (!isset($fields[$key]))
|
// foreach ($formFields as $key => $value)
|
||||||
$fields[$key] = $formFields[$key];
|
// if (!isset($fields[$key]))
|
||||||
|
// $fields[$key] = $formFields[$key];
|
||||||
|
|
||||||
|
$fields = $formFields;
|
||||||
$this->fields_options['contact'] = array(
|
$this->fields_options['contact'] = array(
|
||||||
'title' => $this->l('Contact details'),
|
'title' => $this->l('Contact details'),
|
||||||
'icon' => 'tab-contact',
|
'icon' => 'tab-contact',
|
||||||
|
|||||||
Reference in New Issue
Block a user