// Fixed cast problem in upgrade #PSCFV-3799
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17067 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -110,7 +110,11 @@ function migrate_orders()
|
|||||||
if (!in_array($k, $col_order_detail))
|
if (!in_array($k, $col_order_detail))
|
||||||
unset($order_details[$k]);
|
unset($order_details[$k]);
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if (in_array($order_details[$k], array('product_price', 'reduction_percent', 'reduction_amount', 'group_reduction', 'product_quantity_discount', 'tax_rate', 'ecotax', 'ecotax_tax_rate')))
|
||||||
|
$order_details[$k] = (float)$order_details[$k];
|
||||||
$order_details[$k] = Db::getInstance()->escape($order_details[$k]);
|
$order_details[$k] = Db::getInstance()->escape($order_details[$k]);
|
||||||
|
}
|
||||||
$values_order_detail[] = '(\''.implode('\', \'', $order_details).'\')';
|
$values_order_detail[] = '(\''.implode('\', \'', $order_details).'\')';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -164,7 +168,7 @@ function migrate_orders()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($cpt > 0)
|
if (count($values_order_detail))
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!Db::getInstance()->execute($insert_order_detail. implode(',', $values_order_detail)))
|
if (!Db::getInstance()->execute($insert_order_detail. implode(',', $values_order_detail)))
|
||||||
|
|||||||
Reference in New Issue
Block a user