• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP vmJsApi类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中vmJsApi的典型用法代码示例。如果您正苦于以下问题:PHP vmJsApi类的具体用法?PHP vmJsApi怎么用?PHP vmJsApi使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了vmJsApi类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: onBeforeRender

 function onBeforeRender()
 {
     if ($this->app->isAdmin()) {
         return;
     }
     $app = JFactory::getApplication();
     $option = $app->input->get('option');
     $view = $app->input->get('view');
     $tmpl = $app->input->get('tmpl');
     $document = JFactory::getDocument();
     if ($app->isSite() && $tmpl != 'component') {
         if (!defined('SMART_JQUERY') && (int) $this->params->get('include_jquery', '1')) {
             $document->addScript(JURI::root(true) . '/plugins/system/plg_sj_vm_quickview/assets/js/jquery-1.8.2.min.js');
             $document->addScript(JURI::root(true) . '/plugins/system/plg_sj_vm_quickview/assets/js/jquery-noconflict.js');
             define('SMART_JQUERY', 1);
         }
         if (!class_exists('VmConfig')) {
             require JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart' . DS . 'helpers' . DS . 'config.php';
         }
         VmConfig::loadConfig();
         if (class_exists('vmJsApi')) {
             vmJsApi::jPrice();
         }
         $document->addScript(JURI::root(true) . '/plugins/system/plg_sj_vm_quickview/assets/js/jquery.fancybox.js');
         $document->addStyleSheet(JURI::root(true) . '/plugins/system/plg_sj_vm_quickview/assets/css/jquery.fancybox.css');
         $document->addStyleSheet(JURI::root(true) . '/plugins/system/plg_sj_vm_quickview/assets/css/quickview.css');
     }
     return true;
 }
开发者ID:proyectoseb,项目名称:ShoppyStore,代码行数:29,代码来源:plg_sj_vm_quickview.php


示例2: plgVmDisplayListFEPayment

 /**
  * This shows the plugin for choosing in the payment list of the checkout process.
  *
  * @author Valerie Cartan Isaksen
  */
 public function plgVmDisplayListFEPayment(VirtueMartCart $cart, $selected = 0, &$htmlIn)
 {
     if ($this->getPluginMethods($cart->vendorId) === 0) {
         if (empty($this->_name)) {
             $app = JFactory::getApplication();
             $app->enqueueMessage(vmText::_('COM_VIRTUEMART_CART_NO_' . strtoupper($this->_psType)));
             return false;
         } else {
             return false;
         }
     }
     $html = array();
     $method_name = $this->_psType . '_name';
     VmConfig::loadJLang('com_virtuemart', true);
     vmJsApi::jCreditCard();
     $htmla = '';
     $html = array();
     foreach ($this->methods as $_currentMethod) {
         $this->_currentMethod = $_currentMethod;
         if ($this->checkConditions($cart, $this->_currentMethod, $cart->cartPrices)) {
             $cartPrices = $cart->cartPrices;
             $methodSalesPrice = $this->setCartPrices($cart, $cartPrices, $this->_currentMethod);
             $this->_currentMethod->{$method_name} = $this->renderPluginName($this->_currentMethod);
             $sandbox = $this->_currentMethod->sandbox;
             $html = $this->getPluginHtml($this->_currentMethod, $selected, $methodSalesPrice);
             if ($selected == $this->_currentMethod->virtuemart_paymentmethod_id && $this->hasBillingAddress($cart)) {
                 $html .= $this->displayForm($cart, $sandbox);
             }
             $htmla[] = $html;
         }
     }
     $htmlIn[] = $htmla;
     return true;
 }
开发者ID:everypay,项目名称:everypay-virtuemart,代码行数:39,代码来源:everypay.php


示例3: display

 function display($tpl = null)
 {
     $document = JFactory::getDocument();
     $document->setMimeEncoding('application/json');
     if ($virtuemart_media_id = vRequest::getInt('virtuemart_media_id')) {
         //JResponse::setHeader( 'Content-Disposition', 'attachment; filename="media'.$virtuemart_media_id.'.json"' );
         $model = VmModel::getModel('Media');
         $image = $model->createMediaByIds($virtuemart_media_id);
         if (isset($image[0]) and is_object($image[0])) {
             $image[0]->file_url_thumb_dyn = $image[0]->getFileUrlThumb();
             // 			echo '<pre>'.print_r($image,1).'</pre>';
             $this->json = $image[0];
             //echo json_encode($this->json);
             if (isset($this->json->file_url)) {
                 $this->json->file_root = JURI::root(true) . '/';
                 $this->json->msg = 'OK';
                 echo vmJsApi::safe_json_encode($this->json);
             } else {
                 $this->json->msg = '<b>' . vmText::_('COM_VIRTUEMART_NO_IMAGE_SET') . '</b>';
                 echo @json_encode($this->json);
             }
         }
     } else {
         if (!class_exists('VmMediaHandler')) {
             require VMPATH_ADMIN . DS . 'helpers' . DS . 'mediahandler.php';
         }
         $start = vRequest::getInt('start', 0);
         $type = vRequest::getCmd('mediatype', 0);
         $list = VmMediaHandler::displayImages($type, $start);
         echo vmJsApi::safe_json_encode($list);
     }
     jExit();
 }
开发者ID:virtuemart-fr,项目名称:virtuemart-fr,代码行数:33,代码来源:view.json.php


示例4: withKeepAlive

 public function withKeepAlive()
 {
     if (!class_exists('VirtueMartCart')) {
         require VMPATH_SITE . DS . 'helpers' . DS . 'cart.php';
     }
     $cart = VirtueMartCart::getCart();
     if (!empty($cart->cartProductsData)) {
         vmJsApi::keepAlive(1, 4);
     }
 }
开发者ID:cybershocik,项目名称:Darek,代码行数:10,代码来源:vmview.php


示例5: display

 function display($tpl = null)
 {
     $db = JFactory::getDBO();
     if ($virtuemart_media_id = vRequest::getInt('virtuemart_media_id')) {
         //$db = JFactory::getDBO();
         $query = 'SELECT `file_url`,`file_title` FROM `#__virtuemart_medias` where `virtuemart_media_id`=' . $virtuemart_media_id;
         $db->setQuery($query);
         $json = $db->loadObject();
         if (isset($json->file_url)) {
             $json->file_url = JURI::root() . $json->file_url;
             $json->msg = 'OK';
             echo vmJsApi::safe_json_encode($json);
         } else {
             $json->msg = '<b>' . vmText::_('COM_VIRTUEMART_NO_IMAGE_SET') . '</b>';
             echo json_encode($json);
         }
     } elseif ($custom_jplugin_id = vRequest::getInt('custom_jplugin_id')) {
         $table = '#__extensions';
         $ext_id = 'extension_id';
         $q = 'SELECT `params`,`element` FROM `' . $table . '` WHERE `' . $ext_id . '` = "' . $custom_jplugin_id . '"';
         $db->setQuery($q);
         $this->jCustom = $db->loadObject();
         $customModel = VmModel::getModel('custom');
         $this->custom = $customModel->getCustom();
         // Get the payment XML.
         $formFile = vRequest::filterPath(VMPATH_ROOT . DS . 'plugins' . DS . 'vmcustom' . DS . $this->jCustom->element . DS . $this->jCustom->element . '.xml');
         if (file_exists($formFile)) {
             VmConfig::loadJLang('plg_vmpsplugin', false);
             if (!class_exists('vmPlugin')) {
                 require VMPATH_PLUGINLIBS . DS . 'vmplugin.php';
             }
             $filename = 'plg_vmcustom_' . $this->jCustom->element;
             vmPlugin::loadJLang($filename, 'vmcustom', $this->jCustom->element);
             $this->custom = VmModel::getModel('custom')->getCustom();
             $varsToPush = vmPlugin::getVarsToPushByXML($formFile, 'customForm');
             $this->custom->form = JForm::getInstance($this->jCustom->element, $formFile, array(), false, '//vmconfig | //config[not(//vmconfig)]');
             $this->custom->params = new stdClass();
             foreach ($varsToPush as $k => $field) {
                 if (strpos($k, '_') != 0) {
                     $this->custom->params->{$k} = $field[0];
                 }
             }
             $this->custom->form->bind($this->custom->getProperties());
             $form = $this->custom->form;
             include VMPATH_ADMIN . DS . 'fields' . DS . 'formrenderer.php';
             echo '<input type="hidden" value="' . $this->jCustom->element . '" name="custom_value">';
         } else {
             $this->custom->form = null;
             //VmConfig::$echoDebug = 1;
             vmdebug('File does not exist ' . $formFile);
         }
     }
     jExit();
 }
开发者ID:cybershocik,项目名称:Darek,代码行数:54,代码来源:view.json.php


示例6: getInput

 protected function getInput()
 {
     vmJsApi::addJScript('/plugins/vmpayment/realex_hpp_api/realex_hpp_api/assets/js/admin.js');
     vmJsApi::css('admin', 'plugins/vmpayment/realex_hpp_api/realex_hpp_api/assets/css/');
     $url = "http://www.realexpayments.com/partner-referral?id=tsmart";
     $logo = '<img src="http://www.realexpayments.com/images/logo_realex_large.png" width="150"/>';
     $html = '<p><a target="_blank" href="' . $url . '"  >' . $logo . '</a></p>';
     $html .= '<p><a target="_blank" href="' . $url . '" class="signin-button-link">' . tsmText::_('VMPAYMENT_REALEX_HPP_API_REGISTER') . '</a>';
     $html .= ' <a target="_blank" href="http://docs.tsmart.net/manual/shop-menu/payment-methods/realex-hpp-and-api.html" class="signin-button-link">' . tsmText::_('VMPAYMENT_REALEX_HPP_API_DOCUMENTATION') . '</a></p>';
     return $html;
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:11,代码来源:getrealex.php


示例7: display

 public function display($tpl = null)
 {
     $result = $this->loadTemplate($tpl);
     if ($result instanceof Exception) {
         return $result;
     }
     echo $result;
     if ($this->writeJs and get_class($this) != 'VirtueMartViewProductdetails') {
         echo vmJsApi::writeJS();
     }
 }
开发者ID:spiridonov-oa,项目名称:SheinCandles,代码行数:11,代码来源:vmview.php


示例8: getInput

    function getInput()
    {
        $js = '
//<![CDATA[
		jQuery(document).ready(function( $ ) {

		    jQuery("#paybox_getpaybox_link").click( function() {
				 if ( $("#paybox_getpaybox_show_hide").is(":visible") ) {
				  $("#paybox_getpaybox_show_hide").hide("slow");
			        $("#paybox_getpaybox_link").html("' . addslashes(vmText::_('VMPAYMENT_PAYBOX_ALREADY_ACCOUNT')) . '");
				} else {
				 $("#paybox_getpaybox_show_hide").show("slow");
			       $("#paybox_getpaybox_link").html("' . addslashes(vmText::_('VMPAYMENT_PAYBOX_GET_PAYBOX_HIDE')) . '");
			    }
		    });
		});
//]]>
';
        vmJsApi::addJScript("vm.getPaybox", $js);
        vmJsApi::addJScript('/plugins/vmpayment/paybox/paybox/assets/js/admin.js');
        vmJsApi::css('admin', 'plugins/vmpayment/paybox/paybox/assets/css/');
        $cid = vRequest::getvar('cid', NULL, 'array');
        if (is_Array($cid)) {
            $virtuemart_paymentmethod_id = $cid[0];
        } else {
            $virtuemart_paymentmethod_id = $cid;
        }
        $query = "SELECT * FROM `#__virtuemart_paymentmethods` WHERE  virtuemart_paymentmethod_id = '" . $virtuemart_paymentmethod_id . "'";
        $db = JFactory::getDBO();
        $db->setQuery($query);
        $params = $db->loadObject();
        $html = '<img src="http://virtuemart.boutique-paybox.com/PayboxLogo.jpg" width="200px"/><br />';
        if ($params->created_on == $params->modified_on) {
            $id = "paybox_getpaybox_link";
            $html .= '<a href="#" id="' . $id . '">' . vmText::_('VMPAYMENT_PAYBOX_GET_PAYBOX_HIDE') . '</a>';
            $display = '';
            $html .= '<div id="paybox_getpaybox_show_hide" align=""' . $display . ' >';
        } else {
            $id = "paybox_getpaybox_link";
            $html .= '<a href="#" id="' . $id . '">' . vmText::_('VMPAYMENT_PAYBOX_ALREADY_ACCOUNT') . '</a>';
            $display = ' style="display: none;"';
            $html .= '<div id="paybox_getpaybox_show_hide" align=""' . $display . ' >';
        }
        $id = "";
        $lang = $this->getLang();
        if ($lang == 'fr') {
            $url = "http://virtuemart.boutique-paybox.com/PayboxPres.html";
        } else {
            $url = "http://virtuemart.boutique-paybox.com/PayboxPres.html";
        }
        $html .= '<iframe src="' . $url . '" scrolling="yes" style="x-overflow: none;" frameborder="0" height="1400px" width="800px"></iframe>';
        $html .= "</div>";
        return $html;
    }
开发者ID:brenot,项目名称:forumdesenvolvimento,代码行数:54,代码来源:getpaybox.php


示例9: getInput

 protected function getInput()
 {
     JHtml::_('behavior.colorpicker');
     vmJsApi::addJScript('/plugins/vmpayment/paypal/paypal/assets/js/admin.js');
     vmJsApi::css('paypal', 'plugins/vmpayment/paypal/paypal/assets/css/');
     $url = "https://www.paypal.com/us/webapps/mpp/referral/paypal-payments-standard?partner_id=83EP5DJG9FU6L";
     $logo = '<img src="https://www.paypalobjects.com/en_US/i/logo/PayPal_mark_60x38.gif" />';
     $html = '<p><a target="_blank" href="' . $url . '"  >' . $logo . '</a></p>';
     $html .= '<p><a target="_blank" href="' . $url . '" class="signin-button-link">' . vmText::_('VMPAYMENT_PAYPAL_REGISTER') . '</a>';
     $html .= ' <a target="_blank" href="http://docs.virtuemart.net/manual/shop-menu/payment-methods/paypal.html" class="signin-button-link">' . vmText::_('VMPAYMENT_PAYPAL_DOCUMENTATION') . '</a></p>';
     return $html;
 }
开发者ID:cybershocik,项目名称:Darek,代码行数:12,代码来源:getpaypal.php


示例10: getInput

 function getInput()
 {
     vmJsApi::addJScript('/plugins/vmpayment/klikandpay/klikandpay/assets/js/admin.js');
     $lang = $this->getLang();
     if ($lang == 'fr') {
         $url = "https://www.klikandpay.com/cgi-bin/connexion.pl?FROM=869B834067";
     } else {
         $url = "https://www.klikandpay.com/cgi-bin/connexion.pl?FROM=869B834067&L=en";
     }
     $logo = '<img src="https://www.klikandpay.com/images/logo_en.png" style="width: 150px;">';
     $html = '<p><a target="_blank" href="' . $url . '"  >' . $logo . '</a></p>';
     $html .= '<p><a class="signin-button-link" href="' . $url . '" target="_blank">' . vmText::_('VMPAYMENT_KLIKANDPAY_GET') . '</a>';
     $html .= ' <a target="_blank" href="https://www.youtube.com/watch?v=DVcUU3FiuMM" class="signin-button-link">' . vmText::_('VMPAYMENT_KLIKANDPAY_DOCUMENTATION') . '</a></p>';
     return $html;
 }
开发者ID:cybershocik,项目名称:Darek,代码行数:15,代码来源:getklikandpay.php


示例11: display

    function display($tpl = null)
    {
        $states = array();
        $db = JFactory::getDBO();
        //retrieving countries id
        $country_ids = vRequest::getString('tsmart_country_id');
        $country_ids = explode(',', $country_ids);
        foreach ($country_ids as $country_id) {
            $q = 'SELECT `tsmart_state_id`, `state_name` FROM `#__tsmart_states`  WHERE `tsmart_country_id`= "' . (int) $country_id . '"
				ORDER BY `#__tsmart_states`.`state_name`';
            $db->setQuery($q);
            $states[$country_id] = $db->loadAssocList();
        }
        echo vmJsApi::safe_json_encode($states);
    }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:15,代码来源:view.json.php


示例12: getInput

    function getInput()
    {
        vmJsApi::addJScript('/plugins/vmpayment/klarnacheckout/klarnacheckout/assets/js/admin.js');
        vmJsApi::css('klarnacheckout', 'plugins/vmpayment/klarnacheckout/klarnacheckout/assets/css/');
        $jlang = JFactory::getLanguage();
        $lang = $jlang->getTag();
        $langArray = explode("-", $lang);
        $lang = strtolower($langArray[1]);
        $countriesData = KlarnaHandler::countriesData();
        $signLang = "en";
        foreach ($countriesData as $countryData) {
            if ($countryData['country_code'] == $lang) {
                $signLang = $lang;
                break;
            }
        }
        /*
        		$logo = '<a href="https://merchants.klarna.com/signup?locale=' . $signLang . '&partner_id=7829355537eae268a17667c199e7c7662d3391f7" target="_blank">
        	             <img src="' . JURI::root () . VMKLARNAPLUGINWEBROOT . '/klarna/assets/images/logo/get_klarna_now.png" /></a> ';
        */
        $logo = '<img src="' . JURI::root() . VMKLARNAPLUGINWEBROOT . '/klarna/assets/images/logo/get_klarna_now.jpg" style="margin-bottom: 10px"/>';
        $html = '<p><a href="#" id="klarna_getklarna_link" ">' . $logo . '</a></p>';
        // https://merchants.klarna.com/signup?locale=en&partner_id=7829355537eae268a17667c199e7c7662d3391f7&utm_campaign=Platform&utm_medium=Partners&utm_source=Virtuemart
        $html .= '<div id="klarna_getklarna_show_hide" >';
        $url = "https://merchants.klarna.com/signup/?locale=" . $signLang . "&partner_id=7829355537eae268a17667c199e7c7662d3391f7&utm_campaign=Platform&utm_medium=Partners&utm_source=Virtuemart";
        $js = '
		jQuery(document).ready(function( $ ) {
			$("#klarna_getklarna_show_hide").hide();
			jQuery("#klarna_getklarna_link").click( function() {
				 if ( $("#klarna_getklarna_show_hide").is(":visible") ) {
				  $("#klarna_getklarna_show_hide").hide("slow");
			        $("#klarna_getklarna_link").html("' . addslashes($logo) . '");
				} else {
				 $("#klarna_getklarna_show_hide").show("slow");
			       $("#klarna_getklarna_link").html("' . addslashes(vmText::_('VMPAYMENT_KLARNA_GET_KLARNA_HIDE')) . '");
			    }
		    });
		});
';
        vmJsApi::addJScript('vm.getKlarna', $js);
        $html .= '<iframe src="' . $url . '" scrolling="yes" style="x-overflow: none;" frameborder="0" height="600px" width="850px"></iframe>';
        $html .= '</div>';
        $html .= '<p><a target="_blank" href="http://cdn.klarna.com/1.0/shared/content/integration/guide/virtuemart.pdf" class="signin-button-link">' . vmText::_('VMPAYMENT_KLARNA_DOCUMENTATION') . '</a></p>';
        return $html;
    }
开发者ID:cybershocik,项目名称:Darek,代码行数:45,代码来源:getklarnacheckout.php


示例13: sendPostRequest

	function sendPostRequest () {
		$post_variables = $this->getPostVariables();

		$jump_url = $this->getJumpUrl();

		$html = '';
		if ($this->_method->debug) {
			$html .= '<form action="' . $jump_url . '" method="post" name="vm_realex_form" target="realex">';
		} else {
			if (vmconfig::get('css')) {
				$msg = vmText::_('VMPAYMENT_REALEX_HPP_API_REDIRECT_MESSAGE', true);
			} else {
				$msg='';
			}

			vmJsApi::addJScript('vm.paymentFormAutoSubmit', '
  			jQuery(document).ready(function($){
   				jQuery("body").addClass("vmLoading");
  				var msg="'.$msg.'";
   				jQuery("body").append("<div class=\"vmLoadingDiv\"><div class=\"vmLoadingDivMsg\">"+msg+"</div></div>");
    			jQuery("#vmPaymentForm").submit();
			})
		');
			$html .= '<form action="' . $jump_url . '" method="post" name="vm_realex_form" id="vmPaymentForm" accept-charset="UTF-8">';
		}
		$html .= '<input type="hidden" name="charset" value="utf-8">';

		foreach ($post_variables as $name => $value) {
			$html .= '<input type="hidden" name="' . $name . '" value="' . $value . '" />';
		}

		if ($this->_method->debug) {

			$html .= '<div style="background-color:red;color:white;padding:10px;">
						<input type="submit"  value="The method is in debug mode. Click here to be redirected to Realex" />
						</div>';
			$this->debugLog($post_variables, 'sendPostRequest:', 'debug');

		}
		$html .= '</form>';

		return $html;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:43,代码来源:redirect.php


示例14: getInput

 protected function getInput()
 {
     $pluginpath = '/plugins/vmshopper/ordernumber/ordernumber/';
     $doc = JFactory::getDocument()->addStyleSheet(JURI::root(true) . $pluginpath . 'assets/css/ordernumber.css');
     $doc->addScript(JURI::root(true) . $pluginpath . 'assets/js/ordernumber.js');
     vmJsApi::jQuery();
     $this->makeJSTranslationsAvailable();
     // Look up the current counters
     $db = JFactory::getDBO();
     $db->setQuery('SELECT `number_format`, `count` FROM `#__virtuemart_shopper_plg_ordernumber` WHERE `number_type`=' . $db->quote($this->countertype) . ' ORDER BY `number_format`;');
     $counters = $db->loadObjectList();
     // Joomla 2.x uses <li> for the params and float:left on the controls, so we need to add that too
     $float = "";
     if (version_compare(JVERSION, '3.0', 'lt')) {
         $float = "float: left; ";
     }
     $html = array();
     $html[] = "<img src='" . JURI::root(true) . $pluginpath . "assets/images/loading.gif' class='vm-ordernumber-loading' style=\"display: none; position: absolute; top: 2px; left: 0px; z-index: 9999;\"/><table class=\"vmordernumber-countertable table-striped \" style=\"display: inline-table; {$float}\">";
     $html[] = "  <tr>";
     $html[] = "    <th class='counter_format'>" . JText::_('PLG_ORDERNUMBER_COUNTERLIST_HEADER_COUNTER') . "</th>";
     $html[] = "    <th class='counter_value'>" . JText::_('PLG_ORDERNUMBER_COUNTERLIST_HEADER_VALUE') . "</th>";
     $html[] = "    <th class='counter_buttons'></th>";
     $html[] = "  </tr>";
     $html[] = "  <colgroup><col class='counter_type'><col style=\"text-align: center\" ><col ></colgroup>";
     foreach ($counters as $c) {
         $displayfmt = $c->number_format;
         if ($displayfmt == "") {
             $displayfmt = JText::_('PLG_ORDERNUMBER_COUNTERLIST_GLOBAL');
         }
         $html[] = "  <tr class='counter_row counter_type_{$this->countertype}'>";
         $html[] = "    <td class='counter_format'>" . (string) $displayfmt . "</td>";
         $html[] = "    <td class='counter_value'>" . (string) $c->count . "</td>";
         $html[] = "    <td class='counter_buttons'><div class='ordernumber-ajax-loading'><img src='" . JURI::root(true) . $pluginpath . "assets/images/icon-16-edit.png' class='vmordernumber-counter-editbtn vmordernumber-btn' onClick='ajaxEditCounter(this, {$this->countertype}, " . json_encode($c->number_format) . ", {$c->count})' /></div><div class='ordernumber-ajax-loading'><img src='" . JURI::root(true) . $pluginpath . "assets/images/icon-16-delete.png' class='vmordernumber-counter-deletebtn vmordernumber-btn' onClick='ajaxDeleteCounter(this, {$this->countertype}, " . json_encode($c->number_format) . ", {$c->count})' /></div></td>";
         $html[] = "  </tr>";
     }
     $html[] = "  <tr class='addcounter_row'>";
     $html[] = "    <td colspan=3 class='counter_add'><div class='vmordernumber-counter-addbtn vmordernumber-btn' onClick='ajaxAddCounter(this, {$this->countertype})'><div class='ordernumber-ajax-loading'><img src='" . JURI::root(true) . $pluginpath . "assets/images/icon-16-new.png' class='vmordernumber-counter-addbtn' /></div>" . JText::_('PLG_ORDERNUMBER_COUNTERLIST_ADD') . "</div></td>";
     $html[] = "  </tr>";
     $html[] = "</table>";
     return implode("\n", $html);
 }
开发者ID:naka211,项目名称:studiekorrektur,代码行数:41,代码来源:vmordernumbercounters.php


示例15: __construct

 function __construct(&$subject, $config)
 {
     //if (self::$_this)
     //   return self::$_this;
     parent::__construct($subject, $config);
     $this->_loggable = TRUE;
     $this->tableFields = array_keys($this->getTableSQLFields());
     $this->_tablepkey = 'id';
     $this->_tableId = 'id';
     $varsToPush = $this->getVarsToPush();
     $this->setConfigParameterable($this->_configTableFieldName, $varsToPush);
     $this->setCryptedFields(array('accessKey', 'secretKey'));
     $amazon_library = JPATH_SITE . DS . 'plugins' . DS . 'vmpayment' . DS . 'amazon' . DS . 'library';
     //set_include_path(get_include_path() . PATH_SEPARATOR . realpath(dirname(__FILE__) . "/../../."));
     set_include_path($amazon_library);
     $this->loadAmazonClass('OffAmazonPaymentsService_Client');
     if (!JFactory::getApplication()->isSite()) {
         vmJsApi::jQuery();
         JFactory::getDocument()->addScript(JURI::root(true) . '/plugins/vmpayment/amazon/assets/js/admin.js');
         JFactory::getDocument()->addStyleSheet(JURI::root(true) . '/plugins/vmpayment/amazon/assets/css/amazon-admin.css');
     }
 }
开发者ID:thumbs-up-sign,项目名称:TuVanDuAn,代码行数:22,代码来源:amazon.php


示例16: Plugin

 /**
  * Method to render the plugin datas
  * this is an entry point to plugin to easy renders json or html
  *
  *
  * @access	public
  */
 function Plugin()
 {
     $user = JFactory::getUser();
     if (!($user->authorise('core.admin', 'com_virtuemart') or $user->authorise('core.manage', 'com_virtuemart'))) {
         return false;
     }
     $type = vRequest::getCmd('type', 'vmcustom');
     $typeWhiteList = array('vmshopper', 'vmcustom', 'vmcalculation', 'vmpayment', 'vmshipment', 'vmuserfield');
     if (!in_array($type, $typeWhiteList)) {
         return false;
     }
     $name = vRequest::getString('name', '');
     JPluginHelper::importPlugin($type, $name);
     $dispatcher = JDispatcher::getInstance();
     // if you want only one render simple in the plugin use jExit();
     // or $render is an array of code to echo as html or json Object!
     $render = null;
     $dispatcher->trigger('plgVmOnSelfCallBE', array($type, $name, &$render));
     if ($render) {
         // Get the document object.
         $document = JFactory::getDocument();
         if (vRequest::getCmd('cache', 'no')) {
             JResponse::setHeader('Cache-Control', 'no-cache, must-revalidate');
             JResponse::setHeader('Expires', 'Mon, 6 Jul 2000 10:00:00 GMT');
         }
         $format = vRequest::getCmd('format', 'json');
         if ($format == 'json') {
             $document->setMimeEncoding('application/json');
             // Change the suggested filename.
             JResponse::setHeader('Content-Disposition', 'attachment;filename="' . $type . '".json"');
             echo vmJsApi::safe_json_encode($render);
         } else {
             echo $render;
         }
     }
     return true;
 }
开发者ID:cybershocik,项目名称:Darek,代码行数:44,代码来源:plugin.php


示例17: display

 public function display($tpl = null)
 {
     $view = vRequest::getCmd('view', vRequest::getCmd('controller', 'virtuemart'));
     if ($view == 'virtuemart' || $view == 'about' || $this->canDo->get('core.admin')) {
         //Super administrators always have access
         parent::display($tpl);
         if ($this->writeJs) {
             echo vmJsApi::writeJS();
         }
         return;
     }
     //Super administrator always has access
     if ($this->canDo->get('core.admin')) {
         parent::display($tpl);
         if ($this->writeJs) {
             echo vmJsApi::writeJS();
         }
         return;
     }
     if (!$this->canDo->get('vm.' . $view)) {
         JFactory::getApplication()->redirect('index.php?option=com_virtuemart', JText::_('JERROR_ALERTNOAUTHOR'), 'error');
     }
     parent::display($tpl);
 }
开发者ID:spiridonov-oa,项目名称:SheinCandles,代码行数:24,代码来源:vmview.php


示例18: showActionOrderBEPayment

 private function showActionOrderBEPayment($virtuemart_order_id, $virtuemart_paymentmethod_id, $payments)
 {
     $orderModel = VmModel::getModel('orders');
     $order = $orderModel->getOrder($virtuemart_order_id);
     $options = array();
     if ($this->isDelayedSettlement()) {
         $options[] = JHTML::_('select.option', 'settlePayment', vmText::_('VMPAYMENT_REALEX_HPP_API_ORDER_BE_CAPTURE'), 'value', 'text');
     }
     $options[] = JHTML::_('select.option', 'rebatePayment', vmText::_('VMPAYMENT_REALEX_HPP_API_ORDER_BE_REBATE'), 'value', 'text');
     $actionList = JHTML::_('select.genericlist', $options, 'action', '', 'value', 'text', 'capturePayment', 'action', true);
     $html = '<table class="adminlist table"  >' . "\n";
     $html .= $this->getHtmlHeaderBE();
     $html .= '<form action="index.php" method="post" name="updateOrderBEPayment" id="updateOrderBEPayment">';
     $html .= '<tr ><td >';
     $html .= $actionList;
     $html .= ' </td><td>';
     $html .= '<input type="text" id="amount" name="amount" size="20" value="" class="required" maxlength="25"  placeholder="' . vmText::sprintf('VMPAYMENT_REALEX_HPP_API_ORDER_BE_AMOUNT', shopFunctions::getCurrencyByID($payments[0]->payment_currency, 'currency_code_3')) . '"/>';
     $html .= '<input type="hidden" name="type" value="vmpayment"/>';
     $html .= '<input type="hidden" name="name" value="realex_hpp_api"/>';
     $html .= '<input type="hidden" name="view" value="plugin"/>';
     $html .= '<input type="hidden" name="option" value="com_virtuemart"/>';
     $html .= '<input type="hidden" name="virtuemart_order_id" value="' . $virtuemart_order_id . '"/>';
     $html .= '<input type="hidden" name="virtuemart_paymentmethod_id" value="' . $virtuemart_paymentmethod_id . '"/>';
     $html .= '<a class="updateOrderBEPayment btn btn-small" href="#"   >' . vmText::_('COM_VIRTUEMART_SAVE') . '</a>';
     $html .= '</form>';
     $html .= ' </td></tr>';
     vmJsApi::addJScript('vmRealex.updateOrderBEPayment', "\n\t\tjQuery(document).ready( function(\$) {\n\t\t\tjQuery('.updateOrderBEPayment').click(function() {\n\t\t\t\tdocument.updateOrderBEPayment.submit();\n\t\t\t\treturn false;\n\n\t});\n});\n");
     //$html .= '</table>'  ;
     return $html;
 }
开发者ID:virtuemart-fr,项目名称:virtuemart-fr,代码行数:30,代码来源:realex_hpp_api.php


示例19: addStandardEditViewCommandsNoValidate


//.........这里部分代码省略.........
            }
            JFactory::getDocument()->addStyleDeclaration($flagCss);
            $this->langList = JHtml::_('select.genericlist', $languages, 'vmlang', 'class="inputbox" style="width:176px;"', 'value', 'text', $selectedLangue, 'vmlang');
            if ($editView == 'product') {
                $productModel = tmsModel::getModel('product');
                $childproducts = $productModel->getProductChilds($id) ? $productModel->getProductChilds($id) : '';
            }
            $token = vRequest::getFormToken();
            $j = '
			jQuery(function($) {
				var oldflag = "";
				$("select#vmlang").chosen().change(function() {
					langCode = $(this).find("option:selected").val();
					flagClass = "flag-"+langCode;
					jQuery.ajax({
						type: "GET",
						cache: false,
        				dataType: "json",
        				url: "index.php?option=com_tsmart&view=translate&task=paste&format=json&lg="+langCode+"&id=' . $id . '&editView=' . $editView . '&' . $token . '=1",
    				}).done(
						function(data) {
							var items = [];

							var theForm = document.forms["adminForm"];
							if(typeof theForm.vmlang==="undefined"){
							 	var input = document.createElement("input");
								input.type = "hidden";
								input.name = "vmlang";
								input.value = langCode;
								theForm.appendChild(input);
							} else {
								theForm.vmlang.value = langCode;
							}
							if (data.fields !== "error" ) {
								if (data.structure == "empty") alert(data.msg);
								$.each(data.fields , function(key, val) {
									cible = jQuery("#"+key);
									if (oldflag !== "") cible.parent().removeClass(oldflag)
									var tmce_ver = 0;
									if(typeof window.tinyMCE!=="undefined"){
										var tmce_ver=window.tinyMCE.majorVersion;
									}
									if (tmce_ver>="4") {
										if (cible.parent().addClass(flagClass).children().hasClass("mce_editable") && data.structure !== "empty" ) {
											tinyMCE.get(key).execCommand("mceSetContent", false,val);
											cible.val(val);
										} else if (data.structure !== "empty") cible.val(val);
									} else {
										if (cible.parent().addClass(flagClass).children().hasClass("mce_editable") && data.structure !== "empty" ) {
											tinyMCE.execInstanceCommand(key,"mceSetContent",false,val);
											cible.val(val);
										} else if (data.structure !== "empty") cible.val(val);
									}
									});

							} else alert(data.msg);';
            if ($editView == 'product' && !empty($childproducts)) {
                foreach ($childproducts as $child) {
                    $j .= 'jQuery.ajax({
        						type: "GET",
								cache: false,
        						dataType: "json",
        						url: "index.php?option=com_tsmart&view=translate&task=paste&format=json&lg="+langCode+"&id=' . $child->tsmart_product_id . '&editView=' . $editView . '&' . $token . '=1",
    					}).done(
								//	$.getJSON( "index.php?option=com_tsmart&view=translate&task=paste&format=json&lg="+langCode+"&id=' . $child->tsmart_product_id . '&editView=' . $editView . '&' . $token . '=1" ,
										function(data) {
											cible = jQuery("#child' . $child->tsmart_product_id . 'product_name");
											if (oldflag !== "") cible.parent().removeClass(oldflag)
											cible.parent().addClass(flagClass);
											cible.val(data.fields.product_name);
											jQuery("#child' . $child->tsmart_product_id . 'slug").val(data.fields["slug"]);
										}
									)
								';
                }
            }
            $j .= 'oldflag = flagClass ;
						}
					)
				});
			})';
            vmJsApi::addJScript('vmlang', $j);
        } else {
            $jlang = JFactory::getLanguage();
            $langs = $jlang->getKnownLanguages();
            $defautName = $selectedLangue;
            $flagImg = $selectedLangue;
            if (isset($languagesByCode[$selectedLangue])) {
                $defautName = $langs[$selectedLangue]['name'];
                $flagImg = JHtml::_('image', 'mod_languages/' . $languagesByCode[$selectedLangue]->image . '.gif', $languagesByCode[$selectedLangue]->title_native, array('title' => $languagesByCode[$selectedLangue]->title_native), true);
            } else {
                vmWarn(tsmText::sprintf('com_tsmart_MISSING_FLAG', $selectedLangue, $selectedLangue));
            }
            $this->langList = '<input name ="vmlang" type="hidden" value="' . $selectedLangue . '" >' . $flagImg . ' <b> ' . $defautName . '</b>';
        }
        if (JFactory::getApplication()->isSite()) {
            $bar = JToolBar::getInstance('toolbar');
            $bar->appendButton('Link', 'back', 'com_tsmart_LEAVE', 'index.php?option=com_tsmart&manage=0');
        }
    }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:101,代码来源:tsmviewadmin.php


示例20:

 * @version $Id: cart_advertisement.php 7862 2014-04-25 09:26:53Z alatak $
 * @package VirtueMart
 * @subpackage payment
 * @copyright Copyright (C) 2004-Copyright (C) 2004-2016 Virtuemart Team. All rights reserved.   - 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
 */
$css = ".totalInPaymentCurrency {display:none;}\n";
if ($viewData['payment_form_position'] == 'right' or $viewData['payment_form_position'] == 'specific') {
    vmJsApi::css('klarnacheckout', 'plugins/vmpayment/klarnacheckout/assets/css');
}
?>

<?php 
$class = '';
if ($viewData['message']) {
    $class = 'disableSnippet';
}
?>

<div id="kco-payment-me 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP vmPSPlugin类代码示例发布时间:2022-05-23
下一篇:
PHP vmCommonHTML类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap