Closed kooliahmd closed 1 month ago
Hi @kooliahmd. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release@magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel. :warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting. :clock10: You can find the schedule on the Magento Community Calendar page. :telephone_receiver: The triage of issues 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.
Hi @engcom-Hotel. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to.2.4-develop
branch@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure. 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.Issue: Confirmed
once verification is complete. Hello @kooliahmd,
Thanks for the report and collaboration!
We have tried to reproduce the issue in the latest 2.4-develop branch. In order to reproduce it we have made a custom module as follows:
https://github.com/engcom-Hotel/magento2/tree/issue39039/app/code/Magz/Issue39039
But we are unable to reproduce it, can you please let us know if we missed anything?
Thanks
Dear @kooliahmd,
We've observed that there haven't been any updates on this issue for quite some time. Therefore, we assume it's been resolved and will close it. Feel free to open a new ticket or reopen this one if you require further assistance.
Regards
Summary
Following this documentation in order to register a custom shipping rate validator, I found out that
shipping-rates-validator.js::validateAddressData
would never execute the registered validator as long as the default validator returns true.This is because
shipping-rates-validator.js
registers adefault-validator
and when it runs the validation it considers the rates as valid when at least on of the registered validators returned true. This is problematic, as the custom validator would not even run when the default validator returns true.Examples
N/A
Proposed solution
Change this function
validateAddressData
inmodule-checkout/view/frontend/web/js/model/shipping-rates-validator.js
From:
To:
Release note
No response
Triage and priority