-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Issue #31311 - Shipping Method Delimiter Conflict Fix #35134
base: 2.4-develop
Are you sure you want to change the base?
Issue #31311 - Shipping Method Delimiter Conflict Fix #35134
Conversation
Hi @nicolasddev. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review. For more details, review the Magento Contributor Guide documentation. 🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket. ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
Description (*)
Fixes issues related to shipping modules having an underscore in their carrier code, which conflicts with the delimiter "_" used when concatenating the carrier code with the method code to identify a unique shipping method
<carriercode>_<methodcode>
. Replacing the delimiter with "::" allows for more flexibility for both the carrier codes and the method codes, while preventing conflicts.Related Pull Requests
#21340
Fixed Issues
Manual testing scenarios (*)
Questions or comments
Important
shipping_method
columns of thesales_order
andquote_address
tables and thecode
column of thequote_shipping_rate
table to convert the previous<carriercode>_<methodcode>
format to the new<carriercode>::<methodcode>
format by comparing each entry to all available<carriercode>_<methodcode>
combinations until a match is found. As old entries from uninstalled modules may still exist, the data patch should replace the last underscore "_" of each remaining entries, by filtering any entries already containing the new delimiter "::".shipping_method
string separation directly could be affected or even break. The fix is rather simple as replacing the affectedexplode('_', $shippingMethod);
statement bypreg_split('/' . Order::DELIMITER_SHIPPING_METHOD . '/', $shippingMethod);
should suffice to make any module compatible.Contribution checklist (*)