cancel
Showing results for 
Search instead for 
Did you mean: 

Error activating color swatches on custom theme

Error activating color swatches on custom theme

Hello,

 

i am trying to activate color swatches on a custom theme, using magento ver. 1.9.2.1.

I am following steps from this guide https://www.bemaged.com/en/blog/use-magento-swatches-in-custom-theme/ 

 

Now I get an error with 

 function getProductAttribute() on a non-object in ... template/configurableswatches/catalog/product/view/type/options/configurable/swatches.phtmlon line 38

 

which is

$_attr = $_attribute->getProductAttribute();
$_attrCode = $_attr->getAttributeCode();
$_id = $_attribute->getAttributeId();

 

Any idea how to get around this?

 

thanks