0

Drupal commerce shipping module. I want to set a tax rate on a shipping price so that the shipping price with its tax component is integrated in the subtotal of the line items. Guess it has to be done with rules but I don't know where to start. Any help is very welcome!

2

I guess that, as the creator and maintainer of the Drupal commerce shipping, I should bid in.

The short answer is that right now, this is actually possible without creating the functionality yourself from scratch. The issue was raised in the Drupal commerce shipping queue (by yourself?). Anyways as stated there, this is something that should be handled by commerce core, which right now is lacking a way to apply taxes to line items which aren't the product line items.

I have a chat with Ryan about the problem, where we agreed that the product line item is a special case, since a lot of price handling is tied to the product, where all other line items, shouldn't have a relationship like that. The issue has been raised on the Drupal commerce issue queue, which I believe you are aware of.

If you don't have the ability to create the code for this yourself, your best bet is to wait for some one to fix it, or buy it.

Update:
This is now built in the Commerce shipping module, by exposing an event in rules that can be used to add taxes on shipping line items.

  • Yes it was me who raised the issue, wasn't sure where this was handled exactly. You're right, my best bet is to wait untill it gets fixed. I appreciate your answer. – JurgenR May 27 '11 at 5:52
1

I have really struggled to get this to work. And since it took me several days, I'm sharing!

I needed to apply NC Sales tax to a Flat Rate Shipping Cost. I did the following:

1) Create NC Sales Tax Rate Condition: Order address component comparison (Shipping state is NC) and Condition: Not line item contains specific product type: Giftcard (no tax on gift cards)

Actions: Apply a tax rate to a line item (commerce-line-item)

2) Create New Shipping Tax Type called "Shipping Tax". Event: Calculating the sell price of a product

Elements: NONE

3) Create NC Shipping Sales Tax Rate called "Shipping Sales Tax" Condition: Order address comparison (Shipping state is NC)

Actions: Apply a tax rate to a line item (commerce-line-item)

4) Create New Shipping Calculation Rule called "Calculate NC Sales Tax" Event: Calculating a shipping rate

Actions: rule: Calculate Shipping Sales Tax (commerce-line-item)

Subtotal $36.00 NC Sales Tax $1.71 Shipping Sales Tax $0.48 Flat Rate Shipping $10.00 Order total $48.19

Now to just get the Shipping Sales Tax to fall below the Flat Rate Shipping line. :-)

Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.