<?php defined('IN_DESTOON') or exit('Access Denied'); if ($DT_BOT) { dhttp(403); } require DT_ROOT . '/module/' . $module . '/common.inc.php'; require DT_ROOT . '/module/' . $module . '/cart.class.php'; include load('misc.lang'); $do = new cart(); $cart = $do->get(); $max_cart = $MOD['max_cart']; if ($action == 'ajax') { $itemid or exit('-1'); $s1 = isset($s1) ? intval($s1) : 0; $s2 = isset($s2) ? intval($s2) : 0; $s3 = isset($s3) ? intval($s3) : 0; $key = $itemid . '-' . $s1 . '-' . $s2 . '-' . $s3; if (strpos($cart . ',', ',' . $key . ',') !== false) { exit('-2'); } $item = $db->get_one("SELECT itemid,status,username FROM {$table} WHERE itemid={$itemid}"); if ($item && $item['status'] == 3) { if ($item['username'] != $_username) { $cart = ',' . $key . $cart; $do->set($cart); exit('1'); } else { exit('-4'); } } else {
/** * Set the title for the cart * @Developer brandon * @Date Oct 11, 2010 */ public function __construct() { parent::__construct(); meta::set_title('Shopping Cart'); $this->cart = cart::get(); }
<th>Quantity</th> <th>Price</th> </tr> </thead> <tfoot> <tr> <td colspan="2">Order Subtotal</td> <td><?php echo format::dollar_format(cart::get()->subtotal()); ?> </td> </tr> </tfoot> <tbody> <?php foreach (cart::get()->cart_items as $cart_item) { ?> <tr id="cart-item-<?php echo $cart_item; ?> "> <td><?php echo html::anchor($cart_item->product->show_path(), $cart_item->name); ?> </td> <td> <?php echo form::open('cart/update_quantity'); ?> <?php echo form::hidden('id', $cart_item);