A slightly modified patch from Ankit Jain from a previous work by Nandani Aggarwal for "No method to remove a promo code from the shopping cart" https://issues.apache.org/jira/browse/OFBIZ-4291

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?

Current provided method of dealing with removal of promotions is a so called brute force approach where removing all and adding not to be removed promotions again.

jleroux: 
* in ecommerce no needs to be authentified to be abble to remove a promo code
* I also added a French label

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1493512 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jacques Le Roux
2013-06-16 14:01:56 +00:00
parent fc31563132
commit 8a6e094cd7
@@ -321,6 +321,12 @@ under the License.
<security https="false" auth="false"/>
<response name="success" type="view" value="showPromotionDetails"/>
</request-map>
<request-map uri="removePromotion">
<security https="true" auth="false"/>
<event type="java" path="org.ofbiz.order.shoppingcart.ShoppingCartEvents" invoke="removePromotion"/>
<response name="success" type="view" value="showcart"/>
<response name="error" type="view" value="showcart"/>
</request-map>
<!-- Start Anonymous checkout requests -->
<request-map uri="setCustomer">