Our current project has the requirement to let users pick up items in store. An order can have items that can be collected and items that can be shipped. The customer has a choice in checkout whether they want to collect (only items that can be collected) and ship other items or ship all items.
I have been researching the best way of doing this and from what I can see extending the FixedRateShipping Provider that comes with FastTrack. Here is what I have ended up with:
My new shipping provider shows up fine in the Gateway Providers page:
The problem I have is:
The /checkout/ship-rate-quote/ shipping method dropdown doesn't populate (the Model.ShippingQuotes collection is empty).
I had originally removed all Shipping Countries then added just UK. This seemed to work fine. But after your suggestion I tried to add "Everywhere Else" and got the following error:
Can you step through the code in your provider using the Visual Studio debugger as the error is occurring in your provider and not Merchello as such. Look specifically at the method ToShipGatewayProviderDisplay and I think that should help you locate the source of the exception.
Custom Shipping Provider
Our current project has the requirement to let users pick up items in store. An order can have items that can be collected and items that can be shipped. The customer has a choice in checkout whether they want to collect (only items that can be collected) and ship other items or ship all items.
I have been researching the best way of doing this and from what I can see extending the FixedRateShipping Provider that comes with FastTrack. Here is what I have ended up with:
My new shipping provider shows up fine in the Gateway Providers page:
The problem I have is:
Here is a screencast - https://www.screencast.com/t/5SJL5QHvX2
Can anyone help please?
Have you configured the
Shipping Countries
in the Shipping Providers & Methods tab of Gateway Providers?Check the browser console for script errors also which will help lead you toward the source of the problem.
Simon
I think I have narrowed it down to this call:
This returns an empty collection so it must find any shipping gateway providers for the country?
To answer what I think you are asking - yes, it does return Gateway providers configured for the selected country.
Cheers for the quick reply Simon.
I had originally removed all Shipping Countries then added just UK. This seemed to work fine. But after your suggestion I tried to add "Everywhere Else" and got the following error:
Exception Details: https://pastebin.com/BvbpamuX
Any ideas?
Hi Brendan,
Can you step through the code in your provider using the Visual Studio debugger as the error is occurring in your provider and not Merchello as such. Look specifically at the method
ToShipGatewayProviderDisplay
and I think that should help you locate the source of the exception.Cheers, Simon
is working on a reply...