Needs work
Project:
Commerce coupon percentage
Version:
7.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
1 May 2012 at 21:51 UTC
Updated:
15 Aug 2020 at 08:46 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
pcambraI'd call this a bug report. We should control that kind of stuff by rules, I was pending on a Commerce commit but I'll provide a workaround before that happens.
Comment #2
ajaysolutions commentedOk, that sounds great. Do you know when you'll be able to provide the workaround?
Is there anything we can do or help with in the meantime?
Comment #3
pcambraThe steps for the workaround are:
- Create an event for coupons on line item refresh hook of commerce.
- Move all the refresh elements to that event, instead of using the hook directly so people will have 2 rules, one for redeem and one for refresh.
Related:
#1547440: Kill coupon log entity
#1475118: Rules support for cart line item and order refresh
#1413126: Commerce coupons roadmap
Comment #4
ajaysolutions commentedCould you please explain how we go about implementing that? As it sounds like we really need to be waiting on a patch for this module?
Comment #5
generalconsensus commentedWanted to mention that this is causing problems with taxing as it is being applied to the subtotal pre-discounted subtotal... I would like to open access to the data value of the subtotal order with and without discounts etc. No idea where to start unfortunately.
#3 is rather confusing, pcambra can you elaborate?
Comment #6
generalconsensus commentedI was just recently trying to figure this problem out and I realized that the issue might be that we need a different kind of action for applying a percentage coupon against an order total. This is just the first part we still need for the coupon percentage to be visible and actionable by the rule 'commerce_coupon_action_create_coupon_line_item'. That I have yet to figure out.
Comment #7
generalconsensus commentedOk ignore the above patch. The patch included will allow you to apply percentage coupons just to the subtotal but still requires you to add the item created to the commerce-order:commerce-coupon-order-reference list. Included is the patch and the exported rule I used for it. Let me know what folks think
Here is the exported rule:
Comment #8
MaherSakka commented@ajaysolutions: Did you resolve your problem ?
Comment #9
essbee commentedI like this addition. I far prefer to have the discount applied as part of the totals rather than affecting all individual line items throughout the order.
My only issues is that the taxes, and the ex-tax subtotal dont reflect the discount.
So i have
Subtotal $100
Tax (10%) $10
Discount (20%) -$22
Total $88
The total is correct and the discount is correct but the tax amount is wrong as it no longer reflects 1/11 of the final total
It should be
Discount -$22
Subtotal $80
Tax $8
Total $88
Does anyone know how I reorder the items and push the tax calculation to the correct spot
Comment #10
pcambraThe patch above in #7 is really hard to review as it has a lot of changes regarding spacing and it needs a reroll.
Anyways, I don't think that we should just remove the pct discount per line item to move it to order basis, it should be at most an option there.
Comment #11
essbee commentedI'm not sure on the whole discount per line item. Would definitely like to see it as at minimum and option, and to be honest I think it makes more sense to be the default option.
I really can't think of a receipt/invoice that I have received where a coupon percentage discount was applied throughout on each line item. The norm seems to be a single line item stating the discount amount. That is unless it is a coupon that applies to a specific set of products - but thats a whole other kettle of fish.
Comment #12
arun_ms commentedHello all,
i am also having the same problem. I dont want to include shipping cost in coupon calculation. Can anyone please suggest me a solution.
Thanks all
Comment #13
pcambraRelated #1825886: Add rules actions for applying discounts to prices with VAT included
Comment #14
mrpeanut commented@generalconsensus I applied your patch and tried to import your rule, but am getting this error:
I, too, would like to apply the discount to the order total, not the individual line items. Are you still doing that?
Comment #15
yatil commentedHi there,
good to see that this is a topic here. I find the display rather confusing.
The prices are displayed with discount applied (33,90€) but then the Subtotal (Zwischensumme) is back referring to the original price point (but this time without VAT), then subtracting the discount again, adding VAT and Shipping.
As far as I can see it makes the correct math, I’d just like to see the full price in the individual rows instead of the discounted one.
Cheers, Eric
Comment #16
yatil commentedOh, just found out you can ignore the discount by editing the view, select a price field, chose price by components from the drop down and check base price and VAT.
Comment #17
avpaderno