?> </th> <th class=""><?php echo JText::_('COM_QUICK2CART_DASHB_AMOUNT'); ?> </th> <th class=""><?php echo JText::_('COM_QUICK2CART_DASHB_STATUS'); ?> </th> </tr> </thead> <tbody> <?php foreach ($this->last5orders as $ord) { $order_currency = $comquick2cartHelper->getCurrencySymbol($ord['currency']); $this->store_orders_itemid = $comquick2cartHelper->getitemid('index.php?option=com_quick2cart&view=orders&layout=storeorder'); ?> <tr> <td> <a href="<?php echo JRoute::_('index.php?option=com_quick2cart&view=orders&layout=order&orderid=' . $ord['id'] . '&store_id=' . $this->store_id . '&calledStoreview=1&Itemid=' . $this->store_orders_itemid, false); ?> "> <?php echo JHtml::tooltip(JText::sprintf('QTC_TOOLTIP_VIEW_ORDER_MSG', $ord['prefix'] . $ord['id']), JText::_('QTC_TOOLTIP_VIEW_ORDER'), '', $ord['prefix'] . $ord['id']); ?> </a> </td> <td><?php echo $ord['name'];
?> </th> <th><?php echo JHtml::_('grid.sort', 'COM_QUICK2CART_PAYOUT_AMOUNT', 'amount', $this->lists['order_Dir'], $this->lists['order']); ?> </th> --> <th><?php echo JText::_('COM_QUICK2CART_PAYOUT_ID'); ?> </th> <th><?php echo JText::_('COM_QUICK2CART_PAYOUT_DATE'); ?> </th> <th><?php $currency = $comquick2cartHelper->getCurrencySymbol(); echo JText::_('COM_QUICK2CART_ORDER_AMOUNT'); ?> </th> <!-- <th><?php echo JText::_('COM_QUICK2CART_CASHBACK_VALUE'); ?> </th> --> </tr> <?php } ?> <?php $i = 0; foreach ($this->payouts as $payout) { ?>
/** * getFromattedPrice * * @param int $price price * @param int $curr curr * @param int $formatting formatting * * @return formatted price-currency string */ public function getFromattedPrice($price, $curr = null, $formatting = 1) { $comquick2cartHelper = new comquick2cartHelper(); /* if (empty($curr)) { $curr_sym= $curr = $comquick2cartHelper->getCurrencySymbol(); } $html=''; return $html="<span>".$price." </span> ".$curr;*/ if (empty($curr)) { $curr = $comquick2cartHelper->getCurrencySession(); } $curr_sym = $comquick2cartHelper->getCurrencySymbol(); $params = JComponentHelper::getParams('com_quick2cart'); $currency_display_format = $params->get('currency_display_format', "{SYMBOL} {AMOUNT}"); // $price = intval(str_replace(',', '', $price)); commented by vm bz converts from 25.5 to 25 $price = (double) str_replace(',', '', $price); $price = number_format($price, 2); $currency_display_formatstr = str_replace('{AMOUNT}', $price, $currency_display_format); $currency_display_formatstr = str_replace('{SYMBOL}', $curr_sym, $currency_display_formatstr); $currency_display_formatstr = str_replace('{CURRENCY}', $curr, $currency_display_formatstr); $html = ''; if ($formatting == 1) { $html = "<span>" . $currency_display_formatstr . " </span>"; } else { $html = $currency_display_formatstr; } return $html; }