[-] Classes : Fixed bug on Feature detachables and Customizations
This commit is contained in:
1 parent
efbf3c5d45
commit
26f31f52dc
2 files changed
+14
-4
No files matched your search
+9
-3
@@ -2961,10 +2961,15 @@ class ProductCore extends ObjectModel
|
|||||||
|
|
||||||
public static function addCustomizationPrice(&$products, &$customizedDatas)
|
public static function addCustomizationPrice(&$products, &$customizedDatas)
|
||||||
{
|
{
|
||||||
if (!Customization::isFeatureActive())
|
|
||||||
return;
|
|
||||||
|
|
||||||
foreach ($products AS &$productUpdate)
|
foreach ($products AS &$productUpdate)
|
||||||
|
{
|
||||||
|
if (!Customization::isFeatureActive())
|
||||||
|
{
|
||||||
|
$productUpdate['customizationQuantityTotal'] = 0;
|
||||||
|
$productUpdate['customizationQuantityRefunded'] = 0;
|
||||||
|
$productUpdate['customizationQuantityReturned'] = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
$customizationQuantity = 0;
|
$customizationQuantity = 0;
|
||||||
$customizationQuantityRefunded = 0;
|
$customizationQuantityRefunded = 0;
|
||||||
@@ -2994,6 +2999,7 @@ class ProductCore extends ObjectModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Customization fields' label management
|
** Customization fields' label management
|
||||||
|
|||||||
@@ -168,7 +168,11 @@
|
|||||||
{if !isset($product.deleted)}
|
{if !isset($product.deleted)}
|
||||||
{assign var='productId' value=$product.product_id}
|
{assign var='productId' value=$product.product_id}
|
||||||
{assign var='productAttributeId' value=$product.product_attribute_id}
|
{assign var='productAttributeId' value=$product.product_attribute_id}
|
||||||
{if isset($customizedDatas.$productId.$productAttributeId)}{assign var='productQuantity' value=$product.product_quantity-$product.customizationQuantityTotal}{else}{assign var='productQuantity' value=$product.product_quantity}{/if}
|
{if isset($customizedDatas.$productId.$productAttributeId)}
|
||||||
|
{assign var='productQuantity' value=$product.product_quantity-$product.customizationQuantityTotal}
|
||||||
|
{else}
|
||||||
|
{assign var='productQuantity' value=$product.product_quantity}
|
||||||
|
{/if}
|
||||||
<!-- Customized products -->
|
<!-- Customized products -->
|
||||||
{if isset($customizedDatas.$productId.$productAttributeId)}
|
{if isset($customizedDatas.$productId.$productAttributeId)}
|
||||||
<tr class="item">
|
<tr class="item">
|
||||||
|
|||||||
Reference in new issue
Block a user