Skip to content

Commit

Permalink
Merge pull request #34 from styladev/release
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
ssachtleben authored Jan 7, 2019
2 parents ce15c33 + 1686bd2 commit cd01180
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 19 deletions.
14 changes: 9 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
* 0.2.1.0 (2018-12-18)
* added support for multiple paths
* added support for bundle and grouped products

* 0.2.0.2 (2018-01-24)
* bugfix on cart count update

Expand All @@ -14,24 +18,24 @@
* pricing data for configurable products
* support for [custom search engines](doc/customization/custom-search-engines.md)
* documentation improvements

* 0.1.1.11 (2017-03-24)
* fixed an issue with wrong product urls in multi store setups

* 0.1.1.9 (2017-02-01)
* improved seo api caching [#8](https://github.com/styladev/magentoStylaConnect/issues/8)
* increased seo request timeout

* 0.1.1.8 (2017-01-07)
* stability improvements

* 0.1.1.7 (2016-12-01)
* improved seo features for magazine pages
* improved multi magazine handling

* 0.1.1.6 (2016-08-16)
* stability and documentation improvements

* 0.1.1.5 (2016-02-12)

* feature multi magazine support
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Styla Connect (v 0.2.0.2)
# Styla Connect (v 0.2.1.0)
---

Requires:
* PHP >= 5.3. Since Magento 1 itself does not run on PHP7, we haven't tested on this PHP version.
* Magento 1.7 or later, for our Magento 2 plugin check this https://github.com/styladev/magentoStylaConnect
* Magento REST API activated to share product information http://devdocs.magento.com/guides/m1x/api/rest/introduction.html

Styla Connect is a module to connect your Magento Store with [Styla](http://www.styla.com/). The first diagram on [this page](https://styladocs.atlassian.net/wiki/spaces/CO/pages/9961481/Technical+Integration) should provide you an overview of what the plugin does and how it exchanges data with Styla.
Styla Connect is a module to connect your Magento Store with [Styla](http://www.styla.com/). The first diagram on [this page](https://styladocs.atlassian.net/wiki/spaces/CO/pages/9961481/Technical+Integration) should provide you an overview of what the plugin does and how it exchanges data with Styla.

* [Installation](doc/installation.md)
* [Configuration](doc/configuration.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ protected function _calculatePriceAddition($basePrice, $value, $isPercent)
* @param array $productInfo
* @return array
*/
protected function _collectAdditionalProductInfo($product, $productInfo)
protected function _collectAdditionalProductInfo(Mage_Catalog_Model_Product $product, $productInfo)
{
parent::_collectAdditionalProductInfo($product, $productInfo);

Expand Down Expand Up @@ -156,7 +156,7 @@ protected function _collectAdditionalProductInfo($product, $productInfo)

$attributeInfo = array(
'id' => $attributeId,
'label' => $productAttribute->getFrontendLabel(),
'label' => empty($productAttribute->getStoreLabel()) ? $productAttribute->getFrontendLabel() : $productAttribute->getStoreLabel(),
);

$attributeOptions = array();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ class Styla_Connect_Model_Product_Info_Renderer_Grouped

/**
* Add grouped product's options data to the product info array.
*
* @param Mage_Catalog_Model_Product $product
* @param array $productInfo
* @param array $productInfo
*
* @return array
*/
protected function _collectAdditionalProductInfo(Mage_Catalog_Model_Product $product, $productInfo)
Expand All @@ -29,17 +31,20 @@ protected function _collectAdditionalProductInfo(Mage_Catalog_Model_Product $pro
* Returns grouped product price.
*
* @param array $associatedProducts
*
* @return string
*/
protected function getGroupedPrice($associatedProducts)
{
$finalPrice = 0;
foreach ($associatedProducts as $associatedProduct) {
$price = Mage::helper('tax')
->getPrice($associatedProduct, $associatedProduct->getFinalPrice());
if ($associatedProduct->isSaleable()) {
$price = Mage::helper('tax')
->getPrice($associatedProduct, $associatedProduct->getFinalPrice());

$qty = (int) $associatedProduct->getQty() === 0 ? 1 : $associatedProduct->getQty();
$finalPrice += $price * $qty;
$qty = (int) $associatedProduct->getQty() === 0 ? 1 : $associatedProduct->getQty();
$finalPrice += $price * $qty;
}
}

return number_format(
Expand All @@ -62,8 +67,9 @@ protected function getFormattedAssociatedProducts($associatedProducts)
$data = [];
foreach ($associatedProducts as $associatedProduct) {
$data[] = [
'id' => $associatedProduct->getId(),
'name' => $associatedProduct->getName(),
'id' => $associatedProduct->getId(),
'name' => $associatedProduct->getName(),
'saleable' => (bool) $associatedProduct->isSaleable(),
];
}

Expand Down
2 changes: 1 addition & 1 deletion app/code/community/Styla/Connect/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<config>
<modules>
<Styla_Connect>
<version>0.2.0.2</version>
<version>0.2.1.0</version>
</Styla_Connect>
</modules>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

<div id="stylaMagazine"
data-language="<?php echo $page->getLanguageCode() ?>"
data-rootpath="<?php echo $this->getRootPath() ?>"
data-pluginversion="<?php echo $this->getPluginVersion()?>"></div>
<script src="<?php echo $page->getScriptUrl()?>" async></script>
<link rel="stylesheet" type="text/css" href="<?php echo $page->getCssUrl() ?>">
<link rel="stylesheet" type="text/css" href="<?php echo $page->getCssUrl() ?>">

0 comments on commit cd01180

Please sign in to comment.