This is a follow-up task of #3013427: Support shipping fees, which needs to be postponed, until Commerce (Shipping) is supporting taxing the shipping cost, see #2874158: Support taxing the shipping cost

Until that has landed, feel free to post patches based on patches of the parent issue, or code snippets, how you solve this as a workaround within a custom module :)

CommentFileSizeAuthor
#2 3013645-2.patch6.27 KBagoradesign

Comments

agoradesign created an issue. See original summary.

agoradesign’s picture

Status: Postponed » Needs review
StatusFileSize
new6.27 KB

Now, as the Commerce issue has landed, we can add this long awaited feature. I've raised requirement to Commerce 2.14 - the shipping taxing support was implemented even later afaik, however the data model was already prepared for that and I adjusted the requirment according the functions I'm using in this patch.

This patch is a bit wider in its scope, but still small: besides adding the taxing, I've also refactored the tax collection of normal order items, as since Commerce 2.13 the getAdjustments() and collectAdjustments() functions do have an optional type filter

And I've also added the shipping address as well (by using the collectProfiles() function from Commerce 2.14)

If you want, I can also split this up into several issues, but reviewing is harder than, and each patch needs to be re-rolled after commit of one of the other parts, as all are relating to the same class

agoradesign’s picture

if my proposal in commerce_shipping gets accepted, we can refactor this part a little bit. But we don't have to wait for this...

#3119009: Extend shipping order manager with getRatedShipments() and collectShippingAdjustments()

tuutti’s picture

I'm currently working on 2.x version (https://gitlab.com/tuutti/commerce_klarna_payments/-/merge_requests/6/diffs) of this module and I'm a bit hesitant to commit this to 1.x (it won't be supported anymore once 2.x is released).

I'll port your patch to 2.x later today.

agoradesign’s picture

no problem. didn't know that. hope the patch helps you anyway :)

tuutti’s picture

tuutti’s picture

Status: Needs review » Fixed

This should be fixed in 2.x.

Status: Fixed » Closed (fixed)

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