I'm looking for a way to add php to a static block in Magento. I have tried numerous ways, but the editor changes
There is some quite limited short-tag support in static blocks, but you're probably better off calling a template file. You can do this inside your static block if you prefer:
{{block type="cms/block" block_id="your_block_identifier" template="your_path/template.phtml"}}
Then make a new template file and you can run your php stuff in there.
This is a working way and eliminating unnecessary code
{{block type="core/template" template="page/urfile.phtml"}}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With