1

below is code i am using to add custome image attirbute to magento category

$installer->addAttribute('catalog_category', 'my_image', array(
    'type'          => 'varchar',
    'label'         => 'My Image',
    'input'         => 'image',
    'backend'       => 'catalog/category_attribute_backend_image',
    'required'      => false,
    'sort_order'    => 99,
    'global'        => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
    'group'         => 'General Information'
));

and below code to show that images on frontend:

  echo $imagepathidentifier =  Mage::getBaseUrl('media').'catalog/category/'.Mage::getSingleton('catalog/layer')->getCurrentCategory()->getData('identifier_image')->resize(100);

now above code shows error:

Fatal error: Call to a member function resize() on a non-object in    [...] listcustomtops.phtml on line 39 –  

what to do resize images and then show to user..

2
  • Which error is shown?
    – Alex
    Feb 6, 2015 at 12:32
  • Fatal error: Call to a member function resize() on a non-object in D:\pathher\catalog\product\listcustomtops.phtml on line 39 Feb 6, 2015 at 12:34

1 Answer 1

2

If my assumption is right,probably you have confused with resize() of magento catalog/image Helper class method, it can be applied for product image only. if you want to use that one see this link.

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.