Select carrier shipping method radios by value instead of index - #1102
Merged
Progi1984 merged 1 commit intoAug 19, 2026
Merged
Conversation
The BO carrier form gains a new first choice for the shipping method (based on the shop configuration), which shifts the positional Symfony ids the page object relied on: asking for a billing by weight ended up selecting the billing by price. The radios are now targeted by their submitted value, which maps to the stable ShippingMethod constants whatever the choice order or the PrestaShop version. A selector and a billing branch are added for the new shop configuration option so campaigns can select it.
Contributor
Author
|
Hi @Progi1984 can you check this update please? It's related to this PR PrestaShop/PrestaShop#42022 I'll update the PR to temporarily use this branch to make sure this fixes the UI tests The shipping campaign should be fixed in this run now https://github.com/jolelievre/ga.tests.ui.pr/actions/runs/32172262419 (in progress) |
Progi1984
reviewed
Aug 19, 2026
Progi1984
approved these changes
Aug 19, 2026
|
PR merged, well done! Message to @PrestaShop/committers: do not forget to milestone it before the merge. |
Contributor
Author
|
Thanks @Progi1984 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
PrestaShop/PrestaShop#42022 adds a new first choice to the carrier form's shipping method (
Based on the shop configuration,ShippingMethod::DEFAULT = 0). The BO carrier create page object selected the billing radios by their positional Symfony ids (#carrier_shipping_settings_shipping_method_0/_1), so the new option shifted every index: asking for a billing by weight actually selected by price. The carrier ranges were then stored as price ranges, andfunctional/BO/09_shipping/01_carriers/01_CRUDCarrier.tsfailed because the updated carrier became out of range and hidden in the FO checkout whenever the random out-of-range behavior wasDisable carrier.What
valueattribute instead of their index. The values map to the stableShippingMethodconstants (1= by weight,2= by price) on every PrestaShop version, so the selectors are retro-compatible regardless of the choice order.billingConfigRadioButtonselector (value="0") and handleBased on the shop configurationincreateEditCarrier, so campaigns can select the new option.