Skip to content

Commit

Permalink
Merge pull request #13 from magmodules/1.6.2
Browse files Browse the repository at this point in the history
1.6.2
  • Loading branch information
Marvin-Magmodules authored May 1, 2018
2 parents dc265d5 + 63bb30e commit 614250e
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 17 deletions.
19 changes: 19 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
language: php

php:
- 5.6
- 7.0
- 7.1

sudo: false

cache:
directories:
- $HOME/.composer/cache

install:
- travis_retry composer install --no-interaction

script:
- composer validate
- find . -name '*.php' | xargs -n 1 -P4 php -l
6 changes: 5 additions & 1 deletion app/code/community/Magmodules/Channable/Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ public function getAttributeValue($field, $product, $config, $actions = '', $par
}
}

if (!empty($data['source']) && ($data['source'] == 'attribute_set_name')) {
$field = 'attribute_set_name';
}

switch ($field) {
case 'product_url':
$value = $this->getProductUrl($product, $config, $parent, $parentAttributes);
Expand Down Expand Up @@ -195,7 +199,7 @@ public function getAttributeValue($field, $product, $config, $actions = '', $par
case 'parent_id':
$value = $this->getProductData($parent, $data);
break;
case 'attribute_set_id':
case 'attribute_set_name':
$value = $this->getAttributeSetName($productData);
break;
case 'stock':
Expand Down
6 changes: 6 additions & 0 deletions app/code/community/Magmodules/Channable/Helper/Selftest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ public function runTests()
/** @var Magmodules_Channable_Model_Channable $model */
$model = Mage::getModel("channable/channable");

if (version_compare(PHP_VERSION, '5.4.0') >= 0) {
$result[] = $this->getPass('Compatible PHP version: ' . PHP_VERSION);
} else {
$result[] = $this->getFail('Module requires PHP version >= 5.4, current version: ' . PHP_VERSION);
}

$enabled = Mage::getStoreConfig('channable/connect/enabled');
if ($enabled) {
$result[] = $this->getPass('Module Enabled');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ public function getExtraFields()
'label' => Mage::helper('channable')->__('Attribute Set ID'),
'value' => 'attribute_set_id'
);
$optionArray[] = array(
'label' => Mage::helper('channable')->__('Attribute Set Name'),
'value' => 'attribute_set_name'
);
$optionArray[] = array(
'label' => Mage::helper('channable')->__('Minumun Sales Quantity'),
'value' => 'min_sale_qty'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function createTokenAction()
*/
protected function _isAllowed()
{
return Mage::getSingleton('admin/session')->isAllowed('admin/channable/channable');
return Mage::getSingleton('admin/session')->isAllowed('admin/system/config/channable');
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ public function runAction()
*/
protected function _isAllowed()
{
return Mage::getSingleton('admin/session')->isAllowed('admin/channable/channable');
return Mage::getSingleton('admin/session')->isAllowed('admin/system/config/channable');
}
}
11 changes: 0 additions & 11 deletions app/code/community/Magmodules/Channable/etc/adminhtml.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,6 @@
</config>
</children>
</system>
<channable module="channable">
<title>Channable</title>
<sort_order>200</sort_order>
<children>
<channable module="channable">
<title>Channable</title>
<sort_order>100</sort_order>
<action>adminhtml/channable/</action>
</channable>
</children>
</channable>
</children>
</admin>
</resources>
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.1</version>
<version>1.6.2</version>
</Magmodules_Channable>
</modules>
<global>
Expand Down
4 changes: 2 additions & 2 deletions 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.1",
"version": "v1.6.2",
"keywords": [
"magento"
],
Expand All @@ -14,6 +14,6 @@
}
],
"require": {
"php": ">5.6.0"
"php": ">=5.6.0"
}
}

0 comments on commit 614250e

Please sign in to comment.