I would like to add attributes into a particular magento static block. Each product has a specific attribute that is assigned to it and I would like to display that attribute into a specific static block.
I have created the attribute set SIZECHART and added women-top, women-bottom and assign to products. I have also created static block women-top, women-bottom. I have a separate static block called SiZE that I would like to display the information on product page when someone is viewing the product. The current code I have is and it not working
<?php $_prodID = Mage::registry('current_product')->getId(); $_product = Mage::getModel('catalog/product')->load($_prodID ); ?> <?php $attributeValue = strtolower($product->getAttributeText('sizechart')); ?> <?php $staticBlockIdentifier = "static_block_".$attributeValue; ?> <?php echo $this->getLayout()->createBlock("cms/block")->setBlockId(size)->toHtml();?>