Sybille Posted October 6, 2016 Share Posted October 6, 2016 Hi, Is there a chance to manipulate the variables from the email templates for e. g. the variables {$invoice_html_contents} / {$order_details}. I would like to change the part "total price" in the variable {$order_details}. The variable shows the products and their prices WITHOUT VAT and at the end the total price of all products WITH VAT. If you calculate the product prices your surprised because it’s not congruent with the total price written in the email – it’s because of the different handling of the prices incl. / excl. VAT. There for I would prefer a statement of the prices / a price summary like it is shown in the variable {$invoice_html_contents}, instead of only writing “total price $ xxx” Extract from {$invoice_html_contents} ************************ Sub totalCHF 124.25 VAT 8.00%: CHF 9.94 Credit / deposit: CHF 0.00 Total: CHF 134.19 ************************ Does someone know where or how I can change this part of the {$order_details} variable? Many thanks for your ideas. Sybille 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 6, 2016 Share Posted October 6, 2016 Hi Sybille, the email templates use Smarty, therefore the variables can be manipulated using Smarty. however, it sounds like you're trying/wanting to use a variable from one email template type (invoice) in a general email - that's unlikely to work. you won't have the option of using {$invoice_html_contents} - and because it's not an invoice email, I doubt you'll even have access to the individual parts such as subtotals, vat, credit as separate variables etc. if you really want to do this, then you'll need to use an action hook, EmailPreSend, to query the database and pass the variables to the template. 0 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.