Issue #1779 fixed
This commit is contained in:
parent
f80109ba8b
commit
195a37fea3
|
|
@ -521,6 +521,8 @@ class Bundle extends AbstractType
|
|||
*/
|
||||
public function getAdditionalOptions($data)
|
||||
{
|
||||
$bundleOptionQuantities = $data['bundle_option_qty'];
|
||||
|
||||
foreach ($data['bundle_options'] as $optionId => $optionProductIds) {
|
||||
$option = $this->productBundleOptionRepository->find($optionId);
|
||||
|
||||
|
|
@ -531,11 +533,11 @@ class Bundle extends AbstractType
|
|||
continue;
|
||||
|
||||
$optionProduct = $this->productBundleOptionProductRepository->find($optionProductId);
|
||||
|
||||
|
||||
$qty = $data['bundle_option_qty'][$optionId] ?? $optionProduct->qty;
|
||||
|
||||
if (! isset($data['bundle_option_qty'][$optionId]))
|
||||
$data['bundle_option_qty'][$optionId] = $qty;
|
||||
$bundleOptionQuantities[$optionId] = $qty;
|
||||
|
||||
$labels[] = $qty . ' x ' . $optionProduct->product->name . ' ' . core()->currency($optionProduct->product->getTypeInstance()->getMinimalPrice());
|
||||
}
|
||||
|
|
@ -549,6 +551,8 @@ class Bundle extends AbstractType
|
|||
}
|
||||
}
|
||||
|
||||
$data['bundle_option_qty'] = $bundleOptionQuantities;
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue