示例#1
0
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* 
*/
if (substr($selected_template, strlen($selected_template)) !== '/') {
    $selected_template .= '/';
}
JHTMLOPC::stylesheet('tabcontent1.css', 'components/com_onepage/themes/' . $selected_template, array());
JHTMLOPC::script('tabcontent.js', 'components/com_onepage/themes/' . $selected_template, false);
//JHTMLOPC::script('placeholder.js', 'components/com_onepage/themes/'.$selected_template, false);
$javascript = '
	window.addEvent("domready", function(){ 
		jQuery(document).ready(function($) {
            $(\'#edit_address_bt\').live("click", function() {
                $(this).facebox({ iframe: \'\' });
				return false; 
            });
         });
		}
    ';
$document = JFactory::getDocument();
//$document->addScriptDeclaration($javascript);
//$currentlang = JLanguage::getInstance($lang->lang_code);
$lang = JFactory::getLanguage();
if (method_exists($lang, 'isRTL')) {
    if ($lang->isRTL()) {
        JHTMLOPC::stylesheet('rtl.css', 'components/com_onepage/themes/' . $selected_template, array());
    }
}
示例#2
0
*      Version 2 of date 31.March 2012
*      Feel free to modify this file according to your needs
*
*
*     @copyright Copyright (C) 2007 - 2012 RuposTel - All rights reserved.
*     @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*     One Page checkout is free software released under GNU/GPL and uses code from VirtueMart
*     VirtueMart is free software. This version may have been modified pursuant
*     to the GNU General Public License, and as distributed it includes or
*     is derivative of works licensed under the GNU General Public License or
*     other free or open source software licenses.
* 
*	  BIT VAT COMPATIBILITY FILE
*/
JHTMLOPC::script('jquery.base64.js', $plugin_short_path . 'js/', false);
JHTMLOPC::script('bitvatidchecker.js', $plugin_short_path . 'js/', false);
$db = JFactory::getDBO();
$app = JFactory::getApplication('site');
$plugin = JPluginHelper::getPlugin('system', 'bit_vm_check_vatid');
if (!empty($plugin)) {
    $pluginParams = new JRegistry();
    $pluginParams->loadString($plugin->params);
    $euvatid_field_name = $pluginParams->get('euvatid_field_name', 'EUVatID');
    $validation_method = $pluginParams->get('validation_method', 2);
    $error_msg = base64_encode($pluginParams->get('error_msg_invalid_id', 'Invalid VAT number'));
    $error_msg_country_mismatch = base64_encode($pluginParams->get('error_msg_country_mismatch', "The VAT ID you've entered doesn't match your country."));
    $prefix_invalid = base64_encode($pluginParams->get('invalid_prefix', "[invalid: ]"));
    $current_url = JURI::current();
    $euvat = $pluginParams->get('euvatid_field_name', 'EUVATnumber');
    $session = JFactory::getSession();
    $vatids = $session->get('opc_vat', array());
示例#3
0
<?php

/**
 * @version		$Id: default.php 21837 2011-07-12 18:12:35Z dextercowley $
 * @package		RuposTel OnePage Utils
 * @subpackage	com_onepage
 * @copyright	Copyright (C) 2005 - 2013 RuposTel.com
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */
// no direct access
defined('_JEXEC') or die;
$document = JFactory::getDocument();
JHTMLOPC::script('toggle_langs.js', 'administrator/components/com_onepage/views/config/tmpl/js/', false);
$video = OPCVideoHelp::get('COM_ONEPAGE_TRACKING_GENERAL');
$document->setTitle(JText::_('COM_ONEPAGE_TRACKING_PANEL'));
JHTMLOPC::script('toggle_langs.js', 'administrator/components/com_onepage/views/config/tmpl/js/', false);
JHTML::_('behavior.tooltip');
?>
<script type="text/javascript">
    window.addEvent('domready', function(){ 
       var JTooltips = new Tips($$('.hasTip'), 
       { maxTitleChars: 50, fixed: false}); 
    });
</script>
<?php 
JToolBarHelper::Title(JText::_('COM_ONEPAGE_TRACKING_PANEL') . $video, 'generic.png');
//	JToolBarHelper::install();
JToolBarHelper::apply();
jimport('joomla.html.pane');
jimport('joomla.utilities.utility');
jimport('joomla.html.html.bootstrap');
示例#4
0
 * @package VirtueMart
 * @subpackage payment
 * Copyright (C) 2004-2014 Virtuemart Team. All rights reserved.
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
 * VirtueMart is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * See /administrator/components/com_virtuemart/COPYRIGHT.php for copyright notices and details.
 *
 * http://virtuemart.net
 */
defined('_JEXEC') or die;
$customerData = $viewData['customerData'];
JHTML::_('behavior.tooltip');
JHTMLOPC::script('vmcreditcard.js', 'components/com_virtuemart/assets/js/', false);
VmConfig::loadJLang('com_virtuemart', true);
vmJsApi::jCreditCard();
$doc = JFactory::getDocument();
//$doc->addScript(JURI::root(true).'/plugins/vmpayment/paypal/paypal/assets/js/site.js');
?>
<div id="paymentMethodOptions_<?php 
echo $viewData['virtuemart_paymentmethod_id'];
?>
" class="paymentMethodOptions" >
  
    <span class="vmpayment_cardinfo">
        <?php 
echo JText::_('VMPAYMENT_PAYPAL_CC_COMPLETE_FORM');
if ($viewData['sandbox']) {
    echo '<br />' . JText::_('VMPAYMENT_PAYPAL_CC_SANDBOX_INFO');
/*
*
* @copyright Copyright (C) 2007 - 2014 RuposTel - All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* One Page checkout is free software released under GNU/GPL and uses code from VirtueMart
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* 
*/
defined('_JEXEC') or die('Restricted access');
if (!defined('_VALID_MOS') && !defined('_JEXEC')) {
    die('Direct Access to ' . basename(__FILE__) . ' is not allowed.');
}
$ajax = JRequest::getVar('ajax', '0');
if ($ajax === 'yes') {
    require JPATH_SITE . DS . 'administrator' . DS . 'components' . DS . 'com_onepage' . DS . 'views' . DS . 'order_details' . DS . 'tmpl' . DS . 'ajax' . DS . 'onepage_ajax.php';
    die;
}
JHTMLOPC::script('toggle_langs.js', 'administrator/components/com_onepage/views/config/tmpl/js/', false);
JHTMLOPC::script('order_edit.js', 'administrator/components/com_onepage/views/order_details/tmpl/ajax/', false);
JHTMLOPC::script('onepage_ajax.js', 'administrator/components/com_onepage/views/order_details/tmpl/ajax/', false);
JHTMLOPC::stylesheet('order_edit.css', 'administrator/components/com_onepage/views/order_details/tmpl/ajax/', false);
if (OPCJ3) {
    jimport('joomla.html.html.bootstrap');
    JHtml::_('bootstrap.framework');
}
JHTMLOPC::stylesheet('bootstrap.min.css', 'components/com_onepage/themes/extra/bootstrap/', array());
示例#6
0
<?php

if (!defined('_VALID_MOS') && !defined('_JEXEC')) {
    die('Direct Access to ' . basename(__FILE__) . ' is not allowed.');
}
/*
* This file is part of stAn RuposTel one page checkout
* This is registered Virtuemart function to process one page checkout
* registration of this function is done automatically at first use of basket.php
* it uses all the fields from <form> and saves them into session and redirects to /html/checkout.onepage
* This function saves user information and the order to database and sends emails
*
* @copyright Copyright (C) 2007 - 2010 RuposTel - All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* One Page checkout is free shoftware released under GNU/GPL and uses code from VirtueMart
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* 
*/
if (substr($selected_template, strlen($selected_template)) !== '/') {
    $selected_template .= '/';
}
JHTMLOPC::stylesheet('tabcontent1.css', 'components/com_onepage/themes/' . $selected_template, array());
JHTMLOPC::stylesheet('blue.css', 'components/com_onepage/themes/' . $selected_template, array());
JHTMLOPC::script('tabcontent.js', 'components/com_onepage/themes/' . $selected_template, false);
// based on: http://jamesallardice.github.io/Placeholders.js/
JHTMLOPC::script('placeholder.js', 'components/com_onepage/themes/' . $selected_template, false);
示例#7
0
    public static function getCustomFields($virtuemart_product_id, $cart_key = '', $quantity = 1)
    {
        $html = '';
        require_once JPATH_ROOT . DS . 'components' . DS . 'com_onepage' . DS . 'helpers' . DS . 'mini.php';
        $product_model = OPCmini::getModel('product');
        $product = $product_model->getProduct($virtuemart_product_id, TRUE, TRUE, TRUE, $quantity, true);
        $customfieldModel = OPCmini::getModel('Customfields');
        if (!method_exists($customfieldModel, 'getproductCustomslist')) {
            return $html;
        }
        $product->customfields = $customfieldModel->getproductCustomslist($virtuemart_product_id);
        if (empty($product->customfields) and !empty($product->product_parent_id)) {
            //$product->customfields = $this->productCustomsfieldsClone($product->product_parent_id,true) ;
            $product->customfields = $customfieldModel->getproductCustomslist($product->product_parent_id, $virtuemart_product_id);
            $product->customfields_fromParent = TRUE;
        }
        $customfieldModel->getProductCustomsField($product);
        $product->customfields = $customfieldModel->getProductCustomsFieldCart($product);
        foreach ($product->customfields as $k => $custom) {
            if (!empty($custom->layout_pos)) {
                $product->customfieldsSorted[$custom->layout_pos][] = $custom;
                unset($product->customfields[$k]);
            }
        }
        $product->customfieldsSorted['normal'] = $product->customfields;
        unset($product->customfields);
        JHTMLOPC::script('opcattributes.js', 'components/com_onepage/assets/js/');
        $html .= '
		<form method="post" class="opccartproduct opc-recalculate" action="' . JRoute::_('index.php') . '">
		<input name="quantity[0]" class=".quantity-input" type="hidden" value="' . $quantity . '">
		
		<input name="virtuemart_product_id[0]" class="opc_product" type="hidden" value="' . $virtuemart_product_id . '">
		<input name="cart_key" value="' . $cart_key . '" type="hidden" />
		<input name="cart_virtuemart_product_id" value="' . $cart_key . '" type="hidden" />
		<div class="product-fields">';
        $custom_title = null;
        foreach ($product->customfieldsSorted as $positions => $val) {
            foreach ($val as $field) {
                if ($field->is_hidden) {
                    //OSP http://forum.virtuemart.net/index.php?topic=99320.0
                    continue;
                }
                if ($field->display) {
                    $html .= '<div class="product-field product-field-type-' . $field->field_type . '">';
                    if ($field->custom_title != $custom_title && $field->show_title) {
                        $html .= '<span class="product-fields-title" >' . JText::_($field->custom_title) . '</span>';
                        if ($field->custom_tip) {
                            $html .= JHTML::tooltip($field->custom_tip, JText::_($field->custom_title), 'tooltip.png');
                        }
                    }
                    $display = $field->display;
                    $selected = self::getSelected($cart_key, $field->virtuemart_custom_id);
                    $display = str_replace(JText::_('COM_VIRTUEMART_CART_PRICE_FREE'), '', $display);
                    $display = str_replace('value="' . $selected . '"', ' checked="checked" selected="selected" value="' . $selected . '" ', $display);
                    $html .= '<div class="product-field-display" style="clear:both;">' . $display . '</div>
	    	    <span class="product-field-desc">' . jText::_($field->custom_field_desc) . '</span>
	    	</div>';
                    $custom_title = $field->custom_title;
                }
            }
        }
        $html .= '</div></form>';
        return $html;
    }
示例#8
0
<?php

if (!defined('_VALID_MOS') && !defined('_JEXEC')) {
    die('Direct Access to ' . basename(__FILE__) . ' is not allowed.');
}
/*
* This file is part of stAn RuposTel one page checkout
* This is registered Virtuemart function to process one page checkout
* registration of this function is done automatically at first use of basket.php
* it uses all the fields from <form> and saves them into session and redirects to /html/checkout.onepage
* This function saves user information and the order to database and sends emails
*
* @copyright Copyright (C) 2007 - 2010 RuposTel - All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* One Page checkout is free shoftware released under GNU/GPL and uses code from VirtueMart
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* 
*/
if (substr($selected_template, strlen($selected_template)) !== '/') {
    $selected_template .= '/';
}
JHTMLOPC::stylesheet('pbv.css', 'components/com_onepage/themes/' . $selected_template, array());
JHTMLOPC::stylesheet('tabcontent1.css', 'components/com_onepage/themes/' . $selected_template, array());
JHTMLOPC::script('tabcontent.js', 'components/com_onepage/themes/' . $selected_template, false);
示例#9
0
?>
" type="text/javascript"></script>
<script src="<?php 
echo JHTMLOPC::getFullUrl('sync.js', 'components/com_onepage/assets/js/');
?>
" type="text/javascript"></script>
<script src="<?php 
echo JHTMLOPC::getFullUrl('onepage.js', 'components/com_onepage/assets/js/');
?>
" type="text/javascript"></script>
<script src="<?php 
echo JHTMLOPC::getFullUrl('tabcontent.js', $path, false);
?>
" type="text/javascript"></script>
<script src="<?php 
echo JHTMLOPC::getFullUrl('jquery.mobile.stepper.js', 'components/com_onepage/themes/extra/jQuery-Mobile-Stepper-Widget-master/', false);
?>
" type="text/javascript"></script>


<title><?php 
echo OPCLang::_('COM_VIRTUEMART_CART_TITLE');
?>
</title>
  
<script src="/components/com_virtuemart/assets/js/jquery.ui.datepicker.min.js" type="text/javascript"></script>
<script src="/components/com_virtuemart/assets/js/i18n/jquery.ui.datepicker-en-GB.js" type="text/javascript"></script>

 
  <script src="/components/com_virtuemart/assets/js/vmcreditcard.js" type="text/javascript"></script>
  <script src="/components/com_onepage/ext/doublemail/js/doublemail.js?opcversion=2_0_257_268_140914" type="text/javascript"></script>
示例#10
0
    public static function getStateList(&$ref)
    {
        /*
            if (!class_exists('VirtueMartModelState'))
            require(JPATH_VM_ADMINISTRATOR.DS.'models'.DS.'state.php'); 
            if (!class_exists('VirtueMartModelCountry'))
        	require(JPATH_VM_ADMINISTRATOR.DS.'models'.DS.'country.php'); 
        */
        $db = JFactory::getDBO();
        $q = 'select count(*) as count from #__virtuemart_states where 1';
        $db->setQuery($q);
        $count = $db->loadResult();
        $js_filename = 'opc_states_' . VMLANG . '_' . $count . '.js';
        $js_file = JPATH_SITE . DS . 'components' . DS . 'com_onepage' . DS . 'config' . DS . 'dynamic_scripts' . DS . $js_filename;
        $js_path = 'components/com_onepage/config/dynamic_scripts/';
        $js = ' var OPCStates = { ' . "\n";
        require_once JPATH_ROOT . DS . 'components' . DS . 'com_onepage' . DS . 'helpers' . DS . 'mini.php';
        $countryModel = OPCmini::getModel('country');
        //new VirtueMartModelCountry();
        $list = $countryModel->getCountries(true, true, false);
        $countries = array();
        $states = array();
        $stateModel = OPCmini::getModel('state');
        //new VirtueMartModelState();
        // if state is set in BT, let's make it default
        if (!empty($ref->cart->BT) && !empty($ref->cart->BT['virtuemart_state_id'])) {
            $cs = $ref->cart->BT['virtuemart_state_id'];
        } else {
            $cs = '';
        }
        //$html = '<div style="display: none;">';
        $counts = count($list);
        $ci = 0;
        foreach ($list as $c) {
            if (empty($c->published)) {
                continue;
            }
            $ci++;
            $states[$c->virtuemart_country_id] = $stateModel->getStates($c->virtuemart_country_id, true, true);
            unset($state);
            //$html .= '<input type="hidden" name="opc_state_list" id="state_for_'.$c->virtuemart_country_id.'" value="" />';
            if (!empty($states[$c->virtuemart_country_id])) {
                $js .= ' state_for_' . $c->virtuemart_country_id . ': { ' . "\n";
                //$html .= '<select id="state_for_'.$c->virtuemart_country_id.'">';
                //$html .= '<option value="">'.OPCLang::_('COM_VIRTUEMART_LIST_EMPTY_OPTION').'</option>';
                $counts2 = count($states[$c->virtuemart_country_id]);
                $ci2 = 0;
                foreach ($states[$c->virtuemart_country_id] as $state) {
                    if (empty($state->published)) {
                        continue;
                    }
                    $ci2++;
                    //$js .= ' state_for_'.$c->virtuemart_country_id.'['.$state->virtuemart_state_id.']: "'.str_replace('"', '\"', $state->state_name).'",'."\n";
                    $js .= $state->virtuemart_state_id . ': "' . str_replace('"', '\\"', $state->state_name) . '"';
                    if ($ci2 != $counts2) {
                        $js .= ', ';
                    }
                    $js .= "\n";
                    //$html .= '<option ';
                    //if ($state->virtuemart_state_id == $cs) $html .= ' selected="selected" ';
                    //$html .= ' value="'.$state->virtuemart_state_id.'">'.$state->state_name.'</option>';
                }
                $js .= ' }';
                if ($ci != $counts) {
                    $js .= ', ';
                }
                $js .= "\n";
                //$html .= '</select>';
            }
            // debug
        }
        $js .= ' }; 
	
	
	';
        $html = '<div style="display: none;">';
        $html .= '<select id="no_states" name="no_states">';
        $html .= '<option value="">' . OPCLang::_('COM_VIRTUEMART_LIST_EMPTY_OPTION') . '</option>';
        $html .= '</select>';
        $html .= '</div>';
        //$html .= '</div>';
        //alert(OPCStates.state_for_10[373]);
        if (!empty($ref->cart->BT) && !empty($ref->cart->BT['virtuemart_state_id'])) {
            $cs = $ref->cart->BT['virtuemart_state_id'];
        } else {
            $cs = '';
        }
        if (!empty($ref->cart->ST) && !empty($ref->cart->ST['virtuemart_state_id'])) {
            $css = $ref->cart->ST['virtuemart_state_id'];
        } else {
            $css = '';
        }
        $html .= '<script type="text/javascript">
	var selected_bt_state = \'' . $cs . '\';
	var selected_st_state = \'' . $css . '\';
	
	</script>';
        //$html = '<script>'.$js.'</script>';
        jimport('joomla.filesystem.folder');
        jimport('joomla.filesystem.file');
        if (JFile::write($js_file, $js) !== false) {
            JHTMLOPC::script($js_filename, $js_path);
        } else {
            $html .= '
<script type="text/javascript">
//<![CDATA[		   
			   ' . $js . '
//]]>		   
</script>
';
        }
        return $html;
        return '';
    }
示例#11
0
/**
 * @version		$Id: default.php 21837 2011-07-12 18:12:35Z dextercowley $
 * @package		Joomla.Administrator
 * @subpackage	com_banners
 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */
// no direct access
defined('_JEXEC') or die;
$type = JRequest::getCmd('tr_type', 'site');
//		echo '<input type="hidden" name="tr_type" value="'.$type.'" id="tr_type" />';
$lang = JRequest::getVar('tr_tolang', '');
$tr_from = JRequest::getVar('tr_fromlang', '');
$ext = JRequest::getVar('tr_ext', '');
$ext = str_replace('.ini', '', $ext);
JHTMLOPC::script('translation_helper.js', 'administrator/components/com_onepage/assets/');
$document = JFactory::getDocument();
$javascript = ' var op_secureurl = "' . JURI::base() . 'index.php?option=com_onepage&view=edit&format=raw&tmpl=component&tlang=' . $lang . '&tcomponent=' . $ext . '&ttype=' . $type . '&tr_from=' . $tr_from . '"; op_css = false; ';
$document->addScriptDeclaration($javascript);
$lango = JFactory::getLanguage();
$lango = JFactory::getLanguage();
$extension = 'com_onepage';
$tag = $lango->getTag();
if (file_exists(JPATH_ADMINISTRATOR . 'language' . DS . $tag . DS . $tag . '.' . $extension . '.ini')) {
    $lang->load($extension, JPATH_ADMINISTRATOR, $tag);
}
$style = '#toolbar-box {
	display: none;
	}';
$document->addStyleDeclaration($style);
?>
示例#12
0
/**
 * @version		$Id: default.php 21837 2011-07-12 18:12:35Z dextercowley $
 * @package		Joomla.Administrator
 * @subpackage	com_banners
 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */
// no direct access
defined('_JEXEC') or die;
$document = JFactory::getDocument();
$document->setTitle(JText::_('COM_ONEPAGE_OPC_THEME_EDITOR'));
JToolBarHelper::Title(JText::_('COM_ONEPAGE_OPC_THEME_EDITOR'), 'generic.png');
JHTMLOPC::script('translation_helper.js', 'administrator/components/com_onepage/assets/');
JHTMLOPC::script('colorPicker.js', 'administrator/components/com_onepage/assets/colorPicker/');
JHTMLOPC::stylesheet('edittheme.css', 'administrator/components/com_onepage/assets/css/');
$javascript = ' var op_secureurl = "' . JURI::base() . 'index.php?option=com_onepage&view=edittheme&format=raw&tmpl=component&task=ajax"; var op_css = true; 
var changedColors = new Array(); 
var origColors = new Array(); 
';
foreach ($this->colors as $idcolor => $color) {
    $javascript .= ' origColors.push(\'' . str_replace('#', '', $idcolor) . '\');';
}
$document->addScriptDeclaration($javascript);
if (!empty($this->msgs)) {
    echo '<div style="color: red; clear: both;">' . $this->msgs . '</div>';
}
?>
<input type="hidden" name="current_template" id="current_template" value="<?php 
if (file_exists(JPATH_SITE . DS . 'components' . DS . 'com_onepage' . DS . 'config' . DS . 'onepage.cfg.php')) {
    include JPATH_SITE . DS . 'components' . DS . 'com_onepage' . DS . 'config' . DS . 'onepage.cfg.php';
示例#13
0
if (!class_exists('VmConfig')) {
    require JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart' . DS . 'helpers' . DS . 'config.php';
}
VmConfig::loadConfig();
if (method_exists('vmJsApi', 'js')) {
    $app = JFactory::getApplication();
    $jq = $app->get('jquery', false);
    $jq_ui = $app->get('jquery-ui', false);
    if (empty($jq) && !OPCJ3) {
        //DEPRECATED IN VM3:
        //vmJsApi::js('jquery','//ajax.googleapis.com/ajax/libs/jquery/1.6.4','',TRUE);
        //vmJsApi::js ('jquery-ui', '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.16', '', TRUE);
        $document->addScript('//code.jquery.com/jquery-latest.min.js');
        if (empty($jq_ui)) {
            JHTMLOPC::script('jquery-ui.min.js', 'components/com_onepage/themes/extra/jquery-ui/', false);
            JHTMLOPC::stylesheet('jquery-ui.min.css', 'components/com_onepage/themes/extra/jquery-ui/', false);
        }
        $document->addScript('//code.jquery.com/jquery-migrate-1.2.1.min.js');
        $app->set('jquery', true);
        $app->set('jquery-migrate', true);
    }
    if (OPCJ3) {
        JHtml::_('jquery.framework');
        JHtml::_('jquery.ui');
        JHtml::_('formbehavior.chosen', 'select');
    } else {
        vmJsApi::js('chosen.jquery.min');
        vmJsApi::css('chosen');
    }
    $document->addScriptDeclaration('
//<![CDATA[
示例#14
0
 public static function loadJquery()
 {
     // stAn - this block will enable including newest jquery library, uncomment if needed
     $document = JFactory::getDocument();
     $app = JFactory::getApplication();
     $jq = $app->get('jquery', false);
     if (empty($jq)) {
         //jquery-1.11.0.min.js
         //$document->addScript('//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js');
         //$document->addScript('//code.jquery.com/jquery-1.11.0.min.js');
         $document->addScript('//code.jquery.com/jquery-latest.min.js');
         JHTMLOPC::script('jquery-ui.min.js', 'components/com_onepage/themes/extra/jquery-ui/', false);
         JHTMLOPC::stylesheet('jquery-ui.min.css', 'components/com_onepage/themes/extra/jquery-ui/', false);
         //$document->addScript('//code.jquery.com/jquery-2.1.0.min.js');
         $document->addScript('//code.jquery.com/jquery-migrate-1.2.1.min.js');
         $app->set('jquery', true);
         $app->set('jquery-migrate', true);
     }
     /*
     $ui = $app->get('jquery-ui', false); 
     if (empty($ui))
     {
     $document->addScript( '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.16');
     $app->set('jquery-ui', true); 
     }
     */
     $document = JFactory::getDocument();
     $base = JURI::base();
     $jbase = str_replace('/administrator', '', $base);
     if (substr($jbase, -1) !== '/') {
         $jbase .= '/';
     }
     if (file_exists(JPATH_SITE . DS . 'components' . DS . 'com_virtuemart' . DS . 'assets' . DS . 'js' . DS . 'jquery.noConflict.js')) {
         $document->addScript($jbase . 'components/com_virtuemart/assets/js/jquery.noConflict.js');
     } else {
         if (file_exists(JPATH_SITE . DS . 'components' . DS . 'com_virtuemart' . DS . 'assets' . DS . 'js' . DS . 'jquery.noconflict.js')) {
             $document->addScript($jbase . 'components/com_virtuemart/assets/js/jquery.noconflict.js');
         }
     }
     if (class_exists('plgSystemOpc')) {
         plgSystemOpc::$opc_jquery_loaded = true;
     }
     // END of the block
 }
示例#15
0
//JHTMLOPC::script('checkbox.js', 'components/com_virtuemart/themes/default/templates/onepage/'.$selected_template, false);
JHTML::_('behavior.tooltip');
$javascript = 'window.addEvent("domready", function(){ 
	 var userN = document.getElementById(\'username_login\'); 
	 if (userN != null && userN.value != \'\')
	  {
	    var labelU = document.getElementById(\'label_username_login\'); 
		if (labelU != null) labelU.innerHTML = \'\'; 
	  }
	 var userP = document.getElementById(\'passwd_login\'); 
	 if (userP != null && userP.value != \'\')
	  {
	    var labelP = document.getElementById(\'label_passwd_login\'); 
		if (labelP != null) labelP.innerHTML = \'\'; 
	  }
	
	});' . "\n\n";
$document = JFactory::getDocument();
$css = '
	<!--[if lte IE 7]>
		<link href="' . JURI::root() . 'components/com_onepage/themes/' . $selected_template . '/ie.css" rel="stylesheet" type="text/css">
	
	<![endif]-->
	';
// $css .= ' @import url("'.JURI::root().'components/com_onepage/themes/'.$selected_template.'/ie.css");
$document->addScriptDeclaration($javascript);
$document->addCustomTag($css);
if (file_exists(JPATH_SITE . DS . 'plugins' . DS . 'content' . DS . 'slimbox' . DS . 'slimbox.js')) {
    JHTMLOPC::script('slimbox.js', 'plugins/content/slimbox/', false);
    JHTMLOPC::stylesheet('slimbox.css', 'plugins/content/slimbox/', array());
}
 function shopper($userFields)
 {
     // Shopper info
     if (!class_exists('VirtueMartModelShopperGroup')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'models' . DS . 'shoppergroup.php';
     }
     $_shoppergroup = VirtueMartModelShopperGroup::getShoppergroupById($this->_model->getId());
     if (!class_exists('Permissions')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'permissions.php';
     }
     if (Permissions::getInstance()->check('admin,storeadmin')) {
         $shoppergrps = array();
         foreach ($_shoppergroup as $group) {
             $shoppergrps[] = $group['virtuemart_shoppergroup_id'];
         }
         $this->_lists['shoppergroups'] = ShopFunctions::renderShopperGroupList($shoppergrps);
         $this->_lists['vendors'] = ShopFunctions::renderVendorList($this->_userDetails->virtuemart_vendor_id);
     } else {
         $this->_lists['shoppergroups'] = '';
         foreach ($_shoppergroup as $group) {
             $this->_lists['shoppergroups'] .= $group['shopper_group_name'] . ', ';
         }
         $this->_lists['shoppergroups'] = substr($this->_lists['shoppergroups'], 0, -2);
         if (!empty($this->_userDetails->virtuemart_vendor_id)) {
             $this->_lists['vendors'] = $this->_userDetails->virtuemart_vendor_id;
         }
         if (empty($this->_lists['vendors'])) {
             $this->_lists['vendors'] = JText::_('COM_VIRTUEMART_USER_NOT_A_VENDOR');
             // . $_setVendor;
         }
     }
     //todo here is something broken we use $_userDetailsList->perms and $this->_userDetailsList->perms and perms seems not longer to exist
     if (Permissions::getInstance()->check("admin,storeadmin")) {
         $this->_lists['perms'] = JHTML::_('select.genericlist', Permissions::getUserGroups(), 'perms', '', 'group_name', 'group_name', $this->_userDetails->perms);
     } else {
         if (!empty($this->_userDetails->perms)) {
             $this->_lists['perms'] = $this->_userDetails->perms;
             $_hiddenInfo = '<input type="hidden" name="perms" value = "' . $this->_lists['perms'] . '" />';
             $this->_lists['perms'] .= $_hiddenInfo;
         }
     }
     // Load the required scripts
     if (count($userFields['scripts']) > 0) {
         foreach ($userFields['scripts'] as $_script => $_path) {
             JHTMLOPC::script($_script, $_path);
         }
     }
     // Load the required styresheets
     if (count($userFields['links']) > 0) {
         foreach ($userFields['links'] as $_link => $_path) {
             JHTMLOPC::stylesheet($_link, $_path);
         }
     }
 }