// fixxed bug save Product
This commit is contained in:
@@ -57,7 +57,6 @@
|
|||||||
// Update submit button value
|
// Update submit button value
|
||||||
var split_position = id.indexOf('-') + 1;
|
var split_position = id.indexOf('-') + 1;
|
||||||
var btn_name = id.substr(split_position);
|
var btn_name = id.substr(split_position);
|
||||||
$("#product_form_submit_btn").attr('name', 'submit'+btn_name);
|
|
||||||
|
|
||||||
if ($(this).attr("id") != $(".productTabs a.selected").attr('id'))
|
if ($(this).attr("id") != $(".productTabs a.selected").attr('id'))
|
||||||
{
|
{
|
||||||
|
|||||||
+2
-2
@@ -725,7 +725,7 @@ class ProductCore extends ObjectModel
|
|||||||
|
|
||||||
foreach ($categories as $new_id_categ)
|
foreach ($categories as $new_id_categ)
|
||||||
if (!in_array($new_id_categ, $current_categories))
|
if (!in_array($new_id_categ, $current_categories))
|
||||||
$new_categ_pos[] = '('.$new_id_categ.', '.$this->id.', '.$new_categ_pos[$new_id_categ].')';
|
$product_cats[] = '('.$new_id_categ.', '.$this->id.', '.$new_categ_pos[$new_id_categ].')';
|
||||||
if (count($product_cats))
|
if (count($product_cats))
|
||||||
return Db::getInstance()->execute('
|
return Db::getInstance()->execute('
|
||||||
INSERT INTO `'._DB_PREFIX_.'category_product` (`id_category`, `id_product`, `position`)
|
INSERT INTO `'._DB_PREFIX_.'category_product` (`id_category`, `id_product`, `position`)
|
||||||
@@ -755,7 +755,7 @@ class ProductCore extends ObjectModel
|
|||||||
$this->deleteCategory($categ_to_delete['id_category']);
|
$this->deleteCategory($categ_to_delete['id_category']);
|
||||||
// if none are found, it's an error
|
// if none are found, it's an error
|
||||||
if (!is_array($result))
|
if (!is_array($result))
|
||||||
return (false);
|
return false;
|
||||||
|
|
||||||
if (!$this->addToCategories($categories))
|
if (!$this->addToCategories($categories))
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user