We need to support shipping fees too, as already annotated by a todo comment in code. I'll provide a patch.

Please note, that currently shipping adjustments cannot be taxed, therefore many people are using patches from this issue: #2874158: Support taxing the shipping cost

imho it's too unclear now, how the final implementation will look like. By now it seems to be a not as easy to identifiable order wide tax. We'd have to fiddle that into the shipping order item.

Let's keep this clean until there's an official solution to taxing shipping fees in Commerce. I've added a @todo comment for that. I'll rather go and fix the shipping taxing issue in a custom module in the meantime

A related question is, if we also have to deal with order-wide taxes and promotions... It seems not because I've tried a coupon, which is a fixed amount off the order subtotal condition, and it still seems to be spread across the order items. So as it seems, there's no real order-level tax and discount adjustment!?

CommentFileSizeAuthor
#4 3013427-3.patch2.17 KBagoradesign
#2 3013427-2.patch1.48 KBagoradesign

Comments

agoradesign created an issue. See original summary.

agoradesign’s picture

StatusFileSize
new1.48 KB
agoradesign’s picture

Issue summary: View changes
agoradesign’s picture

StatusFileSize
new2.17 KB

new patch, forgot to set the order item type before

agoradesign’s picture

Status: Active » Needs review
tuutti’s picture

I'm kinda hesitant to commit this because of the issue you mentioned, which is also why I originally chose not to include this feature.

tuutti’s picture

... but on the other hand, not adding this now might cause some problems in the future (like double shipping fees). Assuming that shops have made their own implementations for this and then we suddenly commit this.

agoradesign’s picture

I'm voting for including it. It reflects the the current state of commerce and commerce_shipping. Currently there are shipping adjustments, which we will map to shipping_fee order items, but officially there's no way to put a tax on it. As soon there is one, we have to react on this. What we have here, is the base we'll need anyway

So either way, if you need taxing on shipping adjustments, you have to find a custom workaround or rely on a patch, in both cases the devs must be aware that there might be related problems on other places. So they need to have a sharp eye on payment gateways like this one, where so much information is collected.

Suddenly committing this on a later point and causing double fee problems could of course be another argument for committing this asap, but especially as this module does not have a tagged release, I wouldn't care too much about these things, but of course it's great to consider such facts already in an early stage.

If you'd ask me, I'd do two things: committing this and opening a separate issue about collecting VAT on shipping items and postpone that on the referenced commerce_shipping issue. And if someone gets really motivated, he/she can provide a patch there based on an assumed feature provided by a specific patch in commerce/commerce_shipping

  • tuutti committed 84af4cd on 8.x-1.x
    Issue #3013427 by agoradesign: Support shipping fees
    
  • tuutti committed fda38fd on 8.x-1.x authored by agoradesign
    Issue #3013427 by agoradesign: Support shipping fees
    
tuutti’s picture

Status: Needs review » Fixed

I agree. Thanks again!

agoradesign’s picture

You're welcome :)

PS: I like that new getOrderItemsOfType() -> will refactor my custom code that adds the VAT on the shipping item to use this :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.