当前位置: 首页>>代码示例>>PHP>>正文


PHP CitruscartHelperBase::getSessionVariable方法代码示例

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


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

示例1: currency

 /**
  * Formats and converts a number according to currency rules
  * As of v0.5.0 is a wrapper
  *
  * @param unknown_type $amount
  * @param unknown_type $currency
  * @return unknown_type
  */
 public static function currency($amount, $currency = '', $options = '')
 {
     $currency_selected = CitruscartHelperBase::getSessionVariable('currency_id', Citruscart::getInstance()->get('default_currencyid', 1));
     $currency = $currency_selected;
     $currency_helper = CitruscartHelperBase::getInstance('Currency');
     $amount = $currency_helper->_($amount, $currency, $options);
     return $amount;
 }
开发者ID:joomlacorner,项目名称:citruscart,代码行数:16,代码来源:_base.php

示例2: Copyright

# ------------------------------------------------------------------------
# author   Citruscart Team  - Citruscart http://www.citruscart.com
# copyright Copyright (C) 2014 Citruscart.com All Rights Reserved.
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# Websites: http://citruscart.com
# Technical Support:  Forum - http://citruscart.com/forum/index.html
-------------------------------------------------------------------------*/
/** ensure this file is being included by a parent file */
defined('_JEXEC') or die('Restricted access');
Citruscart::load('CitruscartHelperBase', 'helpers._base');
Citruscart::load('CitruscartSelect', 'library.select');
JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_citruscart/tables');
$helper = CitruscartHelperBase::getInstance();
$url = JRoute::_('index.php?option=com_citruscart&view=currency&task=set&return=' . base64_encode(JURI::getInstance()->__toString()), false);
// Check the currently selected currency
$selected = CitruscartHelperBase::getSessionVariable('currency_id', Citruscart::getInstance()->get('default_currencyid', 1));
?>

<div id="mod_citruscart_currency">
    <form action="<?php 
echo $url;
?>
" method="post" name="currencySwitch">
        <?php 
// echo JText::_('COM_CITRUSCART_SELECT_CURRENCY').': ';
?>
        <?php 
$attribs = array('onChange' => 'document.currencySwitch.submit(); ');
?>
        <?php 
echo CitruscartSelect::currency($selected, 'currency_id', $attribs);
开发者ID:joomlacorner,项目名称:citruscart,代码行数:31,代码来源:default.php


注:本文中的CitruscartHelperBase::getSessionVariable方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。