Magento 1.9 - Add Product in New window
-
13-01-2021 - |
Solution
You can do it by
File path:
magento/app/code/core/Mage/Adminhtml/Block/Catalog/Product.php
protected function _prepareLayout()
{
$this->_addButton('add_new', array(
'label' => Mage::helper('catalog')->__('Add Product'),
'onclick' => "setLocation('{$this->getUrl('*/*/new')}')",
'class' => 'add'
));
$this->setChild('grid', $this->getLayout()->createBlock('adminhtml/catalog_product_grid', 'product.grid'));
return parent::_prepareLayout();
}
Create a file and Replace function to:
magento/app/code/local/Mage/Adminhtml/Block/Catalog/Product.php
protected function _prepareLayout()
{
$this->_addButton('add_new', array(
'label' => Mage::helper('catalog')->__('Add Product'),
'onclick' => 'window.open(\''.$this->getUrl('*/*/new').'\')',
'class' => 'add'
));
$this->setChild('grid', $this->getLayout()->createBlock('adminhtml/catalog_product_grid', 'product.grid'));
return parent::_prepareLayout();
}
replace 'window.open(\''.$this->getUrl('*/*/new').'\')'
Enjoy :)
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange