Fix order on mobile website. appli is not a bool

This commit is contained in:
Michael RICOIS 2017-12-22 14:42:19 +01:00
parent 5acba9c265
commit c75f641567
2 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
<?php
class Order extends OrderCore
{
/** @var boolean True if the order comes from app */
/** @var int True if the order comes from app */
public $appli = 0;
protected $fieldsValidate = array(
@ -27,7 +27,7 @@ class Order extends OrderCore
'total_wrapping' => 'isPrice',
'shipping_number' => 'isUrl',
'conversion_rate' => 'isFloat',
'appli' => 'isBool',
'appli' => 'isUnsignedInt',
);
public function getFields()

View File

@ -25,9 +25,9 @@ class PaymentModule extends PaymentModuleCore
$order->appli = 0;
if (Tools::isApi()) {
$order->appli = 1;
}/* elseif (Tools::isMobile()) {
} elseif (Tools::isMobile()) {
$order->appli = 2;
}*/
}
$order->id_carrier = (int)($cart->id_carrier);
$order->id_customer = (int)($cart->id_customer);
$order->id_address_invoice = (int)($cart->id_address_invoice);