Skip to content

Commit

Permalink
Merge pull request #3929 from maximebiloe/product-page
Browse files Browse the repository at this point in the history
[*] FO : Product page for StarterTheme
  • Loading branch information
julienbourdeau committed Sep 8, 2015
2 parents 9b9c596 + 3c3f1db commit 6d585b4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions controllers/front/ProductController.php
Expand Up @@ -293,7 +293,7 @@ public function initContent()
'display_discount_price' => Configuration::get('PS_DISPLAY_DISCOUNT_PRICE'),
));
}
$this->setTemplate(_PS_THEME_DIR_.'product.tpl');
$this->setTemplate('catalog/product.tpl');
}

/**
Expand Down Expand Up @@ -727,11 +727,11 @@ protected function formatQuantityDiscounts($specific_prices, $price, $tax_rate,
$row['real_value'] = $price > 0 ? $price - $cur_price : $cur_price;
} else {
if ($row['reduction_type'] == 'amount') {
if (Product::$_taxCalculationMethod == PS_TAX_INC) {
$row['real_value'] = $row['reduction_tax'] == 1 ? $row['reduction'] : $row['reduction'] * (1 + $tax_rate / 100);
} else {
$row['real_value'] = $row['reduction_tax'] == 0 ? $row['reduction'] : $row['reduction'] / (1 + $tax_rate / 100);
}
if (Product::$_taxCalculationMethod == PS_TAX_INC) {
$row['real_value'] = $row['reduction_tax'] == 1 ? $row['reduction'] : $row['reduction'] * (1 + $tax_rate / 100);
} else {
$row['real_value'] = $row['reduction_tax'] == 0 ? $row['reduction'] : $row['reduction'] / (1 + $tax_rate / 100);
}
$row['reduction_with_tax'] = $row['reduction_tax'] ? $row['reduction'] : $row['reduction'] + ($row['reduction'] *$tax_rate) / 100;
} else {
$row['real_value'] = $row['reduction'] * 100;
Expand Down

0 comments on commit 6d585b4

Please sign in to comment.