0

I'm re-writing catalog/product_attribute_backend_media model in my module using folllowing configuration

    <global>
        <models>
            <catalog>
                    <rewrite>
                        <product_attribute_backend_media>Makery_S3image_Model_Product_Attribute_Backend_Media</product_attribute_backend_media>
                    </rewrite>
            </catalog>        
        </models>
    </global>

and my model file is like

<?php
class Makery_S3image_Model_Product_Attribute_Backend_Media extends Mage_Eav_Model_Entity_Attribute_Backend_Abstract
{
//snip

While saving product after uploading image, I'm getting error

Invalid backend model specified: catalog/product_attribute_backend_media

  • Any particular reason for extending abstract instead of the class you rewrite? – Lord Skeletor Dec 2 '15 at 19:04
  • @LordSkeletor: Nope. I've updated to to the class being re-written Mage_Catalog_Model_Product_Attribute_Backend_Media. Still same issue. – amitshree Dec 2 '15 at 19:12
0

I got it working using following code. I'm not sure what was wrong

<models>
    <amazon>
        <class>Makery_Amazon_Model</class>
    </amazon>
    <catalog>
        <rewrite>
            <product_attribute_backend_media>Makery_Amazon_Model_Product_Attribute_Backend_Media</product_attribute_backend_media>
        </rewrite>
    </catalog>
</models>

and Model file

<?php
class Makery_Amazon_Model_Product_Attribute_Backend_Media extends Mage_Catalog_Model_Product_Attribute_Backend_Media
{
// snip
  • 2
    <amazon> <class>Makery_Amazon_Model</class> </amazon> this is required to models – Abdul Dec 4 '15 at 5:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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