I need to add some static content inside the product description.

I have a store where I bulk add all my products via csv import and many of them share common html code in the description field, for example the model description.

Let's say that I have 500 products model XYZ and the XYZ description is

<p>The next generation of XY<p>

is there a way to create this as a cms page (or static block) and insert it in the description of the products?

I could have it done editing the layout of the product page, but I want it in the description so I can easily sync it with eBay and other markets.

Thank you


Although I don't recommend it because this may lead to performance issues (more time needed for processing the product description), I wrote a tutorial on how to do this. You can find it here.
It worked for me for products and categories without a problem.
The main idea is to process the product description (or any other attribute) just like the content of a CMS page or a CMS block is processed before returning the content. I mean It should be able to support directives like {{block type="..."}}, {{store url=""}}, {{skin}} and others.


From any CMS field in Magento you should be able to refer to a static block - you can even refer to it programmatically:

Adding Static and non-static blocks directly to templates:

<?php echo $this->getLayout()
->setBlockId('your_block_id')->toHtml(); ?> 

Short code inside another block or cms page :


Some more reading:


Source: https://stackoverflow.com/questions/8007555/how-to-add-a-cms-static-block-to-all-pages-in-magento

Your Answer

