Resolve "App error when customer requests tire assistance" #1549

Merged
korina.cordero merged 1 commit from 624-app-error-when-customer-requests-tire-assistance into master-fix 2021-09-29 07:03:50 +00:00

View file

@ -2897,10 +2897,14 @@ class APIController extends Controller implements LoggedController
} }
} }
// add battery to items // check if batt is null
$sku = $batt->getSAPCode(); if ($batt != null)
if (!empty($sku)) {
$hub_criteria->addItem($batt->getSAPCode(), 1); // add battery to items
$sku = $batt->getSAPCode();
if (!empty($sku))
$hub_criteria->addItem($batt->getSAPCode(), 1);
}
// get customer id. No JO id at this point // get customer id. No JO id at this point
$customer_id = $cust->getID(); $customer_id = $cust->getID();