I don't try to set price attribute during product import. Product is inserted into Magento catalog with its name, sku, description but price attribute is empty. The code I used is the following:
$product_model = Mage::getModel('catalog/product');
$productId = $product_model->getIdBySku($sku);
$categoriesIds = array($categoryId);
if (!$productId) {
//inserimento
$product_model
->setSku($sku)
->setName($name)
->setDescription($description)
->setShortDescription($shortDescription)
->setStatus(Mage_Catalog_Model_Product_Status::STATUS_ENABLED)
->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH)
->setAttributeSetId(10)
->setCategoryIds($categoriesIds)
->setPrice($price)
->setPrice(11.22)
->setCost(22.33)
->setSpecialPrice(00.44)
->setSpecialFromDate('06/1/2014')
->setSpecialToDate('06/30/2014')
->setMsrpEnabled(1)
->setMsrpDisplayActualPriceType(1)
->setMsrp(99.99)
->setTaxId(2);
$qty = 1;
try {
$productId = $product_model->save()->getId();
$product = $product_model->load($productId);
$product->setQty($qty);
$product->setIsInStock(1); //->isInStock(1)
$product->save();
} catch(Exception $e) {
Mage::log($e->getMessage());
}
} else {
}
Can you help me, please? Thanks!!