You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Priya Sharma (Jira)" <ji...@apache.org> on 2021/08/16 07:25:00 UTC

[jira] [Commented] (OFBIZ-12298) Wrong price calculation for productConfigProduct

    [ https://issues.apache.org/jira/browse/OFBIZ-12298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17399559#comment-17399559 ] 

Priya Sharma commented on OFBIZ-12298:
--------------------------------------

Hello [~martnaum] ,
After analyzing the code, here are my findings -

 The price displayed on the eCommerce is the aggregated price 
i.e. the product price plus selected configuration (which internally maps to a product and hence the "COMPONENT_PRICE" of that product)

When we load the page for the first time
the default configuration is  "Cheese enchiladas", which indeed maps to "ENCHILADAS" as the configured product
thus final price: 6+6 = 12

If we look at  the other configuration i.e. "Fajita beef" which maps to "FAJITA_BEEF" with component price=2
thus the final price: 6+2 = 8

Here is the screenshot of the data mapping in ProductConfigProduct
!config-product.png!

[~jleroux], can you please confirm?

Additionally, we should still fix the shopping list page, to display the aggregated price of the product.

 

> Wrong price calculation for productConfigProduct
> ------------------------------------------------
>
>                 Key: OFBIZ-12298
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-12298
>             Project: OFBiz
>          Issue Type: Bug
>          Components: product
>            Reporter: Mart Naum
>            Assignee: Priya Sharma
>            Priority: Major
>         Attachments: config-product.png
>
>
> The enchiladas are implemented in the backend using productConfigProduct. For the standard product, the cheese enchiladas, the productPrice is configured to be 6 USD. The productPrice for fajita beef enchiladas is 8 USD.
> However, the order in the webshop shows a price of 12 USD for a single order of cheese enchiladas. That's exactly double the price stored in productPrice. On the other hand the price calculation for the fajita beef enchiladas seems to be correct.
> I experimented a bit with productConfigProduct and saw that the price always doubles in the ecommerce UI as well as in the resulting order when the productConfigProduct is identical to the parent product of this product configuration. This is so also the case with the configurable PC. I assume there is a glitch within the price calculation for productConfigProducts.
>  
> Update: When I add enchiladas to a shoppingList, the shoppingList shows the correct price of 6USD.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)