Include Php in details page


I would like include some informations in my details product page.

But this code change by product, so I can’t integrate a new variable :


in product detail .tpl, because some time I don’t this code…

So I wanted to insert in detail page :

/// ///session_start();
/// include 'images/include/10-20j-4icones.php';

But doesn’t work…

/// ///session_start();
/// include 'images/include/10-20j-4icones.tpl';

But doesn’t work…


include '../images/include/10-20j-4icones.tpl';



include '../images/include/10-20j-4icones.tpl';


NOTHING WORK..............:mad: :confused: :???:

So....... I really need help...


What is 10-20j-4icones.tpl, is it an html file, php file or image?

it’s a html code, write with fckeditor and insert in context, and save in .tpl or .php

Thanks to interest you to my probleme…

I couldn’t understand why you were using php, if it’s just an HTML file then use

{include file="PATH_TO_FILE/10-20j-4icones.tpl"}

in which ever tpl you want the file to show.


Thanks… But doesn’t work.

Look a the end, my product detail page, here:


It’s because in my Product details page, I have, a table with picture before details content, and a table at the end…

This content is introduced directly in product desc, with fckeditor.

But If i want to change this table, and add a new icone, i HAVE to change product after product!! So big big S***

With an include inside my desc, I change just my file…included.

Other possibilities, but I need your help…

Wich code can I introduce in product_detail.tpl To say:

If there is no product price, nothing

If there is a product price :


{include file=“PATH_TO_FILE/10-20j-4icones.tpl”}

I don’t want this table on all my product detail page, because I use product detail page to give advice, and presents manufacturer, and more more…

I can read a little bit, php code, but write… I’m a looser…:wink:


Can you give me this code… I think it’s not Hard…

{if ($product.price != 0 || include file=“include/10-20j-4icones.tpl”


{if $product.price != 0}
{include file="include/10-20j-4icones.tpl"}

This should go in product_details.tpl at bottom after:

{include file="common_templates/tabsbox.tpl" content=$smarty.capture.tabsbox tabs=$product_tabs js_switch="Y" section="info"}

or if you want it in the description box after


Yes!!! It’s Ok thanks!!

See you…


I loocked for on the forum, but don’t find… but I’ve already found before, but today no… SO i ask you

I would like to an element (banner or link), if it’s it’s a specific category… or sub categroy.

Why this code doesn’t work in top.tpl??

{if $category_id ==‘593’}

element : banner or link



small up…

donesn’t work in top.tpl:

{if $category_id ==‘593’}

{include file=“include/10-20j-4icones.tpl”}


do you know why?


Hello Guillaume,

[quote name=‘gg96’]

Look a the end, my product detail page, here:



Nice website!

One thing, you need to have and display your CNIL number do be in compliance with French law…



Déclarer son site à la CNIL:



Lee Li Pop

Thanks for your advice! yes… I forget it…

and for my banner by categorie…?:wink:

Sorry, I’m not strong enough to do it :???:

Lee Li Pop

Try using:

{if $category_data.category_id == 593}
{include file="include/10-20j-4icones.tpl"}

Thanks it’s ok!

And with all sub-categorie?

If “this categorie and all sub-categorie” apparears, I want this banner-top.php


Where can I find all Cscart variable, to find what i want, or to learn, and use smarty?

It’s same thing with:

$product_data.product_id =

$page_data.page_id =

Really thanks charlie.

In admin → settings → Template debugging console (enable tick box) and Save page.

You must be logged in as admin in front end to see debug console.

yes thanks. it"s hard for me! But i could see…

I don’t understand why Banner cscart system is not efficient… Listmania is good, but too much long…

One product after onbe product, or one categorie after one categorie, i muts choose a listmania “advert”…

It’s not possible to do on other side?

I’ve a listmania, and I choose all product and categorie where I want see this listmania?? Like Joomla with item…


[quote name='gg96' timestamp='1240855976' post='47654']

And with all sub-categorie?

If “this categorie and all sub-categorie” apparears, I want this banner-top.php



I know this is uber old, but did you or anyone figure out how to include subcategories here? Thanks!

Nevermind - found it in another post. Here's the solution if anyone's looking for it:

{if $category_data.category_id == '###' || $category_data.parent_id == '###'}
Show this content if the category id and the parent category id is ###
Otherwise show this