本文整理匯總了PHP中TiendaHelperBase::getSessionVariable方法的典型用法代碼示例。如果您正苦於以下問題:PHP TiendaHelperBase::getSessionVariable方法的具體用法?PHP TiendaHelperBase::getSessionVariable怎麽用?PHP TiendaHelperBase::getSessionVariable使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類TiendaHelperBase
的用法示例。
在下文中一共展示了TiendaHelperBase::getSessionVariable方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: defined
* @version 1.5
* @package Tienda
* @author Dioscouri Design
* @link http://www.dioscouri.com
* @copyright Copyright (C) 2009 Dioscouri Design. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*/
/** ensure this file is being included by a parent file */
defined('_JEXEC') or die('Restricted access');
Tienda::load('TiendaHelperBase', 'helpers._base');
Tienda::load('TiendaSelect', 'library.select');
JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_tienda/tables');
$helper = TiendaHelperBase::getInstance();
$url = JRoute::_('index.php?option=com_tienda&view=products&task=setCurrency&return=' . base64_encode(JURI::getInstance()->toString()), false);
// Check the currently selected currency
$selected = TiendaHelperBase::getSessionVariable('currency_id', Tienda::getInstance()->get('default_currencyid', 1));
?>
<div id="currency">
<form action="<?php
echo $url;
?>
" method="post" name="currencySwitch">
<?php
echo JText::_('COM_TIENDA_SELECT_CURRENCY') . ': ';
?>
<?php
$attribs = array('onChange' => 'document.currencySwitch.submit(); ');
?>
<?php
echo TiendaSelect::currency($selected, 'currency_id', $attribs);