-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Define default shipping costs before selecting #555
Comments
As you've noticed, Simple Commerce won't calculate shipping costs until you actually have a shipping method selected. I think if we were to introduce this, we'd need to make it an opt-in feature or add it into a breaking release as it may not be the behaviour that everyone would expect. To get around this in the meantime, you could potentially listen for the public function handle(OrderSaved $event)
{
if (! $event->order->has('shipping_method') {
$event->order->set('shipping_method', YourDefaultShippingMethod::class);
}
} |
Ok understood and it would be ok for me if you won‘t do it. Otherwise instead of a breaking release it could be configurable: Only if a default value is set than it calculates the grant total with the default shipping costs.
Thanks and I will try this for my current solution. |
Released as part of v2.4.0-beta.3. |
I've added the ability to configure a 'default shipping method' to the next version of Simple Commerce, v2.4. It's included as part of the latest beta release. Learn more about upgrading to the v2.4 beta. My hope is for v2.4 to be out at the end of the month/start of next month. |
Released as part of v2.4.0. |
What's the issue you're running into?
Hi there,
I have three different shipping methods with different shipping costs. As they are selected in the third checkout step I would like to display a default value for shipping costs in the cart view. But the values are empty before selecting the shipping method in step three.
Any idea how to set a default shipping costs (e.g. the lowest one, or name it explicit) to show this in the shopping cart?
Cheers
Steffen
Steps to reproduce
Environment
The text was updated successfully, but these errors were encountered: