Esempio n. 1
0
    }
    $vatids['field'] = (string) $euvat;
    $s = serialize($vatids);
    $vatids = $session->set('opc_vat', $s);
    if (!defined('bit_included')) {
        define('bit_included', 1);
        //http://vm2onj25.rupostel.com/index.php?option=com_onepage&nosef=1&task=opc&view=opc&format=opchtml&tmpl=component&op_onlyd=&lang=
        $bitjs = '
//<![CDATA[
	bit_error_msg = "' . $error_msg . '";
	bit_error_msg_country_mismatch = "' . $error_msg_country_mismatch . '"; 
	bit_validation_method = "' . $validation_method . '"; 
	bit_euvatid_field_name = "' . $euvatid_field_name . '"; 
	bit_prefix_invalid = "' . $prefix_invalid . '";  
	
	bit_current_url = "' . OPCloader::getUrl() . 'index.php?option=com_onepage&task=opc&tmpl=component&cmd=checkbitvat&format=opchtml&nosef=1&view=opc' . '"; 
	
	function opc_bit_check_vatid(el)
	{
	   //Onepage.validateBitVat(el);
	   //return;
		if (el.name.toString().indexOf(\'shipto_\')<0)
		{
		if (typeof document.userForm != \'undefined\')
		{
			 document.userForm[bit_euvatid_field_name] = document.getElementById(bit_euvatid_field_name+\'_field\'); 
			 document.userForm[\'virtuemart_country_id\'] = document.getElementById(\'virtuemart_country_id\'); 
		}
		else
		{
			 document.userForm = new Array(); 
Esempio n. 2
0
 function getReturnLink(&$ref)
 {
     $itemid = JRequest::getVar('Itemid', '');
     if (!empty($itemid)) {
         $itemid = '&Itemid=' . $itemid;
     } else {
         $itemid = '';
     }
     return base64_encode(OPCloader::getUrl() . 'index.php?option=com_virtuemart&view=cart' . $itemid);
     /*
     if(version_compare(JVERSION,'1.7.0','ge') || version_compare(JVERSION,'1.6.0','ge') || version_compare(JVERSION,'2.5.0','ge')) {
       
     }
     else
     {
      return base64_encode(JURI::root().'/index.php?option=com_virtuemart&page=cart');
     }
     */
 }
Esempio n. 3
0
 public static function loadJavascriptFiles(&$ref, &$OPCloader)
 {
     include JPATH_ROOT . DS . 'components' . DS . 'com_onepage' . DS . 'config' . DS . 'onepage.cfg.php';
     /*
     if (!empty($opc_php_js))
     {
       $dc = JFactory::getDocument(); 
       $url = OPCloader::getUrl(true);
          
       $url_onepage = JRoute::_('index.php?option=com_onepage&view=loadjs&task=loadjs&file=sync.js&nosef=1&format=raw'); 
       $dc->addScript($url_onepage, "text/javascript", false, false); 
       $url_onepage = JRoute::_('index.php?option=com_onepage&view=loadjs&task=loadjs&file=onepage.js&nosef=1&format=raw'); 
       $dc->addScript($url_onepage, "text/javascript", true, true); 
       
       
       return; 
     }
     */
     if (empty($opc_async)) {
         $ref->script('onepage.js', 'components/com_onepage/assets/js/', false);
         $ref->script('sync.js', 'components/com_onepage/assets/js/', false);
     } else {
         $ref->script('sync.js', 'components/com_onepage/assets/js/', false);
         $dc = JFactory::getDocument();
         $url = OPCloader::getUrl(true);
         $dc->addScript($url . 'components/com_onepage/assets/js/onepage.js', "text/javascript", true, true);
     }
 }
Esempio n. 4
0
$loader = new OPCloader();
$amount = JRequest::getVar('amount', 0);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Conversion</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
</head>
<body onload="javascript:eval('parent.op_semafor=true;')">
<?php 
$path = JPATH_SITE . DS . 'components' . DS . 'com_onepage' . DS . 'trackers' . DS . 'body.html';
if (file_exists($path)) {
    ob_start();
    echo @file_get_contents($path);
    $html = ob_get_clean();
    if (!empty($amount) && !empty($adwords_amount[0])) {
        $html = str_replace($adwords_amount[0], $amount, $html);
    }
    echo $html;
}
?>
<script type="text/javascript" src="<?php 
$url = OPCloader::getUrl();
echo $url;
?>
components/com_onepage/trackers/footer.js">
</script>
</body>
</html>
Esempio n. 5
0
 public static function getTosLink(&$ref, &$OPCloader)
 {
     $cart = $ref->cart;
     include JPATH_ROOT . DS . 'components' . DS . 'com_onepage' . DS . 'config' . DS . 'onepage.cfg.php';
     require_once JPATH_SITE . DS . 'components' . DS . 'com_onepage' . DS . 'helpers' . DS . 'config.php';
     $opclang = JFactory::getLanguage()->getTag();
     $tos_config = OPCconfig::getValue('opc_config', 'tos_config', 0, 0, true);
     if (empty($tos_config) || !is_numeric($tos_config)) {
         $itemid = JRequest::getVar('Itemid', '');
         if (!empty($itemid)) {
             $itemid = '&Itemid=' . $itemid;
         } else {
             $itemid = '';
         }
         $tos_link = OPCloader::getUrl() . 'index.php?nosef=1&format=html&option=com_virtuemart&view=vendor&layout=tos&virtuemart_vendor_id=' . $cart->vendor->virtuemart_vendor_id . '&tmpl=component' . $itemid;
         require_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart' . DS . 'version.php';
         $x = VmVersion::$RELEASE;
         if (strpos($x, '${PHING.VM.RELEASE}') === false) {
             if (!version_compare($x, '2.0.2', '>=')) {
                 return "";
             }
         }
     } else {
         //if (!empty($newitemid))
         //$tos_link = JRoute::_('index.php?option=com_content&view=article&id='.$tos_config.'&tmpl=component&Itemid='.$newitemid);
         //else
         $tos_itemid = OPCconfig::getValue('opc_config', 'tos_itemid', 0, 0, true);
         if (!empty($tos_itemid)) {
             $tos_link = JRoute::_('index.php?option=com_content&view=article&id=' . $tos_config . '&tmpl=component&Itemid=' . $tos_itemid);
         } else {
             $tos_link = JRoute::_('index.php?option=com_content&view=article&id=' . $tos_config . '&tmpl=component');
         }
     }
     $b1 = JURI::root(true);
     if (!empty($b1)) {
         if (strpos($tos_link, $b1) === 0) {
             $tos_link = substr($tos_link, strlen($b1));
         }
     }
     if (strpos($tos_link, 'http') !== 0) {
         $base = JURI::root();
         if (substr($base, -1) == '/') {
             $base = substr($base, 0, -1);
         }
         if (substr($tos_link, 0, 1) !== '/') {
             $tos_link = '/' . $tos_link;
         }
         $tos_link = $base . $tos_link;
     }
     if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) {
         $tos_link = str_replace('http:', 'https:', $tos_link);
     }
     return $tos_link;
 }