1

Two categories on my website mrmobileuk.com are showing the following error:

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

These are the categories:

http://mrmobileuk.com/index.php/lcds-digitizers-spare-parts.html

http://mrmobileuk.com/index.php/lcds-digitizers-spare-parts/spare-parts.html

Rest other categories are fine.

There have been posts on this issue previously too on your site but no recommended solution has been posted in response.


@murtaza and rest who have been following this post.

There was no problem with the Mediafallback.php file.

Do not edit the core file.

I created new categories and tried to place the products in these new categories one by one. The error showed up again after moving a certain product which was the main cause. It was a configurable product but it wasn't associated with simple products. So I deleted that product and created again and was all fine after that. Because of that, the whole category was showing an error. I still do not know why that product was causing an error but deleting it solved the issue. So if you are keen to know why, you can investigate on that part.

  • Which Magento version are you using exactly ? – Raphael at Digital Pianism Mar 8 '17 at 15:13
  • @Rahphael Am using 1.9.2.4 – sash Mar 9 '17 at 9:50
0

copy

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

to

Magento_Base_DIR/app/code/local/Mage/ConfigurableSwatches/Helper/Mediafallback.php

and change line number 61 from

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

to

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

this is how I solve this error.

Edit

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

Edit2

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

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.