Can we make a simple form in magento for admin to add products and other required details rather than using the default menu which is for the admin after login ??
use below function in controller to add new product
public function addNewProduct(Varien_Object $object){
$product = Mage::getModel('catalog/product');
$product->setSku('pro12');
$product->setAttributeSetId(9);
$product->setTypeId('simple');
$product->setName('Product title');
$product->setCategoryIds(array(7));
$product->setWebsiteIDs(array(1));
$product->setDescription('Product Full description');
$product->setShortDescription('Product Short description');
$product->setPrice(250.00);
$product->setWeight(30.00);
$product->setVisibility(4);
$product->setStatus(1);
$product->setTaxClassId(0);
$product->setStockData(array(
'is_in_stock' => 1,
'qty' => 20
));
$product->setCreatedAt(strtotime('now'));
try {
$product->save();
}
catch (Exception $e) {
Mage::log($e->getMessage()); //check your var/log/system.log for error
}
echo "saved";
die();
}
Also to design form use this link to take necessary input from admin and you can add your product with simple form.