Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
currency rounding to 6 decimals (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
serguitus authored and ecoslado committed Jun 13, 2017
1 parent 77a4454 commit c4eea57
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,8 @@ function slugify($text)
{
echo TXT_SEPARATOR;

$product_price = Product::getPriceStatic($row['id_product'], $cfg_prices_w_taxes, null, 2, null, false, false);
$onsale_price = Product::getPriceStatic($row['id_product'], $cfg_prices_w_taxes, null, 2);
$product_price = Product::getPriceStatic($row['id_product'], $cfg_prices_w_taxes, null, 6, null, false, false);
$onsale_price = Product::getPriceStatic($row['id_product'], $cfg_prices_w_taxes, null, 6);

echo ($product_price ? Tools::convertPrice($product_price, $currency) : "").TXT_SEPARATOR;
echo (($product_price && $onsale_price && $product_price != $onsale_price) ? Tools::convertPrice($onsale_price, $currency) : "");
Expand All @@ -344,8 +344,8 @@ function slugify($text)
else if ($cfg_display_prices && $cfg_product_variations == 1)
{
echo TXT_SEPARATOR;
$product_price = Product::getPriceStatic($row['id_product'], $cfg_prices_w_taxes, $row['id_product_attribute'], 2, null, false, false);
$onsale_price = Product::getPriceStatic($row['id_product'], $cfg_prices_w_taxes, $row['id_product_attribute'], 2);
$product_price = Product::getPriceStatic($row['id_product'], $cfg_prices_w_taxes, $row['id_product_attribute'], 6, null, false, false);
$onsale_price = Product::getPriceStatic($row['id_product'], $cfg_prices_w_taxes, $row['id_product_attribute'], 6);
echo ($product_price ? Tools::convertPrice($product_price, $currency) : "").TXT_SEPARATOR;
echo (($product_price && $onsale_price && $product_price != $onsale_price) ? Tools::convertPrice($onsale_price, $currency) : "");
}
Expand Down

0 comments on commit c4eea57

Please sign in to comment.