Support » Plugin: WooCommerce » Assign Shipping Class Specific Shipping Method

  • Resolved troyw2015

    (@troyw2015)


    Hi team,
    I have been racking my brain for a week, trying to figure out how I can assign a specific Shipping Class, to a specific Shipping Method.
    The reason for this, is because I have 2 products which come from 2 different warehouses. One product comes from Sydney, Australia and the Other comes from Melbourne, Australia.

    If a customer buys the product located in Sydney, I want it to choose the Shipping Method I have created with my Sydney courier.
    If the customer buys the product located in Melbourne, I want it to choose the Shipping Method I have created with my Melbourne Courier.

    I apologise if this is a dumb question and I’m sure the answer must be staring me in the face, but I can’t seem to get it?

    Thanks in advance.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Shaun Kuschel a11n

    (@shaunkuschel)

    Automattic Happiness Engineer

    Hey @troyw2015,

    This is actually a lot more complicated that it may seem, as most shipping methods rely on a single “origin” location and WooCommerce only shows shipping methods if they can be applied to all products in the cart.

    Because of this, one of the most important questions in a situation like this is what do you want to have happen if a customer attempts to purchase items from both locations? Should the site allow it but calculate rates from each warehouse individually and combine them into a single shipping cost? Should the site prevent customers from being able to purchase from both warehouses in a single order? Or something else?

    Thread Starter troyw2015

    (@troyw2015)

    Hey Shaun,
    I would prefer that the website calculate both rates, however I suspect that this is where it might become difficult.
    So if it makes things easier, I would be happy enough to throw a warning message advising the customer that the two products must be ordered separately.

    Plugin Support Shaun Kuschel a11n

    (@shaunkuschel)

    Automattic Happiness Engineer

    Hey @troyw2015,

    The best way to approach this scenario would be to use a plugin that can split the cart contents in separate groups for each of the warehouse locations. For this, I recommend taking a look at the Advanced Shipping Packages plugin, as I’ve used it extensively and it will definitely work as you need (and create a much better experience for your customers).

    As an example, I threw this together on one of my test sites using two shipping methods (one for each courier) and two instances of Flat Rate shipping (one for each courier that only has rates added for the associated shipping class), and created two rules in Advanced Shipping Packages that group products by each shipping class and exclude the Flat Rate method for the other warehouse (leaving only the method for the applicable courier):

    https://d.pr/i/GakZZh

    Plugin Support gabrielfuentes

    (@gabrielfuentes)

    Since it’s been a while since we last heard back from you, I’m going to mark this thread resolved.

    Hopefully, you were able to find a solution to your problem! If you have further questions, please feel free to open a new topic.

    Cheers! 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.