Price rule does not work with quote
----------------------------------- Key: OFBIZ-1432 URL: https://issues.apache.org/jira/browse/OFBIZ-1432 Project: OFBiz Issue Type: Bug Components: order Reporter: William Perng When setup quote item, the default price is always used regardless price rule. I think the problem is in the createQuoteItem method of QuoteServices.xml. When the "calculateProductPrice" service is called, the quantity is not passed in. The quantity needs to be set before the "calculateProductPrice" service is called. I suggest to add the following code to line 304 of QuoteServices.xml (base on ver : 566181): <set from-field="parameters.quantity" field="calculateProductPriceMap.quantity"/> -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
[ https://issues.apache.org/jira/browse/OFBIZ-1432?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux reassigned OFBIZ-1432: -------------------------------------- Assignee: Jacques Le Roux > Price rule does not work with quote > ----------------------------------- > > Key: OFBIZ-1432 > URL: https://issues.apache.org/jira/browse/OFBIZ-1432 > Project: OFBiz > Issue Type: Bug > Components: order > Reporter: William Perng > Assignee: Jacques Le Roux > > When setup quote item, the default price is always used regardless price rule. > I think the problem is in the createQuoteItem method of QuoteServices.xml. When the "calculateProductPrice" service is called, the quantity is not passed in. The quantity needs to be set before the "calculateProductPrice" service is called. I suggest to add the following code to line 304 of QuoteServices.xml (base on ver : 566181): <set from-field="parameters.quantity" field="calculateProductPriceMap.quantity"/> -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546021 ] Jacques Le Roux commented on OFBIZ-1432: ---------------------------------------- William, You maybe right but I can't see any problems with quantity, nor prices rules. Have you an use case you could reproduce on official demo server : https://demo.hotwaxmedia.com/. I f you look at it before it reboots and clears the DB you will see 2 tries I did. They worked well without any changes. The tries are : https://demo.hotwaxmedia.com/ordermgr/control/ViewQuote?quoteId=CQ10000 https://demo.hotwaxmedia.com/ordermgr/control/ViewQuote?quoteId=CQ10001 They use a trivial price rule of 10% discount on the product GZ-2644 > Price rule does not work with quote > ----------------------------------- > > Key: OFBIZ-1432 > URL: https://issues.apache.org/jira/browse/OFBIZ-1432 > Project: OFBiz > Issue Type: Bug > Components: order > Reporter: William Perng > Assignee: Jacques Le Roux > > When setup quote item, the default price is always used regardless price rule. > I think the problem is in the createQuoteItem method of QuoteServices.xml. When the "calculateProductPrice" service is called, the quantity is not passed in. The quantity needs to be set before the "calculateProductPrice" service is called. I suggest to add the following code to line 304 of QuoteServices.xml (base on ver : 566181): <set from-field="parameters.quantity" field="calculateProductPriceMap.quantity"/> -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1432?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546036 ] William Perng commented on OFBIZ-1432: -------------------------------------- I have problem to access the demo box below. Here is how to reproduce this issue. 1. Create a price rule for product A (assume the list price is $100) which will give user $25 off the list price for each one of product A, if the user buy more than 5 units of product A. 2. Create two quote items for product A. One has quantity 1 while the other has quantity 6. The subtotal of the first quote item should be $100. However, the subtotal of the 2nd quote item should be 75*6. It will show you 100*6 because of the bug. If the 100*6 is shown, the price rule is not taken into account. If you don't see the problem, you can simply add the item to the shopping cart. The result of quote should be the same as the value in the shopping cart . Thanks William > Price rule does not work with quote > ----------------------------------- > > Key: OFBIZ-1432 > URL: https://issues.apache.org/jira/browse/OFBIZ-1432 > Project: OFBiz > Issue Type: Bug > Components: order > Reporter: William Perng > Assignee: Jacques Le Roux > > When setup quote item, the default price is always used regardless price rule. > I think the problem is in the createQuoteItem method of QuoteServices.xml. When the "calculateProductPrice" service is called, the quantity is not passed in. The quantity needs to be set before the "calculateProductPrice" service is called. I suggest to add the following code to line 304 of QuoteServices.xml (base on ver : 566181): <set from-field="parameters.quantity" field="calculateProductPriceMap.quantity"/> -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-1432?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux closed OFBIZ-1432. ---------------------------------- Resolution: Fixed Fix Version/s: Release Branch 4.0 SVN trunk William, You were right, I did not reproduce because I was not using the quantity *in* the price rule. Your suggested change is in trunk rev. 598962 release4.0 598963 Thanks > Price rule does not work with quote > ----------------------------------- > > Key: OFBIZ-1432 > URL: https://issues.apache.org/jira/browse/OFBIZ-1432 > Project: OFBiz > Issue Type: Bug > Components: order > Reporter: William Perng > Assignee: Jacques Le Roux > Fix For: SVN trunk, Release Branch 4.0 > > > When setup quote item, the default price is always used regardless price rule. > I think the problem is in the createQuoteItem method of QuoteServices.xml. When the "calculateProductPrice" service is called, the quantity is not passed in. The quantity needs to be set before the "calculateProductPrice" service is called. I suggest to add the following code to line 304 of QuoteServices.xml (base on ver : 566181): <set from-field="parameters.quantity" field="calculateProductPriceMap.quantity"/> -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
Free forum by Nabble | Edit this page |