fix renderOrderId

This commit is contained in:
Christophe LATOUR 2017-11-28 14:23:31 +01:00
parent 67736843ff
commit b7e2dd0007
3 changed files with 4 additions and 4 deletions

View File

@ -112,7 +112,7 @@ class Cart extends BaseCart
* @return integer $id_order associated cart order id
*/
public function getOrderId() {
if (static::$_shouldRenderOrderId) {
if (static::$_shouldRenderOrderId === true) {
return (int)\Db::getInstance()->getValue('
SELECT `id_order` FROM `'._DB_PREFIX_.'orders`
WHERE `id_cart` = '.(int)$this->id.'

View File

@ -121,7 +121,7 @@ class PayboxController extends ApiBaseController {
$paybox->validateOrder((int)$cart->id, _PS_OS_PAYMENT_, ((int)$input_data['MONTANT']) / 100, $paybox->displayName, $info, array(), NULL, false, $user->secure_key, $data);
$paybox->saveInformationPaiement($data);
}
$cart->_shouldRenderOrderId = true;
$cart::$_shouldRenderOrderId = true;
return $cart;
}

View File

@ -102,7 +102,7 @@ class PaypalController extends ApiBaseController {
if ($result !== true) {
throw new HttpBadRequestException('Une erreur est survenue lors de la validation de votre commmande. Veuillez réesayer ultérieurement.');
}
$cart->_shouldRenderOrderId = true;
$cart::$_shouldRenderOrderId = true;
return $cart;
}