webshopapps / module-matrixrate

WebShopApps MatrixRates for Magento2
Open Software License 3.0
120 stars 64 forks source link

Debug Log Error #117

Closed drinkingsouls closed 12 months ago

drinkingsouls commented 1 year ago

Hi, I've been using Matrix Rate module for a couple of years with no noticeable issues. I've noticed today our debug.log is being populated as such:

[2023-01-10T15:24:08.536985+00:00] 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)"] []
[2023-01-10T15:24:08.537124+00:00] main.DEBUG: Bindings:  {":country_id":"GB",":region_id":0,":city":null,":postcode":"",":website_id":1,":condition_name":"package_value",":condition_value":11.99} []
[2023-01-10T15:24:08.537834+00:00] 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)"] []
[2023-01-10T15:24:08.537881+00:00] main.DEBUG: Bindings:  {":country_id":"GB",":region_id":0,":postcode":"",":website_id":1,":condition_name":"package_value",":condition_value":11.99} []
[2023-01-10T15:24:08.538462+00:00] 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 dest_zip ='*')","AND (condition_name = :condition_name)","AND (condition_from_value < :condition_value)","AND (condition_to_value >= :condition_value)"] []
[2023-01-10T15:24:08.538500+00:00] main.DEBUG: Bindings:  {":country_id":"GB",":region_id":0,":city":null,":website_id":1,":condition_name":"package_value",":condition_value":11.99} []
[2023-01-10T15:24:08.538978+00:00] main.DEBUG: SQL Select:  ["(website_id = :website_id)","AND (dest_country_id = :country_id AND dest_region_id = '0' AND STRCMP(LOWER(dest_city),LOWER(:city))= 0 AND dest_zip ='*')","AND (condition_name = :condition_name)","AND (condition_from_value < :condition_value)","AND (condition_to_value >= :condition_value)"] []
[2023-01-10T15:24:08.539014+00:00] main.DEBUG: Bindings:  {":country_id":"GB",":city":null,":website_id":1,":condition_name":"package_value",":condition_value":11.99} []
[2023-01-10T15:24:08.539199+00:00] main.DEBUG: SQL Select:  ["(website_id = :website_id)","AND (dest_country_id = :country_id AND dest_region_id = '0' 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)"] []
[2023-01-10T15:24:08.539235+00:00] main.DEBUG: Bindings:  {":country_id":"GB",":postcode":"",":website_id":1,":condition_name":"package_value",":condition_value":11.99} []
[2023-01-10T15:24:08.539627+00:00] main.DEBUG: SQL Select:  ["(website_id = :website_id)","AND (dest_country_id = :country_id AND dest_region_id = :region_id  AND dest_city ='*' AND dest_zip ='*')","AND (condition_name = :condition_name)","AND (condition_from_value < :condition_value)","AND (condition_to_value >= :condition_value)"] []
[2023-01-10T15:24:08.539662+00:00] main.DEBUG: Bindings:  {":country_id":"GB",":region_id":0,":website_id":1,":condition_name":"package_value",":condition_value":11.99} []
[2023-01-10T15:24:08.540031+00:00] main.DEBUG: SQL Results:  [{"pk":"3562","website_id":"1","dest_country_id":"GB","dest_region_id":"0","dest_city":"*","dest_zip":"*","dest_zip_to":"","condition_name":"package_value","condition_from_value":"0.0000","condition_to_value":"49.9900","price":"4.9900","cost":"0.0000","shipping_method":"Standard Delivery"},{"pk":"3563","website_id":"1","dest_country_id":"GB","dest_region_id":"0","dest_city":"*","dest_zip":"*","dest_zip_to":"","condition_name":"package_value","condition_from_value":"0.0000","condition_to_value":"49.9900","price":"6.9900","cost":"0.0000","shipping_method":"Express Delivery"}] []
[2023-01-10T15:24:16.664175+00:00] 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)"] []
[2023-01-10T15:24:16.664312+00:00] main.DEBUG: Bindings:  {":country_id":"GB",":region_id":0,":city":"Gateshead",":postcode":"NE8 1PS",":website_id":1,":condition_name":"package_value",":condition_value":11.99} []
[2023-01-10T15:24:16.665461+00:00] 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)"] []
[2023-01-10T15:24:16.665529+00:00] main.DEBUG: Bindings:  {":country_id":"GB",":region_id":0,":postcode":"NE8 1PS",":website_id":1,":condition_name":"package_value",":condition_value":11.99} []
[2023-01-10T15:24:16.666153+00:00] 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 dest_zip ='*')","AND (condition_name = :condition_name)","AND (condition_from_value < :condition_value)","AND (condition_to_value >= :condition_value)"] []
[2023-01-10T15:24:16.666209+00:00] main.DEBUG: Bindings:  {":country_id":"GB",":region_id":0,":city":"Gateshead",":website_id":1,":condition_name":"package_value",":condition_value":11.99} []
[2023-01-10T15:24:16.666760+00:00] main.DEBUG: SQL Select:  ["(website_id = :website_id)","AND (dest_country_id = :country_id AND dest_region_id = '0' AND STRCMP(LOWER(dest_city),LOWER(:city))= 0 AND dest_zip ='*')","AND (condition_name = :condition_name)","AND (condition_from_value < :condition_value)","AND (condition_to_value >= :condition_value)"] []
[2023-01-10T15:24:16.666815+00:00] main.DEBUG: Bindings:  {":country_id":"GB",":city":"Gateshead",":website_id":1,":condition_name":"package_value",":condition_value":11.99} []
[2023-01-10T15:24:16.667048+00:00] main.DEBUG: SQL Select:  ["(website_id = :website_id)","AND (dest_country_id = :country_id AND dest_region_id = '0' 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)"] []
[2023-01-10T15:24:16.667102+00:00] main.DEBUG: Bindings:  {":country_id":"GB",":postcode":"NE8 1PS",":website_id":1,":condition_name":"package_value",":condition_value":11.99} []
[2023-01-10T15:24:16.667610+00:00] main.DEBUG: SQL Select:  ["(website_id = :website_id)","AND (dest_country_id = :country_id AND dest_region_id = :region_id  AND dest_city ='*' AND dest_zip ='*')","AND (condition_name = :condition_name)","AND (condition_from_value < :condition_value)","AND (condition_to_value >= :condition_value)"] []
[2023-01-10T15:24:16.667662+00:00] main.DEBUG: Bindings:  {":country_id":"GB",":region_id":0,":website_id":1,":condition_name":"package_value",":condition_value":11.99} []
[2023-01-10T15:24:16.667859+00:00] main.DEBUG: SQL Results:  [{"pk":"3562","website_id":"1","dest_country_id":"GB","dest_region_id":"0","dest_city":"*","dest_zip":"*","dest_zip_to":"","condition_name":"package_value","condition_from_value":"0.0000","condition_to_value":"49.9900","price":"4.9900","cost":"0.0000","shipping_method":"Standard Delivery"},{"pk":"3563","website_id":"1","dest_country_id":"GB","dest_region_id":"0","dest_city":"*","dest_zip":"*","dest_zip_to":"","condition_name":"package_value","condition_from_value":"0.0000","condition_to_value":"49.9900","price":"6.9900","cost":"0.0000","shipping_method":"Express Delivery"}] []

The shipping seems to work as expected, what does this error log refer to? We don't have a condition_value of 11.99 so I'm unsure what the error is referencing. Thank you.

shqsupport commented 1 year ago

Hi @drinkingsouls,

The messages you are seeing in your log are there because debug logging is enabled. If this is disabled, you will stop seeing these messages. We would recommend that debug logging only be enabled on a production store when needed and to disable it at most times.

The 11.99 value you are seeing is coming from the cart. That would have been the value of the cart.

Please let us know if you have any further questions

Peter ShipperHQ Support Engineer

drinkingsouls commented 1 year ago

Thanks for the reply. So there are no issues here with my setup? Where is the option to disable debug logging in this module? I see no option for this in the WebShopApps Matrix Rate settings in Magento admin.

PeterElkoShipperHQ commented 1 year ago

Hi @drinkingsouls

Here is a document that will help you configure your logging in Matrix Rates. https://docs.shipperhq.com/enabling-logging-matrix-rate-product-rate/

Please let us know if you have any further questions regarding this.

Have a great weekend!

Peter ShipperHQ Support Engineer

drinkingsouls commented 1 year ago

This would disable all Magento logs, not just the logs from the Matrix Rate module?