<?php
/**
 * Magento
 *
 * @category    design
 * @package     meigeetheme_default
 * @copyright   Copyright (c) 2012 MeigeeTeam. (http://www.meigeeteam.com)
 */
?>
<?php
/**
 * Shopping cart template
 *
 * @see Mage_Checkout_Block_Cart
 */
?>
<?php
	$meigee_bizarre_general = MAGE::helper('ThemeOptionsBizarre')->getThemeOptionsBizarre('meigee_bizarre_general');
	$cartpage = $meigee_bizarre_general['layout']['cartpage'];
?>
<div class="cart cart-2">
	<div class="page-title title-buttons">
		<h1><?php echo $this->__('Shopping Cart') ?></h1>
		<?php if(!$this->hasError()): ?>
		<ul class="checkout-types">
		<?php foreach ($this->getMethods('top_methods') as $method): ?>
			<?php if ($methodHtml = $this->getMethodHtml($method)): ?>
			<li><?php echo $methodHtml; ?></li>
			<?php endif; ?>
		<?php endforeach; ?>
		</ul>
		<?php endif; ?>
		<br class="clear" />
	</div>
	<div class="grid_8 alpha">
		<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
		<?php echo $this->getChildHtml('form_before') ?>
		<form action="<?php echo $this->getUrl('checkout/cart/updatePost') ?>" method="post">
			<?php echo $this->getBlockHtml('formkey'); ?>
			<fieldset>
				<table id="shopping-cart-table" class="data-table cart-table">
					<col />
				<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
					<col width="1" />
				<?php endif; ?>
				<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
					<col width="1" />
				<?php endif; ?>
					<col width="1" />
				<?php if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
					<col width="1" />
				<?php endif; ?>
				<?php if ($this->helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?>
					<col width="1" />
				<?php endif; ?>
				<col width="1" />
				<?php $mergedCells = ($this->helper('tax')->displayCartBothPrices() ? 2 : 1); ?>
					<thead>
						<tr>
							<th rowspan="<?php echo $mergedCells; ?>"><span class="nobr"><?php echo $this->__('Product Name') ?></span></th>
							<th class="a-center" colspan="<?php echo $mergedCells; ?>"><span class="nobr"><?php echo $this->__('Unit Price') ?></span></th>
							<th rowspan="<?php echo $mergedCells; ?>" class="a-center"><?php echo $this->__('Qty') ?></th>
							<th class="a-center" colspan="<?php echo $mergedCells; ?>"><?php echo $this->__('Subtotal') ?></th>
							<th rowspan="<?php echo $mergedCells; ?>">&nbsp;</th>
						</tr>
						<?php if ($this->helper('tax')->displayCartBothPrices()): ?>
						<tr>
							<th class="a-center"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
							<th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
							<th class="a-center"><?php echo $this->helper('tax')->getIncExcTaxLabel(false) ?></th>
							<th><?php echo $this->helper('tax')->getIncExcTaxLabel(true) ?></th>
						</tr>
						<?php endif; ?>
					</thead>
					<tfoot>
						<tr class="buttons-row">
							<td colspan="50" class="a-right buttons">
								<div>
									<?php if($this->getContinueShoppingUrl()): ?>
										<button type="button" title="<?php echo $this->__('Continue Shopping') ?>" class="button btn-continue" onclick="setLocation('<?php echo $this->getContinueShoppingUrl() ?>')"><span><span><?php echo $this->__('Continue Shopping') ?></span></span></button>
									<?php endif; ?>
									<button type="submit" name="update_cart_action" value="update_qty" title="<?php echo $this->__('Update Shopping Cart'); ?>" class="button btn-update"><span><span><?php echo $this->__('Update Shopping Cart'); ?></span></span></button>
									<button type="submit" name="update_cart_action" value="empty_cart" title="<?php echo $this->__('Clear Shopping Cart'); ?>" class="button btn-clear"><span><span><?php echo $this->__('Clear Shopping Cart'); ?></span></span></button>
								</div>
							</td>
						</tr>
					</tfoot>
					<tbody>
					<?php foreach($this->getItems() as $_item): ?>
						<?php echo $this->getItemHtml($_item) ?>
					<?php endforeach ?>
					</tbody>
				</table>
				<script type="text/javascript">decorateTable('shopping-cart-table')</script>
			</fieldset>
		</form>
		<div class="clear"></div>
		<?php echo $this->getChildHtml('crosssell_big') ?>
	</div>
	<aside class="grid_4 omega">
		<?php if($this->getChildHtml('coupon')): ?>
			<section class="coupon">
				<?php echo $this->getChildHtml('coupon') ?>
			</section>
		<?php endif; ?>
		<?php if (!$this->getIsVirtual()): ?>
			<?php echo $this->getChildHtml('shipping'); ?>
		<?php endif; ?>
		<section class="totals">
			<!-- <div class="totals"> -->
				<header class="cart-blocks-title">
					<h2><?php echo $this->__('Total') ?></h2>
				</header>
				<div class="totals-border">
					<div class="totals-wrapper"><?php echo $this->getChildHtml('totals'); ?></div>
					<?php if(!$this->hasError()): ?>
					<ul class="checkout-types">
					<?php foreach ($this->getMethods('methods') as $method): ?>
						<?php if ($methodHtml = $this->getMethodHtml($method)): ?>
						<li><?php echo $methodHtml; ?></li>
						<?php endif; ?>
					<?php endforeach; ?>
					</ul>
					<?php endif; ?>
				</div>
			<!-- </div> -->
		</section>
	</aside>
	<div class="clear"></div>
</div>