lat9 / upsxml

UPS-XML for Zen Cart
3 stars 4 forks source link

UPSXML rates not showing prior to login (shipping estimator) #37

Open lat9 opened 1 year ago

lat9 commented 1 year ago

From the Zen Cart support-thread (@scottcwilson):

Small bug in a recent update.

line 387 if ($next_zone['zone_id'] < 1 || $next_zone['zone_id'] === $order->delivery['zone_id']) {

fails to work because of ===. $next_zone['zone_id'] is not an int the way $order->delivery['zone_id'] is. Casting fixes.

The symptom is the shipping estimator does not show UPSXML rates prior to login.

scottcwilson commented 1 year ago

For documentation, link to original report: https://www.zen-cart.com/showthread.php?222903-UPS-XML-Support-Thread&p=1394894#post1394894

scottcwilson commented 1 year ago

Follow up note - I wound up casting both sides because this kept failing. An easier fix would be to switch from === back to == to prevent this issue from occurring.