示例#1
0
文件: cart.php 项目: Shtier/digicom
					<?php 
    }
    ?>
				</td>
				<td nowrap="nowrap" style="text-align: center;">
					<ul style="margin: 0; padding: 0;list-style-type: none;">
						<li class="digi_cart_total" style="font-weight: bold;font-size: 18px;text-align:right;"><?php 
    echo JText::_("COM_DIGICOM_TOTAL");
    ?>
</li>
					</ul>
				</td>
				<td nowrap="nowrap" style="text-align: center;">
					<ul style="margin: 0; padding: 0;list-style-type: none;">
						<li class="digi_cart_amount" id="cart_total" style="font-weight: bold;font-size: 18px;text-align:right;"><?php 
    echo DigiComSiteHelperDigiCom::format_price2($tax['taxed'], $tax['currency'], true, $configs);
    ?>
</li>
					</ul>
				</td>
			</tr>
		</table>

		<?php 
    if ($configs->get('showccont', 0) == 1) {
        ?>
			<div id="digicomcartcontinue" class="row-fluid continue-shopping">
				<div class="span8">
					<?php 
        echo JText::_("DIGI_PAYMENT_METHOD") . ": " . $this->plugins;
        $onclick = "document.getElementById('returnpage').value='checkout'; document.getElementById('type_button').value='checkout';";
示例#2
0
文件: cart.php 项目: Shtier/digicom
    public function getOrderItems($order_id)
    {
        $configs = $this->configs;
        $customer = new DigiComSiteHelperSession();
        $db = JFactory::getDbo();
        $sql = 'SELECT `p`.*, `od`.quantity FROM
					`#__digicom_products` AS `p`
						INNER JOIN
					`#__digicom_orders_details` AS `od` ON (`od`.`productid` = `p`.`id`)
				WHERE `orderid` =' . $order_id;
        $db->setQuery($sql);
        $items = $db->loadObjectList();
        //change the price of items if needed
        for ($i = 0; $i < count($items); $i++) {
            $item =& $items[$i];
            $item->discount = 0;
            $item->currency = $configs->get('currency', 'USD');
            $item->price = DigiComSiteHelperDigiCom::format_price($item->price, $item->currency, false, $configs);
            //sprintf( $price_format, $item->product_price );
            $item->subtotal = DigiComSiteHelperDigiCom::format_price($item->price, $item->currency, false, $configs);
            //sprintf( $price_format, $item->subtotal );
            $item->price_formated = DigiComSiteHelperDigiCom::format_price2($item->price, $item->currency, false, $configs);
            //sprintf( $price_format, $item->product_price );
            $item->subtotal_formated = DigiComSiteHelperDigiCom::format_price2($item->subtotal, $item->currency, false, $configs);
            //sprintf( $price_format, $item->subtotal );
            $item->subtotal = $item->price * $item->quantity;
        }
        return $items;
    }
示例#3
0
				<b><?php 
$text = "COM_DIGICOM_ITEM_IN_CART";
if ($k > 1) {
    $text = "COM_DIGICOM_ITEMS_IN_CART";
}
echo $k . " " . JText::_($text);
?>
</b>
			</td>
			<td><b><?php 
echo JText::_("COM_DIGICOM_SUBTOTAL");
?>
</b></td>
			<td>
				<b><?php 
echo DigiComSiteHelperDigiCom::format_price2($total, $currency, true, $configs);
?>
</b>
			</td>
		</tr>
		</tfoot>
	</table>

	<input name="controller" type="hidden" id="controller" value="Cart">
	<input name="task" type="hidden" id="task" value="updateCart">
	<input name="returnpage" type="hidden" id="returnpage" value="">
	<input name="Itemid" type="hidden" value="<?php 
global $Itemid;
echo $Itemid;
?>
">
示例#4
0
 function getCartItems()
 {
     $customer = $this->customer;
     $configs = $this->configs;
     if (is_object($customer)) {
         $sid = $customer->_sid;
     }
     if (is_array($customer)) {
         $sid = $customer['sid'];
     }
     if (is_object($customer) && isset($customer->_user->id)) {
         $uid = $customer->_user->id;
     }
     if (is_array($customer)) {
         $uid = $customer['userid'];
     }
     $db = JFactory::getDBO();
     $sql = "SELECT \n\t\t\t\t\t\t`c`.*,\n\t\t\t\t\t\t`p`.*\n\t\t\t\t\tFROM\n\t\t\t\t\t\t`#__digicom_products` AS `p`\n\t\t\t\t\t\t\tINNER JOIN\n\t\t\t\t\t\t`#__digicom_cart` AS `c` ON (`c`.`item_id` = `p`.`id`)\n\t\t\t\t\tWHERE\n\t\t\t\t\t\t`c`.`sid` = '" . intval($sid) . "' AND `c`.`item_id` = `p`.`id`\n\t\t\t\t\tORDER BY `p`.`ordering`";
     $db->setQuery($sql);
     $items = $db->loadObjectList();
     //change the price of items if needed
     for ($i = 0; $i < count($items); $i++) {
         $item =& $items[$i];
         $item->discount = 0;
         $item->currency = $configs->get('currency', 'USD');
         $item->price = DigiComSiteHelperDigiCom::format_price($item->price, $item->currency, false, $configs);
         //sprintf( $price_format, $item->product_price );
         $item->subtotal = DigiComSiteHelperDigiCom::format_price($item->price, $item->currency, false, $configs);
         //sprintf( $price_format, $item->subtotal );
         $item->price_formated = DigiComSiteHelperDigiCom::format_price2($item->price, $item->currency, false, $configs);
         //sprintf( $price_format, $item->product_price );
         $item->subtotal_formated = DigiComSiteHelperDigiCom::format_price2($item->subtotal, $item->currency, false, $configs);
         //sprintf( $price_format, $item->subtotal );
         $item->subtotal = $item->price * $item->quantity;
     }
     //print_r($items);die;
     if (count($items) > 0) {
         $this->calc_price($items, $customer, $configs);
         foreach ($items as $i => $v) {
             if ($i < 0) {
                 continue;
             }
         }
     }
     //print_r($items);die;
     $this->_items = $items;
     return $items;
 }