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


PHP TiendaHelperBase::currency方法代码示例

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


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

示例1: fetchElement

    function fetchElement($name, $value, &$node, $control_name)
    {
        $output = '
		<input type="text" class="text_area" value="" id="pluginstiendaproductPrice" name="plugins[tiendaproductPrice]">
		<span class="k2Note">' . JText::_('Set Normal Price Now Special Prices Later') . '</span>
		';
        $id = JRequest::getInt('cid');
        if ($id) {
            $K2Item = JTable::getInstance('K2Item', 'Table');
            $K2Item->load($id);
            $params = new K2Parameter($K2Item->plugins, JPATH_PLUGINS . '/k2/tienda.xml', 'tienda');
            $productID = $params->get('productID');
            if ($productID) {
                Tienda::load('TiendaUrl', 'library.url');
                Tienda::load("TiendaHelperProduct", 'helpers.product');
                $prices = TiendaHelperProduct::getPrices($productID);
                if (count($prices)) {
                    $output = '<div class="tiendaButton">' . TiendaUrl::popup("index.php?option=com_tienda&controller=products&task=setprices&id=" . $productID . "&tmpl=component", JText::_('COM_TIENDA_SET_PRICES')) . '</div>';
                    $output .= '<div>';
                    foreach (@$prices as $price) {
                        $output .= '
						<div>
							<span>' . TiendaHelperBase::currency($price->product_price) . '</span>
							<div class="tiendaButton"><a href="' . $price->link_remove . '&return=' . base64_encode("index.php?option=com_k2&view=item&cid=" . $id) . '">' . JText::_('Remove') . '</a></div>
						</div>';
                    }
                    $output .= '</div>';
                }
            }
        }
        return $output;
    }
开发者ID:annggeel,项目名称:tienda,代码行数:32,代码来源:price.php

示例2: getList

 /**
  * Method to get content article data for the frontpage
  *
  * @since 1.5
  */
 function getList()
 {
     $where = array();
     $mainframe = JFactory::getApplication();
     if (!empty($this->_list)) {
         return $this->_list;
     }
     // Initialize variables
     $db = $this->getDBO();
     $filter = null;
     // Get some variables from the request
     //		$sectionid			= JRequest::getVar( 'sectionid', -1, '', 'int' );
     //		$redirect			= $sectionid;
     //		$option				= JRequest::getCmd( 'option' );
     $filter_order = $mainframe->getUserStateFromRequest('userelement.filter_order', 'filter_order', '', 'cmd');
     $filter_order_Dir = $mainframe->getUserStateFromRequest('userelement.filter_order_Dir', 'filter_order_Dir', '', 'word');
     $limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int');
     $limitstart = $mainframe->getUserStateFromRequest('userelement.limitstart', 'limitstart', 0, 'int');
     $search = $mainframe->getUserStateFromRequest('userelement.search', 'search', '', 'string');
     $search = JString::strtolower($search);
     if (!$filter_order) {
         $filter_order = 'tbl.product_id';
     }
     $order = ' ORDER BY ' . $filter_order . ' ' . $filter_order_Dir;
     $all = 1;
     // Keyword filter
     if ($search) {
         $where[] = 'LOWER( tbl.product_id ) LIKE ' . $db->Quote('%' . $db->getEscaped($search, true) . '%', false);
         $where[] = 'LOWER( tbl.product_name ) LIKE ' . $db->Quote('%' . $db->getEscaped($search, true) . '%', false);
     }
     // Build the where clause of the query
     $where = count($where) ? ' WHERE ' . implode(' OR ', $where) : '';
     // Get the total number of records
     $query = 'SELECT COUNT(tbl.product_id)' . ' FROM #__tienda_products AS tbl' . $where;
     $db->setQuery($query);
     $total = $db->loadResult();
     // Create the pagination object
     jimport('joomla.html.pagination');
     $this->_page = new JPagination($total, $limitstart, $limit);
     // Get the products
     $query = 'SELECT tbl.*, pp.* ' . ' FROM #__tienda_products AS tbl' . ' LEFT JOIN #__tienda_productprices pp ON pp.product_id = tbl.product_id ' . $where . $order;
     $db->setQuery($query, $this->_page->limitstart, $this->_page->limit);
     $this->_list = $db->loadObjectList();
     //currency formatting
     Tienda::load('TiendaHelperBase', 'helpers._base');
     foreach ($this->_list as $item) {
         $item->product_price = TiendaHelperBase::currency($item->product_price);
     }
     // If there is a db query error, throw a HTTP 500 and exit
     if ($db->getErrorNum()) {
         JError::raiseError(500, $db->stderr());
         return false;
     }
     return $this->_list;
 }
开发者ID:annggeel,项目名称:tienda,代码行数:60,代码来源:elementproductmultiple.php

示例3: foreach

		<?php 
        foreach ($priceRanges as $priceRange) {
            ?>
	
			<?php 
            if ($priceRange->total > 0) {
                ?>
		
			<li>
				<a href="<?php 
                echo JRoute::_($priceRange->link);
                ?>
">
					<span class="refinementLink">
						<?php 
                echo TiendaHelperBase::currency($priceRange->price_from) . ' - ' . TiendaHelperBase::currency($priceRange->price_to);
                ?>
					</span>
				</a>
				<span class="narrowValue">
					(<?php 
                echo $priceRange->total;
                ?>
)
				</span>							
			</li>	
			<?php 
            }
            ?>
		
		<?php 
开发者ID:annggeel,项目名称:tienda,代码行数:31,代码来源:default.php

示例4:

	<tr>
		<th style="width: 100px;" class="key">
			 <?php 
echo JText::_('COM_TIENDA_SHIPPING_TAX');
?>
:
		</th>
		<td>
		    <?php 
echo TiendaHelperBase::currency(@$this->shipping_total->shipping_tax_total);
?>
		</td>
	</tr>
	<tr>
		<th style="width: 100px;" class="key">
			<label for="grand_total" style="color:#1432F2;font-size:16px;">
			 <?php 
echo JText::_('COM_TIENDA_GRAND_TOTAL');
?>
:
			</label>
		</th>
		<td style="color:#1432F2;font-size:16px;">
            <?php 
echo TiendaHelperBase::currency(@$totals->order_total);
?>
		</td>
	</tr>					
	</tbody>
</table>
开发者ID:annggeel,项目名称:tienda,代码行数:30,代码来源:ordertotals.php

示例5:

    if (strlen($item->manufacturer_name)) {
        echo $item->manufacturer_name;
    } else {
        echo ' - ' . JText::_('COM_TIENDA_NO_MANUFACTURER') . ' - ';
    }
    ?>
                </td>    
                <td style="text-align: center;">
                    <?php 
    echo @$item->count_items;
    ?>
                    
                </td>           
                <td style="text-align: center;">
                    <?php 
    echo @TiendaHelperBase::currency($item->price_total);
    ?>
                </td>
            </tr>
            <?php 
    $k = 1 - $k;
    ?>
            <?php 
}
?>

            <?php 
if (!count(@$items)) {
    ?>
            <tr>
                <td colspan="10" align="center">
开发者ID:annggeel,项目名称:tienda,代码行数:31,代码来源:view.php

示例6: sprintf

				<?php 
if ($display_credits) {
    ?>
				<div class="reset marginbot"></div>
				<?php 
    if ($this->userinfo->credits_total > '0.00') {
        ?>
            	<!-- STORE CREDITS -->
		            <div id="credits_area" class="address">
		                <div id="credits_form">
		                <h3><?php 
        echo JText::_('COM_TIENDA_STORE_CREDIT');
        ?>
</h3>
		                <div id="credit_help"><?php 
        echo sprintf(JText::_('COM_TIENDA_YOU_HAVE_STORE_CREDIT'), TiendaHelperBase::currency($this->userinfo->credits_total, Tienda::getInstance()->get('default_currencyid', 1)));
        ?>
</div>
		                <div id="credit_message"></div>
		                <input type="text" name="apply_credit_amount" id="apply_credit_amount" value="" />
		                <input type="button" name="credit_submit" value="<?php 
        echo JText::_('COM_TIENDA_APPLY_CREDIT_TO_ORDER');
        ?>
"  onClick="tiendaAddCredit( document.adminForm );"/>
		                </div>
		            </div>
		        <?php 
    }
    ?>
		        <div id='applied_credit' style="display: none;"></div>				
				<?php 
开发者ID:annggeel,项目名称:tienda,代码行数:31,代码来源:onepage-opc.php

示例7: deleteCartItem

 public function deleteCartItem()
 {
     $response = new stdClass();
     $response->html = '';
     $response->error = false;
     $user = JFactory::getUser();
     $model = $this->getModel('carts');
     $table = $model->getTable();
     $id = JRequest::getInt('cartitem_id');
     $keys = array('user_id' => $user->id, 'cart_id' => $id);
     $table->load($keys);
     if (!empty($table->cart_id)) {
         if ($table->delete()) {
             $response->html = JText::_('COM_TIENDA_CARTITEM_DELETED');
         } else {
             $response->html = JText::_('COM_TIENDA_DELETE_FAILED');
             $response->error = true;
         }
     } else {
         $response->html = JText::_('COM_TIENDA_INVALID_REQUEST');
         $response->error = true;
     }
     // we deleted the item so we have to recalculate the subtotal
     $response->subtotal = 0;
     if ($response->error == false) {
         $show_tax = $this->defines->get('display_prices_with_tax');
         $model = $this->getModel($this->get('suffix'));
         $this->_setModelState();
         $items = $model->getList();
         Tienda::load('TiendaHelperUser', 'helpers.user');
         Tienda::load('TiendaHelperTax', 'helpers.tax');
         if ($show_tax) {
             $taxes = TiendaHelperTax::calculateTax($items, 2);
         }
         foreach ($items as $item) {
             if ($show_tax) {
                 $item->product_price += $taxes->product_taxes[$item->product_id];
             }
             $response->subtotal += $item->product_price * $item->product_qty;
         }
         $response->subtotal = TiendaHelperBase::currency($response->subtotal);
     }
     echo json_encode($response);
     return;
 }
开发者ID:annggeel,项目名称:tienda,代码行数:45,代码来源:carts.php

示例8: defined

<?php

/*Layout for displaying refreshed total amount.*/
defined('_JEXEC') or die('Restricted access');
JHTML::_('stylesheet', 'menu.css', 'media/com_tienda/css/');
JHTML::_('script', 'tienda.js', 'media/com_tienda/js/');
JHTML::_('script', 'joomla.javascript.js', 'includes/js/');
Tienda::load('TiendaGrid', 'library.grid');
$state = @$this->state;
$order = @$this->order;
$items = @$this->orderitems;
echo TiendaHelperBase::currency($items);
开发者ID:annggeel,项目名称:tienda,代码行数:12,代码来源:total.php

示例9:

            <?php 
        } else {
            ?>
                <div id="payment_paypal">
                    <div class="prepayment_message">
                        <?php 
            echo JText::_('COM_TIENDA_PAYPAL_PAYMENT_STANDARD_PREPARATION_MESSAGE');
            ?>
                    </div>
                    <div class="prepayment_action">
                        <div style="float: left; padding: 10px;"><input type="image" src="<?php 
            echo $vars->img_url_std;
            ?>
" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" /></div>
                        <div style="float: left; padding: 10px;"><?php 
            echo "<b>" . JText::_('COM_TIENDA_CHECKOUT_AMOUNT') . ":</b> " . TiendaHelperBase::currency(@$vars->orderpayment_amount);
            ?>
</div>
                        <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" />
                        <div style="clear: both;"></div>
                    </div>
                </div>
            <?php 
        }
        ?>
            <?php 
        break;
}
?>

<!--PAYPAL VARIABLES-->
开发者ID:annggeel,项目名称:tienda,代码行数:31,代码来源:prepayment.php

示例10:

            (<?php 
    echo $item->recurring_payments . " " . JText::_('COM_TIENDA_PAYMENTS');
    ?>
, <?php 
    echo $item->recurring_period_interval . " " . JText::_('COM_TIENDA_PERIOD_UNIT_' . $item->recurring_period_unit) . " " . JText::_('COM_TIENDA_PERIODS');
    ?>
) 
            <?php 
    if ($item->recurring_trial) {
        ?>
                <br/>
                <?php 
        echo JText::_('COM_TIENDA_TRIAL_PERIOD_PRICE');
        ?>
: <?php 
        echo TiendaHelperBase::currency($item->recurring_trial_price);
        ?>
                (<?php 
        echo "1 " . JText::_('COM_TIENDA_PAYMENT');
        ?>
, <?php 
        echo $item->recurring_trial_period_interval . " " . JText::_('COM_TIENDA_PERIOD_UNIT_' . $item->recurring_period_unit) . " " . JText::_('COM_TIENDA_PERIOD');
        ?>
)
            <?php 
    }
    ?>
 
            </div>
        </div>
    <?php 
开发者ID:annggeel,项目名称:tienda,代码行数:31,代码来源:product_buy.php

示例11: display

 /**
  * Displays a product category
  *
  * (non-PHPdoc)
  * @see tienda/admin/TiendaController#display($cachable)
  */
 function display($cachable = false, $urlparams = false)
 {
     JRequest::setVar('view', $this->get('suffix'));
     JRequest::setVar('search', false);
     $view = $this->getView($this->get('suffix'), JFactory::getDocument()->getType());
     $model = $this->getModel($this->get('suffix'));
     $state = $this->_setModelState();
     $session = JFactory::getSession();
     $app = JFactory::getApplication();
     $ns = $app->getName() . '::' . 'com.tienda.products.state.' . $this->itemid;
     $session->set($ns, $state);
     $app = JFactory::getApplication();
     $ns_general = $app->getName() . '::' . 'com.tienda.products.state';
     $session->set($ns_general, $state);
     // get the category we're looking at
     $filter_category = $model->getState('filter_category', JRequest::getVar('filter_category'));
     JModel::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_tienda/models');
     $cmodel = JModel::getInstance('Categories', 'TiendaModel');
     $cat = $cmodel->getTable();
     $cat->load($filter_category);
     // set the title based on the selected category
     $title = empty($cat->category_name) ? JText::_('COM_TIENDA_ALL_CATEGORIES') : JText::_($cat->category_name);
     $level = !empty($filter_category) ? $filter_category : '1';
     // breadcrumb support
     $app = JFactory::getApplication();
     $pathway = $app->getPathway();
     // does this item have its own itemid?  if so, let joomla handle the breadcrumb,
     // otherwise, help it out a little bit
     $category_itemid = $this->router->category($filter_category, true);
     if (!$category_itemid) {
         $category_itemid = JRequest::getInt('Itemid');
         $items = Tienda::getClass("TiendaHelperCategory", 'helpers.category')->getPathName($filter_category, 'array');
         if (!empty($items)) {
             // add the categories to the pathway
             Tienda::getClass("TiendaHelperPathway", 'helpers.pathway')->insertCategories($items, $category_itemid);
         }
         // add the item being viewed to the pathway
         $pathway_values = $pathway->getPathway();
         $pathway_names = Tienda::getClass("TiendaHelperBase", 'helpers._base')->getColumn($pathway_values, 'name');
         $pathway_links = Tienda::getClass("TiendaHelperBase", 'helpers._base')->getColumn($pathway_values, 'link');
         $cat_url = "index.php?Itemid={$category_itemid}";
         if (!in_array($cat->category_name, $pathway_names)) {
             $pathway->addItem($title);
         }
     }
     $cat->itemid = $category_itemid;
     // get the category's sub categories
     $cmodel->setState('filter_level', $level);
     $cmodel->setState('filter_enabled', '1');
     $cmodel->setState('order', 'tbl.lft');
     $cmodel->setState('direction', 'ASC');
     if ($citems = $cmodel->getList()) {
         foreach ($citems as $item) {
             $item->itemid_string = null;
             $item->itemid = Tienda::getClass("TiendaHelperRoute", 'helpers.route')->category($item->category_id, true);
             if (!empty($item->itemid)) {
                 $item->itemid_string = "&Itemid=" . $item->itemid;
             }
         }
     }
     $this->_list = true;
     // if you want to display a slightly differen add-to-cart area for list view, check this boolean
     // get the products to be displayed in this category
     if ($items = $model->getList()) {
         JRequest::setVar('page', 'category');
         // for "getCartButton"
         $this->display_cartbutton = Tienda::getInstance()->get('display_category_cartbuttons', '1');
         foreach ($items as $item) {
             $item->itemid_string = null;
             $item->itemid = (int) Tienda::getClass("TiendaHelperRoute", 'helpers.route')->product($item->product_id, null, true);
             if (!empty($item->itemid)) {
                 $item->itemid_string = "&Itemid=" . $item->itemid;
             }
         }
     }
     if ($model->getState('filter_price_from') > '0' || $model->getState('filter_price_to') > '0') {
         $url = "index.php?option=com_tienda&view=products&filter_category={$filter_category}&filter_price_from=&filter_price_to=";
         $from = TiendaHelperBase::currency($model->getState('filter_price_from'));
         $to = $model->getState('filter_price_to') > 0 ? TiendaHelperBase::currency($model->getState('filter_price_to')) : JText::_('COM_TIENDA_MAXIMUM_PRICE');
         $view->assign('remove_pricefilter_url', $url);
         $view->assign('pricefilter_applied', true);
         $view->assign('filterprice_from', $from);
         $view->assign('filterprice_to', $to);
     }
     if (Tienda::getInstance()->get('enable_product_compare', '1')) {
         Tienda::load("TiendaHelperProductCompare", 'helpers.productcompare');
         $compareitems = TiendaHelperProductCompare::getComparedProducts();
         $view->assign('compareitems', $compareitems);
     }
     $view->assign('level', $level);
     $view->assign('title', $title);
     $view->assign('cat', $cat);
     $view->assign('citems', $citems);
     $view->assign('items', $items);
//.........这里部分代码省略.........
开发者ID:annggeel,项目名称:tienda,代码行数:101,代码来源:products.php

示例12: array

				<td style="text-align: center; width: 33%;"><h3><?php 
    echo TiendaSelect::range(@$state->stats_interval, 'stats_interval', $attribs);
    ?>
</h3></td>
				<?php 
} else {
    ?>
				<td style="text-align: center; width: 33%;"><h3><?php 
    echo TiendaSelect::range(@$state->stats_interval, 'stats_interval', $attribs, null, true);
    ?>
</h3></td>
				<?php 
}
?>
				<td style="text-align: center; width: 33%;"><h3><?php 
echo TiendaHelperBase::currency(@$this->sum);
?>
</h3></td>
				<td style="text-align: center; width: 33%;"><h3><?php 
echo TiendaHelperBase::number(@$this->total, array('num_decimals' => '0'));
?>
</h3></td>
			</tr>
			</tbody>
			</table>

            <div class="section">
                <?php 
$chart = new HighRoller();
$chart->chart->renderTo = 'chart';
$chart->chart->type = 'mixed';
开发者ID:annggeel,项目名称:tienda,代码行数:31,代码来源:default.php

示例13:

    ?>
                    </div>
                </td>
				<td style="text-align: center;">
                    <?php 
    echo $item->product_model;
    ?>
                </td>
                <td style="text-align: center;">
                    <?php 
    echo $item->product_sku;
    ?>
                </td>
                <td style="text-align: right;">
                   <?php 
    echo TiendaHelperBase::currency($item->total_value);
    ?>
                </td>
                <td style="text-align: center;">
                   <?php 
    echo $item->product_quantity;
    ?>
                </td>
            </tr>
            <?php 
    ++$i;
    $k = 1 - $k;
    ?>
            <?php 
}
?>
开发者ID:annggeel,项目名称:tienda,代码行数:31,代码来源:view.php

示例14: foreach

$document->addStyleSheet(JURI::root(true) . '/modules/mod_tienda_cart/tmpl/tienda_cart.css');
$html = $ajax ? '' : '<div id="tiendaUserShoppingCart">';
$html .= '<span class="CartItems">';
if ($num > 0) {
    $qty = 0;
    foreach ($items as $item) {
        $qty = $qty + $item->orderitem_quantity;
    }
    $html .= '<span class="qty">' . $qty . '</span> ';
    $html .= $qty == 1 ? JText::_('COM_TIENDA_ITEM') : JText::_('COM_TIENDA_ITEMS');
} elseif ($display_null == '1') {
    $text = JText::_($null_text);
    $html .= $text;
}
$html .= '</span>';
$html .= '<span class="CartTotal">' . JText::_('COM_TIENDA_TOTAL') . ':<span>' . TiendaHelperBase::currency($orderTable->order_total) . '</span> ' . '</span> ';
$html .= '<span class="CartView">';
if ($params->get('display_lightbox') == '1') {
    $lightbox_attribs = array();
    $lightbox['update'] = false;
    if ($lightbox_width = Tienda::getInstance()->get('lightbox_width')) {
        $lightbox_attribs['width'] = $lightbox_width;
    }
    $html .= TiendaUrl::popup("index.php?option=com_tienda&view=carts&task=confirmAdd&tmpl=component", JText::_('COM_TIENDA_VIEW_YOUR_CART'), $lightbox_attribs);
} else {
    $html .= '<a id="cartLink" href="' . JRoute::_("index.php?option=com_tienda&view=carts") . '">' . JText::_('COM_TIENDA_VIEW_YOUR_CART') . '</a>';
}
$html .= '</span>';
$html .= '<span class="CartCheckout">' . '<a id="checkoutLink" href="' . JRoute::_("index.php?option=com_tienda&view=checkout") . '">' . JText::_('COM_TIENDA_CHECKOUT') . '</a>' . '</span>';
$html .= '<div class="reset"></div>';
if ($ajax) {
开发者ID:annggeel,项目名称:tienda,代码行数:31,代码来源:default.php

示例15: empty

    ?>
				</a>	
			</td>
			<td style="text-align: center;">
				<?php 
    echo empty($item->volume) ? 0 : $item->number_of_orders;
    ?>
			</td>
			<td style="text-align: center;">
				<?php 
    echo empty($item->volume) ? 0 : $item->volume;
    ?>
			</td>
			<td style="text-align: right;">
				<?php 
    echo TiendaHelperBase::currency($item->spent);
    ?>
			</td>

		</tr>
		<?php 
    ++$i;
    $k = 1 - $k;
    ?>
		<?php 
}
?>

		<?php 
if (!count(@$items)) {
    ?>
开发者ID:annggeel,项目名称:tienda,代码行数:31,代码来源:view.php


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