Closed Web10-Joris closed 5 months ago
Hey 👋
Before I tag a release changing some code which may or may not fix it, would you be able to update some code in your vendor
directory and let me know if it fixes it?
In vendor/duncanmcclean/simple-commerce/src/UpdateScripts/v6_0/UpdateClassReferences.php
, would you be able to....
->whereNotNull('gateway')
to ->whereNotNull('data->gateway')
->whereNotNull('shipping_method')
to ->whereNotNull('data->shipping_method')
Then run php please sc:run-update-scripts
and let me know if that fixes it? If it does, I'll tag a new release, otherwise, I'll take a deeper look later (need to get back to my day job now 😅)
Yes, this approach is working. Thank you for the quick response! I'll leave the issue open so that you can update this on a later moment :)
I think I may have found another issue related to database orders. I'll open a new issue for this. There's no rush, just wanted to let you know (maybe it is a problem from my side?).
Released as part of v6.0.4.
Description
I'm using database orders and running the update script command of v6 shows me this error (see below).
Looks like it is trying to find the shipping_method column inside the orders table, but there was never a migration to make this column. The shipping method class reference is stored inside the data column like this:
See full error here:
Steps to reproduce
Environment
Environment Application Name: XXXX Laravel Version: 10.43.0 PHP Version: 8.1.5 Composer Version: 2.5.5 Environment: local Debug Mode: ENABLED URL: localhost/ Maintenance Mode: OFF
Cache Config: NOT CACHED Events: NOT CACHED Routes: NOT CACHED Views: NOT CACHED
Drivers Broadcasting: log Cache: statamic Database: mysql Logs: stack / single Mail: smtp Queue: sync Session: file
Simple Commerce Currencies: EUR, EUR, EUR, EUR Gateways: Mollie Repository: Customer: DuncanMcClean\SimpleCommerce\Customers\EloquentCustomerRepository Repository: Order: DuncanMcClean\SimpleCommerce\Orders\EloquentOrderRepository Repository: Product: DuncanMcClean\SimpleCommerce\Products\EntryProductRepository Shipping Methods: Pallet Zending, International Tax Engine: DuncanMcClean\SimpleCommerce\Tax\Standard\TaxEngine
Statamic Addons: 6 Antlers: runtime Stache Watcher: Enabled Static Caching: Disabled Version: 4.47.0 PRO
Statamic Addons aerni/advanced-seo: 2.4.3 appswithlove/statamic-one-click-content-translation: 4.35.0 duncanmcclean/simple-commerce: 6.0.3 heidkaemper/statamic-toolbar: 1.1.2 statamic-rad-pack/runway: 6.1.0 statamic/collaboration: 0.8.1