Example #1
0
 public static function overrideShippingHtml(&$html, $cart, $vm_id = 0)
 {
     //include(JPATH_SITE.DS.'components'.DS.'com_onepage'.DS.'helpers'.DS.'third_party'.DS.'third_party_shipping_html.php');
     if (empty($vm_id)) {
         $vm_id = OPCTransform::getFT($html, 'input', 'virtuemart_shipmentmethod_id', 'type', 'radio', '>', 'value');
         $vm_id = $vm_id[0];
     }
     OPCloader::getPluginMethods();
     jimport('joomla.filesystem.file');
     if (!isset(OPCloader::$methods['shipment'][$vm_id])) {
         return $html;
     }
     $name = OPCloader::$methods['shipment'][$vm_id]['shipment_element'];
     $name = JFile::makeSafe($name);
     if (empty($name)) {
         return '';
     }
     if (file_exists(JPATH_SITE . DS . 'components' . DS . 'com_onepage' . DS . 'helpers' . DS . 'third_party' . DS . $name . DS . 'html.php')) {
         include JPATH_SITE . DS . 'components' . DS . 'com_onepage' . DS . 'helpers' . DS . 'third_party' . DS . $name . DS . 'html.php';
     }
     return $html;
 }