[-] FO : Fix bug #PSCFV-8028 refactoring customization

This commit is contained in:
gRoussac
2013-03-21 12:02:13 +01:00
parent 6fdb4890cd
commit 14627d4d75
6 changed files with 111 additions and 99 deletions
+6 -5
View File
@@ -576,16 +576,17 @@ class OrderOpcControllerCore extends ParentOrderController
protected function getFormatedSummaryDetail()
{
$result = array('summary' => $this->context->cart->getSummaryDetails(),
'customizedDatas' => Product::getAllCustomizedDatas($this->context->cart->id, null, true)
);
'customizedDatas' => Product::getAllCustomizedDatas($this->context->cart->id, null, true));
foreach ($result['summary']['products'] as $key => &$product)
{
$product['quantity_without_customization'] = $product['quantity'];
if ($result['customizedDatas'])
{
foreach ($result['customizedDatas'][(int)$product['id_product']][(int)$product['id_product_attribute']] as $addresses)
foreach ($addresses as $customization)
$product['quantity_without_customization'] -= (int)$customization['quantity'];
if (isset($result['customizedDatas'][(int)$product['id_product']][(int)$product['id_product_attribute']]))
foreach ($result['customizedDatas'][(int)$product['id_product']][(int)$product['id_product_attribute']] as $addresses)
foreach ($addresses as $customization)
$product['quantity_without_customization'] -= (int)$customization['quantity'];
}
}