Merge pull request #3075 from MattApril/hide_0_dollar_bundle_item_price

Hide $0 bundle option price in cart
This commit is contained in:
Jitendra Singh 2020-07-14 19:41:15 +05:30 committed by GitHub
commit 0a662c34f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -585,7 +585,14 @@ class Bundle extends AbstractType
$bundleOptionQuantities[$option->id] = $qty;
}
$labels[] = $qty . ' x ' . $optionProduct->product->name . ' ' . core()->currency($optionProduct->product->getTypeInstance()->getMinimalPrice());
$label = $qty . ' x ' . $optionProduct->product->name;
$price = $optionProduct->product->getTypeInstance()->getMinimalPrice();
if($price != 0){
$label .= ' ' . core()->currency($price);
}
$labels[] = $label;
}
if (count($labels)) {