cancel
Showing results for 
Search instead for 
Did you mean: 

Colorado retail delivery fee

Colorado retail delivery fee

I'm wondering if anyone has worked on implementing the Colorado Retail Delivery Fee in Magento 2? The deadline is approaching in less than two weeks, and the only discussion I've seen is this post in the Adobe forums where someone was directed to *this* forum, but no follow-up and no discussion over here: https://community.adobe.com/t5/the-lounge-discussions/colorado-shipping-fee-magento/td-p/12989878

 

Hoping that someone has some ideas on how to implement this!

17 REPLIES 17

Re: Colorado retail delivery fee

Just wanted to bump this topic up. Is there anyone who sells to Colorado? If so, how are you planning to be compliant with the new Colorado Retail Delivery Fee in Magento?

Re: Colorado retail delivery fee

Hello @cbdpeter 

 

Yes I have some ideas to implement the delivery fee. Can we discuss in PM? 

Best regards
madhuboots

Re: Colorado retail delivery fee

Also interested in this discussion. We have a client that uses Avalara Avatax and it appears they're setting up a custom tax rule that will assign $.27 to the order when it passes through taxes at the shopping cart or invoicing IF a custom line item (that we are setting at $0.00) is found in the order. 

 

The issue I'm having trouble with is figuring out how to add a line item to the order after the shipping address on the order has been determined. That normally happens during checkout, so it seems like we'd either have to somehow force shipping address to be determined before checkout - which seems like a huge pain - or to add the line item during checkout which also seems deceptive, confusing and also would be a huge pain. Not even sure if either of those are viable solutions.

Re: Colorado retail delivery fee


@BVBAccelerate wrote:

Also interested in this discussion. We have a client that uses Avalara Avatax and it appears they're setting up a custom tax rule that will assign $.27 to the order when it passes through taxes at the shopping cart or invoicing IF a custom line item (that we are setting at $0.00) is found in the order. 

 

The issue I'm having trouble with is figuring out how to add a line item to the order after the shipping address on the order has been determined. That normally happens during checkout, so it seems like we'd either have to somehow force shipping address to be determined before checkout - which seems like a huge pain - or to add the line item during checkout which also seems deceptive, confusing and also would be a huge pain. Not even sure if either of those are viable solutions.


I don't think adding it during checkout would be deceptive - we have another (non-Magento) site that uses AvaTax, and that's how we're doing it there.

 

If you have any pointers on how to add the custom line item to the order (as well as prevent it from being removed), or how to conditionally add it during checkout based on shipping address, I would appreciate it.

 

Also note that the item should only be added for orders where tax is being assessed, so if the person is a tax-exempt customer or their order is entirely non-taxable items, then they shouldn't be assessed the fee.

Re: Colorado retail delivery fee

Well, for starters one would need to add an item to their store that is for this fee / tax. Avalara is actually already developing functionality so that on their backend they have a custom tax code for this fee. They're suggesting to their clients that they apply this tax code to a new product/sku that they create in their own systems with a $0.00 price. I'm assuming what's happening there is that on their back end it's applying the appropriate tax for that sku. If one doesn't use Avalara they'd probably just want to create a product/sku with that $.27 price.

 

To get it into the cart, I think one would have to develop a custom extension that includes a plugin that processes after the shipping address information is saved. Similar to here (https://magento.stackexchange.com/questions/182431/magento-2-how-to-get-an-event-after-shipping-addr...) but hooking in after (file for reference https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Checkout/Model/ShippingInforma...). If this finds that the shipping address is to Colorado, check the cart for the above mentioned product, and if it is not there, add it (something like this https://meetanshi.com/blog/programmatically-add-product-to-cart-in-magento-2/).

 

To prevent them from being able to remove it one would have to update the template files for line items on the cart page and checkout page and include the product SKU/ID or some identifier as a class on the container for the line item (https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Checkout/view/frontend/templat... and https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Checkout/view/frontend/templat...). Then, using CSS or a conditional in the template itself, one would hide the buttons that allows users to remove that item from their cart.

 

As for preventing this from showing up for a customer that isn't required to pay sales tax, I'm not sure how that would be handled. I'm pretty sure for our client Avalara handles the tax exemptions, so I'm hoping that they'd recognize not to charge that tax in that case (even if the item is present in the cart). But, I'm not sure if Magento natively handles tax exemption as well in some way. If they do, and someone is using that, they'd want to check for this in the plugin I mentioned developing above that would be adding the line item to the cart.

 

This is just my guess. I'm not 100% sure if this would work out. But just based on the research I've been doing this is how I'd approach it.

Re: Colorado retail delivery fee

you can direct PM me.

Re: Colorado retail delivery fee

EDITED: This did not work since it added 27 cents for each different item in cart

I'm sure this is not the best way, but I'm using this fix until I find an extension. I set up a 'Shopping Cart Price Rule'. If the 'State/Province' is Colorado apply a 'Fixed amount discount' with a value of -.027 (that's negative .27).  Add 'Colorado Retail Delivery Fee' as the label.

 

The only downside is the cart displays "Discount (Colorado Retail Delivery Fee)", but it does correctly add 27 cents to the order. 

Re: Colorado retail delivery fee

What version of Magento do you have? I tried the same thing but it doesn't allow me to add negative numbers to that field 

Re: Colorado retail delivery fee

It amazes me that we are over half way through the month and we can't find a solution anywhere for this. I spoke with my developer and he stated I am the only customer he has even asking about it.

 

It is going to cost us WAY more to implement that the $.27/order will add up to. I am guessing Avalara is going to charge the standard $50/month to file the return. That will in itself cost more than the total fee I think.

 

Sigh...