What's New
Viewing 8 posts - 1 through 8 (of 8 total)
Viewing 8 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic.
Tagged: price reduction, sticker, taxes
Hello, we have set prices without taxes for all user groups in our shop, but when we create an specific price it’s showed with tax included. Taking a look at the code it seems that it comes from sticker module, how can we change it in the .tpl?
This is example is a discount of 2€ (tax excluded) in a product that costs 10€ (tax exluded). It should show:
Price: 8€
Old price: 10€
Discount: 2€
And then in the cart show all tax info.
Thanks!
In our Prestashop version the same lines are different
// TODO: add percent sign according to locale preferences
$this->product[‘discount_percentage’] = Tools::displayNumber($presNegativeReduction) . ‘%’;
$this->product[‘discount_percentage_absolute’] = Tools::displayNumber($presAbsoluteReduction) . ‘%’;
// TODO: Fix issue with tax calculation
$this->product[‘discount_amount’] = $this->priceFormatter->format(
$product[‘reduction’]
);
$this->product[‘discount_amount_to_display’] = ‘-‘ . $this->product[‘discount_amount’];
$regular_price = $product[‘price_without_reduction’];
}
If someone faces the same problem, add this in classes – product.php above this “$row[‘specific_prices’] = $specific_prices;”
$row[‘reduction_without_tax’] = Product::getPriceStatic(
(int) $row[‘id_product’],
false,
$id_product_attribute,
6,
null,
true,
true,
$quantity,
true,
null,
null,
null,
$specific_prices
);
then you will be able to use $product[‘reduction_without_tax’]
You must be logged in to reply to this topic.