I have a attribute called
Artist
It has several artist names
XYZ
ABC
RST
I need to be get the artist name associated to the current product page via a call to a phtml in a CMS Block.
What do I need to put in the block file and in the phtml file for this?
I've tried this solution but I'm unsure how to go about it or if even a recommended method of doing it.
UPDATE
What I'm looking for is to use a short code to call the attribute name within the short description block, as follows, rather than changing the view xml file to get and position the attribute name on the product page.
<p>Painting by {{block class="" template=""}} in oil on canvas</p>
Where
{{block class="" template=""}}
= attribute artist name
Best Answer
You can directly call product attribute in following file.
Using following code:
Note: You need to replace
short_description
with your new attribute code. You can also change display position of product attribute.Update I
If you want to manage it from static block you need to create a static block with identifier
artist_block
with following contentNow create
artist.phtml
at:with following content
Now you need to call static block at:
by following code:
Hope above will help!