Forum

The forum is a free service supported by community members. Please consider opening a support ticket if you need timely help.

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 19 Jan 2018 04:28 PM by  J T
display the product price with tax on the email and prints
 7 Replies
Sort:
You are not authorized to post a reply.
Page 1 of 212 > >>
Author Messages


Basic Member


Posts:272
Basic Member


--
16 Oct 2017 07:09 AM

    Hi Stephen,

    At this moment the output on an email or print is as follow.
    - SKU, ProductVariant, Quantity, TotalAmountWithTax

    I like to display the unit price with tax after the product variant name.

    For this I have edit the email / print template like below.

    This does not work :-(

    Can you point me out what I so wrong?

    Regards, Ton

    0


    Veteran Member


    Posts:2937
    Veteran Member


    --
    17 Oct 2017 05:54 PM

    Hi Ton

    Try moving you highlighted XSL token 2 lines above (i.e. right after the select="productVariantName" /}). You placed it under the for-each that is only intended to print if this was a bundled product.

    Please note starting with v12.2, we have many new friendlier tokens you can use to simplify your templates. For example, you can use {xsl:value-of select="in/salesOrder/formattedTotalAmount" /} and it will print the nicely formatted "$10.00" and automatically knows if it should print with tax, currency symbol, exchange rate and formatting in one. Login to the demo site and see the new templates.

    0


    Basic Member


    Posts:272
    Basic Member


    --
    29 Oct 2017 08:16 AM

    Hi Stephen.

    I'am almost at the finisch :-)
    I Have installed version 12.2.
    I changed the template for the print like below.

    The output is now:


    This is almost OK.
    I only want to have the unit price include with tax.
    I cannot find the token how to display this.
    What do do wrong here?

    Regards, Ton

    0


    Veteran Member


    Posts:2937
    Veteran Member


    --
    07 Nov 2017 12:55 AM

    Hi Ton

    There is no formattedPriceWithTax, but you can try to do something like taking the total amount with tax and divide by the quantity and multiply by your exchange rate. Then you want to round the number to 2 decimal places and prepend the "EUR".

    {xsl:value-of select="concat('EUR ', replace(format-number(totalAmountWithTax div quantity * /in/salesOrder/exchangeRate, '##0.00'), '.', ','))" /}

    0


    Basic Member


    Posts:272
    Basic Member


    --
    18 Jan 2018 04:56 PM

    Hi Stephen,

    I'am still struggling with this problem.
    I have copied the new basic communication template from the demo site.
    Then I changed it to the layout I liked.

    Till that point everything works ok.

    As last I have added your example to get this unit price with tax displayed.


    This does not work.
    I get the output like below (the grey bar is a page break in the view).

    Do you have any suggestion to get this work properly?

    With regards, Ton

    0
    You are not authorized to post a reply.
    Page 1 of 212 > >>