You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Jacques Le Roux (JIRA)" <ji...@apache.org> on 2013/05/29 22:32:20 UTC

[jira] [Commented] (OFBIZ-4291) No method to remove a promo code from the shopping cart

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

Jacques Le Roux commented on OFBIZ-4291:
----------------------------------------

Thanks Ankit,

2 comments:

e.printStackTrace();
only, is not an option in OFBiz. Please put an explicit Debug.logError() before :)

Also
int index = cart.getAdjustmentPromoIndex(productPromoAction.getString("productPromoId"));
Could be
int index = cart.getAdjustmentPromoIndex(productPromoId);

Else this sounds good to me. I will wait more reviews, tests, opinions and votes.
                
> No method to remove a promo code from the shopping cart
> -------------------------------------------------------
>
>                 Key: OFBIZ-4291
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4291
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: order
>    Affects Versions: Release Branch 10.04
>            Reporter: Glyton Camilleri
>         Attachments: unapplyPromotion.txt, Updated-Ofbiz-4291.patch
>
>
> Hi,
> When working with promotions and promo codes in the shopping cart, it seems not possible to remove _one_ specific promo code from the cart neither through the ShoppingCart and its helpers and services, nor through the ProductPromoWorker.
> ShoppingCart has the method 
> {{addProductPromoCode(String productPromoCodeId, LocalDispatcher dispatcher)}}
> but no method to remove the added PromoCode. Is there any other worker, service or event that can be called to do this? And if not, is there a specifc reason (maybe relating to promotions application rules) for not implementing this?
> Any response is appreciated.
> Thanks

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira