Carlos Martins Posted February 9, 2018 Share Posted February 9, 2018 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> {$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} × {$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 Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 9, 2018 Share Posted February 9, 2018 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. Quote Link to comment Share on other sites More sharing options...
Carlos Martins Posted February 9, 2018 Author Share Posted February 9, 2018 The "Overview" tab shows exactly how I need it to be in the Printed version..... it shows the current retail price, witch is what I need. Qnty | Product | CurrentUnitPrice | Line Total Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 9, 2018 Share Posted February 9, 2018 The code as it is: <span class="price">{$item.price}</span>{$item.quantity} × {$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} × {$item.name} {if !empty($item.product_code)}({$item.product_code}) {/if}@ {$item.item_price} Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.