Please help us to make AbanteCart Ideal Open Source Ecommerce Solution for everyone.

Support AbanteCart eCommerce

Author Topic: How to modify order detail form?  (Read 7141 times)

Offline Gleaf

  • Newbie
  • *
  • Posts: 33
  • Karma: +6/-0
    • View Profile
How to modify order detail form?
« 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.

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4359
  • Karma: +298/-10
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: How to modify order detail form?
« Reply #1 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
Please  rate your experience or leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can help

Offline Gleaf

  • Newbie
  • *
  • Posts: 33
  • Karma: +6/-0
    • View Profile
Re: How to modify order detail form?
« Reply #2 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!


Offline Gleaf

  • Newbie
  • *
  • Posts: 33
  • Karma: +6/-0
    • View Profile
Re: How to modify order detail form?
« Reply #3 on: March 03, 2013, 06:13:38 AM »
Ok, got it.

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

 

Database Error

Please try again. If you come back to this error screen, report the error to an administrator.