View Single Post
  #4  
Old January 29th, 2011, 06:29 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

Just add the 2 functions to the top of the <head> area and then insert the PHP code where you want the information to appear.

Something like this should get you started:

PHP Code:
<?php
function merchant_title($merchant) {
    
$merchant strip_tags($merchant);
    return 
$merchant;
}
function 
forbabygifts_format_price($price) {
    
$price strip_tags($price);
    
$price explode("-"$price);
    if (
trim($price[0]) == '')
        
$html 'less than $'.$price[1];
    elseif (
trim($price[1]) == '')
        
$html 'more than $'.$price[0];
    else
        
$html '$'.$price[0] . ' - ''$'.$price[1];
    return 
$html;
}
?>

<title>[category.name] | <?php if (@$_GET['merchant']) { ?> Provided by <?php echo merchant_title($_GET['merchant']); ?> | <?php ?> <?php if (@$_GET['price']) { ?> Price is <?php echo forbabygifts_format_price($_GET['price']); ?> | <?php ?> </title>
Eric