Okay so here’s the thing. I have four products in my store. (4 types of products specifically). Each product has a different shipping method associated with it.
This product is a high-priced product, so I offer ‘Free Shipping’. Quite simple, no hassle of adding shipping rates.
An associate organization supplies Product B, so I have to charge a ‘Flat Rate’ fee (the same amount they charge me) to ship their product.
Product C is supplied by an external organization as well, but they prefer collecting ‘Cash on Delivery’.
This one’s quite a popular product. I use UPS to ship it across the country. Thus, I have to charge ‘UPS Shipping’ rates to ship product D.
Now, these settings are quite clear… in my head. But quite difficult to set up in WooCommerce.
You ask why? (Clearly you haven’t used WooCommerce)
Shipping Methods in WooCommerce
In WooCommerce, customers have an option to pick the shipping method, for all products in an order. A single option. Which is terrible. Terrible. Because if my customers pick products A, B, and D, I can’t apply different shipping methods, for these different products. The customer gets to pick the one they want.
And out of ‘Free’, ‘Flat Rate’ and ‘UPS’, which do you think the customer would pick?!
I love using WooCommerce, and I do not want to switch to another e-Commerce plugin. I just want to resolve this one, tiny, but extremely important issue!
Per Product Shipping Method in WooCommerce
The ideal solution, and quite an obvious one, would be to set shipping methods as per the products picked.
So if a customer picked product A and D, the shipping cost would be $0 for product A, and the UPS rate for product D.
If a customer picked B and D, the shipping cost would be the flat rate for B + the UPS rate for D.
Quite simple right? But then how do I set this up. My friend, Aparna, here at WisdmLabs gave me a solution. She said this was quite achievable, and chalked out a plan for the solution.
Here’s her idea.
Disallow Option to Pick Shipping Method in WooCommerce
To ensure that different shipping methods are applied for different products in WooCommerce, I have to first disallow customers from picking the shipping method they would prefer. (Well, that’s understood. I have fixed shipping methods for products, I cannot allow customers to choose).
Associate WooCommerce Products with Shipping Methods
Next, there has to be an option to associate products with shipping methods, so that the appropriate cost gets applied. For example, It’s simple for product B. I can set a shipping class for the product, and then set a flat rate for the shipping class.
Aparna said, this idea could help me with other products as well. I would need a settings option, where I would have to associate shipping classes with shipping methods.
Cool. Seems logical. I‘ll try that. (She’d have to help me with the code too 🙂 )
Calculate WooCommerce Per Product Shipping Cost
The final step, and of course the most important one, would be to calculate the total shipping cost for the products in my customer’s cart. For this, I’d have to fetch the shipping class for the product, and then get the associated shipping method, and then calculate the shipping cost.
All this is possible because WooCommerce provides the adequate hooks and filters. I’m assured of that, because Aparna did provide me with the filters. I’ll be trying out this solution, but I want you rooting for me. You could suggest features or point out a better solution. If I can make this ‘Per Product Shipping Methods’ for WooCommerce (that’s what I’m calling it) plugin work well, I’d be sure to offer it to you as well 🙂
Manjusha Chandrashekhar Aklujkar :
I also have similar requirement… Using Shiprocket, Printrove & WCFM…. Not sure how to get different Shipping Methods for Printrove products & other store products which will be shipped via Shiprocket. I’ll be really grateful if you can guide me.
so ??? did you achieve it ? i’m very interested in a solution too !!