Skip to content

Commit

Permalink
Merge pull request #18 from magmodules/1.6.8
Browse files Browse the repository at this point in the history
1.6.8
  • Loading branch information
Marvin-Magmodules authored Sep 20, 2018
2 parents dcd473c + 9642b17 commit c11f481
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
15 changes: 13 additions & 2 deletions app/code/community/Magmodules/Channable/Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ public function getProductPrice($product, $config)
case 'bundle':
if ($product->getPriceType() == '1') {
$price = $this->processPrice($product, $product->getPrice(), $config);
$finalPrice = $this->processPrice($product, $product->getFinalPrice(), $config);;
$finalPrice = $this->processPrice($product, $product->getFinalPrice(), $config);
$minPrice = $this->processPrice($product, $product->getData('min_price'), $config);
$maxPrice = $this->processPrice($product, $product->getData('max_price'), $config);

Expand Down Expand Up @@ -652,13 +652,23 @@ public function getProductPrice($product, $config)
break;
default:
$price = $this->processPrice($product, $product->getPrice(), $config);
$finalPrice = $this->processPrice($product, $product->getFinalPrice(), $config);;
$finalPrice = $this->processPrice($product, $product->getFinalPrice(), $config);
$specialPrice = $this->processPrice($product, $product->getSpecialPrice(), $config);
$minPrice = $this->processPrice($product, $product->getData('min_price'), $config);
$maxPrice = $this->processPrice($product, $product->getData('max_price'), $config);

if ($specialPrice > 0 && $specialPrice < $finalPrice) {
$finalPrice = $specialPrice;
}

if ($finalPrice < $minPrice) {
$minPrice = $finalPrice;
}

if ((floatval($price) == 0) && (floatval($minPrice) !== 0)) {
$price = $minPrice;
}

break;
}

Expand Down Expand Up @@ -689,6 +699,7 @@ public function getProductPrice($product, $config)
}
}

$priceData['final_price_clean'] = $finalPrice;
$priceData['sales_price'] = $this->formatPrice($finalPrice, $config);
}

Expand Down
2 changes: 1 addition & 1 deletion app/code/community/Magmodules/Channable/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<config>
<modules>
<Magmodules_Channable>
<version>1.6.7</version>
<version>1.6.8</version>
</Magmodules_Channable>
</modules>
<global>
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "magmodules/magento1-channable",
"type": "magento-module",
"description": "Magento 1 Channable integration",
"version": "v1.6.7",
"version": "v1.6.8",
"keywords": [
"magento"
],
Expand Down

0 comments on commit c11f481

Please sign in to comment.