From 7156caed8140bbfd01cd0d95f42007c04cbaf78e Mon Sep 17 00:00:00 2001 From: cyradin Date: Fri, 8 Jul 2016 11:54:58 +0300 Subject: [PATCH] fix order send fail when delivery code is an empty string --- admin/model/retailcrm/order.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/admin/model/retailcrm/order.php b/admin/model/retailcrm/order.php index 8f40478..2dc90b9 100644 --- a/admin/model/retailcrm/order.php +++ b/admin/model/retailcrm/order.php @@ -136,7 +136,9 @@ class ModelRetailcrmOrder extends Model { $country = (isset($order_data['shipping_country'])) ? $order_data['shipping_country'] : '' ; $order['delivery'] = array( - 'code' => $settings['retailcrm_delivery'][$delivery_code], + 'code' => !empty($settings['retailcrm_delivery'][$delivery_code]) + ? $settings['retailcrm_delivery'][$delivery_code] + : null, 'cost' => $deliveryCost, 'address' => array( 'index' => $order_data['shipping_postcode'],