Welcome to Vortx Community Forum, where you can ask questions and receive answers from the staff at Vortx and other members of the community.

If you had a user account on our previous forums website, you will need to register a new account here.

Learn more about...


Shipping on Orders with Recurring and Non-Recurring items

We're using ML and are having an issue with orders that contain recurring items. All our recurring items have free shipping. When a user checks out with a recurring item and a non-recurring item, they are being charged shipping for the original order on the recurring item the second time around. So say they buy a yearly recurring item A with free shipping and non-recurring item B with $10 shipping. When the recurring item is sent through the following year, the customer is being charged $10 shipping when they shouldn't be charged anything. Is this in the configuration somewhere? Can anyone point me to where the issue might be occuring? Thanks.

asked Mar 30, 2015 in ML by JMcConahie (135 points)
Quick update. It appears that when a free shipping recurring item and a non-free shipping non-recurring item are in the same cart, the recurring item gets assigned the ShippingMethodID of the non-recurring item. This means that when the shipping is calculated in the total that is sent to authorize.net, it is calculated with the wrong ShippingMethod, hence why it is no longer free shipping. Still looking into a fix.
Have you tried setting the recurring product variant to "Is ship separately"? I do not know if that will do it, but it is worth a try.
Yeah, I tried that with no luck :(
Sounds like either code modifications would be necessary, or perhaps wording on the recurring product pages to the effect of: "To ensure you receive free shipping on this recurring product, please order it separately from other products."
I'm currently stepping through the code trying to find where the ShippingMethodID is set in the shopping cart after a product is added to the cart. It doesn't look like the ShippingMethodID is initially set when the product is first added to the cart, so it's getting set somewhere after that, and that may be where the problem is occuring.
I imagine the code will get messy considering the complexity of the shipping code. You may want to consider a hard coded solution to the specific issue such as a db trigger (or file code) setting the free shipping method explicitly for the free ship recurring orders.
So what I ended up doing is creating a copy of the Total() function in the ShoppingCart class that takes an additional bool argument (isRecurringOrder). Inside that function, instead of calling the ShippingTotal() function that determines shipping costs, I just set the dShippingTotal variable to zero for all recurring orders.

Then I replaced the call to the original Total() function used for the authorizenet command function in the Gateway.cs file with this new method.

This solution works for me since all of our recurring orders have free shipping. Also, if we needed to add shipping in the future for a recurring product, we could just build the shipping into the price of the product.

Please log in or register to answer this question.