// optimization to Product constructor (stock data is not loaded by default)

This commit is contained in:
tDidierjean
2012-01-03 13:40:50 +00:00
parent 21e4a2fb89
commit 93e2f8b5bf
5 changed files with 32 additions and 6 deletions
@@ -924,6 +924,7 @@ class AdminImportControllerCore extends AdminController
if (array_key_exists('id', $info) && (int)$info['id'] && Product::existsInDatabase((int)$info['id'], 'product'))
{
$product = new Product((int)$info['id']);
$product->loadStockData();
$category_data = Product::getProductCategories((int)$product->id);
foreach ($category_data as $tmp)
$product->category[] = $tmp;