orders/details.php

Detalle de una compra

Detalle de un pedido

Este template permite mostrar el detalle de un pedido

Objetos disponibles

Descripción

$_order

Detalle de pedido.

$_paymentInfo

Detalle del pago.

Para visualizar este template el usuario debe estar autenticado en su cuenta

Código de ejemplo de un detalle de pedido simple

<div id="cart" class="container clearfix">
	
	<div id="products">
		
		<div class="step step1 clearfix">
			<h1>
				Pedido No. <?=$_order->getId()?>
				<span><?=$_order->get('orders_status.name')?></span>
			</h1>

			<?php if(isset($_paymentInfo) && is_object($_paymentInfo)): ?>
			<div class="payment">
				<h2><?=$_paymentInfo->title?></h2>
				
				<?php if(isset($_paymentInfo->text)): ?>
				<p class="intro"><?=$_paymentInfo->text?></p>
				<?php endif; ?>
				
				<?php foreach($_paymentInfo->params as $key => $val): ?>
				<h3><?=$key?></h3>
				<p><?=$val?></p>
				<?php endforeach; ?>			
			</div>
			<?php endif; ?>			
			
			<?php foreach($_order->get('groups') as $group): ?>
			<h2><?=($group->get('name') != '' ? $group->get('name') : 'Detalle del pedido')?> (<?=$_order->getId($group)?>)</h2>
			<?php foreach($group->products() as $product): ?>
			<div class="product">
				<div class="img">
					<img src="<?=$_front->thumb($product->get('product')->image()->get('image'), 200, 200)?>" alt="">
				</div>
				
				<div class="info">
					<p class="name"><?=$product->get('product')->get('name')?></p>
					<p class="version"><?=$product->get('version')->info()?></p>								
				</div>
				
				<label>
					Cantidad:
					<?=$product->get('quantity')?>
				</label>
				
				<div>
					<p class="price"><?=$_front->price($product->get('total'))?></p>
				</div>
			</div>
			<?php endforeach; ?>
			<?php if($group->get('deliveryFrom') != null): ?>
			<p class="pull-left">
				<strong>Fecha estimada de entrega:</strong> <?=$_front->date($group->get('deliveryFrom'))?> al <?=$_front->date($group->get('deliveryTo'))?>
			</p>
			<?php endif; ?>
			<?php endforeach; ?>
			
		</div>
		
	</div>
	
	<div id="summary">
		<h2>Tu compra</h2>
		
		<p>Subtotal <strong><?=$_front->price($_order->get('subtotal'))?></strong></p>

		<?php foreach($_order->get('discounts') as $disc): ?>
		<p><?=$disc->get('discount')->get('description')?> <strong><?=$_front->price(-$disc->get('amount'))?></strong></p>
		<?php endforeach; ?>

		<?php if($_order->get('credits')): ?>
		<p>Créditos utilizados <strong><?=$_front->price(-$_order->get('credits'))?></strong></p>
		<?php endif; ?>

		<p>Envío <strong id="shipping"><?=$_front->price($_order->get('shipping'))?></strong></p>
		
		<p class="total">Total <strong id="total"><?=$_front->price($_order->get('total'))?></strong></p>
		
	</div>	

</div>

Last updated