possible solution
You can add a new method to the product model.
function getDescription(){ $processor = Mage::getModel('core/email_template_filter'); $html = $processor->filter($this->getData('description')); return $html; }
In this way you can use the same {{block}} and {{skin}} sections just like the static blocks and pages and e-mail templates.
It works the same for categories.
ReplyDeleteWhere do I find the product model? Where do I add this code? I would really lie to have static blocks inside of Product descriptions.
ReplyDeleteYou will find the product model in app/code/core/Mage/Catalog/Model/Product.php
ReplyDeleteBut don't edit the core. Here is a way to override your model without editing the code: http://magedev.com/2009/06/03/magento-overriding-model-block-or-helper/
which is the line to adding this? plese
DeleteFollow the tutorial for extending the product model. The code needs to go to the model you create to replace the product mode.
Deletethaaaaaaaaaaaaaaaaaaaaaaank youuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
ReplyDeleteYou saved my life!
hi tzyganu,
ReplyDeletenice function, can i get this to work in the short description as well? That way my static blocks can appear 'above the fold'?
Hello Adza...it should work for the short descrioption also. Just add the method
ReplyDeletefunction getShortDescription(){
$processor = Mage::getModel('core/email_template_filter');
$html = $processor->filter($this->getData('short_description'));
return $html;
}
Hi ,
ReplyDeleteIs there a way to do it like wordpress . like just paste the short code right inside the product discription tab and the cms static block starts to show
Many Thanks
By default is not possible. But adding a new method like I described makes it possible.
DeleteAnd please don't use the "W" word in here :)
Many Thanks for the technical Update . Will surely Try the same on my Wordpress Projects
Delete