0

I would like to add the SKU to the product name in "edit product" at the admin-side. Is this possible? enter image description here

1 Answer 1

0

It is possible. Just copy Edit.php file from Mage/Adminhtml/Block/Catalog/Product and paste into local/Mage/Adminhtml/Block/Catalog/Product

and find following function public function getHeader() and replace with this:

public function getHeader()
    {
        $header = '';
        if ($this->getProduct()->getId()) {

            $header = $this->escapeHtml($this->getProduct()->getSku() . " " .$this->getProduct()->getName());
        }
        else {
            $header = Mage::helper('catalog')->__('New Product');
        }
        if ($setName = $this->getAttributeSetName()) {
            $header.= ' (' . $setName . ')';
        }
        return $header;
    }

See the line: $header = $this->escapeHtml($this->getProduct()->getSku() . " " .$this->getProduct()->getName()); where I have added $this->getProduct()->getSku(). This is giving you the sku of the product.

For best practise you should follow this link. Remember this only helps you on magento core file override. This will make sure the upgrade will not have much affect on your site. Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.