views:

46

answers:

1

Has anyone found a way to get Server Side Includes to work inside a Magento product description?

I tried adding one and the published page did not show the content I'm trying to include.

For example, I added this to the product description field in the Magento Admin:

<!--#include virtual="../test.php" -->
+2  A: 

You're not going to be able to do that.

Magento product descriptions are stored in the database, and then PHP fetches them out and displays them

Server side includes are processed before Apache ever worries about outputing any content.

Magento doesn't have a feature that's similar to SSI. You could probably write an override to the Product class in Magento to acheive this effect, but it would be non-trival and beyond the scope of a simple StackOverflow answer.

Good luck.

Alan Storm
Thanks Alan. The reason I'm asking is that my product descriptions are very long (10k file size) and only the first half or so shows on the product page. The rest gets cut off. I was thinking to use includes to fix. Do you know any other solution? I'm adding my descriptions by importing a csv (import/export -> profile).