Closed Berkelder closed 4 years ago
Hi @Berkelder
Could you please check the logs and see what country code is being passed over when Germany is selected - here is a doc that you could use to retrieve these logs: http://support.webshopapps.com/matrixrate/retrieving-webshopapps-logs/
Hi @ibraheemnabeelfauzi ; I have checked your URL, but I can't find anything related to Magento 2 in it. I have this issue on Magento 2. Could you please let me know how to turn on logging for Magento 2?
@Berkelder Sorry about this - here you go: https://docs.shipperhq.com/enabling-logging-matrix-rate-product-rate/
I also recommend checking this: https://docs.shipperhq.com/troubleshooting-matrixrates/#StateRegion_Code_Invalid
Hi @ibraheemnabeelfauzi ; have checked and when I via the German storeview request the checkout, I get this result. [2020-09-24 06:52:04] main.DEBUG: SQL Select: ["(website_id = :website_id)","AND (dest_country_id = :country_id AND dest_region_id = :region_id AND STRCMP(LOWER(dest_city),LOWER(:city))= 0 AND :postcode LIKE dest_zip )","AND (condition_name = :condition_name)","AND (condition_from_value < :condition_value)","AND (condition_to_value >= :condition_value)"] [] [2020-09-24 06:52:04] main.DEBUG: Bindings: {":country_id":"NL",":region_id":0,":city":null,":postcode":"",":website_id":1,":condition_name":"package_weight",":condition_value":4} [] [2020-09-24 06:52:04] main.DEBUG: SQL Select: ["(website_id = :website_id)","AND (dest_country_id = :country_id AND dest_region_id = :region_id AND dest_city='' AND :postcode LIKE dest_zip )","AND (condition_name = :condition_name)","AND (condition_from_value < :condition_value)","AND (condition_to_value >= :condition_value)"] [] [2020-09-24 06:52:04] main.DEBUG: Bindings: {":country_id":"NL",":region_id":0,":postcode":"",":website_id":1,":condition_name":"package_weight",":condition_value":4} [] [2020-09-24 06:52:04] main.DEBUG: SQL Results: [{"pk":"3354","website_id":"1","dest_country_id":"NL","dest_region_id":"0","dest_city":"","dest_zip":"","dest_zip_to":"","condition_name":"package_weight","condition_from_value":"2.0000","condition_to_value":"10.9999","price":"13.8600","cost":"0.0000","shipping_method":"Standaard leveren"},{"pk":"3291","website_id":"1","dest_country_id":"NL","dest_region_id":"0","dest_city":"","dest_zip":"","dest_zip_to":"","condition_name":"package_weight","condition_from_value":"2.0000","condition_to_value":"10.9999","price":"28.8600","cost":"0.0000","shipping_method":"Standaard + op verdieping"},{"pk":"3296","website_id":"1","dest_country_id":"NL","dest_region_id":"0","dest_city":"","dest_zip":"","dest_zip_to":"","condition_name":"package_weight","condition_from_value":"2.0000","condition_to_value":"10.9999","price":"63.8600","cost":"0.0000","shipping_method":"Standaard + voor 10:00 uur"},{"pk":"3302","website_id":"1","dest_country_id":"NL","dest_region_id":"0","dest_city":"","dest_zip":"","dest_zip_to":"","condition_name":"package_weight","condition_from_value":"2.0000","condition_to_value":"10.9999","price":"32.8600","cost":"0.0000","shipping_method":"Standaard + garantie gewenste dag"},{"pk":"3313","website_id":"1","dest_country_id":"NL","dest_region_id":"0","dest_city":"","dest_zip":"","dest_zip_to":"","condition_name":"package_weight","condition_from_value":"2.0000","condition_to_value":"10.9999","price":"48.8600","cost":"0.0000","shipping_method":"Standaard + na 14:00 uur"},{"pk":"3322","website_id":"1","dest_country_id":"NL","dest_region_id":"0","dest_city":"","dest_zip":"","dest_zip_to":"","condition_name":"package_weight","condition_from_value":"2.0000","condition_to_value":"10.9999","price":"48.8600","cost":"0.0000","shipping_method":"Standaard + voor 12:00 uur"}] [] [2020-09-24 06:52:04] main.DEBUG: SQL Select: ["(website_id = :website_id)","AND (dest_country_id = :country_id AND dest_region_id = :region_id AND STRCMP(LOWER(dest_city),LOWER(:city))= 0 AND :postcode LIKE dest_zip )","AND (condition_name = :condition_name)","AND (condition_from_value < :condition_value)","AND (condition_to_value >= :condition_value)"] [] [2020-09-24 06:52:04] main.DEBUG: Bindings: {":country_id":"NL",":region_id":0,":city":null,":postcode":"",":website_id":1,":condition_name":"package_weight",":condition_value":4} [] [2020-09-24 06:52:04] main.DEBUG: SQL Select: ["(website_id = :website_id)","AND (dest_country_id = :country_id AND dest_region_id = :region_id AND dest_city='' AND :postcode LIKE dest_zip )","AND (condition_name = :condition_name)","AND (condition_from_value < :condition_value)","AND (condition_to_value >= :condition_value)"] [] [2020-09-24 06:52:04] main.DEBUG: Bindings: {":country_id":"NL",":region_id":0,":postcode":"",":website_id":1,":condition_name":"package_weight",":condition_value":4} [] [2020-09-24 06:52:04] main.DEBUG: SQL Results: [{"pk":"3354","website_id":"1","dest_country_id":"NL","dest_region_id":"0","dest_city":"","dest_zip":"","dest_zip_to":"","condition_name":"package_weight","condition_from_value":"2.0000","condition_to_value":"10.9999","price":"13.8600","cost":"0.0000","shipping_method":"Standaard leveren"},{"pk":"3291","website_id":"1","dest_country_id":"NL","dest_region_id":"0","dest_city":"","dest_zip":"","dest_zip_to":"","condition_name":"package_weight","condition_from_value":"2.0000","condition_to_value":"10.9999","price":"28.8600","cost":"0.0000","shipping_method":"Standaard + op verdieping"},{"pk":"3296","website_id":"1","dest_country_id":"NL","dest_region_id":"0","dest_city":"","dest_zip":"","dest_zip_to":"","condition_name":"package_weight","condition_from_value":"2.0000","condition_to_value":"10.9999","price":"63.8600","cost":"0.0000","shipping_method":"Standaard + voor 10:00 uur"},{"pk":"3302","website_id":"1","dest_country_id":"NL","dest_region_id":"0","dest_city":"","dest_zip":"","dest_zip_to":"","condition_name":"package_weight","condition_from_value":"2.0000","condition_to_value":"10.9999","price":"32.8600","cost":"0.0000","shipping_method":"Standaard + garantie gewenste dag"},{"pk":"3313","website_id":"1","dest_country_id":"NL","dest_region_id":"0","dest_city":"","dest_zip":"","dest_zip_to":"","condition_name":"package_weight","condition_from_value":"2.0000","condition_to_value":"10.9999","price":"48.8600","cost":"0.0000","shipping_method":"Standaard + na 14:00 uur"},{"pk":"3322","website_id":"1","dest_country_id":"NL","dest_region_id":"0","dest_city":"","dest_zip":"","dest_zip_to":"","condition_name":"package_weight","condition_from_value":"2.0000","condition_to_value":"10.9999","price":"48.8600","cost":"0.0000","shipping_method":"Standaard + voor 12:00 uur"}] []
So for all other countries it's going fine. Any clue where this NL may be coming from? Default country for the respective storeview is Germany as well (DE)
@Berkelder thanks for that - check the table mentioned in the following doc and see if the correct country code is mapped to the correct country: http://support.webshopapps.com/matrixrate/filtering-based-on-country/
On default Magento Luma when default country is Germany (Deutschland), it picks the rates for Netherlands (Nederland). For all other storeviews it's working fine. Furthermore when picking a different country and afterwards reselecting Germany, it's picking correct rates.