2

I am creating a module for a 3rd party rating for Magento. I only need the rates to show in the cart checkout and there is no label creation, tracking, pickup, etc for this carrier. It will send out an XML request as a post through the HTTP/ClientFactory then parse the response to show the rates returned.

My question is, is there a requirement for this to extend AbstractCarrierOnline, like UPS, USPS, and FedEx do, or can I leave it as extending AbstractCarrier? I currently have it is working as an AbstractCarrier but when I've tried to convert it to AbstractCarrierOnline, it constructs it just fine but never hits the collectRates() method and I don't see any errors anywhere and just says that it is not available. The one main downside I can see is that the Online includes the set and get for CachedQuotes.

1
  • Not sure what I was missing but it is working now. Just completely got the Offline carrier working and copied code over and not the Online carrier works.
    – Damon
    Commented May 16, 2018 at 21:39

1 Answer 1

2

You don't need to set shipping module to Online Shipping module, cause You don't need to get (API or etc) rates. Also, your module does not provide a tracking number. It's simply Offline shipping.

The Magento_OfflineShipping module implements the shipping methods which do not involve a direct interaction with shipping carriers, so called offline shipping methods.

Reference: MagentoDocs

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.