I want to create an multiselect
attribute with 3 values. When I select the values during product creation It should display the content from the static blocks. So I entered the identifier
of the static block under default store view
(which is English
below) option during attribute creation like:
Now in view.phtml
, I have added the below code:
<?php
getResource()->getAttribute('r_n')->getFrontend()->getValue($_product);
echo $this->getLayout()->createBlock('cms/block')->setBlockID($cmsstatic)->tohtml();
?>
where r_n
is the attribute code
.
But am getting error like:
Fatal error: Call to undefined function getResource()
Kindly someone help me to resolve this issue.