Include Php in details page

Hello,



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 :

{$lang.10_20j_4icones}

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…



{literal}

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

{/literal}



{php}

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

{/php}










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

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

THANKS.....

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.

Hello,



Thanks… But doesn’t work.

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

[url]http://www.lacentrale-eco.com/index.php?target=products&product_id=31064[/url]





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 :

Code:

{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}


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




This should go in product_details.tpl at bottom after:


{/capture}
{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


{$product.full_description|default:$product.short_description}

Yes!!! It’s Ok thanks!!



See you…

Hello BABALLUCI,



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

{/if}





Thanks

small up…



donesn’t work in top.tpl:



{if $category_id ==‘593’}

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

{/if}



do you know why?



Thanks.

Hello Guillaume,


[quote name=‘gg96’]

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

[url]http://www.lacentrale-eco.com/index.php?target=products&product_id=31064[/url]

[/QUOTE]



Nice website!



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



CNIL FAQ’s:



[url]http://www.cnil.fr/index.php?id=1253&print=1&user_cnilfaq_pi3_action=etape2&no_cache=1&user_cnilfaq_pi3_profil=11[/url]



Déclarer son site à la CNIL:



[url]http://www.cnil.fr/index.php?id=1544[/url]



Bye!





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"}
{/if}

Thanks it’s ok!



And with all sub-categorie?



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



Thanks…





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…



Thanks.

[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

charlie.

[/quote]



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 ###
{else}
Otherwise show this
{/if}