Include php code in html pages of Cs-Cart


I’m quite new to Cs-Cart, after testing many scripts, this is, by far, one of the best, but I wonder about one thing.

When creating web pages or categories in the admin area through the WYSIWYG html editor ¿is it possible to include php code in that pages? I mean, I’d like to include a little php script within the html description, but until now I’ve had no success.

If someone knows about this, I’d be very grateful…


this should work though I have not tested…





Hi snorocket, and thank you very much for your help.

I’t didn’t work, in the page generated appeared directly the tags {php} and {/php} as normal text and the script didn’t work…

But thanks again for your kind help

Hi gestion21

Replace this:
Then replace this: ?> with this: {/php} at the bottom of your script.

to look like this in your tpl.

if (empty($window)) {
$image_data = fn_get_image($object_id, $object, $image_id, true, ($mode == 'detailed') ? true : false, $object_table);
if (is_array($image_data)) {
header("Content-type: $image_data[image_type]");
echo $image_data['image'];
} else {
header('Content-type: image/gif');

Thank you very much zardos but I want to put the php script, not in a template (tpl) but in a page created with the html editor of Cs-Cart (for example in a category description page or in a page of a section created with Cs-Cart).

But I’m afraid this is not possible… :frowning:

Thank you very much again.

Being more concrete, my aim is to render as html a RSS feed in one of the pages of the shop, for that, I need to include a php script that does the trick…

(I say this just in case you think there is an alternative approach to this that does not include javascript solutions, because with java, the text rendered from the rss is invisible to search engines and then it’s not very useful…)