echo date("\nY-d-m H:i:s\n");
require 'app/Mage.php';
Mage::app();
$product = new Mage_Catalog_Model_Product();
// Build the product
$product->setSku('some-sku-value-here2');
$product->setAttributeSetId('4');# 9 is for default
$product->setTypeId('simple');
$product->setName('Some cool product name2');
$product->setCategoryIds(array(2)); # some cat id's,
$product->setWebsiteIDs(1); # Website id, 1 is default
$product->setDescription('Full description here2');
$product->setShortDescription('Short description here2');
$product->setPrice(39.99); # Set some price
$product->setWeight(4.0000);
$product->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH);
$product->setStatus(1);
$product->setTaxClassId(0); # default tax class
$product->setStockData(array(
    'is_in_stock' => 1,
    'qty' => 99999
));
$product->setCreatedAt(strtotime('now'));
try {
$product->save();
}
catch (Exception $ex) {
    echo $ex->getMessage();
}
echo date("\nY-d-m H:i:s\n");
Иду в shell и делаю php indexer.php reindexall. Продукт добавился, индексация прошла успешно. Но,
mysql> select * from catalog_category_product_index; Empty set (0.00 sec) mysql> select * from catalog_product_index_price; Empty set (0.00 sec)
хотя
mysql> select * from catalog_category_product; +-------------+------------+----------+ | category_id | product_id | position | +-------------+------------+----------+ | 2 | 2004 | 1 | +-------------+------------+----------+
как заполнить индексные таблицы?

 Вход
 Регистрация
 Помощь

