cancel
Showing results for 
Search instead for 
Did you mean: 

How can i create a module similar to UPS that allows me to book a shipment?

SOLVED

How can i create a module similar to UPS that allows me to book a shipment?

Hi Everyone, 

 

Ive been asked to develop a module for Magento 2 that pulls in shipping prices and allows our customers to book through to our system. 

 

I have managed to follow the tutorial for MageCustomShipping online and adjust the module so that it retrieves our shipping rates and that seems to be working fine. I have therefore now moved onto the booking step.

 

The way i understand it, with the 4 carriers that are currently integrated, the correct way to book a shipment with them is via Orders > Ship > Shipment where there is a shipping options checkbox to "Create Shipping Label" i have looked at the UPS module in magento and cant seem to find out how to activate this option for my custom shipping module or specifically how Magento is linking in to the _sendShipmentRequest. 

 

Could someone possibly point me in the right direction for how i might achieve this or otherwise tell me if im going wrong with my assumption on how to book.

 

Many thanks 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How can i create a module similar to UPS that allows me to book a shipment?

Hello @AMelbye

 

There is one thing you need to take care while creating shipping method.

 

If you are creating online shipping method then you need to extend your carrier to 

Magento\Shipping\Model\Carrier\AbstractCarrierOnline.php

 

where is one method 

 public function isShippingLabelsAvailable()
    {
        return true;
    }

hope it will help you.

 

if work then marks as solution.


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

View solution in original post

3 REPLIES 3

Re: How can i create a module similar to UPS that allows me to book a shipment?

Hello @AMelbye

 

There is one thing you need to take care while creating shipping method.

 

If you are creating online shipping method then you need to extend your carrier to 

Magento\Shipping\Model\Carrier\AbstractCarrierOnline.php

 

where is one method 

 public function isShippingLabelsAvailable()
    {
        return true;
    }

hope it will help you.

 

if work then marks as solution.


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: How can i create a module similar to UPS that allows me to book a shipment?

Thanks, this looks promising, the AbstractCarrierOnline i had missed, ill have a look now and see what happens

Re: How can i create a module similar to UPS that allows me to book a shipment?

@AMelbye

 

if it will help then mark as the solution so it will help someone else

 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer