[jira] [Commented] (OFBIZ-10842) No userLogin given in calculateProductPrice service call context

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-10842) No userLogin given in calculateProductPrice service call context

Nicolas Malin (Jira)

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

Danny Trunk commented on OFBIZ-10842:
-------------------------------------

I was thinking about this as well when creating the issue, but I think it is a bug. As mentioned in [https://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/price/PriceServices.java?view=markup#l347] it is looking for a userLogin in context which is never set before. I did a workaround in my customPriceCalcService for now as we are using Spring Security. You can also consider it as an improvement if you want.

> 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
>            Assignee: Jacques Le Roux
>            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)