Closed sstottelaar closed 4 months ago
Can you try changing default_method
to free_shipping
instead?
This did the trick, thanks a lot. Did I miss this from the upgrade guide? My bad.
No, you didn't miss it. I missed adding it to the upgrade guide.
Hi Duncan, this issue remains. I noticed that when implementing this code:
'sites' => [
'default' => [
'currency' => 'EUR',
'shipping' => [
// 'mailbox_shipping' => \App\ShippingMethods\MailboxShipping::class,
'default_method' => \App\ShippingMethods\MailboxShipping::class,
'methods' => [
App\ShippingMethods\MailboxShipping::class => [],
App\ShippingMethods\ParcelShipping::class => [],
],
],
],
],
I get the following error:
So earlier in the issue, I fixed the wrong thing, which led to not defaulting to any shipping method. Now when I try both the class name and the handle, it doesn't work.
Anything I'm missing here?
The default_method
now needs to be the handle of the shipping method, not the FCQN (the fully qualified class name).
So, something like this should work:
'default_method' => 'mailbox_shipping',
If there's something else that's not working when the default shipping method is a handle, please open another issue.
Description
I upgraded to v6 and I ran into an issue that no shipping methods are found. I took all the steps as described in the upgrade guide. Even if I try with the built-in free shipping method I get this error:
My code that defines the shipping methods:
Is there anything missing from the docs or my code that might be causing this issue? I tried clearing cache, dump-autoload etc.
Any help is appreciated!
Steps to reproduce
php please make:shipping-method YourNewShippingMethod
Environment
Environment Application Name: App Laravel Version: 10.38.1 PHP Version: 8.2.15 Composer Version: 2.5.5 Environment: local Debug Mode: ENABLED URL: erw5eowfwv.sharedwithexpose.com Maintenance Mode: OFF
Cache Config: NOT CACHED Events: NOT CACHED Routes: NOT CACHED Views: NOT CACHED
Drivers Broadcasting: log Cache: statamic Database: sqlite Logs: stack / single Mail: smtp Queue: sync Session: file
Simple Commerce Currencies: EUR Gateways: Mollie Repository: Customer: DuncanMcClean\SimpleCommerce\Customers\EntryCustomerRepository Repository: Order: DuncanMcClean\SimpleCommerce\Orders\EntryOrderRepository Repository: Product: DuncanMcClean\SimpleCommerce\Products\EntryProductRepository Shipping Methods: Free Shipping Tax Engine: DuncanMcClean\SimpleCommerce\Tax\Standard\TaxEngine
Statamic Addons: 4 Antlers: runtime Sites: 1 Stache Watcher: Enabled Static Caching: Disabled Version: 4.48.0 PRO
Statamic Addons aerni/font-awesome: 2.0.0 duncanmcclean/simple-commerce: 6.0.5 mattrothenberg/statamic-mapbox-address: 0.7.4 withcandour/aardvark-seo: 3.0.1