modif validate field OrderDetail
This commit is contained in:
parent
0759d17ae2
commit
13b20adb20
35
override/classes/OrderDetail.php
Normal file
35
override/classes/OrderDetail.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
class OrderDetail extends OrderDetailCore
|
||||
{
|
||||
/**
|
||||
* @Override
|
||||
* @var 'product_ean13' => 'isEan13'
|
||||
*/
|
||||
protected $fieldsValidate = array (
|
||||
'id_order' => 'isUnsignedId',
|
||||
'product_id' => 'isUnsignedId',
|
||||
'product_attribute_id' => 'isUnsignedId',
|
||||
'product_name' => 'isGenericName',
|
||||
'product_quantity' => 'isInt',
|
||||
'product_quantity_in_stock' => 'isInt',
|
||||
'product_quantity_return' => 'isUnsignedInt',
|
||||
'product_quantity_refunded' => 'isUnsignedInt',
|
||||
'product_quantity_reinjected' => 'isUnsignedInt',
|
||||
'product_price' => 'isPrice',
|
||||
'reduction_percent' => 'isFloat',
|
||||
'reduction_amount' => 'isPrice',
|
||||
'group_reduction' => 'isFloat',
|
||||
'product_quantity_discount' => 'isFloat',
|
||||
'product_ean13' => 'isReference',
|
||||
'product_upc' => 'isUpc',
|
||||
'product_reference' => 'isReference',
|
||||
'product_supplier_reference' => 'isReference',
|
||||
'product_weight' => 'isFloat',
|
||||
'tax_name' => 'isGenericName',
|
||||
'tax_rate' => 'isFloat',
|
||||
'ecotax' => 'isFloat',
|
||||
'ecotax_tax_rate' => 'isFloat',
|
||||
'download_nb' => 'isInt',
|
||||
);
|
||||
}
|
@ -164,8 +164,8 @@ class ParentOrderController extends ParentOrderControllerCore {
|
||||
// distinction "at home" et "out of home"
|
||||
$carriers_ah = array();
|
||||
$carriers_ooh = array();
|
||||
$config_carrier_ooh = array(88,89); // prod
|
||||
// $config_carrier_ooh = array(47,48); // dev
|
||||
// $config_carrier_ooh = array(88,89); // prod
|
||||
$config_carrier_ooh = array(47,48); // dev
|
||||
// $config_carrier_ooh = array(40,45); // local
|
||||
foreach ($carriers as $carrier) {
|
||||
if (in_array($carrier['id_carrier'], $config_carrier_ooh) ){
|
||||
|
Loading…
Reference in New Issue
Block a user