This commit is contained in:
jitendra 2019-11-05 15:23:01 +05:30
parent 6537f66441
commit f4a562da5c
1 changed files with 12 additions and 7 deletions

View File

@ -293,7 +293,7 @@ class Bundle extends AbstractType
public function getPriceHtml()
{
$prices = $this->getProductPrices();
$priceHtml = '<div class="price-from">';
if ($prices['from']['regular_price']['price'] != $prices['from']['final_price']['price']) {
@ -303,13 +303,18 @@ class Bundle extends AbstractType
$priceHtml .= '<span>' . $prices['from']['regular_price']['formated_price'] . '</span>';
}
$priceHtml .= '<span style="font-weight: 500;margin-top: 1px;margin-bottom: 1px;display: block;">To</span>';
if ($prices['to']['regular_price']['price'] != $prices['to']['final_price']['price']) {
$priceHtml .= '<span class="regular-price">' . $prices['to']['regular_price']['formated_price'] . '</span>'
. '<span class="special-price">' . $prices['to']['final_price']['formated_price'] . '</span>';
} else {
$priceHtml .= '<span>' . $prices['to']['regular_price']['formated_price'] . '</span>';
if ($prices['from']['regular_price']['price'] != $prices['to']['regular_price']['price']
|| $prices['from']['final_price']['price'] != $prices['to']['final_price']['price']) {
$priceHtml .= '<span style="font-weight: 500;margin-top: 1px;margin-bottom: 1px;display: block;">To</span>';
if ($prices['to']['regular_price']['price'] != $prices['to']['final_price']['price']) {
$priceHtml .= '<span class="regular-price">' . $prices['to']['regular_price']['formated_price'] . '</span>'
. '<span class="special-price">' . $prices['to']['final_price']['formated_price'] . '</span>';
} else {
$priceHtml .= '<span>' . $prices['to']['regular_price']['formated_price'] . '</span>';
}
}
$priceHtml .= '</div>';