Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 10 Aug 2022 09:03 AM by  Piotr Borkowski
Product Part price with tax calculated on ProductDetail page
 5 Replies
Sort:
You are not authorized to post a reply.
Author Messages

Piotr Borkowski



New Member


Posts:36
New Member


--
29 Jul 2022 08:55 AM

    I have the following configuration.
    Product A with price 998,00 and flat tax rate 23%
    Product B with price 1,00 and flat tax rate 23%.
    Product A has Product B as a product part in product's A component definiton.

    When product A is added to the cart its price is presented like that:
    Price without tax: 999,00
    Price with tax: 1228,77
    Price with tax is ok because 998,00 * 1,23 + 1,00 * 1,23 = 1228,77

    I've a custom ProductDetail template based on StandardRegular (Revindex v18)
    On this custom template I'm presenting product price with tax and without tax (unlike default template where only price without tax is displayed).
    For price without tax I use:
    @Html.Raw(String.Format("{0:c}", @Model.ProductVariant.CombinedPrice))
    and
    @Html.Raw(String.Format("{0:c}", @Model.ProductVariant.CombinedPromotionPrice))
    For price with tax I use:
    @Html.Raw(String.Format("{0:c}", @Model.ProductVariant.CombinedPriceWithTax))
    and
    @Html.Raw(String.Format("{0:c}", @Model.ProductVariant.CombinedPromotionPriceWithTax))
    Here:
    Price without tax: 999,00
    Price with tax: 1228,54
    I think that CombinedPromotionPriceWithTax doesn't include product part tax.
    It looks like this is calculated that way:
    998*1,23+1,00 = 1228,54 

    In my opinion that is a wrong calculation - product part tax should be included in calculation. Although, maybe there is a solution to overcome this problem another way?
    I've tried other fields with prices of ProductVariant model but I've not found correct values.
     

    0

    Steve L



    Veteran Member


    Posts:2854
    Veteran Member


    --
    02 Aug 2022 04:19 AM

    I tried locally with a product selling at $998 and an implicit part for $1. Both are set to 23% tax. The prices are displayed correctly. The Model.ProductVariant.CombinedPriceWithTax shows $1228.77. Please verify you don't have any marketing promotions that may affect it.

    Please note, CombinedPromotionPriceWithTax will only show if you have a promotion set, otherwise this value is blank. You can also use CombinedSellingPriceWithTax that will automatically pick between the promoted price and regular price.

    0

    Steve L



    Veteran Member


    Posts:2854
    Veteran Member


    --
    02 Aug 2022 04:26 AM

    I want to add that if you are using non-implicit part, such as "multiple selection" where the part is an optional choice and the default is not-selected, when viewing the product detail page, you may need to select the part and read the JSON value from the ViewModel for the updated CombinedPriceWithTax value. The value you have printed using Razor (server-side) is the static price before the part selection.

     

    0

    Piotr Borkowski



    New Member


    Posts:36
    New Member


    --
    02 Aug 2022 02:38 PM
    Steve L,
    Thank you for your answer.
    I wasn't precise. In fact there is a promotion on this product - defined in promotion section of product variant.
    Product variant:
    Base price: 1648,00
    Tax class: 23%
    Promotion price: 998,00 (flat price - fixed promotion price)
    Component's product:
    Base price: 1,00
    Tax Class: 23%
    Promotion price: not defined.
    I present to the user the price before promotion (with and without tax) and the values are:
    1649 (2028,27 with tax)
    and that's correct.
    While presented price after promotion are the same like I wrote earlier:
    999 (1228,54 with tax)
    and that's not correct.
    0

    Steve L



    Veteran Member


    Posts:2854
    Veteran Member


    --
    09 Aug 2022 03:00 PM

    Thank you. We were able to identify the issue and will correct it in the next version smiley

     

    0

    Piotr Borkowski



    New Member


    Posts:36
    New Member


    --
    10 Aug 2022 09:03 AM
    Thank you. I'm looking forward to receive the new version from you.
    0
    You are not authorized to post a reply.