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:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user