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

Commit

Permalink
BugFix: Problem with variation prices.
Browse files Browse the repository at this point in the history
  • Loading branch information
ecoslado committed Nov 20, 2015
1 parent 98812e8 commit 91bb954
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
Binary file modified dist/doofinder-p1.5-latest.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion doofinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Doofinder extends Module

const GS_SHORT_DESCRIPTION = 1;
const GS_LONG_DESCRIPTION = 2;
const VERSION = "2.0.9";
const VERSION = "2.0.10";

const YES = 1;
const NO = 0;
Expand Down
13 changes: 12 additions & 1 deletion feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@
echo dfTools::splitReferences($product_title);

// PRODUCT PRICE & ON SALE PRICE
if ($cfg_display_prices)
if ($cfg_display_prices && !$cfg_product_variations)
{
echo TXT_SEPARATOR;

Expand All @@ -249,6 +249,17 @@
echo (($product_price && $onsale_price && $product_price != $onsale_price) ? Tools::convertPrice($onsale_price, $currency) : "");
}

else if ($cfg_display_prices && $cfg_product_variations)
{
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);

echo ($product_price ? Tools::convertPrice($product_price, $currency) : "").TXT_SEPARATOR;
echo (($product_price && $onsale_price && $product_price != $onsale_price) ? Tools::convertPrice($onsale_price, $currency) : "");
}

if ($cfg_product_variations){

echo TXT_SEPARATOR;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "doofinder-for-prestashop",
"version": "2.0.9",
"version": "2.0.10",
"devDependencies": {
"grunt": "^0.4.5",
"grunt-contrib-clean": "^0.5.0",
Expand Down

0 comments on commit 91bb954

Please sign in to comment.