Magento Core: Make custom attribute read-only

Send Snippet To: Save this snippet to Code Collector Pro -- view all tamburra's snippets
language: Other
license: Other

Code for Snippet:

                
---------------
Open:
---------------
 
/app/design/adminhtml/default/default/template/catalog/form/renderer/fieldset/element.phtml
 
 
---------------
Find:
---------------
 
<?php $_element = $this->getElement() ?>
<?php $this->checkFieldDisable() ?>
 
 
---------------
Add Below:
---------------
 
<?php
if((strpos(trim($this->getElementHtml()), '"ebay_erp_available_qty"') !== false)){
    $_element->setDisabled(true);
}
?>
 
<?php
if((strpos(trim($this->getElementHtml()), '"availability_ln"') !== false)){
    $_element->setDisabled(true);
}
?>
comments powered by Disqus

Info

Tags: Core CE 1.6

Link to this snippet:


Download to Code Collector

To use the direct link to your snippet on CodeCollector.net either copy the html from the above section or drag the Download to Code Collector to where you would like to use it.

More Info:

Times Viewed: 2682
Date Added: 2012-01-24 06:16:52
Last Modified: 0000-00-00 00:00:00

Web Analytics