ViArt - PHP Shopping Cart
Select your currency:
American DollarBritish Pound
How to add php code in custom blocks
You can add php-code to your custom block with php tags, and operate with contents using $block_body variable. This variable consists of all the html text you have in your block.

To activate PHP code functionality for custom blocks, please go to Administration > System > Global Settings and select where you want to insert your php code. Also, don't forget to switch from the 'WYSIWYG HTML Editor' to 'Textarea Editor' to view the code in your custom blocks correctly. Then open your custom block and insert your php code in the 'Block Content' textarea.

The basic code will look like this:

Feel free to add any text here <br> Something <?php echo "1";>
// simple php code

or like this:

Feel free to add any text here <br> Something <?php $block_body = str_replace("Something", "Anything", $block_body); ?>
// php code with a variable replacement

Here is an example of code that can be used in the footer body:

©CopyRight 2004 - {current_year} - All Rights Reserved
<?php
$block_body = str_replace("{current_year}", date("Y"), $block_body);
?>

ViArt - PHP Shopping Cart