Jump to content

Can't get Unit Price to show on orders.print.php


Carlos Martins

Recommended Posts

Hello everyone!

I'm having some trouble inserting the products unit price when printing the order "orders.print.php" under admin/skins/default/template

I've tried : 
{$item.price_unit}
{$item.price_each}

how can I place it there?

 

--- code ---

      <div class="info">
        <span class="orderid"><strong>{$LANG.common.order_id}</strong> &nbsp; {$order.cart_order_id}</span>
        <strong>{$LANG.orders.title_receipt_for}</strong> {$order.order_date}
      </div>

      <div class="product">

        <span class="price">{$LANG.common.price}</span>
        <strong>{$LANG.common.product}</strong>
      </div>

      {foreach from=$order.items item=item}
      <div class="product">
        <span class="price">{$item.price}</span>{$item.quantity} &times; {$item.name} {if !empty($item.product_code)}({$item.product_code}) {/if} ..... INSERT UNIT PRICE HERE

        {if isset($item.options)}
        <ul>
        {foreach from=$item.options item=option}
        <li>{$option}</li>
        {/foreach}
        </ul>
        {/if}
      </div>
      {/foreach}
      <div id="totals">
        <div class="total">{$LANG.basket.total_sub} <strong>{$order.subtotal}</strong></div>
        <div class="total">{$LANG.basket.total_discount} {if !empty($order.percent)}({$order.percent}){/if} <strong>{$order.discount}</strong></div>
        <div class="total">{$LANG.basket.shipping} <strong>{$order.shipping}</strong></div>
        {if isset($order.taxes)} {foreach from=$order.taxes item=tax}
        <div class="total">{$tax.name} <strong>{$tax.value}</strong></div>
        {/foreach}{/if}
        <br>

 

--- code ---

Thank you in advance.

Carlos

 

Link to comment
Share on other sites

Details of the order include just the eventual single piece price (list price, sale price, quantity price, coupon discounted price, etc) and the quantity, and CubeCart then calculates the line item's total.

So, what would be the source of what you are wanting versus what CubeCart has already logged regarding the price the item sold at?

If a price different than the actual sold price, and wanting the order summary to have this data, we would need to alter the database to hold that data.

If the current retail price, which may change over time, then we would have to fetch that from the database and add it to the data array that populates the template.

Link to comment
Share on other sites

The code as it is:

<span class="price">{$item.price}</span>{$item.quantity} &times; {$item.name} {if !empty($item.product_code)}({$item.product_code}) {/if}

Perhaps, this is the code you are wanting:

<span class="price">{$item.price}</span>{$item.quantity} &times; {$item.name} {if !empty($item.product_code)}({$item.product_code}) {/if}@ {$item.item_price}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...