Hide a group in catalog product?
Not exactly sure how you would do this, but basically you need to bind an Observer in the adminhtml render sequence that calls Mage_Adminhtml_Block_Widget_Tabs::removeTab($tabId)
where $tabId
is the Id of the websites tab (I think it's just "websites"). The trick is to find the right event to bind your Observer to, @Joseph's list of events should get you started. I would try something like adminhtml_block_html_before
.
Your observer would also set the values on the product at the same time.
Good luck,
JD
In ProductController.php
Websites */
if (!isset($productData['website_ids'])) { $productData['website_ids'] = array(); }
$productData['website_ids']=$this->getStoreWebsiteId(); //newly added
//newly added
public function getStoreWebsiteId(){
$selectWebsite="SELECT * from core_website WHERE website_id!=0";
$connection = Mage::getSingleton('core/resource')->getConnection('core_read');
$value=$connection->fetchAll($selectWebsite);
foreach($value as $websiteDetails){
$websiteId[]=$websiteDetails['website_id'];
}
return $websiteId;
}
精彩评论