Trying to create a custom shipping method.
So firstly created the class and used the example. But in the example there is a reference to an Address class which is not in the Data folder of SC anymore.
Could not check compatibility between App\ShippingMethods\CustomShipping::checkAvailability(DoubleThreeDigital\SimpleCommerce\Contracts\Order $order, DoubleThreeDigital\SimpleCommerce\Data\Address $address): bool and DoubleThreeDigital\SimpleCommerce\Contracts\ShippingMethod::checkAvailability(DoubleThreeDigital\SimpleCommerce\Contracts\Order $order, DoubleThreeDigital\SimpleCommerce\Orders\Address $address): bool, because class DoubleThreeDigital\SimpleCommerce\Data\Address is not available
(Also, the documentation class references need updating, it still states 'DuncanMcClean', instead of 'DoubleThreeDigital'.)
I'll give some more info on why I want a custom shipping method in the first place.
I would like to have a fixed shipping price (for example 10$), for any kind of order.
Either the order has 1 item or 20, it should not impact the shipping cost.
Steps to reproduce
Create custom shipping method class.
Assign in the SC config.
Visit the shop checkout.
Environment
I'm afraid running this command gives me the same error, but in the terminal.
Could not check compatibility between App\ShippingMethods\CustomShipping::checkAvailability(DoubleThreeDigital\SimpleCommerce\Contracts\Order $order, DoubleThreeDigital\SimpleCommerce\Data\Address $address): bool and DoubleThreeDigital\SimpleCommerce\Contracts\ShippingMethod::checkAvailability(DoubleThreeDigital\SimpleCommerce\Contracts\Order $order, DoubleThreeDigital\SimpleCommerce\Orders\Address $address): bool, because class DoubleThreeDigital\SimpleCommerce\Data\Address is not available
at app/ShippingMethods/CustomShipping.php:27
23▕ {
24▕ return 123;
25▕ }
26▕
➜ 27▕ public function checkAvailability(Order $order, Address $address): bool
28▕ {
29▕ return true;
30▕ }
31▕ }
Description
Trying to create a custom shipping method. So firstly created the class and used the example. But in the example there is a reference to an Address class which is not in the Data folder of SC anymore.
Could not check compatibility between App\ShippingMethods\CustomShipping::checkAvailability(DoubleThreeDigital\SimpleCommerce\Contracts\Order $order, DoubleThreeDigital\SimpleCommerce\Data\Address $address): bool and DoubleThreeDigital\SimpleCommerce\Contracts\ShippingMethod::checkAvailability(DoubleThreeDigital\SimpleCommerce\Contracts\Order $order, DoubleThreeDigital\SimpleCommerce\Orders\Address $address): bool, because class DoubleThreeDigital\SimpleCommerce\Data\Address is not available
(Also, the documentation class references need updating, it still states 'DuncanMcClean', instead of 'DoubleThreeDigital'.)
I'll give some more info on why I want a custom shipping method in the first place. I would like to have a fixed shipping price (for example 10$), for any kind of order. Either the order has 1 item or 20, it should not impact the shipping cost.
Steps to reproduce
Environment
I'm afraid running this command gives me the same error, but in the terminal.
Could not check compatibility between App\ShippingMethods\CustomShipping::checkAvailability(DoubleThreeDigital\SimpleCommerce\Contracts\Order $order, DoubleThreeDigital\SimpleCommerce\Data\Address $address): bool and DoubleThreeDigital\SimpleCommerce\Contracts\ShippingMethod::checkAvailability(DoubleThreeDigital\SimpleCommerce\Contracts\Order $order, DoubleThreeDigital\SimpleCommerce\Orders\Address $address): bool, because class DoubleThreeDigital\SimpleCommerce\Data\Address is not available
at app/ShippingMethods/CustomShipping.php:27 23▕ { 24▕ return 123; 25▕ } 26▕ ➜ 27▕ public function checkAvailability(Order $order, Address $address): bool 28▕ { 29▕ return true; 30▕ } 31▕ }