Jump to content

Bug sur duplicate customization


Recommended Posts

Bonjour,

 

La copie de personnalisation de produits avec ajout des langues ne fonctionnent pas, après vérification de la fonction duplicateCustomizationFields, il manque une portion de code ou code à revoir, $query et sa requete :

 

if (isset($customizations['labels']))
  {
   $query = 'INSERT INTO `'._DB_PREFIX_.'` (`id_customization_field`, `id_lang`, `name`) VALUES ';
   $data = array();
   foreach ($customizations['labels'][$old_customization_field_id] as $customization_label)
 $data = array(
  'id_customization_field' => (int)$customization_field_id,
  'id_lang' => (int)$customization_label['id_lang'],
  'name' => pSQL($customization_label['name']),
 );					 
   if (!Db::getInstance()->insert('customization_field_lang', $data))
 return false;
  }

Link to comment
Share on other sites

Ceci fonctionne :

 

if (isset($customizations['labels']))
  {	  
   $data = array();
   foreach ($customizations['labels'][$old_customization_field_id] as $customization_label)
		    {
  $data = array(
  'id_customization_field' => (int)$customization_field_id,
  'id_lang' => (int)$customization_label['id_lang'],
  'name' => pSQL($customization_label['name'])
 );
  $result = Db::getInstance()->AutoExecute(
			 _DB_PREFIX_.'customization_field_lang',$data,
			 'INSERT');	
   }
  }

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...