AbanteCart Community

Shopping Cart Operations => Support => General Support => Topic started by: Gleaf on February 16, 2013, 05:38:04 PM

Title: How to modify order detail form?
Post by: Gleaf on February 16, 2013, 05:38:04 PM
There are 5 columns in the default order detail form: Product/Model/ Price/ Quantity/ Total 

For the products I'm selling, I don't need Model column, but need more space to show product name and options, how to remove or add a column and how to modify the width of a column?

Thanks.
Title: Re: How to modify order detail form?
Post by: abantecart on February 17, 2013, 02:56:59 PM
I assume question is addressed to order history/invoice section of the storefront.

You need to edit this file:
/storefront/view/default/template/pages/account/invoice.tpl

Locate code:

Code: [Select]
    <div class="content">
      <table width="536">
        <tr>
          <th align="left"><?php echo $text_product?></th>
          <th align="left"><?php echo $text_model?></th>
          <th align="right"><?php echo $text_quantity?></th>
          <th align="right"><?php echo $text_price?></th>
          <th align="right"><?php echo $text_total?></th>
        </tr>
        <?php foreach ($products as $product) { ?>
        <tr>
          <td align="left" valign="top"><a href="<?php echo str_replace('%ID%'$product['id'], $product_link?>"><?php echo $product['name']; ?></a>
            <?php foreach ($product['option'] as $option) { ?>
            <br />
            &nbsp;<small> - <?php echo $option['name']; ?> <?php echo $option['value']; ?></small>
            <?php ?></td>
          <td align="left" valign="top"><?php echo $product['model']; ?></td>
          <td align="right" valign="top"><?php echo $product['quantity']; ?></td>
          <td align="right" valign="top"><?php echo $product['price']; ?></td>
          <td align="right" valign="top"><?php echo $product['total']; ?></td>
        </tr>
        <?php ?>
      </table>
      <br />
      <div style="width: 100%; display: inline-block;">
        <table style="float: right; display: inline-block;">
          <?php foreach ($totals as $total) { ?>
          <tr>
            <td align="right"><?php echo $total['title']; ?></td>
            <td align="right"><?php echo $total['text']; ?></td>
          </tr>
          <?php ?>
        </table>
      </div>
    </div>

Remove th and td for model and set fixed width for product name
Title: Re: How to modify order detail form?
Post by: Gleaf on February 20, 2013, 04:30:21 PM
Sorry, was not able to come back to see. Thanks so much for your answer!

But my question is for the receipt received through e-mail. I mean, when customer place an order, both customer and I will receive a notice with order detail, include order ID, date, address etc. and a form with 5 columns:
 |Product | Model | Price | Quantity | Total |

The "product" column is small, and the "Model" column is very wide. I don't need "Model" column, but need a wide column for "Product" to show product name and options.

Can you please again let me know how to do with this ?

Thank you!

Title: Re: How to modify order detail form?
Post by: Gleaf on March 03, 2013, 06:13:38 AM
Ok, got it.

/storefront/view/default/template/mail/order_confirm.tpl