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.
Asked
Active
Viewed 151 times
0

Jonathan Day
- 18,519
- 10
- 84
- 137

Max
- 117
- 4
- 18
-
Can you be little clear??? Do you want the categories not to be displayed as a link in the header menu? – Vijay Mar 23 '11 at 06:24
-
hi.. kvijayhari ...actually i want to hide website tab in catalog->Manage products->website tab from the left tablist.i want to hide but functionality should exist. – Max Mar 23 '11 at 06:51
-
1Why u want to do this? if u want to hide this from someone, then try creating user with restricted permissions under System->permissions->Roles and create a new user from System->permissions->Roles.. – Vijay Mar 23 '11 at 07:23
-
@kvijayhari that's not an option in CE – Jonathan Day Mar 24 '11 at 01:27
2 Answers
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

Jonathan Day
- 18,519
- 10
- 84
- 137
-
1no problem. interested to see your solution, what code worked for you? – Jonathan Day Mar 24 '11 at 06:33
-
hello...JD i tried adding an observer in config.xml and changing in removeTab() method in tabs.php inside adminhtml_block_widget...but i failed to get my desired result.So for a while i stoped my task..doing some other task...actually i am beginner in magento..but i will do that.If u have the solution please help me... – Max Mar 25 '11 at 06:11
0
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;
}

Max
- 117
- 4
- 18