<?php if (!isset($redirect)) { ?>
<div class="checkout-product">
<table class="table table-action">

  <thead>
    <tr>
    <th class="t-medium"><?php echo $column_name; ?></th>
    <th class="t-medium"><?php echo $column_model; ?></th>
	  <th class="t-medium"><?php echo $column_quantity; ?></th>
    <?php $modulostconf = $this->futuracalcularst->getconfiguracoes();
    if(($this->customer->isLogged()) && ($this->customer->getTipo_pessoa() == 'J') && ($modulostconf['futuracalcularst_status']) ){ ?>
      <th class="t-medium"><?php echo 'Valor ST' ?></td>
      <th class="t-medium"><?php echo 'Valor IPI' ?></td>
      <th class="t-medium"><?php echo 'Valor FCP ST' ?></td>
    <?php } ?>
	  <th class="t-medium"><?php echo $column_price; ?></th>
	  <th class="t-medium"><?php echo $column_total; ?></th>
    </tr>
  </thead>

  <tbody>
	<?php foreach ($products as $product) { ?>
    <?php if($product['recurring']): ?>
    <tr>
    <td colspan="6" style="border:none;"><image src="catalog/view/theme/default/image/reorder.png" alt="" title="" style="float:left;" /><span style="float:left;line-height:18px; margin-left:10px;">
            <strong><?php echo $text_recurring_item ?></strong>
            <?php echo $product['profile_description'] ?>
    </td>
    </tr>
    <?php endif; ?>
    <tr>
	<td class="fix"></td>
	<td class="info_responsive"><b><?php echo $column_name; ?></b></td>
	<td class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a>
    <?php foreach ($product['option'] as $option) { ?>
    <br />
    &nbsp;<small> - <?php echo $option['name']; ?>: <?php echo $option['value']; ?></small>
    <?php } ?>
    <?php if($product['recurring']): ?>
    <br />
    &nbsp;<small><?php echo $text_payment_profile ?>: <?php echo $product['profile_name'] ?></small>
    <?php endif; ?>
    </td>
	<td class="info_responsive"><b><?php echo $column_model; ?></b></td>
	<td class="model"><?php echo $product['model']; ?></td>
	<td class="info_responsive"><b><?php echo $column_quantity; ?></b></td>
	<td><?php echo $product['quantity']; ?></td>
  <?php $modulostconf = $this->futuracalcularst->getconfiguracoes();
  if(($this->customer->isLogged()) && ($this->customer->getTipo_pessoa() == 'J') && ($modulostconf['futuracalcularst_status']) ){ ?>
    <td class="info_responsive"><b><?php echo 'Valor ST'; ?></b></td>
    <td class="valorst"><?php  if($product['st_valor'] !== 'N') {echo $product['st_valor'];}   else {echo "";};?></td>
    <td class="info_responsive"><b><?php echo 'Valor IPI'; ?></b></td>
    <td class="valoripi"><?php if($product['ipi_valor']!== 'N') {echo $product['ipi_valor'];}  else {echo "";};?></td>
    <td class="info_responsive"><b><?php echo 'Valor FCP ST'; ?></b></td>
    <td class="valorfcp"><?php if($product['fcpst_valor']!== 'N') {echo $product['fcpst_valor'];}  else {echo "";};?></td>
  <?php } ?>
	<td class="info_responsive"><b><?php echo $column_price; ?></b></td>
	<td class="price"><?php echo $product['price']; ?></td>
	<td class="info_responsive"><b><?php echo $column_total; ?></b></td>
	<td class="total" style=" white-space: nowrap;"><?php echo $product['total']; ?></td>
	<td class="fix-margin"></td>
	</tr>
	<?php } ?>
      <?php foreach ($vouchers as $voucher) { ?>
      <tr>
        <td class="name"><?php echo $voucher['description']; ?></td>
        <td class="model"></td>
        <td>1</td>
        <td class="price"><?php echo $voucher['amount']; ?></td>
        <td class="total"><?php echo $voucher['amount']; ?></td>
      </tr>
      <?php } ?>
  </tbody>

  <tfoot>
      <?php foreach ($totals as $total) { ?>
      <tr>
	    <td class="info_responsive"><b><?php echo $total['title']; ?>:</b></td>
      <?php $modulostconf = $this->futuracalcularst->getconfiguracoes();
        if(($this->customer->isLogged()) && ($this->customer->getTipo_pessoa() == 'J') && ($modulostconf['futuracalcularst_status']) ){ ?>
        <td colspan="7" class="price"><b><?php echo $total['title']; ?>:</b></td>
      <?php }else{ ?>
        <td colspan="4" class="price"><b><?php echo $total['title']; ?>:</b></td>
      <?php } ?>
        <td class="total"><?php echo $total['text']; ?></td>
      </tr>
      <?php } ?>
  </tfoot>
  </table>
</div>
<div class="payment"><?php echo $payment; ?></div>
<?php } else { ?>
<script type="text/javascript"><!--
location = '<?php echo $redirect; ?>';
//--></script>
<?php } ?>
