// $required_fields must not be static
This commit is contained in:
@@ -46,7 +46,7 @@ class AdminImportControllerCore extends AdminController
|
|||||||
|
|
||||||
public $available_fields = array();
|
public $available_fields = array();
|
||||||
|
|
||||||
public static $required_fields = array('name');
|
public $required_fields = array('name');
|
||||||
|
|
||||||
public static $default_values = array();
|
public static $default_values = array();
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ class AdminImportControllerCore extends AdminController
|
|||||||
switch ((int)Tools::getValue('entity'))
|
switch ((int)Tools::getValue('entity'))
|
||||||
{
|
{
|
||||||
case $this->entities[$this->l('Combinations')]:
|
case $this->entities[$this->l('Combinations')]:
|
||||||
self::$required_fields = array(
|
$this->required_fields = array(
|
||||||
'id_product',
|
'id_product',
|
||||||
'group',
|
'group',
|
||||||
'attribute'
|
'attribute'
|
||||||
@@ -241,7 +241,7 @@ class AdminImportControllerCore extends AdminController
|
|||||||
|
|
||||||
case $this->entities[$this->l('Customers')]:
|
case $this->entities[$this->l('Customers')]:
|
||||||
//Overwrite required_fields AS only email is required whereas other entities
|
//Overwrite required_fields AS only email is required whereas other entities
|
||||||
self::$required_fields = array('email', 'passwd', 'lastname', 'firstname');
|
$this->required_fields = array('email', 'passwd', 'lastname', 'firstname');
|
||||||
|
|
||||||
$this->available_fields = array(
|
$this->available_fields = array(
|
||||||
'no' => array('label' => $this->l('Ignore this column')),
|
'no' => array('label' => $this->l('Ignore this column')),
|
||||||
@@ -269,7 +269,7 @@ class AdminImportControllerCore extends AdminController
|
|||||||
|
|
||||||
case $this->entities[$this->l('Addresses')]:
|
case $this->entities[$this->l('Addresses')]:
|
||||||
//Overwrite required_fields
|
//Overwrite required_fields
|
||||||
self::$required_fields = array(
|
$this->required_fields = array(
|
||||||
'lastname',
|
'lastname',
|
||||||
'firstname',
|
'firstname',
|
||||||
'address1',
|
'address1',
|
||||||
@@ -393,7 +393,7 @@ class AdminImportControllerCore extends AdminController
|
|||||||
$nb_table = ceil($nb_column / MAX_COLUMNS);
|
$nb_table = ceil($nb_column / MAX_COLUMNS);
|
||||||
|
|
||||||
$res = array();
|
$res = array();
|
||||||
foreach (self::$required_fields as $elem)
|
foreach ($this->required_fields as $elem)
|
||||||
$res[] = '\''.$elem.'\'';
|
$res[] = '\''.$elem.'\'';
|
||||||
|
|
||||||
$data = array();
|
$data = array();
|
||||||
|
|||||||
Reference in New Issue
Block a user