fix(settings): render same-day settings for carriers (trunkrs) with same-day delivery type - #508
Open
FreekVR wants to merge 7 commits into
Open
fix(settings): render same-day settings for carriers (trunkrs) with same-day delivery type#508FreekVR wants to merge 7 commits into
FreekVR wants to merge 7 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the PDK carrier settings UI so the same-day delivery settings render for carriers that expose same-day as a delivery type (not only as a shipment option), and consolidates same-day settings into a single section to avoid duplicates.
Changes:
- Render the same-day settings section when SAME_DAY is present in
carrier.deliveryTypes, not only when thesameDayDeliveryshipment option is supported. - Prevent duplicate same-day toggles by skipping SAME_DAY in both the dynamic delivery-type list and the shipment-options list.
- Extend unit test coverage and update JSON snapshots to reflect the new settings structure.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Frontend/View/CarrierSettingsItemView.php | Adds SAME_DAY-delivery-type detection for rendering the same-day section; skips SAME_DAY in other sections to avoid duplicates. |
| tests/Unit/Frontend/View/CarrierSettingsItemViewTest.php | Adds coverage for same-day-as-delivery-type and asserts same-day settings render exactly once across representations. |
| tests/snapshots/SettingsViewTest__it_gets_settings_view_with_data_set_carrier_settings__1.json | Snapshot updates reflecting removal of duplicate same-day elements and updated ordering. |
| tests/snapshots/FrontendRenderServiceTest__it_renders_component_with_data_set_plugin_settings__1.json | Snapshot updates reflecting removal of duplicate same-day elements and updated ordering. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #508 +/- ##
============================================
- Coverage 94.33% 94.31% -0.02%
- Complexity 2414 2422 +8
============================================
Files 352 352
Lines 7726 7745 +19
============================================
+ Hits 7288 7305 +17
- Misses 438 440 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
NabDevs
approved these changes
Jul 20, 2026
GravendeelJochem
approved these changes
Jul 21, 2026
FreekVR
force-pushed
the
fix/INT-1561-same-day-delivery-type-settings
branch
from
July 21, 2026 12:41
8090ca2 to
2680ea3
Compare
myparcel-bot
Bot
force-pushed
the
fix/INT-1561-same-day-delivery-type-settings
branch
6 times, most recently
from
August 6, 2026 14:18
abfcabf to
21a01f2
Compare
myparcel-bot
Bot
force-pushed
the
fix/INT-1561-same-day-delivery-type-settings
branch
from
August 7, 2026 08:39
21a01f2 to
132fa0f
Compare
* Guard carrier settings * test: clean carrier guard * fix: validate carrier entries * fix: ignore malformed carrier settings * refactor: simplify carrier settings guard
…livery type Carriers that expose same-day as a delivery type (e.g. Trunkrs) instead of a shipment option (e.g. DHL For You) were missing the same-day section in the carrier settings view, so the same-day cutoff time could not be configured. The section now renders for both representations and is the single owner of these fields, which also removes the duplicate same-day toggle that was rendered for shipment-option carriers. Fixes INT-1561 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…quires it Moving same-day into its own settings section skipped the read-only guard for carriers that mark same-day as required in their capabilities. Apply makeReadOnlyWhenRequired in the same-day section too, and split the representation checks into two named booleans for readability. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
fixes an issue where same day delivery was blocked for any date in the future if the current hour was past the configured "cutoff time sameDay" or if the "drop off delay" was more than 0 the delivery options widget decides which dates are available for same day delivery now remember: same day delivery means shipment and delivery happen on the same day, not if the customer can expect their shipment on the same day as ordering. Whether thats possible is decided by a combination of "cut off time" and "drop off days". "drop off delay" only indicates how long it takes to process an order: it doesnt mean that the merchant can't drop off their shipment on the same day it will be delivered if that delivery is planned ex. 2 days in the future (past the drop off delay). the merchant can still opt-out of same day delivery but simply not enabling the delivery type - and it's off by default. reverts the changes from #356
myparcel-bot
Bot
force-pushed
the
fix/INT-1561-same-day-delivery-type-settings
branch
from
August 7, 2026 14:34
601cb71 to
dc7b575
Compare
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.
renders the same-day delivery settings for carriers that expose same-day as a delivery type instead of a shipment option.
Some carriers (like Trunkrs) advertise same-day delivery as a delivery type in their contract, while others (like DHL For You) advertise it as a shipment option. The carrier settings view only checked the shipment option, so for delivery-type carriers the cutoff time field never rendered and the same-day cutoff silently stayed at the 10:00 default. When same-day is all the carrier offers, that hides the carrier from checkout after the cutoff with no way to fix it in the admin. The same-day section now renders for both representations and is the single owner of these fields. This also removes a duplicate same-day toggle that was rendered for shipment-option carriers.
Fixes INT-1561
🤖 Generated with Claude Code