Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

How To Enable Php Tag On My Tpl Page? Rate Topic   - - - - -

 
  • thomas
  • Advanced Member
  • Members
  • Join Date: 19-Nov 12
  • 83 posts

Posted 25 March 2015 - 09:01 AM #1

Hello Guys

I want to add php tag in my tpl page like below
{php}
echo "hi";
{/php}
But whenever i try to do it on my payemt_list.tpl file on the checkout, page went to blank.

I have set allow php tag to true in my conf local page.
But still not working.
Can you tell me what to do?

Please help.


Thank you
Cheers!
Thomas

 
  • Anaconda
  • Senior Member
  • Members
  • Join Date: 19-Sep 14
  • 151 posts

Posted 25 March 2015 - 09:09 AM #2

Did you try this one.
<?php
  echo "hi";
?>

or use
<?php
echo <<<HTML
your html tags here
HTML;
?>


 
  • CS-Market
  • Senior Member
  • Authorized Reseller
  • Join Date: 06-Mar 13
  • 677 posts

Posted 25 March 2015 - 09:33 AM #3

Hello Guys

I want to add php tag in my tpl page like below
{php}
echo "hi";
{/php}
But whenever i try to do it on my payemt_list.tpl file on the checkout, page went to blank.

I have set allow php tag to true in my conf local page.
But still not working.
Can you tell me what to do?

Please help.


Thank you


Please use the following construction as example to use php functions:

{$param1|fn_my_function:$param2:"param3_value"}

Best regards,
CS-Market.

GET A FREE QUOTE  │  CS-Cart add-ons   │   CS-Cart custom development   │  CS-Cart design integration  │  CS-Cart license

Сертифицированный разработчик на CS-Cart Русская Версия. More than 5 years experience in CS-Cart development.


 
  • thomas
  • Advanced Member
  • Members
  • Join Date: 19-Nov 12
  • 83 posts

Posted 25 March 2015 - 10:51 AM #4

I have tried the follwing way on my tpl page

{php}
echo "hi";
{/php}
Cheers!
Thomas

 
  • thomas
  • Advanced Member
  • Members
  • Join Date: 19-Nov 12
  • 83 posts

Posted 25 March 2015 - 10:52 AM #5

Where do i have to put the below line?

{$param1|fn_my_function:$param2:"param3_value"}
i just want to display the below on my tpl page (paymen_list.tpl on cs cart version 4.2)

{php}
echo "hi";
{/php}
Cheers!
Thomas

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19960 posts

Posted 25 March 2015 - 05:28 PM #6

Where do i have to put the below line?

{$param1|fn_my_function:$param2:"param3_value"}
i just want to display the below on my tpl page (paymen_list.tpl on cs cart version 4.2)

{php}
echo "hi";
{/php}


With your example it will be

{"hi"|echo}

{php} tag is not supported by CS-Cart anymore
GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • Sumit
  • Newbie
  • Trial users
  • Join Date: 04-Mar 15
  • 3 posts

Posted 27 March 2015 - 08:24 PM #7

{php} tags are deprecated from Smarty, and should not be used. Put your PHP logic in PHP scripts or plugin functions instead.

http://www.smarty.ne...unction.php.tpl