Jump to content

Display product reduction in back office order details 1.7.2


Chancho1938

Recommended Posts

We would like to display product reduction in back office order details in Prestashop ver. 1.7.2. After some research we came up with some additions and we would like to share them with you.

1. Open view.tpl file under <admin>/themes/default/template/controllers/orders/helpers/view/view.tpl and make the following additions and changes 

Arround 925 line under

<th class="text-center"><span class="title_box ">{l s='Qty' d='Admin.Orderscustomers.Feature'}</span></th>

Add <th class="text-center"><span class="title_box ">{l s='Discount' d='product.discount'} %</span></th> 

2. Open _product_line.tpl file under <admin>/themes/default/template/controllers/orders/_product_line.tpl and make the following additions and changes 

Add

 


{if ($order->hasBeenPaid())}
<td class="productQuantity text-center">
{$product.reduction_percent} %
</td>
{/if}

Before

{if ($order->hasBeenPaid())}
<td class="productQuantity text-center">
{if !empty($product['amount_refund'])}
{l s='%quantity_refunded% (%amount_refunded% refund)' sprintf=['%quantity_refunded%' => $product['product_quantity_refunded'], '%amount_refunded%' => $product['amount_refund']] d='Admin.Orderscustomers.Feature'}
{/if}
<input type="hidden" value="{$product['quantity_refundable']}" class="partialRefundProductQuantity" />
<input type="hidden" value="{(Tools::ps_round($product_price, 2) * ($product['product_quantity'] - $product['customizationQuantityTotal']))}" class="partialRefundProductAmount" />
{if count($product['refund_history'])}
<span class="tooltip">
<span class="tooltip_label tooltip_button">+</span>
<span class="tooltip_content">
<span class="title">{l s='Refund history' d='Admin.Orderscustomers.Feature'}</span>
{foreach $product['refund_history'] as $refund}
{l s='%refund_date% - %refund_amount%' sprintf=['%refund_date%' => {dateFormat date=$refund.date_add}, '%refund_amount%' => {displayPrice price=$refund.amount_tax_incl}] d='Admin.Orderscustomers.Feature'}<br />
{/foreach}
</span>
</span>
{/if}
</td>
{/if}

 

 

Edited by Chancho1938 (see edit history)
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...