Shipping Method Based on Supplier

Hi All,

Hope everyone is well considering the circumstances of the world at the minute.

Does anyone know of a module, or a method to set shipping options based on Supplier or a product Attribute?

In my case, I have multiple drop shippers who charge different prices for delivery, then we also have the stock products which need there own shipping price as well. Anyone have a solution or recommend a module for this?


Hi @Casey

At the risk of this question turning into a shill where developers start plugging their own shipping modules, I may close this within 7-14 days. Having said that, I think you’ll find the Mageside solution I mention in this post of use: Magento 2 Shipping Problems. It’s what I use right now, allowing you to add rules based on variables. It might take you a hot minute to get your head around it all, but it’ll do the job.


That makes sense.

I want to share with you what I found, plus I might need some help understanding!

I found this module and added it to my development site. Disabling all other shipping methods and only enabling this option with the premade examples, appears to work perfectly well.

That said, I am not a developer and struggling to understand the documentation, so maybe someone here can educate me a bit.


Using the guide, I am trying to create a method based on the Assign Inventory\Source. So I created this entry into the shipping module, but it dont work. I believe its an error with the code I entered as I do not fully understand it. Can someone take a quick look and let me know what I am doing wrong?

// First shipping method
addMethod(‘PM_METHOD1’, [
‘title’ => “Standard Shipping”,
‘Enabled’ => $item->product->getSourceItems($sourceItem->source_code == ‘PM’),
‘price’ => 10,

There error I get is “Error Unknown variable $item” so something is wrong on the “Enabled” line. But I do not understand what.


These code-customisation appear to be specific for this module, which I have no experience with I’m afraid. It seems quite a convoluted way of setting up the system. I though you’d get better answers by reaching out to the module supplier.

addMethod('PM_METHOD1', [
'title' => "Standard Shipping",
'enabled' => count(
    array_filter($request->all_items, function ($item) {
        return count(
            array_filter($item->product->getSourceItems(), function ($source_item) {
                return $source_item->source_code == 'PM';
    ) > 0,
'price' => 10,

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.