Closed keke996 closed 3 years ago
Hi @keke996. Thank you for your report. To help us process this issue please make sure that you provided the following information:
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release
For more details, please, review the Magento Contributor Assistant documentation.
@keke996 do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
The web is run in magento CLI 2.3.3. I'm able to reproduce the issue on vanilla Magento instance following steps to reproduce.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 14 days if no further activity occurs. Thank you for your contributions.
Summary (*)
I'm developing custom shipping method, different price for different address. When customer select/entered address, my carrier model use Magento\Quote\Model\Quote\Address\RateRequest getDestRegionCode() to get region. But sometimes ,getDestRegionCode return null. If address is been selecter and region is entered to input not select, getDestRegionCode() return null. I can't get full address.
Examples (*)
namespace Forkel\CustomShipping\Model\Carrier; . . . class Custom extends \Magento\Shipping\Model\Carrier\AbstractCarrier implements \Magento\Shipping\Model\Carrier\CarrierInterface { . . . public function collectRates(RateRequest $request) { ' ' ' $destState = $request->getDestRegionCode(); ' ' ' } }
Proposed solution
I don't now how to get region reliably.