Skip to content

Commit

Permalink
Merge pull request #19 from magmodules/1.6.9
Browse files Browse the repository at this point in the history
1.6.9
  • Loading branch information
Marvin-Magmodules authored Oct 16, 2018
2 parents c11f481 + ee5b3e6 commit 39ac859
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 6 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ php:
- 5.6
- 7.0
- 7.1
- 7.2

sudo: false

Expand Down
4 changes: 3 additions & 1 deletion app/code/community/Magmodules/Channable/Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -1088,8 +1088,10 @@ public function getProductRelations($product, $type)
}

$skus = array();
/** @var Mage_Catalog_Model_Resource_Eav_Mysql4_Product $resource */
$resource = Mage::getSingleton('catalog/product')->getResource();
foreach ($products as $product) {
$skus[] = $product->getSku();
$skus[] = $resource->getAttributeRawValue($product->getId(),'sku',0);
}

return implode(',', $skus);
Expand Down
4 changes: 2 additions & 2 deletions app/code/community/Magmodules/Channable/Helper/Selftest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
runTests<?php
/**
* Magmodules.eu - http://www.magmodules.eu
*
Expand Down Expand Up @@ -65,7 +65,7 @@ public function runTests()
$result[] = $this->getPass('Catalog Product Flat is enabled');

$storeId = $this->getStoreIdConfig();
$nonFlatAttributes = $this->checkFlatCatalog($model->getFeedAttributes('', $storeId));
$nonFlatAttributes = $this->checkFlatCatalog($model->getFeedAttributes($storeId, 'selftest'));

if (!empty($nonFlatAttributes)) {
$atts = '<i>' . implode($nonFlatAttributes, ', ') . '</i>';
Expand Down
16 changes: 15 additions & 1 deletion app/code/community/Magmodules/Channable/Model/Channable.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ public function getFeedAttributes($storeId = 0, $type = 'xml', $config = '')
}
}

if ($extraFields = @unserialize($this->helper->getConfigData('advanced/extra', $storeId))) {
if ($extraFields = $this->helper->getSerializedConfigData('advanced/extra', $storeId)) {
$i = 1;
foreach ($extraFields as $extraField) {
$attributes['extra-' . $i] = array(
Expand All @@ -331,6 +331,20 @@ public function getFeedAttributes($storeId = 0, $type = 'xml', $config = '')
}
}

if ($type == 'selftest') {
if($filters = $this->helper->getSerializedConfigData('filter/advanced', $storeId)) {
$i = 1;
foreach ($filters as $filter) {
$attributes['filter-' . $i] = array(
'label' => $filter['attribute'],
'source' => $filter['attribute'],
'action' => ''
);
$i++;
}
}
}

if ($type != 'config') {
$attributes = $this->helper->addAttributeData($attributes, $config);
}
Expand Down
2 changes: 2 additions & 0 deletions app/code/community/Magmodules/Channable/Model/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -354,11 +354,13 @@ public function getParentAttributeSelection($atts)

return $attributes;
}

/**
* @param array $parentRelations
* @param array $config
*
* @return Mage_Catalog_Model_Resource_Product_Collection
* @throws Mage_Core_Exception
*/
public function getParents($parentRelations, $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.8</version>
<version>1.6.9</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.8",
"version": "v1.6.9",
"keywords": [
"magento"
],
Expand Down

0 comments on commit 39ac859

Please sign in to comment.