News:

Looking for documentation? Take a look on our wiki

Main Menu

plugin creation

Started by hareharan, June 07, 2012, 08:09:04 AM

Previous topic - Next topic

hareharan

Hi I am new to PHP...I have created plugin which shows current date and time in product page with the help of virtuemart built-in function and the code is :

function plgVmOnDisplayProductFE($field, $param, $product, $idx){

$html = '';
               $now  = date('l jS \of F Y h:i:s  A',strtotime($today . " +5 hours 30 minutes"));             
            
               if ($this->params->get('show_relatedproduct'))
               {
                  $html .= '<div class="date">';
                  $html .= 'Date is:';
                  $html .= $now;
                  $html .= '</div>';
               }
               
               return $html;
}


but it doesn't show the date in product page...what is the reason....?
Please help me and THANKS IN ADVANCE