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

This commit is contained in:
gRoussac
2013-03-21 14:05:36 +01:00
parent 39e036197d
commit 8dfef27674
5 changed files with 107 additions and 94 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'];
}
}