ShoppingCart.addOrIncreaseItem
------------------------------ Key: OFBIZ-2105 URL: https://issues.apache.org/jira/browse/OFBIZ-2105 Project: OFBiz Issue Type: Improvement Components: order Affects Versions: SVN trunk Environment: Windows XP Reporter: Stephen Rufle Fix For: SVN trunk Adding a parameter to ShoppingCart.addOrIncreaseItem(... , boolean checkItemsExists) this allows for the adding of a new line item instead of just increasing the 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-2105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stephen Rufle updated OFBIZ-2105: --------------------------------- Attachment: 2008-12-23_001_shoppingcart_package.patch Adds checkItemsExists parameter to ShoppingCart.addOrIncreaseItem . I also changed calls to this method to default to true which was the previous default behavior. There was a dev list thread about white space issues, but I removed those from my current patch Check for tab to spaces issues in applications\order\src\org\ofbiz\order\shoppingcart\ShoppingCart.java applications\order\src\org\ofbiz\order\shoppingcart\ShoppingCartEvents.java applications\order\src\org\ofbiz\order\shoppingcart\ShoppingCartHelper.java applications\order\src\org\ofbiz\order\shoppinglist\ShoppingListEvents.java applications\order\src\org\ofbiz\order\shoppinglist\ShoppingListServices.java > ShoppingCart.addOrIncreaseItem > ------------------------------ > > Key: OFBIZ-2105 > URL: https://issues.apache.org/jira/browse/OFBIZ-2105 > Project: OFBiz > Issue Type: Improvement > Components: order > Affects Versions: SVN trunk > Environment: Windows XP > Reporter: Stephen Rufle > Fix For: SVN trunk > > Attachments: 2008-12-23_001_shoppingcart_package.patch > > > Adding a parameter to ShoppingCart.addOrIncreaseItem(... , > boolean checkItemsExists) this allows for the adding of a new line item instead of just increasing the 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-2105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12659298#action_12659298 ] David E. Jones commented on OFBIZ-2105: --------------------------------------- Why not use the ShoppingCart.addItemToEnd or addItem methods, neither of which do this check. There's no reason to add a parameter to do that. Also, in general I am 100% against adding parameters to that method and would in fact like to see that method signature (addOrIncreaseItem and some similar ones too) super-simplified as right now it is ridiculously large and a bad design that evolved in bad ways and hasn't been cleaned up with. Of course, that doesn't really matter for this, the point is the functionality already exists. If it doesn't already exist, then it should be implemented using a better design to not perpetuate this unfortunate direction. If there is something not handled by current method please respond, otherwise we'll close this issue. > ShoppingCart.addOrIncreaseItem > ------------------------------ > > Key: OFBIZ-2105 > URL: https://issues.apache.org/jira/browse/OFBIZ-2105 > Project: OFBiz > Issue Type: Improvement > Components: order > Affects Versions: SVN trunk > Environment: Windows XP > Reporter: Stephen Rufle > Fix For: SVN trunk > > Attachments: 2008-12-23_001_shoppingcart_package.patch > > > Adding a parameter to ShoppingCart.addOrIncreaseItem(... , > boolean checkItemsExists) this allows for the adding of a new line item instead of just increasing the 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-2105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12659301#action_12659301 ] Stephen Rufle commented on OFBIZ-2105: -------------------------------------- k, I will look at addItemToEnd to see if it does what I need. -- Stephen P Rufle [hidden email] H1:480-626-8022 H2:480-802-7173 Yahoo IM: stephen_rufle AOL IM: stephen1rufle > ShoppingCart.addOrIncreaseItem > ------------------------------ > > Key: OFBIZ-2105 > URL: https://issues.apache.org/jira/browse/OFBIZ-2105 > Project: OFBiz > Issue Type: Improvement > Components: order > Affects Versions: SVN trunk > Environment: Windows XP > Reporter: Stephen Rufle > Fix For: SVN trunk > > Attachments: 2008-12-23_001_shoppingcart_package.patch > > > Adding a parameter to ShoppingCart.addOrIncreaseItem(... , > boolean checkItemsExists) this allows for the adding of a new line item instead of just increasing the 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)
The reason for my request was that in
ShoppingCartHelper.addToCart(...) line 235 calls addOrIncreaseItem. Is there a better way to create Items and add them to a ShoppingCart? David E. Jones (JIRA) wrote: > [ https://issues.apache.org/jira/browse/OFBIZ-2105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12659298#action_12659298 ] > > David E. Jones commented on OFBIZ-2105: > --------------------------------------- > > Why not use the ShoppingCart.addItemToEnd or addItem methods, neither of which do this check. > > There's no reason to add a parameter to do that. Also, in general I am 100% against adding parameters to that method and would in fact like to see that method signature (addOrIncreaseItem and some similar ones too) super-simplified as right now it is ridiculously large and a bad design that evolved in bad ways and hasn't been cleaned up with. Of course, that doesn't really matter for this, the point is the functionality already exists. If it doesn't already exist, then it should be implemented using a better design to not perpetuate this unfortunate direction. > > If there is something not handled by current method please respond, otherwise we'll close this issue. > > >> ShoppingCart.addOrIncreaseItem >> ------------------------------ >> >> Key: OFBIZ-2105 >> URL: https://issues.apache.org/jira/browse/OFBIZ-2105 >> Project: OFBiz >> Issue Type: Improvement >> Components: order >> Affects Versions: SVN trunk >> Environment: Windows XP >> Reporter: Stephen Rufle >> Fix For: SVN trunk >> >> Attachments: 2008-12-23_001_shoppingcart_package.patch >> >> >> Adding a parameter to ShoppingCart.addOrIncreaseItem(... , >> boolean checkItemsExists) this allows for the adding of a new line item instead of just increasing the quantity. >> > > -- Stephen P Rufle [hidden email] H1:480-626-8022 H2:480-802-7173 Yahoo IM: stephen_rufle AOL IM: stephen1rufle |
It's not tough... just write a little code. -David On Dec 26, 2008, at 7:16 PM, Stephen Rufle wrote: > The reason for my request was that in > ShoppingCartHelper.addToCart(...) line 235 calls addOrIncreaseItem. > > Is there a better way to create Items and add them to a ShoppingCart? > > > David E. Jones (JIRA) wrote: >> [ https://issues.apache.org/jira/browse/OFBIZ-2105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12659298 >> #action_12659298 ] >> >> David E. Jones commented on OFBIZ-2105: >> --------------------------------------- >> >> Why not use the ShoppingCart.addItemToEnd or addItem methods, >> neither of which do this check. >> >> There's no reason to add a parameter to do that. Also, in general I >> am 100% against adding parameters to that method and would in fact >> like to see that method signature (addOrIncreaseItem and some >> similar ones too) super-simplified as right now it is ridiculously >> large and a bad design that evolved in bad ways and hasn't been >> cleaned up with. Of course, that doesn't really matter for this, >> the point is the functionality already exists. If it doesn't >> already exist, then it should be implemented using a better design >> to not perpetuate this unfortunate direction. >> >> If there is something not handled by current method please respond, >> otherwise we'll close this issue. >> >> >>> ShoppingCart.addOrIncreaseItem >>> ------------------------------ >>> >>> Key: OFBIZ-2105 >>> URL: https://issues.apache.org/jira/browse/OFBIZ-2105 >>> Project: OFBiz >>> Issue Type: Improvement >>> Components: order >>> Affects Versions: SVN trunk >>> Environment: Windows XP >>> Reporter: Stephen Rufle >>> Fix For: SVN trunk >>> >>> Attachments: 2008-12-23_001_shoppingcart_package.patch >>> >>> >>> Adding a parameter to ShoppingCart.addOrIncreaseItem(... , >>> boolean checkItemsExists) this allows for the adding of a new line >>> item instead of just increasing the quantity. >>> >> >> > > -- > Stephen P Rufle > [hidden email] > H1:480-626-8022 > H2:480-802-7173 > Yahoo IM: stephen_rufle > AOL IM: stephen1rufle > |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-2105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12659321#action_12659321 ] Jacques Le Roux commented on OFBIZ-2105: ---------------------------------------- I replaced tabs by 4 spaces in revision: 729621 in applications\order\src\org\ofbiz\order\shoppingcart\ShoppingCartEvents.java applications\order\src\org\ofbiz\order\shoppingcart\ShoppingCartHelper.java applications\order\src\org\ofbiz\order\shoppinglist\ShoppingListEvents.java applications\order\src\org\ofbiz\order\shoppinglist\ShoppingListServices.java Note that I did no find any tabs in applications\order\src\org\ofbiz\order\shoppingcart\ShoppingCart.java > ShoppingCart.addOrIncreaseItem > ------------------------------ > > Key: OFBIZ-2105 > URL: https://issues.apache.org/jira/browse/OFBIZ-2105 > Project: OFBiz > Issue Type: Improvement > Components: order > Affects Versions: SVN trunk > Environment: Windows XP > Reporter: Stephen Rufle > Fix For: SVN trunk > > Attachments: 2008-12-23_001_shoppingcart_package.patch > > > Adding a parameter to ShoppingCart.addOrIncreaseItem(... , > boolean checkItemsExists) this allows for the adding of a new line item instead of just increasing the 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-2105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12663784#action_12663784 ] Stephen Rufle commented on OFBIZ-2105: -------------------------------------- I think you can close this, since David suggested using addItem > ShoppingCart.addOrIncreaseItem > ------------------------------ > > Key: OFBIZ-2105 > URL: https://issues.apache.org/jira/browse/OFBIZ-2105 > Project: OFBiz > Issue Type: Improvement > Components: order > Affects Versions: SVN trunk > Environment: Windows XP > Reporter: Stephen Rufle > Fix For: SVN trunk > > Attachments: 2008-12-23_001_shoppingcart_package.patch > > > Adding a parameter to ShoppingCart.addOrIncreaseItem(... , > boolean checkItemsExists) this allows for the adding of a new line item instead of just increasing the 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-2105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux closed OFBIZ-2105. ---------------------------------- Resolution: Invalid Assignee: David E. Jones > ShoppingCart.addOrIncreaseItem > ------------------------------ > > Key: OFBIZ-2105 > URL: https://issues.apache.org/jira/browse/OFBIZ-2105 > Project: OFBiz > Issue Type: Improvement > Components: order > Affects Versions: SVN trunk > Environment: Windows XP > Reporter: Stephen Rufle > Assignee: David E. Jones > Fix For: SVN trunk > > Attachments: 2008-12-23_001_shoppingcart_package.patch > > > Adding a parameter to ShoppingCart.addOrIncreaseItem(... , > boolean checkItemsExists) this allows for the adding of a new line item instead of just increasing the 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 |