I am inserting a simple product programmatically.
the price is displaying on the grid but not on the (admin)form when I try to edit the product price. it is displaying as zero
$new_product->setName($sortedData['description'])
->setAttributeSetId(9)
->setTypeId('simple')
->setCreatedAt(strtotime('now'))
->setWebsiteIds(array(1))
->setStatus(1)
->setTaxClassId(1)
->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH)
->setTag($sortedData['printer_compatibility'])
->setCategoryIds($category)
->setSupplierCode($sortedData['dynamic_supply_code'])
->setSku($sortedData['dynamic_supply_code'])
->setCostExTax($sortedData['reseller_price_ex_gst'])
->setManufacturer($this->fetchManufacturerOption($sortedData['manufacturer_name']))
->setColor($this->addAttributeValue('color', $sortedData['cartridge_type']))
->setMarkUpPercentage(10)
->setPrice($this->calculatePrice($sortedData['reseller_price_ex_gst'], 10))
->setCustomPrice($this->calculatePrice($sortedData['reseller_price_ex_gst'], 10))
->setOriginalCustomPrice($this->calculatePrice($sortedData['reseller_price_ex_gst'], 10))
//->setPricePerPage()
->setManufacturerCode($sortedData['manufacturer_oem_code'])
->setWeight($sortedData['product_weight'])
//->setPageYield($sortedData['cartridge_yield'])
->setPageYield($this->filterPageYield($sortedData['cartridge_yield'], $sortedData['cartridge_type']))
->setMediaGallery (array('images'=>array (), 'values'=>array ()))
->addImageToMediaGallery(getcwd()."/images/{$sortedData['dynamic_supply_code']}.jpg", array('image','thumbnail','small_image'), false, false)
->setCubicMeasurement($sortedData['cubic_measurement'])
->setStockData(array(
'use_config_manage_stock' => 0, //'Use config settings' checkbox
'manage_stock'=>1, //manage stock
'min_sale_qty'=>1, //Minimum Qty Allowed in Shopping Cart
'max_sale_qty'=>2, //Maximum Qty Allowed in Shopping Cart
'is_in_stock' => 1, //Stock Availability
'qty' => $sortedData['stock_on_hand'] //qty
)
);
$new_product->save();