diff --git a/classes/PDF.php b/classes/PDF.php index 22b126eb..88aa6771 100755 --- a/classes/PDF.php +++ b/classes/PDF.php @@ -549,7 +549,7 @@ class PDFCore extends PDF_PageGroupCore 'company' => trim($mr_point['MR_Selected_LgAdr1']), 'vat_number' => '', 'address1' => trim($address_lines[0]), - 'address2' => trim($address_lines[1]), + 'address2' => isset($address_lines[1]) ? trim($address_lines[1]) : '', 'postcode' => trim($mr_point['MR_Selected_CP']), 'city' => trim($mr_point['MR_Selected_Ville']), 'Country:name' => trim($mr_point['MR_Selected_Pays']), diff --git a/override/classes/PaymentModule.php b/override/classes/PaymentModule.php index e50215b6..030ac2c4 100755 --- a/override/classes/PaymentModule.php +++ b/override/classes/PaymentModule.php @@ -8,8 +8,16 @@ // Does order already exists ? if (Validate::isLoadedObject($cart) AND $cart->OrderExists() == false) { - if ($secure_key !== false AND $secure_key != $cart->secure_key) - die(Tools::displayError()); + /* @Override + * do not die and create Order in error state + */ + // die(Tools::displayError()); + + if ($secure_key !== false AND $secure_key != $cart->secure_key) { + $id_order_state = Configuration::get('PS_OS_ERROR'); + $message = "Problème de sercure_key. A valider manuellement" . "\n\n" . $message; + Logger::addLog('Invalid secure_key', 4, '0000001', 'Cart', intval($id_cart)); + } // Copying data from cart $order = new Order();