GX-Bug #52477 » CSVTOPCategoriesFix.patch
src/system/classes/csv/CSVSource.php (revision ) | ||
---|---|---|
2537 | 2537 |
{ |
2538 | 2538 |
$t_table_name = 'products'; |
2539 | 2539 |
$t_table_data = &$p_import_data[$t_table_name]; |
2540 |
|
|
2540 | ||
2541 |
// set TOP to true/1, if this product is not related to a categorie |
|
2542 |
if(count($p_import_data['categories']) === 0) |
|
2543 |
{ |
|
2544 |
$t_table_data['products_startpage'] = 1; |
|
2545 |
} |
|
2546 | ||
2547 | 2541 |
if ($this->entry_exists($t_table_name)) |
2548 | 2542 |
{ |
2549 | 2543 |
$t_action = 'update'; |
... | ... | |
2566 | 2560 |
if ($t_action == 'insert') |
2567 | 2561 |
{ |
2568 | 2562 |
$t_table_data['products_id'] = ((is_null($___mysqli_res = mysqli_insert_id($GLOBALS["___mysqli_ston"]))) ? false : $___mysqli_res); |
2563 |
if(count($p_import_data['categories']) === 0) |
|
2564 |
{ |
|
2565 |
$p_import_data['products_to_categories']['categories_id'] = 0; |
|
2566 |
$p_import_data['products_to_categories']['products_id'] = $t_table_data['products_id']; |
|
2567 |
} |
|
2569 | 2568 |
} |
2570 | 2569 |
} |
2571 | 2570 |