Abhishek Gowda
Abhishek Gowda

Reputation: 11

Admin order mail does not have correct details prestashop 1.6

Hello Guys i'm new to Prestashop I'm using Version 1.6 This is the mail I'm getting where i get an order on my store.

https://drive.google.com/file/d/0Bxq0OqXtCs3iTjVzOG8xYnZqTW8/view?usp=sharing

please see the image in the link above.

this mail is missing the base price and discount on the product its directly showing the discounted price as unit price.

I tried looking at mails directory under prestashop folder. But i dint see any Database quires there . how make it to show the discount and base price and total base price.

Thank You in advance..

Upvotes: 0

Views: 492

Answers (1)

Christian Rauchenwald
Christian Rauchenwald

Reputation: 275

Since the mails also use Smarty Template Engine the soution shown for the product listings at http://nemops.com/unit-price-in-prestashop-product-list/#.VJfLAV4BcA will work for the mails to.

So open the mailtemplate and look for the foreach loop that returns the products table. Then just add:

{if $product.unit_price_ratio}
    {math equation="b/a" a=$product.unit_price_ratio b=$product.price_without_reduction assign=realunit}
    {convertPrice price=$realunit} {l s="per"} {$product.unity}
{/if}

whereever you want to display the price per unit. Keep in mind the foreach loop in the mail might not user $product but instead another variable so you'd have to replace $product in the code above.

Upvotes: 1

Related Questions