[-] BO: Fix #PSCFV-7377 customizable fields on product duplication
This commit is contained in:
+1
-1
@@ -3567,7 +3567,7 @@ class ProductCore extends ObjectModel
|
||||
|
||||
if (isset($customizations['labels']))
|
||||
{
|
||||
$query = 'INSERT INTO `'._DB_PREFIX_.'` (`id_customization_field`, `id_lang`, `name`) VALUES ';
|
||||
$query = 'INSERT INTO `'._DB_PREFIX_.'customization_field_lang` (`id_customization_field`, `id_lang`, `name`) VALUES ';
|
||||
$data = array();
|
||||
foreach ($customizations['labels'][$old_customization_field_id] as $customization_label)
|
||||
$data = array(
|
||||
|
||||
@@ -79,7 +79,7 @@ function create_multistore()
|
||||
|
||||
// Stock conversion
|
||||
$sql = 'INSERT INTO `'._DB_PREFIX_.'.stock` (`id_product`, `id_product_attribute`, `id_group_shop`, `id_shop`, `quantity`)
|
||||
VALUES (SELECT `p.id_product`, 0, 1, 1, `p.quantity` FROM `'._DB_PREFIX_.'.product` p);';
|
||||
VALUES (SELECT p.`id_product`, 0, 1, 1, p.`quantity` FROM `'._DB_PREFIX_.'.product` p);';
|
||||
$res &= Db::getInstance()->execute($sql);
|
||||
|
||||
$sql = 'INSERT INTO `'._DB_PREFIX_.'.stock` (`id_product`, `id_product_attribute`, `id_group_shop`, `id_shop`, `quantity`)
|
||||
|
||||
@@ -63,8 +63,8 @@ function generate_tax_rules()
|
||||
}
|
||||
|
||||
$states = Db::getInstance()->executeS('
|
||||
SELECT * FROM `'._DB_PREFIX_.'states s
|
||||
LEFT JOIN `'._DB_PREFIX_.'tax_state ts ON (ts.`id_state` = s.`id_state`)
|
||||
SELECT * FROM `'._DB_PREFIX_.'states` s
|
||||
LEFT JOIN `'._DB_PREFIX_.'tax_state` ts ON (ts.`id_state` = s.`id_state`)
|
||||
WHERE `id_tax` = '.(int)$id_tax);
|
||||
|
||||
if ($states)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
function setAllGroupsOnHomeCategory()
|
||||
{
|
||||
$ps_lang_default = Db::getInstance()->getValue('SELECT value
|
||||
FROM `'._DB_PREFIX_.'`configuration WHERE name="PS_LANG_DEFAULT"');
|
||||
FROM `'._DB_PREFIX_.'configuration` WHERE name="PS_LANG_DEFAULT"');
|
||||
|
||||
$results = Db::getInstance()->executeS('SELECT id_group FROM `'._DB_PREFIX_.'group`');
|
||||
$groups = array();
|
||||
|
||||
@@ -55,7 +55,7 @@ function update_order_canada()
|
||||
|
||||
$id_order_list = Db::getInstance()->executeS($sql);
|
||||
$default_price_display_method = Db::getInstance()->getValue('SELECT price_display_method
|
||||
FROM `'._DB_PREFIX_.'group WHERE id_group=1`');
|
||||
FROM `'._DB_PREFIX_.'group` WHERE id_group=1');
|
||||
$values = '';
|
||||
foreach ($id_order_list as $order)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user