You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Danny Trunk (JIRA)" <ji...@apache.org> on 2019/02/27 08:30:00 UTC
[jira] [Comment Edited] (OFBIZ-10842) No userLogin given in
calculateProductPrice service call context
[ https://issues.apache.org/jira/browse/OFBIZ-10842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16779028#comment-16779028 ]
Danny Trunk edited comment on OFBIZ-10842 at 2/27/19 8:29 AM:
--------------------------------------------------------------
Adding
{{{code:java}}}
priceContext.put("userLogin", cart.getUserLogin());`
{{{code}}} in ShoppingCartItem#updatePrice should do the trick. Same for
{{{code:java}}}
priceContext.put("autoUserLogin", cart.getAutoUserLogin());
{{{code}}}
which is also missing.
was (Author: dtrunk90):
Adding `priceContext.put("userLogin", cart.getUserLogin());` in `ShoppingCartItem#updatePrice` should do the trick. Same for `priceContext.put("autoUserLogin", cart.getAutoUserLogin());` which is also missing.
> No userLogin given in calculateProductPrice service call context
> ----------------------------------------------------------------
>
> Key: OFBIZ-10842
> URL: https://issues.apache.org/jira/browse/OFBIZ-10842
> Project: OFBiz
> Issue Type: Bug
> Components: order, product
> Affects Versions: Trunk
> Reporter: Danny Trunk
> Priority: Major
>
> The call context for calculateProductPrice doesn't contain the userLogin:
> [https://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartItem.java?view=markup#l1195]
> As this is needed in the customPriceCalcService:
> [https://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/price/PriceServices.java?view=markup#l347]
>
> So currently there's no chance to get the user information in a custom price calc service.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)