( ! ) Warning: get_browser(): browscap ini directive not set in /var/www/vendorama/cart/includes/browser.inc on line 127
Call Stack
#TimeMemoryFunctionLocation
10.0003359448{main}( ).../index.php:0
20.0005365608include( '/var/www/vendorama/cart/includes/global.inc' ).../index.php:5
30.0010367888include_once( '/var/www/vendorama/cart/includes/browser.inc' ).../global.inc:82
40.0072381688get_browser ( ).../browser.inc:127
Snippets on Vendo

Snippets

Smart Tags | Page Variables | Session Variables | Snippets | PHP | Language Variables (Constants) | SQLITE | GET variables | Templates Markup

 Snippets (examples) Description Result

Snippets allow you to insert blocks of PHP into your HTML templates. Set your variables in your top.inc file, e,g, $snippet1 and $snippet20 and the smart tag equivalents i.e. {$snippet1} and {$snippet20} in your template HTML template.

For example add to your top.inc file:
<?php
$snippet1 = "The date is ".date('d/m/Y')." and the time is ".date('g:ia').".";
?>

In your header.html template file add: {$snippet1}

The date is 23/7/18 and the time is 3:53pm.
<?php
if($_SESSION[country_id]!='121') {
$snippet2 = "<p><strong style=\"color:red\">Note: we do not deliver outside New Zealand.</strong></p>";
}
?>

In your header.html template file add: {$snippet2}

Note: we do not deliver outside New Zealand.

In your top.inc file add:

<?php
if($_SESSION[first_name]) {
      $xyz_custom_name = "<p>Hi $_SESSION[first_name].";
       ifcount($_SESSION[order][cart]>0) $xyz_custom_name .= "<br />You have count($_SESSION[order][cart]) items in your cart.";
      $xyz_custom_name .= "</p>";
} else {
      $xyz_custom_name .= "<p>You are not logged in.</p>";
}
?>

In your header.html template file add:

<div id="side">
{$xyz_custom_name}
</div>

You can also also create snippets by adding to the $snippets array in top.inc:
<?php
$nights = array('wet', 'moist', 'sultry', 'humid');
shuffle($nights);
$snippets['NIGHTS']=$nights[0];
?>

Then put the equivelent Smart Tag into your template HTML or any page content:
The night was {$NIGHTS}

Hi .
You have 0 items in your cart.