1

I am trying to add a configurable product on magento 1.9.1.0 and experiencing a fatal error

Fatal error: Unsupported operand types in /public_html/app/code/core/Mage/ConfigurableSwatches/Helper/Mediafallback.php on line 61

Any suggestions how I can solve the problem?

1

Faced same problem today, I fixed it by Overriding core files

  1. Copy

    app/code/core/Mage/ConfigurableSwatches/Helper/Mediafallback.php
    

    to

    app/code/local/Mage/ConfigurableSwatches/Helper/Mediafallback.php
    
  2. and change line number 61 from

    $optionLabels += $attribute->getOptionLabels();
    

    to

    $optionLabels = array_merge($optionLabels, $attribute->getOptionLabels());
    

this will solve this error.

| improve this answer | |
-1

replace this error line 61 : $optionLabels .= $attribute->getOptionLabels();

i placed (.) instate of (+). its working fine for me.

| improve this answer | |
  • I would highly discourage editing Magento core files. IMO this is not a proper solution – 7ochem Apr 21 '15 at 14:12
  • Is this a core bug? You wouldn't expect $attribute->getOptionLabels() to be a number, right? .= seems right? - although i would suggest moving the file to the local code pool. – Douglas Radburn Apr 21 '15 at 14:22

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.