craftcms / commerce

Fully integrated ecommerce for Craft CMS.
https://craftcms.com/commerce
Other
226 stars 170 forks source link

Shipping method defaults to none #2498

Closed ineghi closed 3 years ago

ineghi commented 3 years ago

Description

Hi guys !

Since the last update, the shipping method defaults to none when creating an order. It was previously automatically setting the only shipping method we got. Selecting manually in the front-end works, but a customer could still got free shipping if he manipulates the calls. If I read the changelog, could it be that a plugin interferes with the shipping method ?

Thanks for the help !

Steps to reproduce

  1. Create new order
  2. Shipping method input is empty (only available option in None)
  3. Add a customer
  4. Add a product
  5. Now the sipping method is available in the dropdown but no selected anyway

Additional info

"aelvan/mailchimp-subscribe": "3.0.3",
"bymayo/commerce-widgets": "2.0.21",
"craftcms/cms": "3.7.4",
"craftcms/commerce": "3.4.0.3",
"craftcms/commerce-omnipay": "^2.1",
"craftcms/contact-form": "2.2.7",
"craftcms/element-api": "2.7.0",
"craftcms/mailgun": "1.4.3",
"craftcms/redactor": "2.8.7",
"ether/logs": "3.0.4",
"ether/notes": "1.0.5",
"mmikkel/incognito-field": "1.2.0",
"nystudio107/craft-seomatic": "3.3.45",
"nystudio107/craft-twigpack": "1.2.15",
"omnipay/mollie": "^5.2",
"picqer/sendcloud-php-client": "^2.4",
"pierrestoffe/craft-language-redirector": "1.5.3",
"sebastianlenz/linkfield": "1.0.25",
"swishdigital/out-of-stock": "3.0.3.1",
"topshelfcraft/wordsmith": "3.3.0.1",
"ubitransports/omnipay-payzen": "^2.2",
"verbb/gift-voucher": "2.5.10",
"vlucas/phpdotenv": "^3.4.0"
lukeholder commented 3 years ago

A shipping method was being incorrectly set when calling order.shippingMethod which we have since changed.

If you require the shipping method to be selected set the requireShippingMethodSelectionAtCheckout config setting to true, and make sure to defaulting it in the options dropdown/radio on the front-end.

The customer should then not be able to checkout without having a shipping option selected.