Hide a group in catalog product?

Please help me if anybody know how this work can be done.
I want to hide the website tab in catalog Product, but its functionality should exist. That is, I have made all the check boxes automatically checked,so i dont want to show this tab anybody…but at the time of adding product..check boxes values would be saved.

2 thoughts on “Hide a group in catalog product?”

  1. 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

  2. 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;
    }
    

Leave a Reply

Your email address will not be published. Required fields are marked *