Magmodules_Channable - Version 1.5.2

Version Notes

Channable Connect

Download this release

Release Info

Developer Magmodules
Extension Magmodules_Channable
Version 1.5.2
Comparing to
See all releases


Code changes from version 1.5.1 to 1.5.2

Files changed (53) hide show
  1. app/code/community/Magmodules/Channable/Block/Adminhtml/Config/Form/Field/Extra.php +19 -15
  2. app/code/community/Magmodules/Channable/Block/Adminhtml/Config/Form/Field/Filter.php +36 -33
  3. app/code/community/Magmodules/Channable/Block/Adminhtml/Config/Form/Field/Shipping.php +32 -28
  4. app/code/community/Magmodules/Channable/Block/Adminhtml/Config/Form/Renderer/Select.php +28 -19
  5. app/code/community/Magmodules/Channable/Block/Adminhtml/System/Config/Form/Field/Feeds.php +46 -27
  6. app/code/community/Magmodules/Channable/Block/Adminhtml/System/Config/Form/Field/Heading.php +19 -14
  7. app/code/community/Magmodules/Channable/Block/Adminhtml/System/Config/Form/Field/Note.php +19 -14
  8. app/code/community/Magmodules/Channable/Block/Adminhtml/System/Config/Form/Field/Token.php +26 -17
  9. app/code/community/Magmodules/Channable/Block/Adminhtml/System/Config/Form/Field/Version.php +21 -16
  10. app/code/community/Magmodules/Channable/Block/Adminhtml/Widget/Info/Info.php +46 -24
  11. app/code/community/Magmodules/Channable/Helper/Data.php +86 -47
  12. app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Backend/Design/Extra.php +18 -13
  13. app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Backend/Design/Filter.php +18 -14
  14. app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Backend/Design/Shipping.php +18 -13
  15. app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Action.php +17 -13
  16. app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Attribute.php +17 -13
  17. app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Category.php +18 -13
  18. app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Categorytype.php +17 -13
  19. app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Conditions.php +17 -13
  20. app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Configurable.php +17 -13
  21. app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Countries.php +17 -13
  22. app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Images.php +17 -13
  23. app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Mainimage.php +17 -13
  24. app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Name.php +24 -18
  25. app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Pricemodel.php +17 -13
  26. app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Selectattribute.php +24 -18
  27. app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Shipping.php +17 -13
  28. app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Tax.php +17 -13
  29. app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Textattribute.php +30 -25
  30. app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Type.php +17 -13
  31. app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Visibility.php +17 -13
  32. app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Weight.php +17 -13
  33. app/code/community/Magmodules/Channable/Model/Channable.php +340 -310
  34. app/code/community/Magmodules/Channable/Model/Common.php +111 -102
  35. app/code/community/Magmodules/Channable/controllers/Adminhtml/ChannableController.php +54 -16
  36. app/code/community/Magmodules/Channable/controllers/FeedController.php +27 -16
  37. app/code/community/Magmodules/Channable/data/magmodules_channable_setup/data-upgrade-1.4.8-1.4.9.php +31 -17
  38. app/code/community/Magmodules/Channable/etc/adminhtml.xml +21 -17
  39. app/code/community/Magmodules/Channable/etc/config.xml +20 -21
  40. app/code/community/Magmodules/Channable/etc/system.xml +573 -527
  41. app/code/community/Magmodules/Channable/sql/magmodules_channable_setup/upgrade-1.4.8-1.4.9.php +28 -24
  42. app/etc/modules/Magmodules_Channable.xml +26 -7
  43. app/locale/da_DK/Magmodules_Channable.csv +0 -0
  44. app/locale/de_DE/Magmodules_Channable.csv +0 -0
  45. app/locale/en_US/Magmodules_Channable.csv +73 -65
  46. app/locale/es_ES/Magmodules_Channable.csv +0 -0
  47. app/locale/fr_FR/Magmodules_Channable.csv +0 -0
  48. app/locale/it_IT/Magmodules_Channable.csv +0 -0
  49. app/locale/nl_NL/Magmodules_Channable.csv +2 -1
  50. app/locale/pl_PL/Magmodules_Channable.csv +0 -0
  51. app/locale/pt_PT/Magmodules_Channable.csv +0 -0
  52. app/locale/sv_SE/Magmodules_Channable.csv +0 -0
  53. package.xml +4 -4
app/code/community/Magmodules/Channable/Block/Adminhtml/Config/Form/Field/Extra.php CHANGED
@@ -1,18 +1,22 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
 
18
  class Magmodules_Channable_Block_Adminhtml_Config_Form_Field_Extra
@@ -38,8 +42,8 @@ class Magmodules_Channable_Block_Adminhtml_Config_Form_Field_Extra
38
 
39
  $this->addColumn(
40
  'attribute', array(
41
- 'label' => Mage::helper('channable')->__('Magento Attribute'),
42
- 'style' => 'width:120px',
43
  'renderer' => $rendererAttributes
44
  )
45
  );
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  class Magmodules_Channable_Block_Adminhtml_Config_Form_Field_Extra
42
 
43
  $this->addColumn(
44
  'attribute', array(
45
+ 'label' => Mage::helper('channable')->__('Magento Attribute'),
46
+ 'style' => 'width:120px',
47
  'renderer' => $rendererAttributes
48
  )
49
  );
app/code/community/Magmodules/Channable/Block/Adminhtml/Config/Form/Field/Filter.php CHANGED
@@ -1,18 +1,22 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
 
18
  class Magmodules_Channable_Block_Adminhtml_Config_Form_Field_Filter
@@ -25,64 +29,63 @@ class Magmodules_Channable_Block_Adminhtml_Config_Form_Field_Filter
25
  * Magmodules_Channable_Block_Adminhtml_Config_Form_Field_Filter constructor.
26
  */
27
  public function __construct()
28
- {
29
  $layout = Mage::app()->getFrontController()->getAction()->getLayout();
30
  $rendererAttributes = $layout->createBlock(
31
  'channable/adminhtml_config_form_renderer_select',
32
  '',
33
  array('is_render_to_js_template' => true)
34
- );
35
  $rendererAttributes->setOptions(
36
  Mage::getModel('channable/adminhtml_system_config_source_attribute')->toOptionArray()
37
  );
38
-
39
  $rendererConditions = $layout->createBlock(
40
  'channable/adminhtml_config_form_renderer_select',
41
  '',
42
  array('is_render_to_js_template' => true)
43
- );
44
-
45
  $rendererConditions->setOptions(
46
  Mage::getModel('channable/adminhtml_system_config_source_conditions')->toOptionArray()
47
  );
48
 
49
  $this->addColumn(
50
  'attribute', array(
51
- 'label' => Mage::helper('channable')->__('Attribute'),
52
- 'style' => 'width:100px',
53
- 'renderer' => $rendererAttributes
54
  )
55
  );
56
-
57
  $this->addColumn(
58
  'condition', array(
59
- 'label' => Mage::helper('channable')->__('Condition'),
60
- 'style' => 'width:100px',
61
- 'renderer' => $rendererConditions
62
  )
63
  );
64
 
65
  $this->addColumn(
66
  'value', array(
67
- 'label' => Mage::helper('channable')->__('Value'),
68
- 'style' => 'width:100px',
69
  )
70
- );
71
 
72
- $this->_renders['attribute'] = $rendererAttributes;
73
- $this->_renders['condition'] = $rendererConditions;
74
 
75
  $this->_addAfter = false;
76
  $this->_addButtonLabel = Mage::helper('channable')->__('Add Filter');
77
  parent::__construct();
78
  }
79
 
80
-
81
  /**
82
  * @param Varien_Object $row
83
  */
84
  protected function _prepareArrayRow(Varien_Object $row)
85
- {
86
  foreach ($this->_renders as $key => $render) {
87
  $row->setData(
88
  'option_extra_attr_' . $render->calcOptionHash($row->getData($key)),
@@ -90,4 +93,4 @@ class Magmodules_Channable_Block_Adminhtml_Config_Form_Field_Filter
90
  );
91
  }
92
  }
93
- }
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  class Magmodules_Channable_Block_Adminhtml_Config_Form_Field_Filter
29
  * Magmodules_Channable_Block_Adminhtml_Config_Form_Field_Filter constructor.
30
  */
31
  public function __construct()
32
+ {
33
  $layout = Mage::app()->getFrontController()->getAction()->getLayout();
34
  $rendererAttributes = $layout->createBlock(
35
  'channable/adminhtml_config_form_renderer_select',
36
  '',
37
  array('is_render_to_js_template' => true)
38
+ );
39
  $rendererAttributes->setOptions(
40
  Mage::getModel('channable/adminhtml_system_config_source_attribute')->toOptionArray()
41
  );
42
+
43
  $rendererConditions = $layout->createBlock(
44
  'channable/adminhtml_config_form_renderer_select',
45
  '',
46
  array('is_render_to_js_template' => true)
47
+ );
48
+
49
  $rendererConditions->setOptions(
50
  Mage::getModel('channable/adminhtml_system_config_source_conditions')->toOptionArray()
51
  );
52
 
53
  $this->addColumn(
54
  'attribute', array(
55
+ 'label' => Mage::helper('channable')->__('Attribute'),
56
+ 'style' => 'width:100px',
57
+ 'renderer' => $rendererAttributes
58
  )
59
  );
60
+
61
  $this->addColumn(
62
  'condition', array(
63
+ 'label' => Mage::helper('channable')->__('Condition'),
64
+ 'style' => 'width:100px',
65
+ 'renderer' => $rendererConditions
66
  )
67
  );
68
 
69
  $this->addColumn(
70
  'value', array(
71
+ 'label' => Mage::helper('channable')->__('Value'),
72
+ 'style' => 'width:100px',
73
  )
74
+ );
75
 
76
+ $this->_renders['attribute'] = $rendererAttributes;
77
+ $this->_renders['condition'] = $rendererConditions;
78
 
79
  $this->_addAfter = false;
80
  $this->_addButtonLabel = Mage::helper('channable')->__('Add Filter');
81
  parent::__construct();
82
  }
83
 
 
84
  /**
85
  * @param Varien_Object $row
86
  */
87
  protected function _prepareArrayRow(Varien_Object $row)
88
+ {
89
  foreach ($this->_renders as $key => $render) {
90
  $row->setData(
91
  'option_extra_attr_' . $render->calcOptionHash($row->getData($key)),
93
  );
94
  }
95
  }
96
+ }
app/code/community/Magmodules/Channable/Block/Adminhtml/Config/Form/Field/Shipping.php CHANGED
@@ -1,18 +1,22 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
 
18
  class Magmodules_Channable_Block_Adminhtml_Config_Form_Field_Shipping
@@ -25,7 +29,7 @@ class Magmodules_Channable_Block_Adminhtml_Config_Form_Field_Shipping
25
  * Magmodules_Channable_Block_Adminhtml_Config_Form_Field_Shipping constructor.
26
  */
27
  public function __construct()
28
- {
29
  $layout = Mage::app()->getFrontController()->getAction()->getLayout();
30
  $rendererCoutries = $layout->createBlock(
31
  'channable/adminhtml_config_form_renderer_select',
@@ -39,33 +43,33 @@ class Magmodules_Channable_Block_Adminhtml_Config_Form_Field_Shipping
39
 
40
  $this->addColumn(
41
  'country', array(
42
- 'label' => Mage::helper('channable')->__('Country'),
43
- 'style' => 'width:120px',
44
- 'renderer' => $rendererCoutries
45
  )
46
- );
47
 
48
  $this->addColumn(
49
  'price_from', array(
50
- 'label' => Mage::helper('channable')->__('Price From'),
51
- 'style' => 'width:40px',
52
  )
53
  );
54
  $this->addColumn(
55
  'price_to', array(
56
- 'label' => Mage::helper('channable')->__('Price To'),
57
- 'style' => 'width:40px',
58
  )
59
  );
60
  $this->addColumn(
61
  'cost', array(
62
- 'label' => Mage::helper('channable')->__('Cost'),
63
- 'style' => 'width:40px',
64
  )
65
- );
66
 
67
  $this->_renders['country'] = $rendererCoutries;
68
-
69
  $this->_addAfter = false;
70
  $this->_addButtonLabel = Mage::helper('channable')->__('Add Option');
71
  parent::__construct();
@@ -75,10 +79,10 @@ class Magmodules_Channable_Block_Adminhtml_Config_Form_Field_Shipping
75
  * @param Varien_Object $row
76
  */
77
  protected function _prepareArrayRow(Varien_Object $row)
78
- {
79
  foreach ($this->_renders as $key => $render) {
80
  $row->setData('option_extra_attr_' . $render->calcOptionHash($row->getData($key)), 'selected="selected"');
81
  }
82
- }
83
 
84
  }
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  class Magmodules_Channable_Block_Adminhtml_Config_Form_Field_Shipping
29
  * Magmodules_Channable_Block_Adminhtml_Config_Form_Field_Shipping constructor.
30
  */
31
  public function __construct()
32
+ {
33
  $layout = Mage::app()->getFrontController()->getAction()->getLayout();
34
  $rendererCoutries = $layout->createBlock(
35
  'channable/adminhtml_config_form_renderer_select',
43
 
44
  $this->addColumn(
45
  'country', array(
46
+ 'label' => Mage::helper('channable')->__('Country'),
47
+ 'style' => 'width:120px',
48
+ 'renderer' => $rendererCoutries
49
  )
50
+ );
51
 
52
  $this->addColumn(
53
  'price_from', array(
54
+ 'label' => Mage::helper('channable')->__('Price From'),
55
+ 'style' => 'width:40px',
56
  )
57
  );
58
  $this->addColumn(
59
  'price_to', array(
60
+ 'label' => Mage::helper('channable')->__('Price To'),
61
+ 'style' => 'width:40px',
62
  )
63
  );
64
  $this->addColumn(
65
  'cost', array(
66
+ 'label' => Mage::helper('channable')->__('Cost'),
67
+ 'style' => 'width:40px',
68
  )
69
+ );
70
 
71
  $this->_renders['country'] = $rendererCoutries;
72
+
73
  $this->_addAfter = false;
74
  $this->_addButtonLabel = Mage::helper('channable')->__('Add Option');
75
  parent::__construct();
79
  * @param Varien_Object $row
80
  */
81
  protected function _prepareArrayRow(Varien_Object $row)
82
+ {
83
  foreach ($this->_renders as $key => $render) {
84
  $row->setData('option_extra_attr_' . $render->calcOptionHash($row->getData($key)), 'selected="selected"');
85
  }
86
+ }
87
 
88
  }
app/code/community/Magmodules/Channable/Block/Adminhtml/Config/Form/Renderer/Select.php CHANGED
@@ -1,18 +1,22 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
 
18
  class Magmodules_Channable_Block_Adminhtml_Config_Form_Renderer_Select extends Mage_Core_Block_Html_Select
@@ -20,6 +24,7 @@ class Magmodules_Channable_Block_Adminhtml_Config_Form_Renderer_Select extends M
20
 
21
  /**
22
  * @param $inputName
 
23
  * @return $this
24
  */
25
  public function setInputName($inputName)
@@ -31,6 +36,7 @@ class Magmodules_Channable_Block_Adminhtml_Config_Form_Renderer_Select extends M
31
 
32
  /**
33
  * @param $columnName
 
34
  * @return $this
35
  */
36
  public function setColumnName($columnName)
@@ -42,6 +48,7 @@ class Magmodules_Channable_Block_Adminhtml_Config_Form_Renderer_Select extends M
42
 
43
  /**
44
  * @param $column
 
45
  * @return $this
46
  */
47
  public function setColumn($column)
@@ -116,9 +123,9 @@ class Magmodules_Channable_Block_Adminhtml_Config_Form_Renderer_Select extends M
116
  } else {
117
  $html .= $this->_optionToHtml(
118
  array(
119
- 'value' => $value,
120
- 'label' => $label,
121
- 'params' => $params
122
  ), in_array($value, $values)
123
  );
124
  }
@@ -159,8 +166,9 @@ class Magmodules_Channable_Block_Adminhtml_Config_Form_Renderer_Select extends M
159
  }
160
 
161
  /**
162
- * @param $option
163
  * @param bool $selected
 
164
  * @return string
165
  */
166
  protected function _optionToHtml($option, $selected = false)
@@ -185,14 +193,15 @@ class Magmodules_Channable_Block_Adminhtml_Config_Form_Renderer_Select extends M
185
 
186
  return sprintf(
187
  '<option value="%s"%s %s>%s</option>',
188
- $this->htmlEscape($option['value']),
189
  $selectedHtml,
190
- $params, $this->htmlEscape($option['label'])
191
  );
192
  }
193
 
194
  /**
195
  * @param $optionValue
 
196
  * @return string
197
  */
198
  public function calcOptionHash($optionValue)
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  class Magmodules_Channable_Block_Adminhtml_Config_Form_Renderer_Select extends Mage_Core_Block_Html_Select
24
 
25
  /**
26
  * @param $inputName
27
+ *
28
  * @return $this
29
  */
30
  public function setInputName($inputName)
36
 
37
  /**
38
  * @param $columnName
39
+ *
40
  * @return $this
41
  */
42
  public function setColumnName($columnName)
48
 
49
  /**
50
  * @param $column
51
+ *
52
  * @return $this
53
  */
54
  public function setColumn($column)
123
  } else {
124
  $html .= $this->_optionToHtml(
125
  array(
126
+ 'value' => $value,
127
+ 'label' => $label,
128
+ 'params' => $params
129
  ), in_array($value, $values)
130
  );
131
  }
166
  }
167
 
168
  /**
169
+ * @param $option
170
  * @param bool $selected
171
+ *
172
  * @return string
173
  */
174
  protected function _optionToHtml($option, $selected = false)
193
 
194
  return sprintf(
195
  '<option value="%s"%s %s>%s</option>',
196
+ $this->escapeHtml($option['value']),
197
  $selectedHtml,
198
+ $params, $this->escapeHtml($option['label'])
199
  );
200
  }
201
 
202
  /**
203
  * @param $optionValue
204
+ *
205
  * @return string
206
  */
207
  public function calcOptionHash($optionValue)
app/code/community/Magmodules/Channable/Block/Adminhtml/System/Config/Form/Field/Feeds.php CHANGED
@@ -1,18 +1,22 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
 
 
 
 
 
 
 
 
 
 
9
  *
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
16
  */
17
 
18
  class Magmodules_Channable_Block_Adminhtml_System_Config_Form_Field_Feeds
@@ -21,35 +25,50 @@ class Magmodules_Channable_Block_Adminhtml_System_Config_Form_Field_Feeds
21
 
22
  /**
23
  * @param Varien_Data_Form_Element_Abstract $element
 
24
  * @return string
25
  */
26
  public function render(Varien_Data_Form_Element_Abstract $element)
27
  {
28
  $helper = Mage::helper('channable');
29
  $storeIds = $helper->getStoreIds('channable/connect/enabled');
30
- $token = Mage::getStoreConfig('channable/connect/token');
31
- $htmlFeedlinks = '';
32
 
33
- foreach ($storeIds as $storeId) {
34
- $baseUrl = Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
35
- $channableFeed = $baseUrl . 'channable/feed/get/code/' . $token . '/store/' . $storeId . '/array/1';
36
- $storeTitle = Mage::app()->getStore($storeId)->getName();
37
- $htmlFeedlinks .= '<tr><td>' . $storeTitle . '</td><td><a href="' . $channableFeed . '">Preview</a></td><td><a href="https://app.channable.com/connect/magento.html?store_id=' . $storeId . '&url=' . $baseUrl . '&token=' . $token . '" target="_blank">Click to auto connect with Channable</a></td></tr>';
 
 
 
 
 
 
 
 
 
 
38
  }
39
 
40
- if (!$htmlFeedlinks) {
41
- $htmlFeedlinks = $helper->__('No enabled feed(s) found');
42
  } else {
43
- $htmlHeader = '<div class="grid"><table cellpadding="0" cellspacing="0" class="border" style="width:425px;"><tbody><tr class="headings"><th>Store</th><th>Preview</th><th>Connect</th></tr>';
44
- $htmlFooter = '</tbody></table></div>';
45
- $htmlFeedlinks = $htmlHeader . $htmlFeedlinks . $htmlFooter;
 
 
 
 
 
46
  }
47
 
48
-
49
  return sprintf(
50
  '<tr id="row_%s"><td colspan="6" class="label" style="margin-bottom: 10px;">%s</td></tr>',
51
- $element->getHtmlId(), $htmlFeedlinks
52
  );
53
  }
54
 
55
- }
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
  *
 
 
 
 
 
 
20
  */
21
 
22
  class Magmodules_Channable_Block_Adminhtml_System_Config_Form_Field_Feeds
25
 
26
  /**
27
  * @param Varien_Data_Form_Element_Abstract $element
28
+ *
29
  * @return string
30
  */
31
  public function render(Varien_Data_Form_Element_Abstract $element)
32
  {
33
  $helper = Mage::helper('channable');
34
  $storeIds = $helper->getStoreIds('channable/connect/enabled');
35
+ $token = Mage::helper('channable')->getToken();
36
+ $sHtml = '';
37
 
38
+ if ($token) {
39
+ foreach ($storeIds as $storeId) {
40
+ $baseUrl = Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
41
+ $channableFeed = $baseUrl . 'channable/feed/get/code/' . $token . '/store/' . $storeId . '/array/1';
42
+ $storeTitle = Mage::app()->getStore($storeId)->getName();
43
+ $url = 'https://app.channable.com/connect/magento.html?';
44
+ $url .= 'store_id=' . $storeId . '&url=' . $baseUrl . '&token=' . $token;
45
+ $msg = $this->__('Click to auto connect with Channable');
46
+
47
+ $sHtml .= '<tr>
48
+ <td>' . $storeTitle . '</td>
49
+ <td><a href="' . $channableFeed . '">' . $this->__('Preview') . '</a></td>
50
+ <td><a href="' . $url . '" target="_blank">' . $msg . '</a></td>
51
+ </tr>';
52
+ }
53
  }
54
 
55
+ if (!$sHtml) {
56
+ $html = $helper->__('No enabled feed(s) found or token missing');
57
  } else {
58
+ $html = '<div class="grid">
59
+ <table cellpadding="0" cellspacing="0" class="border" style="width:425px;">
60
+ <tbody>
61
+ <tr class="headings"><th>Store</th><th>Preview</th><th>Connect</th></tr>
62
+ </tbody>
63
+ ' . $sHtml . '
64
+ </table>
65
+ </div>';
66
  }
67
 
 
68
  return sprintf(
69
  '<tr id="row_%s"><td colspan="6" class="label" style="margin-bottom: 10px;">%s</td></tr>',
70
+ $element->getHtmlId(), $html
71
  );
72
  }
73
 
74
+ }
app/code/community/Magmodules/Channable/Block/Adminhtml/System/Config/Form/Field/Heading.php CHANGED
@@ -1,18 +1,22 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
 
18
  class Magmodules_Channable_Block_Adminhtml_System_Config_Form_Field_Heading
@@ -21,6 +25,7 @@ class Magmodules_Channable_Block_Adminhtml_System_Config_Form_Field_Heading
21
 
22
  /**
23
  * @param Varien_Data_Form_Element_Abstract $element
 
24
  * @return string
25
  */
26
  public function render(Varien_Data_Form_Element_Abstract $element)
@@ -31,5 +36,5 @@ class Magmodules_Channable_Block_Adminhtml_System_Config_Form_Field_Heading
31
  $element->getLabel()
32
  );
33
  }
34
-
35
  }
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  class Magmodules_Channable_Block_Adminhtml_System_Config_Form_Field_Heading
25
 
26
  /**
27
  * @param Varien_Data_Form_Element_Abstract $element
28
+ *
29
  * @return string
30
  */
31
  public function render(Varien_Data_Form_Element_Abstract $element)
36
  $element->getLabel()
37
  );
38
  }
39
+
40
  }
app/code/community/Magmodules/Channable/Block/Adminhtml/System/Config/Form/Field/Note.php CHANGED
@@ -1,18 +1,22 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
 
18
  class Magmodules_Channable_Block_Adminhtml_System_Config_Form_Field_Note
@@ -21,6 +25,7 @@ class Magmodules_Channable_Block_Adminhtml_System_Config_Form_Field_Note
21
 
22
  /**
23
  * @param Varien_Data_Form_Element_Abstract $element
 
24
  * @return string
25
  */
26
  public function render(Varien_Data_Form_Element_Abstract $element)
@@ -31,5 +36,5 @@ class Magmodules_Channable_Block_Adminhtml_System_Config_Form_Field_Note
31
  $element->getLabel()
32
  );
33
  }
34
-
35
  }
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  class Magmodules_Channable_Block_Adminhtml_System_Config_Form_Field_Note
25
 
26
  /**
27
  * @param Varien_Data_Form_Element_Abstract $element
28
+ *
29
  * @return string
30
  */
31
  public function render(Varien_Data_Form_Element_Abstract $element)
36
  $element->getLabel()
37
  );
38
  }
39
+
40
  }
app/code/community/Magmodules/Channable/Block/Adminhtml/System/Config/Form/Field/Token.php CHANGED
@@ -1,31 +1,40 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
-
18
  class Magmodules_Channable_Block_Adminhtml_System_Config_Form_Field_Token
19
  extends Mage_Adminhtml_Block_System_Config_Form_Field
20
  {
21
 
22
  /**
23
  * @param Varien_Data_Form_Element_Abstract $element
 
24
  * @return mixed
25
  */
26
  public function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
27
- {
28
- return Mage::getStoreConfig('channable/connect/token');
 
 
 
 
29
  }
30
-
31
  }
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
+
22
  class Magmodules_Channable_Block_Adminhtml_System_Config_Form_Field_Token
23
  extends Mage_Adminhtml_Block_System_Config_Form_Field
24
  {
25
 
26
  /**
27
  * @param Varien_Data_Form_Element_Abstract $element
28
+ *
29
  * @return mixed
30
  */
31
  public function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
32
+ {
33
+ if ($token = Mage::helper('channable')->getToken()) {
34
+ return $token;
35
+ }
36
+
37
+ return '<a href="' . $this->getUrl('adminhtml/channable/createToken') . '">Create Token</a>';
38
  }
39
+
40
  }
app/code/community/Magmodules/Channable/Block/Adminhtml/System/Config/Form/Field/Version.php CHANGED
@@ -1,33 +1,38 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
-
18
  class Magmodules_Channable_Block_Adminhtml_System_Config_Form_Field_Version
19
  extends Mage_Adminhtml_Block_System_Config_Form_Field
20
  {
21
 
22
  /**
23
  * @param Varien_Data_Form_Element_Abstract $element
 
24
  * @return mixed
25
  */
26
  public function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
27
  {
28
  $modules = Mage::getConfig()->getNode('modules')->children();
29
- $modulesArray = (array)$modules;
30
  return $modulesArray['Magmodules_Channable']->version;
31
  }
32
-
33
  }
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
+
22
  class Magmodules_Channable_Block_Adminhtml_System_Config_Form_Field_Version
23
  extends Mage_Adminhtml_Block_System_Config_Form_Field
24
  {
25
 
26
  /**
27
  * @param Varien_Data_Form_Element_Abstract $element
28
+ *
29
  * @return mixed
30
  */
31
  public function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
32
  {
33
  $modules = Mage::getConfig()->getNode('modules')->children();
34
+ $modulesArray = (array) $modules;
35
  return $modulesArray['Magmodules_Channable']->version;
36
  }
37
+
38
  }
app/code/community/Magmodules/Channable/Block/Adminhtml/Widget/Info/Info.php CHANGED
@@ -1,35 +1,41 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
-
18
  class Magmodules_Channable_Block_Adminhtml_Widget_Info_Info
19
  extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface
20
  {
21
 
22
  /**
23
  * @param Varien_Data_Form_Element_Abstract $element
 
24
  * @return string
25
  */
26
  public function render(Varien_Data_Form_Element_Abstract $element)
27
  {
28
  $magentoVersion = Mage::getVersion();
29
  $moduleVersion = Mage::getConfig()->getNode()->modules->Magmodules_Channable->version;
30
-
31
  $logoLink = '//www.magmodules.eu/logo/channable/' . $moduleVersion . '/' . $magentoVersion . '/logo.png';
32
-
 
33
  $html = '<div style="background:url(\'' . $logoLink . '\') no-repeat scroll 15px center #EAF0EE;border:1px solid #CCCCCC;margin-bottom:10px;padding:10px 5px 5px 200px;">
34
  <h4>About Magmodules.eu</h4>
35
  <p>We are a Magento only E-commerce Agency located in the Netherlands.<br>
@@ -37,7 +43,11 @@ class Magmodules_Channable_Block_Adminhtml_Widget_Info_Info
37
  <table width="500px" border="0">
38
  <tr>
39
  <td width="58%">More Extensions from Magmodules:</td>
40
- <td width="42%"><a href="http://www.magentocommerce.com/magento-connect/developer/Magmodules" target="_blank">Magento Connect</a></td>
 
 
 
 
41
  </tr>
42
  <tr>
43
  <td>For Help:</td>
@@ -48,7 +58,11 @@ class Magmodules_Channable_Block_Adminhtml_Widget_Info_Info
48
  <td><a href="http://www.magmodules.eu" target="_blank">www.magmodules.eu</a></td>
49
  </tr>
50
  <tr>
51
- <td height="30"><strong>Read everything about the extension configuration in our <a href="http://www.magmodules.eu/help/channable-connect#" target="_blank">Knowledgebase</a></strong>.</td>
 
 
 
 
52
  <td>&nbsp;</td>
53
  </tr>
54
  </table>
@@ -65,19 +79,27 @@ class Magmodules_Channable_Block_Adminhtml_Widget_Info_Info
65
  $msg = '<div id="messages"><ul class="messages"><li class="error-msg"><ul><li><span>' . Mage::helper('channable')->__('Please enable "Flat Catalog Category" and "Flat Catalog Product" for the extension to work properly. <a href="https://www.magmodules.eu/help/enable-flat-catalog/" target="_blank">More information.</a>') . '</span></li></ul></li></ul></div>';
66
  $html = $html . $msg;
67
  }
68
-
69
  if (empty($oldversion)) {
70
  if (Mage::getStoreConfig('catalog/frontend/flat_catalog_product')) {
71
- $storeId = Mage::helper('channable')->getStoreIdConfig();
72
- $nonFlatAttributes = Mage::helper('channable')->checkFlatCatalog(Mage::getModel("channable/channable")->getFeedAttributes('', $storeId));
 
 
 
 
 
73
  if (!empty($nonFlatAttributes)) {
74
  $html .= '<div id="messages"><ul class="messages"><li class="error-msg"><ul><li><span>';
75
- $html .= $this->__('Warning: The following used attribute(s) were not found in the flat catalog: %s. This can result in empty data or higher resource usage. Click <a href="%s">here</a> to add these to the flat catalog. ', implode($nonFlatAttributes, ', '), $this->getUrl('adminhtml/channable/addToFlat'));
 
 
 
76
  $html .= '</span></ul></li></ul></div>';
77
- }
78
  }
79
  }
80
-
81
  return $html;
82
  }
83
 
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
+
22
  class Magmodules_Channable_Block_Adminhtml_Widget_Info_Info
23
  extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface
24
  {
25
 
26
  /**
27
  * @param Varien_Data_Form_Element_Abstract $element
28
+ *
29
  * @return string
30
  */
31
  public function render(Varien_Data_Form_Element_Abstract $element)
32
  {
33
  $magentoVersion = Mage::getVersion();
34
  $moduleVersion = Mage::getConfig()->getNode()->modules->Magmodules_Channable->version;
35
+
36
  $logoLink = '//www.magmodules.eu/logo/channable/' . $moduleVersion . '/' . $magentoVersion . '/logo.png';
37
+
38
+
39
  $html = '<div style="background:url(\'' . $logoLink . '\') no-repeat scroll 15px center #EAF0EE;border:1px solid #CCCCCC;margin-bottom:10px;padding:10px 5px 5px 200px;">
40
  <h4>About Magmodules.eu</h4>
41
  <p>We are a Magento only E-commerce Agency located in the Netherlands.<br>
43
  <table width="500px" border="0">
44
  <tr>
45
  <td width="58%">More Extensions from Magmodules:</td>
46
+ <td width="42%">
47
+ <a href="http://www.magentocommerce.com/magento-connect/developer/Magmodules" target="_blank">
48
+ Magento Connect
49
+ </a>
50
+ </td>
51
  </tr>
52
  <tr>
53
  <td>For Help:</td>
58
  <td><a href="http://www.magmodules.eu" target="_blank">www.magmodules.eu</a></td>
59
  </tr>
60
  <tr>
61
+ <td height="30">
62
+ <strong>Read everything about the extension configuration in our
63
+ <a href="http://www.magmodules.eu/help/channable-connect#" target="_blank">Knowledgebase</a>
64
+ </strong>.
65
+ </td>
66
  <td>&nbsp;</td>
67
  </tr>
68
  </table>
79
  $msg = '<div id="messages"><ul class="messages"><li class="error-msg"><ul><li><span>' . Mage::helper('channable')->__('Please enable "Flat Catalog Category" and "Flat Catalog Product" for the extension to work properly. <a href="https://www.magmodules.eu/help/enable-flat-catalog/" target="_blank">More information.</a>') . '</span></li></ul></li></ul></div>';
80
  $html = $html . $msg;
81
  }
82
+
83
  if (empty($oldversion)) {
84
  if (Mage::getStoreConfig('catalog/frontend/flat_catalog_product')) {
85
+ $storeId = Mage::helper('channable')->getStoreIdConfig();
86
+ $nonFlatAttributes = Mage::helper('channable')->checkFlatCatalog(
87
+ Mage::getModel("channable/channable")->getFeedAttributes(
88
+ '',
89
+ $storeId
90
+ )
91
+ );
92
  if (!empty($nonFlatAttributes)) {
93
  $html .= '<div id="messages"><ul class="messages"><li class="error-msg"><ul><li><span>';
94
+ $html .= $this->__(
95
+ 'Warning: The following used attribute(s) were not found in the flat catalog: %s. This can result in empty data or higher resource usage. Click <a href="%s">here</a> to add these to the flat catalog. ',
96
+ implode($nonFlatAttributes, ', '), $this->getUrl('adminhtml/channable/addToFlat')
97
+ );
98
  $html .= '</span></ul></li></ul></div>';
99
+ }
100
  }
101
  }
102
+
103
  return $html;
104
  }
105
 
app/code/community/Magmodules/Channable/Helper/Data.php CHANGED
@@ -1,19 +1,22 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * @version 16-09-2016
16
- * =============================================================
 
 
 
17
  */
18
 
19
  class Magmodules_Channable_Helper_Data extends Mage_Core_Helper_Abstract
@@ -290,10 +293,14 @@ class Magmodules_Channable_Helper_Data extends Mage_Core_Helper_Abstract
290
 
291
  if (!empty($parent) && !empty($url)) {
292
  if (!empty($parentAttributes[$parent->getEntityId()])) {
 
 
293
  $productAttributeOptions = $parentAttributes[$parent->getEntityId()];
294
  $urlExtra = '';
295
  foreach ($productAttributeOptions as $productAttribute) {
296
- if ($id = Mage::getResourceModel('catalog/product')->getAttributeRawValue($product->getId(), $productAttribute['attribute_code'], $config['store_id'])) {
 
 
297
  $urlExtra .= $productAttribute['attribute_id'] . '=' . $id . '&';
298
  }
299
  }
@@ -315,7 +322,7 @@ class Magmodules_Channable_Helper_Data extends Mage_Core_Helper_Abstract
315
  if ($parent->getTypeId() == 'configurable') {
316
  $configurableAttributes[$parent->getEntityId()] = $parent->getTypeInstance(true)
317
  ->getConfigurableAttributesAsArray($parent);
318
- }
319
  }
320
  }
321
 
@@ -386,7 +393,7 @@ class Magmodules_Channable_Helper_Data extends Mage_Core_Helper_Abstract
386
  $imageData['image_link'] = $image;
387
  $container = new Varien_Object(
388
  array(
389
- 'attribute' => new Varien_Object(array('id' => $config['media_gallery_id'])))
390
  );
391
  $imgProduct = new Varien_Object(array('id' => $product->getId(), 'store_id' => $config['store_id']));
392
  $gallery = Mage::getResourceModel('catalog/product_attribute_backend_media')->loadGallery(
@@ -469,8 +476,6 @@ class Magmodules_Channable_Helper_Data extends Mage_Core_Helper_Abstract
469
  $availability = $config['stock_instock'];
470
  }
471
 
472
- echo $availability; exit;
473
-
474
  return $availability;
475
  }
476
 
@@ -532,7 +537,7 @@ class Magmodules_Channable_Helper_Data extends Mage_Core_Helper_Abstract
532
  $specialPriceToDate = $product->getSpecialToDate();
533
  $today = time();
534
  if ($today >= strtotime($specialPriceFromDate)) {
535
- if ($today <= strtotime($specialPriceToDate) || is_null($specialPriceToDate)) {
536
  $priceData['sales_date_start'] = $specialPriceFromDate;
537
  $priceData['sales_date_end'] = $specialPriceToDate;
538
  }
@@ -576,7 +581,8 @@ class Magmodules_Channable_Helper_Data extends Mage_Core_Helper_Abstract
576
 
577
  if ($config['base_currency_code'] != $config['currency']) {
578
  $exchangeRate = Mage::helper('directory')->currencyConvert(
579
- 1, $config['base_currency_code'],
 
580
  $config['currency']
581
  );
582
  $markup = ($markup * $exchangeRate);
@@ -694,12 +700,10 @@ class Magmodules_Channable_Helper_Data extends Mage_Core_Helper_Abstract
694
  $value = $product->getAttributeText($source);
695
  break;
696
  case 'multiselect':
697
- if (count($product->getAttributeText($source))) {
698
- if (count($product->getAttributeText($source)) > 1) {
699
- $value = implode(',', $product->getAttributeText($source));
700
- } else {
701
- $value = $product->getAttributeText($source);
702
- }
703
  }
704
  break;
705
  default:
@@ -918,8 +922,11 @@ class Magmodules_Channable_Helper_Data extends Mage_Core_Helper_Abstract
918
  ->setStoreId($storeId)
919
  ->getCollection()
920
  ->addAttributeToSelect($attributes)
 
 
921
  ->getFirstItem();
922
  } catch (Exception $e) {
 
923
  }
924
 
925
  if (empty($e)) {
@@ -1050,34 +1057,35 @@ class Magmodules_Channable_Helper_Data extends Mage_Core_Helper_Abstract
1050
  public function getTypePrices($config, $products)
1051
  {
1052
  $typePrices = array();
1053
- if (!empty($config['conf_enabled'])) {
 
 
 
1054
  foreach ($products as $product) {
1055
  if ($product->getTypeId() == 'configurable') {
1056
  $parentId = $product->getEntityId();
1057
  $attributes = $product->getTypeInstance(true)->getConfigurableAttributes($product);
1058
  $basePrice = $product->getFinalPrice();
1059
  $basePriceReg = $product->getPrice();
 
 
1060
  foreach ($attributes as $attribute) {
1061
- $optionPrices = array();
1062
  $prices = $attribute->getPrices();
1063
  foreach ($prices as $value) {
1064
  $product->setConfigurablePrice(
1065
- $this->_preparePrice(
1066
  $value['pricing_value'],
1067
  $value['is_percent'], $product
1068
  )
1069
  );
1070
  $product->setParentId(true);
1071
  Mage::dispatchEvent(
1072
- 'catalog_product_type_configurable_price',
1073
- array('product' => $product)
1074
  );
1075
  $configurablePrice = $product->getConfigurablePrice();
1076
  $optionPrices[$value['value_index']] = $configurablePrice;
1077
- $optionPrices[$value['value_index'] . '_reg'] = $this->_prepareOldPrice(
1078
- $value['pricing_value'],
1079
- $value['is_percent'], $product
1080
- );
1081
  }
1082
  }
1083
 
@@ -1093,14 +1101,11 @@ class Magmodules_Channable_Helper_Data extends Mage_Core_Helper_Abstract
1093
  }
1094
  }
1095
 
1096
- $typePrices[$parentId . '_' . $sProduct->getEntityId()] = number_format(
1097
- ($totalPrice * $config['markup']), 2,
1098
- '.', ''
1099
- );
1100
- $typePrices[$parentId . '_' . $sProduct->getEntityId() . '_reg'] = number_format(
1101
- ($totalPriceReg * $config['markup']),
1102
- 2, '.', ''
1103
- );
1104
  }
1105
  }
1106
  }
@@ -1115,7 +1120,7 @@ class Magmodules_Channable_Helper_Data extends Mage_Core_Helper_Abstract
1115
  * @param $product
1116
  * @return float|int
1117
  */
1118
- protected function _preparePrice($price, $isPercent = false, $product)
1119
  {
1120
  if ($isPercent && !empty($price)) {
1121
  $price = $product->getFinalPrice() * $price / 100;
@@ -1130,7 +1135,7 @@ class Magmodules_Channable_Helper_Data extends Mage_Core_Helper_Abstract
1130
  * @param $product
1131
  * @return float|int
1132
  */
1133
- protected function _prepareOldPrice($price, $isPercent = false, $product)
1134
  {
1135
  if ($isPercent && !empty($price)) {
1136
  $price = $product->getPrice() * $price / 100;
@@ -1203,7 +1208,8 @@ class Magmodules_Channable_Helper_Data extends Mage_Core_Helper_Abstract
1203
  public function getStoreIdConfig()
1204
  {
1205
  $storeId = 0;
1206
- if (strlen($code = Mage::getSingleton('adminhtml/config_data')->getStore())) {
 
1207
  $storeId = Mage::getModel('core/store')->load($code)->getId();
1208
  }
1209
 
@@ -1225,4 +1231,37 @@ class Magmodules_Channable_Helper_Data extends Mage_Core_Helper_Abstract
1225
 
1226
  return $suffix;
1227
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1228
  }
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  class Magmodules_Channable_Helper_Data extends Mage_Core_Helper_Abstract
293
 
294
  if (!empty($parent) && !empty($url)) {
295
  if (!empty($parentAttributes[$parent->getEntityId()])) {
296
+ $storeId = $config['store_id'];
297
+ $pId = $product->getId();
298
  $productAttributeOptions = $parentAttributes[$parent->getEntityId()];
299
  $urlExtra = '';
300
  foreach ($productAttributeOptions as $productAttribute) {
301
+ $attCode = $productAttribute['attribute_code'];
302
+ $id = Mage::getResourceModel('catalog/product')->getAttributeRawValue($pId, $attCode, $storeId);
303
+ if ($id > 0) {
304
  $urlExtra .= $productAttribute['attribute_id'] . '=' . $id . '&';
305
  }
306
  }
322
  if ($parent->getTypeId() == 'configurable') {
323
  $configurableAttributes[$parent->getEntityId()] = $parent->getTypeInstance(true)
324
  ->getConfigurableAttributesAsArray($parent);
325
+ }
326
  }
327
  }
328
 
393
  $imageData['image_link'] = $image;
394
  $container = new Varien_Object(
395
  array(
396
+ 'attribute' => new Varien_Object(array('id' => $config['media_gallery_id'])))
397
  );
398
  $imgProduct = new Varien_Object(array('id' => $product->getId(), 'store_id' => $config['store_id']));
399
  $gallery = Mage::getResourceModel('catalog/product_attribute_backend_media')->loadGallery(
476
  $availability = $config['stock_instock'];
477
  }
478
 
 
 
479
  return $availability;
480
  }
481
 
537
  $specialPriceToDate = $product->getSpecialToDate();
538
  $today = time();
539
  if ($today >= strtotime($specialPriceFromDate)) {
540
+ if ($today <= strtotime($specialPriceToDate) || empty($specialPriceToDate)) {
541
  $priceData['sales_date_start'] = $specialPriceFromDate;
542
  $priceData['sales_date_end'] = $specialPriceToDate;
543
  }
581
 
582
  if ($config['base_currency_code'] != $config['currency']) {
583
  $exchangeRate = Mage::helper('directory')->currencyConvert(
584
+ 1,
585
+ $config['base_currency_code'],
586
  $config['currency']
587
  );
588
  $markup = ($markup * $exchangeRate);
700
  $value = $product->getAttributeText($source);
701
  break;
702
  case 'multiselect':
703
+ if (is_array($product->getAttributeText($source))) {
704
+ $value = implode(',', $product->getAttributeText($source));
705
+ } else {
706
+ $value = $product->getAttributeText($source);
 
 
707
  }
708
  break;
709
  default:
922
  ->setStoreId($storeId)
923
  ->getCollection()
924
  ->addAttributeToSelect($attributes)
925
+ ->setCurPage(1)
926
+ ->setPageSize(1)
927
  ->getFirstItem();
928
  } catch (Exception $e) {
929
+ Mage::log($e->getMessage());
930
  }
931
 
932
  if (empty($e)) {
1057
  public function getTypePrices($config, $products)
1058
  {
1059
  $typePrices = array();
1060
+ $confEnabled = $config['conf_enabled'];
1061
+ $simplePrice = $config['simple_price'];
1062
+
1063
+ if (!empty($confEnabled) && empty($simplePrice)) {
1064
  foreach ($products as $product) {
1065
  if ($product->getTypeId() == 'configurable') {
1066
  $parentId = $product->getEntityId();
1067
  $attributes = $product->getTypeInstance(true)->getConfigurableAttributes($product);
1068
  $basePrice = $product->getFinalPrice();
1069
  $basePriceReg = $product->getPrice();
1070
+ $optionPrices = array();
1071
+
1072
  foreach ($attributes as $attribute) {
 
1073
  $prices = $attribute->getPrices();
1074
  foreach ($prices as $value) {
1075
  $product->setConfigurablePrice(
1076
+ $this->preparePrice(
1077
  $value['pricing_value'],
1078
  $value['is_percent'], $product
1079
  )
1080
  );
1081
  $product->setParentId(true);
1082
  Mage::dispatchEvent(
1083
+ 'catalog_product_type_configurable_price', array('product' => $product)
 
1084
  );
1085
  $configurablePrice = $product->getConfigurablePrice();
1086
  $optionPrices[$value['value_index']] = $configurablePrice;
1087
+ $optionPrices[$value['value_index'] . '_reg'] =
1088
+ $this->prepareOldPrice($value['pricing_value'], $value['is_percent'], $product);
 
 
1089
  }
1090
  }
1091
 
1101
  }
1102
  }
1103
 
1104
+ $typePrices[$parentId . '_' . $sProduct->getEntityId()] =
1105
+ number_format(($totalPrice * $config['markup']), 2, '.', '');
1106
+
1107
+ $typePrices[$parentId . '_' . $sProduct->getEntityId() . '_reg'] =
1108
+ number_format(($totalPriceReg * $config['markup']), 2, '.', '');
 
 
 
1109
  }
1110
  }
1111
  }
1120
  * @param $product
1121
  * @return float|int
1122
  */
1123
+ public function preparePrice($price, $isPercent = false, $product)
1124
  {
1125
  if ($isPercent && !empty($price)) {
1126
  $price = $product->getFinalPrice() * $price / 100;
1135
  * @param $product
1136
  * @return float|int
1137
  */
1138
+ public function prepareOldPrice($price, $isPercent = false, $product)
1139
  {
1140
  if ($isPercent && !empty($price)) {
1141
  $price = $product->getPrice() * $price / 100;
1208
  public function getStoreIdConfig()
1209
  {
1210
  $storeId = 0;
1211
+ $code = Mage::getSingleton('adminhtml/config_data')->getStore();
1212
+ if (!empty($code)) {
1213
  $storeId = Mage::getModel('core/store')->load($code)->getId();
1214
  }
1215
 
1231
 
1232
  return $suffix;
1233
  }
1234
+
1235
+ public function getToken()
1236
+ {
1237
+ $token = $this->getUncachedConfigValue('channable/connect/token', 0);
1238
+ $token = Mage::helper('core')->decrypt($token);
1239
+ $strlen = strlen($token);
1240
+
1241
+ if ($strlen == 32 || $strlen == 16) {
1242
+ if (ctype_alnum($token)) {
1243
+ return $token;
1244
+ }
1245
+ }
1246
+
1247
+ return false;
1248
+ }
1249
+
1250
+ /**
1251
+ * @param $path
1252
+ * @param int $storeId
1253
+ *
1254
+ * @return mixed
1255
+ */
1256
+ public function getUncachedConfigValue($path, $storeId = 0)
1257
+ {
1258
+ $collection = Mage::getModel('core/config_data')->getCollection()->addFieldToFilter('path', $path);
1259
+ if ($storeId == 0) {
1260
+ $collection = $collection->addFieldToFilter('scope_id', 0)->addFieldToFilter('scope', 'default');
1261
+ } else {
1262
+ $collection = $collection->addFieldToFilter('scope_id', $storeId)->addFieldToFilter('scope', 'stores');
1263
+ }
1264
+
1265
+ return $collection->getFirstItem()->getValue();
1266
+ }
1267
  }
app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Backend/Design/Extra.php CHANGED
@@ -1,18 +1,22 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
 
18
  class Magmodules_Channable_Model_Adminhtml_System_Config_Backend_Design_Extra
@@ -51,6 +55,7 @@ class Magmodules_Channable_Model_Adminhtml_System_Config_Backend_Design_Extra
51
  /**
52
  * @param $data
53
  * @param $sort
 
54
  * @return mixed
55
  */
56
  function orderData($data, $sort)
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  class Magmodules_Channable_Model_Adminhtml_System_Config_Backend_Design_Extra
55
  /**
56
  * @param $data
57
  * @param $sort
58
+ *
59
  * @return mixed
60
  */
61
  function orderData($data, $sort)
app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Backend/Design/Filter.php CHANGED
@@ -1,25 +1,28 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
 
18
  class Magmodules_Channable_Model_Adminhtml_System_Config_Backend_Design_Filter
19
  extends Mage_Adminhtml_Model_System_Config_Backend_Serialized_Array
20
  {
21
 
22
-
23
  /**
24
  *
25
  */
@@ -61,6 +64,7 @@ class Magmodules_Channable_Model_Adminhtml_System_Config_Backend_Design_Filter
61
  /**
62
  * @param $data
63
  * @param $sort
 
64
  * @return mixed
65
  */
66
  function orderData($data, $sort)
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  class Magmodules_Channable_Model_Adminhtml_System_Config_Backend_Design_Filter
23
  extends Mage_Adminhtml_Model_System_Config_Backend_Serialized_Array
24
  {
25
 
 
26
  /**
27
  *
28
  */
64
  /**
65
  * @param $data
66
  * @param $sort
67
+ *
68
  * @return mixed
69
  */
70
  function orderData($data, $sort)
app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Backend/Design/Shipping.php CHANGED
@@ -1,18 +1,22 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
 
18
  class Magmodules_Channable_Model_Adminhtml_System_Config_Backend_Design_Shipping
@@ -67,6 +71,7 @@ class Magmodules_Channable_Model_Adminhtml_System_Config_Backend_Design_Shipping
67
  /**
68
  * @param $data
69
  * @param $sort
 
70
  * @return mixed
71
  */
72
  function orderData($data, $sort)
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  class Magmodules_Channable_Model_Adminhtml_System_Config_Backend_Design_Shipping
71
  /**
72
  * @param $data
73
  * @param $sort
74
+ *
75
  * @return mixed
76
  */
77
  function orderData($data, $sort)
app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Action.php CHANGED
@@ -1,18 +1,22 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
 
18
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Action
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Action
app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Attribute.php CHANGED
@@ -1,18 +1,22 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
 
18
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Attribute
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Attribute
app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Category.php CHANGED
@@ -1,18 +1,22 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
 
18
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Category
@@ -20,6 +24,7 @@ class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Category
20
 
21
  /**
22
  * @param bool $addEmpty
 
23
  * @return array
24
  */
25
  public function toOptionArray($addEmpty = true)
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Category
24
 
25
  /**
26
  * @param bool $addEmpty
27
+ *
28
  * @return array
29
  */
30
  public function toOptionArray($addEmpty = true)
app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Categorytype.php CHANGED
@@ -1,18 +1,22 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
 
18
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Categorytype
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Categorytype
app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Conditions.php CHANGED
@@ -1,18 +1,22 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2015 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
 
18
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Conditions
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Conditions
app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Configurable.php CHANGED
@@ -1,18 +1,22 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
 
18
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Configurable
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Configurable
app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Countries.php CHANGED
@@ -1,18 +1,22 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
 
18
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Countries
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Countries
app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Images.php CHANGED
@@ -1,18 +1,22 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
 
18
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Images
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Images
app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Mainimage.php CHANGED
@@ -1,18 +1,22 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
 
18
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Mainimage
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Mainimage
app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Name.php CHANGED
@@ -1,18 +1,22 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
 
18
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Name
@@ -59,12 +63,14 @@ class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Name
59
  $options = array();
60
  $options[] = array('value' => '', 'label' => Mage::helper('channable')->__('-- none'));
61
  $entityTypeId = Mage::getModel('eav/entity_type')->loadByCode('catalog_product')->getEntityTypeId();
62
- $attributes = Mage::getModel('eav/entity_attribute')->getCollection()->addFilter(
63
- 'entity_type_id',
64
- $entityTypeId
65
- )->setOrder('attribute_code', 'ASC');
 
 
66
  foreach ($attributes as $attribute) {
67
- if (($attribute->getBackendType() == 'text') || ($attribute->getBackendType() == 'varchar') || ($attribute->getBackendType() == 'static')) {
68
  if ($attribute->getFrontendLabel()) {
69
  if (!in_array($attribute->getAttributeCode(), $this->_ignore)) {
70
  $options[] = array(
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Name
63
  $options = array();
64
  $options[] = array('value' => '', 'label' => Mage::helper('channable')->__('-- none'));
65
  $entityTypeId = Mage::getModel('eav/entity_type')->loadByCode('catalog_product')->getEntityTypeId();
66
+ $backendTypes = array('text','varchar','static');
67
+
68
+ $attributes = Mage::getModel('eav/entity_attribute')->getCollection()
69
+ ->addFilter('entity_type_id', $entityTypeId)
70
+ ->setOrder('attribute_code', 'ASC');
71
+
72
  foreach ($attributes as $attribute) {
73
+ if (in_array($attribute->getBackendType(), $backendTypes)) {
74
  if ($attribute->getFrontendLabel()) {
75
  if (!in_array($attribute->getAttributeCode(), $this->_ignore)) {
76
  $options[] = array(
app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Pricemodel.php CHANGED
@@ -1,18 +1,22 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
 
18
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Pricemodel
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Pricemodel
app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Selectattribute.php CHANGED
@@ -1,18 +1,22 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
 
18
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Selectattribute
@@ -37,12 +41,14 @@ class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Selectattribute
37
  $options = array();
38
  $options[] = array('value' => '', 'label' => Mage::helper('channable')->__('-- none'));
39
  $entityTypeId = Mage::getModel('eav/entity_type')->loadByCode('catalog_product')->getEntityTypeId();
40
- $attributes = Mage::getModel('eav/entity_attribute')->getCollection()->addFilter(
41
- 'entity_type_id',
42
- $entityTypeId
43
- )->setOrder('attribute_code', 'ASC');
 
 
44
  foreach ($attributes as $attribute) {
45
- if ($attribute->getBackendType() == 'int') {
46
  if ($attribute->getFrontendLabel()) {
47
  if (!in_array($attribute->getAttributeCode(), $this->_ignore)) {
48
  $options[] = array(
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Selectattribute
41
  $options = array();
42
  $options[] = array('value' => '', 'label' => Mage::helper('channable')->__('-- none'));
43
  $entityTypeId = Mage::getModel('eav/entity_type')->loadByCode('catalog_product')->getEntityTypeId();
44
+ $backendTypes = array('text','varchar','static');
45
+
46
+ $attributes = Mage::getModel('eav/entity_attribute')->getCollection()
47
+ ->addFilter('entity_type_id', $entityTypeId)
48
+ ->setOrder('attribute_code', 'ASC');
49
+
50
  foreach ($attributes as $attribute) {
51
+ if (in_array($attribute->getBackendType(), $backendTypes)) {
52
  if ($attribute->getFrontendLabel()) {
53
  if (!in_array($attribute->getAttributeCode(), $this->_ignore)) {
54
  $options[] = array(
app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Shipping.php CHANGED
@@ -1,18 +1,22 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
 
18
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Shipping
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Shipping
app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Tax.php CHANGED
@@ -1,18 +1,22 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
 
18
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Tax
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Tax
app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Textattribute.php CHANGED
@@ -1,18 +1,22 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
 
18
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Textattribute
@@ -59,19 +63,20 @@ class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Textattribute
59
  $options = array();
60
  $options[] = array('value' => '', 'label' => Mage::helper('channable')->__('-- none'));
61
  $entityTypeId = Mage::getModel('eav/entity_type')->loadByCode('catalog_product')->getEntityTypeId();
62
- $attributes = Mage::getModel('eav/entity_attribute')->getCollection()->addFilter(
63
- 'entity_type_id',
64
- $entityTypeId
65
- )->setOrder('attribute_code', 'ASC');
 
 
 
66
  foreach ($attributes as $attribute) {
67
- if (($attribute->getBackendType() == 'text') || ($attribute->getBackendType() == 'varchar') || ($attribute->getBackendType() == 'static')) {
68
- if ($attribute->getFrontendLabel()) {
69
- if (!in_array($attribute->getAttributeCode(), $this->_ignore)) {
70
- $options[] = array(
71
- 'value' => $attribute->getAttributeCode(),
72
- 'label' => $attribute->getFrontendLabel()
73
- );
74
- }
75
  }
76
  }
77
  }
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Textattribute
63
  $options = array();
64
  $options[] = array('value' => '', 'label' => Mage::helper('channable')->__('-- none'));
65
  $entityTypeId = Mage::getModel('eav/entity_type')->loadByCode('catalog_product')->getEntityTypeId();
66
+ $backendTypes = array('text', 'varchar', 'static');
67
+
68
+ $attributes = Mage::getModel('eav/entity_attribute')->getCollection()
69
+ ->addFilter('entity_type_id', $entityTypeId)
70
+ ->addFilter('backend_type', $backendTypes)
71
+ ->setOrder('attribute_code', 'ASC');
72
+
73
  foreach ($attributes as $attribute) {
74
+ if ($attribute->getFrontendLabel()) {
75
+ if (!in_array($attribute->getAttributeCode(), $this->_ignore)) {
76
+ $options[] = array(
77
+ 'value' => $attribute->getAttributeCode(),
78
+ 'label' => $attribute->getFrontendLabel()
79
+ );
 
 
80
  }
81
  }
82
  }
app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Type.php CHANGED
@@ -1,18 +1,22 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2015 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
 
18
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Type
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Type
app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Visibility.php CHANGED
@@ -1,18 +1,22 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2015 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
 
18
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Visibility
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Visibility
app/code/community/Magmodules/Channable/Model/Adminhtml/System/Config/Source/Weight.php CHANGED
@@ -1,18 +1,22 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2015 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
 
18
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Weight
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  class Magmodules_Channable_Model_Adminhtml_System_Config_Source_Weight
app/code/community/Magmodules/Channable/Model/Channable.php CHANGED
@@ -1,29 +1,34 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
 
18
  class Magmodules_Channable_Model_Channable extends Magmodules_Channable_Model_Common
19
  {
20
 
21
  /**
22
- * @param $storeId
23
  * @param string $limit
24
- * @param int $page
25
- * @param $timeStart
26
- * @return array
 
27
  */
28
  public function generateFeed($storeId, $limit = '', $timeStart, $page = 1)
29
  {
@@ -37,14 +42,256 @@ class Magmodules_Channable_Model_Channable extends Magmodules_Channable_Model_Co
37
  if ($feed = $this->getFeedData($products, $parents, $config, $parentAttributes, $timeStart, $prices, $page)) {
38
  return $feed;
39
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  }
41
 
42
  /**
43
  * @param $products
 
44
  * @param $config
 
45
  * @param $timeStart
46
  * @param $prices
47
  * @param $page
 
48
  * @return array
49
  */
50
  public function getFeedData($products, $parents, $config, $parentAttributes, $timeStart, $prices, $page)
@@ -96,19 +343,24 @@ class Magmodules_Channable_Model_Channable extends Magmodules_Channable_Model_Co
96
  * @param $config
97
  * @param $product
98
  * @param $prices
 
99
  * @return array
100
  */
101
  public function getExtraDataFields($productData, $config, $product, $prices)
102
  {
103
  $extra = array();
104
  if (!empty($productData['price'])) {
105
- if(!empty($productData['item_group_id'])) {
106
  $itemGroupId = $productData['item_group_id'];
107
  } else {
108
- $itemGroupId = '';
109
  }
110
 
111
- if ($priceData = $this->getPrices($productData['price'], $prices, $product, $config['currency'], $itemGroupId)) {
 
 
 
 
112
  $extra = array_merge($extra, $priceData);
113
  }
114
  }
@@ -116,8 +368,8 @@ class Magmodules_Channable_Model_Channable extends Magmodules_Channable_Model_Co
116
  if ($stockData = $this->getStockData($productData, $config, $product)) {
117
  $extra = array_merge($extra, $stockData);
118
  }
119
-
120
- if ($shippingData = $this->getShipping($productData, $config, $product->getWeight(), $product, $stockData)) {
121
  $extra = array_merge($extra, $shippingData);
122
  }
123
 
@@ -140,6 +392,7 @@ class Magmodules_Channable_Model_Channable extends Magmodules_Channable_Model_Co
140
  * @param $product
141
  * @param $currency
142
  * @param $itemGroupId
 
143
  * @return array
144
  */
145
  public function getPrices($data, $confPrices, $product, $currency, $itemGroupId)
@@ -177,11 +430,61 @@ class Magmodules_Channable_Model_Channable extends Magmodules_Channable_Model_Co
177
  return $prices;
178
  }
179
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
180
  /**
181
  * @param $data
182
  * @param $config
183
  * @param $weight
184
  * @param $stock
 
185
  * @return array
186
  */
187
  public function getShipping($data, $config, $weight, $stock)
@@ -202,8 +505,8 @@ class Magmodules_Channable_Model_Channable extends Magmodules_Channable_Model_Co
202
  } else {
203
  if (!empty($config['delivery_in'])) {
204
  $shippingArray['delivery'] = $config['delivery_in'];
205
- }
206
- }
207
  }
208
 
209
  if ($config['delivery_be'] == 'fixed') {
@@ -220,8 +523,8 @@ class Magmodules_Channable_Model_Channable extends Magmodules_Channable_Model_Co
220
  } else {
221
  if (!empty($config['delivery_in'])) {
222
  $shippingArray['delivery_be'] = $config['delivery_in_be'];
223
- }
224
- }
225
  }
226
 
227
  if ($config['shipping_method'] == 'weight') {
@@ -233,7 +536,7 @@ class Magmodules_Channable_Model_Channable extends Magmodules_Channable_Model_Co
233
  $calValue = '0.00';
234
  }
235
  }
236
-
237
  if (!empty($config['shipping_prices'])) {
238
  foreach ($config['shipping_prices'] as $shippingPrice) {
239
  if (($calValue >= $shippingPrice['price_from']) && ($calValue <= $shippingPrice['price_to'])) {
@@ -257,6 +560,7 @@ class Magmodules_Channable_Model_Channable extends Magmodules_Channable_Model_Co
257
 
258
  /**
259
  * @param $productData
 
260
  * @return array
261
  */
262
  public function getCategoryData($productData)
@@ -282,60 +586,13 @@ class Magmodules_Channable_Model_Channable extends Magmodules_Channable_Model_Co
282
  /**
283
  * @param $productData
284
  * @param $config
285
- * @param $product
286
- * @return array
287
- */
288
- public function getStockData($productData, $config, $product)
289
- {
290
- $stockData = array();
291
- $stockData['is_in_stock'] = $productData['is_in_stock'];
292
-
293
- if (!empty($productData['qty'])) {
294
- $stockData['qty'] = $productData['qty'];
295
- } else {
296
- $stockData['qty'] = (string)'0';
297
- }
298
-
299
- if ($product->getUseConfigManageStock()) {
300
- $stockData['manage_stock'] = (string)$config['stock_manage'];
301
- } else {
302
- $stockData['manage_stock'] = (string)$product->getManageStock();
303
- }
304
-
305
- if (!empty($product['min_sale_qty'])) {
306
- $stockData['min_sale_qty'] = (string)round($product['min_sale_qty']);
307
- } else {
308
- $stockData['min_sale_qty'] = '1';
309
- }
310
-
311
- if ($product->getUseEnableQtyIncrements()) {
312
- if (!empty($config['use_qty_increments'])) {
313
- $stockData['qty_increments'] = (string)$config['qty_increments'];
314
- }
315
- } else {
316
- if ($product->getUseConfigQtyIncrements()) {
317
- $stockData['qty_increments'] = (string)$config['qty_increments'];
318
- } else {
319
- $stockData['qty_increments'] = round($product['qty_increments']);
320
- }
321
- }
322
-
323
- if (empty($stockData['qty_increments'])) {
324
- $stockData['qty_increments'] = '1';
325
- }
326
-
327
- return $stockData;
328
- }
329
-
330
- /**
331
- * @param $productData
332
- * @param $config
333
  * @return array
334
  */
335
  public function getImages($productData, $config)
336
  {
337
  $_images = array();
338
-
339
  if (!empty($config['default_image'])) {
340
  if (!empty($productData['image'][$config['default_image']])) {
341
  $_images['image_link'] = $productData['image'][$config['default_image']];
@@ -364,7 +621,7 @@ class Magmodules_Channable_Model_Channable extends Magmodules_Channable_Model_Co
364
  }
365
  }
366
 
367
- if (count($_additional) > 0) {
368
  $_images['additional_imagelinks'] = $_additional;
369
  }
370
  }
@@ -382,15 +639,17 @@ class Magmodules_Channable_Model_Channable extends Magmodules_Channable_Model_Co
382
  }
383
 
384
  /**
385
- * @param $config
386
- * @param $count
387
- * @param $timeStart
388
  * @param int $productCount
389
  * @param int $page
 
390
  * @return array
391
  */
392
  public function getFeedHeader($config, $count, $timeStart, $productCount = 0, $page = 1)
393
  {
 
394
  $header = array();
395
  $header['system'] = 'Magento';
396
  $header['extension'] = 'Magmodules_Channable';
@@ -400,7 +659,7 @@ class Magmodules_Channable_Model_Channable extends Magmodules_Channable_Model_Co
400
  $header['products_total'] = $count;
401
  $header['products_limit'] = $config['limit'];
402
  $header['products_output'] = $productCount;
403
- $header['products_pages'] = (($config['limit']) && ($count > $config['limit'])) ? ceil($count / $config['limit']) : 1;
404
  $header['current_page'] = ($page) ? $page : 1;
405
  $header['processing_time'] = number_format((microtime(true) - $timeStart), 4);
406
  if ($header['products_pages'] > $header['current_page']) {
@@ -411,233 +670,4 @@ class Magmodules_Channable_Model_Channable extends Magmodules_Channable_Model_Co
411
 
412
  return $header;
413
  }
414
-
415
- /**
416
- * @param $storeId
417
- */
418
- protected function setMemoryLimit($storeId)
419
- {
420
- if (Mage::getStoreConfig('channable/server/overwrite', $storeId)) {
421
- if ($memory_limit = Mage::getStoreConfig('channable/server/memory_limit', $storeId)) {
422
- ini_set('memory_limit', $memory_limit);
423
- }
424
-
425
- if ($max_execution_time = Mage::getStoreConfig('channable/server/max_execution_time', $storeId)) {
426
- ini_set('max_execution_time', $max_execution_time);
427
- }
428
- }
429
- }
430
-
431
- /**
432
- * @param $storeId
433
- * @param $page
434
- */
435
- protected function cleanItemUpdates($storeId, $page)
436
- {
437
- if (empty($page)) {
438
- if (Mage::helper('core')->isModuleEnabled('Magmodules_Channableapi')) {
439
- Mage::getModel('channableapi/items')->cleanItemStore($storeId);
440
- }
441
- }
442
- }
443
-
444
-
445
- /**
446
- * @param $storeId
447
- * @return array
448
- */
449
- public function getFeedConfig($storeId)
450
- {
451
-
452
- $config = array();
453
- $feed = Mage::helper('channable');
454
- $websiteId = Mage::app()->getStore($storeId)->getWebsiteId();
455
-
456
- // DEFAULTS
457
- $config['store_id'] = $storeId;
458
- $config['website_name'] = $feed->cleanData(Mage::getModel('core/website')->load($websiteId)->getName(), 'striptags');
459
- $config['website_url'] = Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
460
- $config['media_url'] = Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
461
- $config['media_image_url'] = $config['media_url'] . 'catalog' . DS . 'product';
462
- $config['media_attributes'] = $feed->getMediaAttributes();
463
- $config['limit'] = Mage::getStoreConfig('channable/connect/max_products', $storeId);
464
- $config['version'] = (string)Mage::getConfig()->getNode()->modules->Magmodules_Channable->version;
465
- $config['media_gallery_id'] = Mage::getResourceModel('eav/entity_attribute')->getIdByCode('catalog_product', 'media_gallery');
466
- $config['filters'] = @unserialize(Mage::getStoreConfig('channable/filter/advanced', $storeId));
467
- $config['product_url_suffix'] = $feed->getProductUrlSuffix($storeId);
468
- $config['filter_enabled'] = Mage::getStoreConfig('channable/filter/category_enabled', $storeId);
469
- $config['filter_cat'] = Mage::getStoreConfig('channable/filter/categories', $storeId);
470
- $config['filter_type'] = Mage::getStoreConfig('channable/filter/category_type', $storeId);
471
- $config['filter_status'] = Mage::getStoreConfig('channable/filter/visibility_inc', $storeId);
472
- $config['hide_no_stock'] = Mage::getStoreConfig('channable/filter/stock', $storeId);
473
- $config['conf_enabled'] = Mage::getStoreConfig('channable/data/conf_enabled', $storeId);
474
- $config['conf_fields'] = Mage::getStoreConfig('channable/data/conf_fields', $storeId);
475
- $config['parent_att'] = $this->getParentAttributeSelection($config['conf_fields']);
476
- $config['conf_switch_urls'] = Mage::getStoreConfig('channable/data/conf_switch_urls', $storeId);
477
- $config['stock_manage'] = Mage::getStoreConfig('cataloginventory/item_options/manage_stock');
478
- $config['use_qty_increments'] = Mage::getStoreConfig('cataloginventory/item_options/enable_qty_increments');
479
- $config['qty_increments'] = Mage::getStoreConfig('cataloginventory/item_options/qty_increments');
480
- $config['delivery'] = Mage::getStoreConfig('channable/data/delivery', $storeId);
481
- $config['delivery_be'] = Mage::getStoreConfig('channable/data/delivery_be', $storeId);
482
- $config['delivery_att'] = Mage::getStoreConfig('channable/data/delivery_att', $storeId);
483
- $config['delivery_att_be'] = Mage::getStoreConfig('channable/data/delivery_att_be', $storeId);
484
- $config['delivery_in'] = Mage::getStoreConfig('channable/data/delivery_in', $storeId);
485
- $config['delivery_in_be'] = Mage::getStoreConfig('channable/data/delivery_in_be', $storeId);
486
- $config['delivery_out'] = Mage::getStoreConfig('channable/data/delivery_out', $storeId);
487
- $config['delivery_out_be'] = Mage::getStoreConfig('channable/data/delivery_out_be', $storeId);
488
- $config['images'] = Mage::getStoreConfig('channable/data/images', $storeId);
489
- $config['default_image'] = Mage::getStoreConfig('channable/data/default_image', $storeId);
490
- $config['skip_validation'] = false;
491
- $config['weight'] = Mage::getStoreConfig('channable/data/weight', $storeId);
492
- $config['weight_units'] = Mage::getStoreConfig('channable/data/weight_units', $storeId);
493
- $config['price_scope'] = Mage::getStoreConfig('catalog/price/scope');
494
- $config['price_add_tax'] = Mage::getStoreConfig('channable/data/add_tax', $storeId);
495
- $config['price_add_tax_perc'] = Mage::getStoreConfig('channable/data/tax_percentage', $storeId);
496
- $config['force_tax'] = Mage::getStoreConfig('channable/data/force_tax', $storeId);
497
- $config['currency'] = Mage::app()->getStore($storeId)->getCurrentCurrencyCode();
498
- $config['base_currency_code'] = Mage::app()->getStore($storeId)->getBaseCurrencyCode();
499
- $config['markup'] = Mage::helper('channable')->getPriceMarkup($config);
500
- $config['use_tax'] = Mage::helper('channable')->getTaxUsage($config);
501
-
502
- if (Mage::helper('core')->isModuleEnabled('Magmodules_Channableapi')) {
503
- $config['item_updates'] = Mage::getStoreConfig('channable_api/item/enabled', $storeId);
504
- } else {
505
- $config['item_updates'] = '';
506
- }
507
-
508
- $config['shipping_prices'] = @unserialize(Mage::getStoreConfig('channable/advanced/shipping_price', $storeId));
509
- $config['shipping_method'] = Mage::getStoreConfig('channable/advanced/shipping_method', $storeId);
510
- $config['field'] = $this->getFeedAttributes($config, $storeId);
511
- $config['category_exclude'] = 'channable_exclude';
512
- $config['category_data'] = $feed->getCategoryData($config, $storeId);
513
-
514
- return $config;
515
- }
516
-
517
- /**
518
- * @param string $config
519
- * @param int $storeId
520
- * @return mixed
521
- */
522
- public function getFeedAttributes($config = '', $storeId = 0)
523
- {
524
- $attributes = array();
525
- $attributes['id'] = array(
526
- 'label' => 'id',
527
- 'source' => 'entity_id'
528
- );
529
- $attributes['name'] = array(
530
- 'label' => 'name',
531
- 'source' => Mage::getStoreConfig('channable/data/name', $storeId)
532
- );
533
- $attributes['description'] = array(
534
- 'label' => 'description',
535
- 'source' => Mage::getStoreConfig('channable/data/description', $storeId)
536
- );
537
- $attributes['product_url'] = array(
538
- 'label' => 'url',
539
- 'source' => ''
540
- );
541
- $attributes['image_link'] = array(
542
- 'label' => 'image',
543
- 'source' => Mage::getStoreConfig('channable/data/default_image', $storeId)
544
- );
545
- $attributes['price'] = array(
546
- 'label' => 'price',
547
- 'source' => ''
548
- );
549
- $attributes['sku'] = array(
550
- 'label' => 'sku',
551
- 'source' => Mage::getStoreConfig('channable/data/sku', $storeId)
552
- );
553
- $attributes['brand'] = array(
554
- 'label' => 'brand',
555
- 'source' => Mage::getStoreConfig('channable/data/brand', $storeId)
556
- );
557
- $attributes['size'] = array(
558
- 'label' => 'size',
559
- 'source' => Mage::getStoreConfig('channable/data/size', $storeId)
560
- );
561
- $attributes['color'] = array(
562
- 'label' => 'color',
563
- 'source' => Mage::getStoreConfig('channable/data/color', $storeId)
564
- );
565
- $attributes['material'] = array(
566
- 'label' => 'material',
567
- 'source' => Mage::getStoreConfig('channable/data/material', $storeId)
568
- );
569
- $attributes['gender'] = array(
570
- 'label' => 'gender',
571
- 'source' => Mage::getStoreConfig('channable/data/gender', $storeId)
572
- );
573
- $attributes['ean'] = array(
574
- 'label' => 'ean',
575
- 'source' => Mage::getStoreConfig('channable/data/ean', $storeId)
576
- );
577
- $attributes['categories'] = array(
578
- 'label' => 'categories',
579
- 'source' => '',
580
- 'parent' => 1
581
- );
582
- $attributes['type'] = array(
583
- 'label' => 'type',
584
- 'source' => 'type_id'
585
- );
586
- $attributes['status'] = array(
587
- 'label' => 'status',
588
- 'source' => 'status',
589
- 'parent' => 1
590
- );
591
- $attributes['visibility'] = array(
592
- 'label' => 'visibility',
593
- 'source' => 'visibility'
594
- );
595
- $attributes['parent_id'] = array(
596
- 'label' => 'item_group_id',
597
- 'source' => 'entity_id',
598
- 'parent' => 1
599
- );
600
- $attributes['weight'] = array(
601
- 'label' => 'weight',
602
- 'source' => ''
603
- );
604
- $attributes['is_in_stock'] = array(
605
- 'label' => 'is_in_stock',
606
- 'source' => 'is_in_stock'
607
- );
608
-
609
- if (Mage::getStoreConfig('channable/data/stock', $storeId)) {
610
- $attributes['stock'] = array(
611
- 'label' => 'qty',
612
- 'source' => 'qty',
613
- 'action' => 'round'
614
- );
615
- }
616
-
617
- if (Mage::getStoreConfig('channable/data/delivery', $storeId) == 'attribute') {
618
- $attributes['delivery'] = array(
619
- 'label' => 'delivery',
620
- 'source' => Mage::getStoreConfig('channable/data/delivery_att', $storeId)
621
- );
622
- }
623
-
624
- if (Mage::getStoreConfig('channable/data/delivery_be', $storeId) == 'attribute') {
625
- $attributes['delivery_be'] = array(
626
- 'label' => 'delivery_be',
627
- 'source' => Mage::getStoreConfig('channable/data/delivery_att_be', $storeId)
628
- );
629
- }
630
-
631
- if ($extraFields = @unserialize(Mage::getStoreConfig('channable/advanced/extra', $storeId))) {
632
- foreach ($extraFields as $extraField) {
633
- $attributes[$extraField['attribute']] = array(
634
- 'label' => $extraField['label'],
635
- 'source' => $extraField['attribute'],
636
- 'action' => ''
637
- );
638
- }
639
- }
640
-
641
- return Mage::helper('channable')->addAttributeData($attributes, $config);
642
- }
643
  }
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  class Magmodules_Channable_Model_Channable extends Magmodules_Channable_Model_Common
23
  {
24
 
25
  /**
26
+ * @param $storeId
27
  * @param string $limit
28
+ * @param $timeStart
29
+ * @param int $page
30
+ *
31
+ * @return array|bool
32
  */
33
  public function generateFeed($storeId, $limit = '', $timeStart, $page = 1)
34
  {
42
  if ($feed = $this->getFeedData($products, $parents, $config, $parentAttributes, $timeStart, $prices, $page)) {
43
  return $feed;
44
  }
45
+
46
+ return false;
47
+ }
48
+
49
+ /**
50
+ * @param $storeId
51
+ */
52
+ protected function setMemoryLimit($storeId)
53
+ {
54
+ if (Mage::getStoreConfig('channable/server/overwrite', $storeId)) {
55
+ if ($memoryLimit = Mage::getStoreConfig('channable/server/memory_limit', $storeId)) {
56
+ ini_set('memory_limit', $memoryLimit);
57
+ }
58
+
59
+ if ($maxExecutionTime = Mage::getStoreConfig('channable/server/max_execution_time', $storeId)) {
60
+ ini_set('max_execution_time', $maxExecutionTime);
61
+ }
62
+ }
63
+ }
64
+
65
+ /**
66
+ * @param $storeId
67
+ *
68
+ * @return array
69
+ */
70
+ public function getFeedConfig($storeId)
71
+ {
72
+
73
+ $config = array();
74
+ $feed = Mage::helper('channable');
75
+ $websiteId = Mage::app()->getStore($storeId)->getWebsiteId();
76
+
77
+ // DEFAULTS
78
+ $config['store_id'] = $storeId;
79
+ $config['website_name'] = $feed->cleanData(
80
+ Mage::getModel('core/website')->load($websiteId)->getName(),
81
+ 'striptags'
82
+ );
83
+ $config['website_url'] = Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
84
+ $config['media_url'] = Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA);
85
+ $config['media_image_url'] = $config['media_url'] . 'catalog' . DS . 'product';
86
+ $config['media_attributes'] = $feed->getMediaAttributes();
87
+ $config['limit'] = Mage::getStoreConfig('channable/connect/max_products', $storeId);
88
+ $config['version'] = (string) Mage::getConfig()->getNode()->modules->Magmodules_Channable->version;
89
+ $config['media_gallery_id'] = Mage::getResourceModel('eav/entity_attribute')->getIdByCode(
90
+ 'catalog_product',
91
+ 'media_gallery'
92
+ );
93
+ $config['filters'] = @unserialize(Mage::getStoreConfig('channable/filter/advanced', $storeId));
94
+ $config['product_url_suffix'] = $feed->getProductUrlSuffix($storeId);
95
+ $config['filter_enabled'] = Mage::getStoreConfig('channable/filter/category_enabled', $storeId);
96
+ $config['filter_cat'] = Mage::getStoreConfig('channable/filter/categories', $storeId);
97
+ $config['filter_type'] = Mage::getStoreConfig('channable/filter/category_type', $storeId);
98
+ $config['filter_status'] = Mage::getStoreConfig('channable/filter/visibility_inc', $storeId);
99
+ $config['hide_no_stock'] = Mage::getStoreConfig('channable/filter/stock', $storeId);
100
+ $config['conf_enabled'] = Mage::getStoreConfig('channable/data/conf_enabled', $storeId);
101
+ $config['conf_fields'] = Mage::getStoreConfig('channable/data/conf_fields', $storeId);
102
+ $config['parent_att'] = $this->getParentAttributeSelection($config['conf_fields']);
103
+ $config['conf_switch_urls'] = Mage::getStoreConfig('channable/data/conf_switch_urls', $storeId);
104
+ $config['simple_price'] = Mage::getStoreConfig('channable/data/simple_price', $storeId);
105
+ $config['stock_manage'] = Mage::getStoreConfig('cataloginventory/item_options/manage_stock');
106
+ $config['use_qty_increments'] = Mage::getStoreConfig('cataloginventory/item_options/enable_qty_increments');
107
+ $config['qty_increments'] = Mage::getStoreConfig('cataloginventory/item_options/qty_increments');
108
+ $config['delivery'] = Mage::getStoreConfig('channable/data/delivery', $storeId);
109
+ $config['delivery_be'] = Mage::getStoreConfig('channable/data/delivery_be', $storeId);
110
+ $config['delivery_att'] = Mage::getStoreConfig('channable/data/delivery_att', $storeId);
111
+ $config['delivery_att_be'] = Mage::getStoreConfig('channable/data/delivery_att_be', $storeId);
112
+ $config['delivery_in'] = Mage::getStoreConfig('channable/data/delivery_in', $storeId);
113
+ $config['delivery_in_be'] = Mage::getStoreConfig('channable/data/delivery_in_be', $storeId);
114
+ $config['delivery_out'] = Mage::getStoreConfig('channable/data/delivery_out', $storeId);
115
+ $config['delivery_out_be'] = Mage::getStoreConfig('channable/data/delivery_out_be', $storeId);
116
+ $config['images'] = Mage::getStoreConfig('channable/data/images', $storeId);
117
+ $config['default_image'] = Mage::getStoreConfig('channable/data/default_image', $storeId);
118
+ $config['skip_validation'] = false;
119
+ $config['weight'] = Mage::getStoreConfig('channable/data/weight', $storeId);
120
+ $config['weight_units'] = Mage::getStoreConfig('channable/data/weight_units', $storeId);
121
+ $config['price_scope'] = Mage::getStoreConfig('catalog/price/scope');
122
+ $config['price_add_tax'] = Mage::getStoreConfig('channable/data/add_tax', $storeId);
123
+ $config['price_add_tax_perc'] = Mage::getStoreConfig('channable/data/tax_percentage', $storeId);
124
+ $config['force_tax'] = Mage::getStoreConfig('channable/data/force_tax', $storeId);
125
+ $config['currency'] = Mage::app()->getStore($storeId)->getCurrentCurrencyCode();
126
+ $config['base_currency_code'] = Mage::app()->getStore($storeId)->getBaseCurrencyCode();
127
+ $config['markup'] = Mage::helper('channable')->getPriceMarkup($config);
128
+ $config['use_tax'] = Mage::helper('channable')->getTaxUsage($config);
129
+
130
+ if (Mage::helper('core')->isModuleEnabled('Magmodules_Channableapi')) {
131
+ $config['item_updates'] = Mage::getStoreConfig('channable_api/item/enabled', $storeId);
132
+ } else {
133
+ $config['item_updates'] = '';
134
+ }
135
+
136
+ $config['shipping_prices'] = @unserialize(Mage::getStoreConfig('channable/advanced/shipping_price', $storeId));
137
+ $config['shipping_method'] = Mage::getStoreConfig('channable/advanced/shipping_method', $storeId);
138
+ $config['field'] = $this->getFeedAttributes($config, $storeId);
139
+ $config['category_exclude'] = 'channable_exclude';
140
+ $config['category_data'] = $feed->getCategoryData($config, $storeId);
141
+
142
+ return $config;
143
+ }
144
+
145
+ /**
146
+ * @param string $config
147
+ * @param int $storeId
148
+ *
149
+ * @return mixed
150
+ */
151
+ public function getFeedAttributes($config = '', $storeId = 0)
152
+ {
153
+ $attributes = array();
154
+ $attributes['id'] = array(
155
+ 'label' => 'id',
156
+ 'source' => 'entity_id'
157
+ );
158
+ $attributes['name'] = array(
159
+ 'label' => 'name',
160
+ 'source' => Mage::getStoreConfig('channable/data/name', $storeId)
161
+ );
162
+ $attributes['description'] = array(
163
+ 'label' => 'description',
164
+ 'source' => Mage::getStoreConfig('channable/data/description', $storeId)
165
+ );
166
+ $attributes['product_url'] = array(
167
+ 'label' => 'url',
168
+ 'source' => ''
169
+ );
170
+ $attributes['image_link'] = array(
171
+ 'label' => 'image',
172
+ 'source' => Mage::getStoreConfig('channable/data/default_image', $storeId)
173
+ );
174
+ $attributes['price'] = array(
175
+ 'label' => 'price',
176
+ 'source' => ''
177
+ );
178
+ $attributes['sku'] = array(
179
+ 'label' => 'sku',
180
+ 'source' => Mage::getStoreConfig('channable/data/sku', $storeId)
181
+ );
182
+ $attributes['brand'] = array(
183
+ 'label' => 'brand',
184
+ 'source' => Mage::getStoreConfig('channable/data/brand', $storeId)
185
+ );
186
+ $attributes['size'] = array(
187
+ 'label' => 'size',
188
+ 'source' => Mage::getStoreConfig('channable/data/size', $storeId)
189
+ );
190
+ $attributes['color'] = array(
191
+ 'label' => 'color',
192
+ 'source' => Mage::getStoreConfig('channable/data/color', $storeId)
193
+ );
194
+ $attributes['material'] = array(
195
+ 'label' => 'material',
196
+ 'source' => Mage::getStoreConfig('channable/data/material', $storeId)
197
+ );
198
+ $attributes['gender'] = array(
199
+ 'label' => 'gender',
200
+ 'source' => Mage::getStoreConfig('channable/data/gender', $storeId)
201
+ );
202
+ $attributes['ean'] = array(
203
+ 'label' => 'ean',
204
+ 'source' => Mage::getStoreConfig('channable/data/ean', $storeId)
205
+ );
206
+ $attributes['categories'] = array(
207
+ 'label' => 'categories',
208
+ 'source' => '',
209
+ 'parent' => 1
210
+ );
211
+ $attributes['type'] = array(
212
+ 'label' => 'type',
213
+ 'source' => 'type_id'
214
+ );
215
+ $attributes['status'] = array(
216
+ 'label' => 'status',
217
+ 'source' => 'status',
218
+ 'parent' => 1
219
+ );
220
+ $attributes['visibility'] = array(
221
+ 'label' => 'visibility',
222
+ 'source' => 'visibility'
223
+ );
224
+ $attributes['parent_id'] = array(
225
+ 'label' => 'item_group_id',
226
+ 'source' => 'entity_id',
227
+ 'parent' => 1
228
+ );
229
+ $attributes['weight'] = array(
230
+ 'label' => 'weight',
231
+ 'source' => ''
232
+ );
233
+ $attributes['is_in_stock'] = array(
234
+ 'label' => 'is_in_stock',
235
+ 'source' => 'is_in_stock'
236
+ );
237
+
238
+ if (Mage::getStoreConfig('channable/data/stock', $storeId)) {
239
+ $attributes['stock'] = array(
240
+ 'label' => 'qty',
241
+ 'source' => 'qty',
242
+ 'action' => 'round'
243
+ );
244
+ }
245
+
246
+ if (Mage::getStoreConfig('channable/data/delivery', $storeId) == 'attribute') {
247
+ $attributes['delivery'] = array(
248
+ 'label' => 'delivery',
249
+ 'source' => Mage::getStoreConfig('channable/data/delivery_att', $storeId)
250
+ );
251
+ }
252
+
253
+ if (Mage::getStoreConfig('channable/data/delivery_be', $storeId) == 'attribute') {
254
+ $attributes['delivery_be'] = array(
255
+ 'label' => 'delivery_be',
256
+ 'source' => Mage::getStoreConfig('channable/data/delivery_att_be', $storeId)
257
+ );
258
+ }
259
+
260
+ if ($extraFields = @unserialize(Mage::getStoreConfig('channable/advanced/extra', $storeId))) {
261
+ foreach ($extraFields as $extraField) {
262
+ $attributes[$extraField['attribute']] = array(
263
+ 'label' => $extraField['label'],
264
+ 'source' => $extraField['attribute'],
265
+ 'action' => ''
266
+ );
267
+ }
268
+ }
269
+
270
+ return Mage::helper('channable')->addAttributeData($attributes, $config);
271
+ }
272
+
273
+ /**
274
+ * @param $storeId
275
+ * @param $page
276
+ */
277
+ protected function cleanItemUpdates($storeId, $page)
278
+ {
279
+ if (empty($page)) {
280
+ if (Mage::helper('core')->isModuleEnabled('Magmodules_Channableapi')) {
281
+ Mage::getModel('channableapi/items')->cleanItemStore($storeId);
282
+ }
283
+ }
284
  }
285
 
286
  /**
287
  * @param $products
288
+ * @param $parents
289
  * @param $config
290
+ * @param $parentAttributes
291
  * @param $timeStart
292
  * @param $prices
293
  * @param $page
294
+ *
295
  * @return array
296
  */
297
  public function getFeedData($products, $parents, $config, $parentAttributes, $timeStart, $prices, $page)
343
  * @param $config
344
  * @param $product
345
  * @param $prices
346
+ *
347
  * @return array
348
  */
349
  public function getExtraDataFields($productData, $config, $product, $prices)
350
  {
351
  $extra = array();
352
  if (!empty($productData['price'])) {
353
+ if (!empty($productData['item_group_id'])) {
354
  $itemGroupId = $productData['item_group_id'];
355
  } else {
356
+ $itemGroupId = '';
357
  }
358
 
359
+ if ($priceData = $this->getPrices(
360
+ $productData['price'], $prices, $product, $config['currency'],
361
+ $itemGroupId
362
+ )
363
+ ) {
364
  $extra = array_merge($extra, $priceData);
365
  }
366
  }
368
  if ($stockData = $this->getStockData($productData, $config, $product)) {
369
  $extra = array_merge($extra, $stockData);
370
  }
371
+
372
+ if ($shippingData = $this->getShipping($productData, $config, $product->getWeight(), $stockData)) {
373
  $extra = array_merge($extra, $shippingData);
374
  }
375
 
392
  * @param $product
393
  * @param $currency
394
  * @param $itemGroupId
395
+ *
396
  * @return array
397
  */
398
  public function getPrices($data, $confPrices, $product, $currency, $itemGroupId)
430
  return $prices;
431
  }
432
 
433
+ /**
434
+ * @param $productData
435
+ * @param $config
436
+ * @param $product
437
+ *
438
+ * @return array
439
+ */
440
+ public function getStockData($productData, $config, $product)
441
+ {
442
+ $stockData = array();
443
+ $stockData['is_in_stock'] = $productData['is_in_stock'];
444
+
445
+ if (!empty($productData['qty'])) {
446
+ $stockData['qty'] = $productData['qty'];
447
+ } else {
448
+ $stockData['qty'] = (string) '0';
449
+ }
450
+
451
+ if ($product->getUseConfigManageStock()) {
452
+ $stockData['manage_stock'] = (string) $config['stock_manage'];
453
+ } else {
454
+ $stockData['manage_stock'] = (string) $product->getManageStock();
455
+ }
456
+
457
+ if (!empty($product['min_sale_qty'])) {
458
+ $stockData['min_sale_qty'] = (string) round($product['min_sale_qty']);
459
+ } else {
460
+ $stockData['min_sale_qty'] = '1';
461
+ }
462
+
463
+ if ($product->getUseEnableQtyIncrements()) {
464
+ if (!empty($config['use_qty_increments'])) {
465
+ $stockData['qty_increments'] = (string) $config['qty_increments'];
466
+ }
467
+ } else {
468
+ if ($product->getUseConfigQtyIncrements()) {
469
+ $stockData['qty_increments'] = (string) $config['qty_increments'];
470
+ } else {
471
+ $stockData['qty_increments'] = round($product['qty_increments']);
472
+ }
473
+ }
474
+
475
+ if (empty($stockData['qty_increments'])) {
476
+ $stockData['qty_increments'] = '1';
477
+ }
478
+
479
+ return $stockData;
480
+ }
481
+
482
  /**
483
  * @param $data
484
  * @param $config
485
  * @param $weight
486
  * @param $stock
487
+ *
488
  * @return array
489
  */
490
  public function getShipping($data, $config, $weight, $stock)
505
  } else {
506
  if (!empty($config['delivery_in'])) {
507
  $shippingArray['delivery'] = $config['delivery_in'];
508
+ }
509
+ }
510
  }
511
 
512
  if ($config['delivery_be'] == 'fixed') {
523
  } else {
524
  if (!empty($config['delivery_in'])) {
525
  $shippingArray['delivery_be'] = $config['delivery_in_be'];
526
+ }
527
+ }
528
  }
529
 
530
  if ($config['shipping_method'] == 'weight') {
536
  $calValue = '0.00';
537
  }
538
  }
539
+
540
  if (!empty($config['shipping_prices'])) {
541
  foreach ($config['shipping_prices'] as $shippingPrice) {
542
  if (($calValue >= $shippingPrice['price_from']) && ($calValue <= $shippingPrice['price_to'])) {
560
 
561
  /**
562
  * @param $productData
563
+ *
564
  * @return array
565
  */
566
  public function getCategoryData($productData)
586
  /**
587
  * @param $productData
588
  * @param $config
589
+ *
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
590
  * @return array
591
  */
592
  public function getImages($productData, $config)
593
  {
594
  $_images = array();
595
+
596
  if (!empty($config['default_image'])) {
597
  if (!empty($productData['image'][$config['default_image']])) {
598
  $_images['image_link'] = $productData['image'][$config['default_image']];
621
  }
622
  }
623
 
624
+ if (!empty($_additional)) {
625
  $_images['additional_imagelinks'] = $_additional;
626
  }
627
  }
639
  }
640
 
641
  /**
642
+ * @param $config
643
+ * @param $count
644
+ * @param $timeStart
645
  * @param int $productCount
646
  * @param int $page
647
+ *
648
  * @return array
649
  */
650
  public function getFeedHeader($config, $count, $timeStart, $productCount = 0, $page = 1)
651
  {
652
+ $pages = (($config['limit']) && ($count > $config['limit'])) ? ceil($count / $config['limit']) : 1;
653
  $header = array();
654
  $header['system'] = 'Magento';
655
  $header['extension'] = 'Magmodules_Channable';
659
  $header['products_total'] = $count;
660
  $header['products_limit'] = $config['limit'];
661
  $header['products_output'] = $productCount;
662
+ $header['products_pages'] = $pages;
663
  $header['current_page'] = ($page) ? $page : 1;
664
  $header['processing_time'] = number_format((microtime(true) - $timeStart), 4);
665
  if ($header['products_pages'] > $header['current_page']) {
670
 
671
  return $header;
672
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
673
  }
app/code/community/Magmodules/Channable/Model/Common.php CHANGED
@@ -1,28 +1,33 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
 
18
  class Magmodules_Channable_Model_Common extends Mage_Core_Helper_Abstract
19
  {
20
 
21
  /**
22
- * @param $config
23
  * @param string $limit
24
- * @param int $page
25
  * @param string $type
 
26
  * @return mixed
27
  */
28
  public function getProducts($config, $limit = '', $page = 1, $type = '')
@@ -69,7 +74,7 @@ class Magmodules_Channable_Model_Common extends Mage_Core_Helper_Abstract
69
  if (!empty($config['hide_no_stock'])) {
70
  Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($collection);
71
  }
72
-
73
  if ($type != 'count') {
74
  $attributes = $this->getDefaultAttributes();
75
 
@@ -125,13 +130,13 @@ class Magmodules_Channable_Model_Common extends Mage_Core_Helper_Abstract
125
 
126
  $collection->joinTable(
127
  'cataloginventory/stock_item', 'product_id=entity_id', array(
128
- "qty" => "qty",
129
- "is_in_stock" => "is_in_stock",
130
- "manage_stock" => "manage_stock",
131
- "use_config_manage_stock" => "use_config_manage_stock",
132
- "min_sale_qty" => "min_sale_qty",
133
- "qty_increments" => "qty_increments",
134
- "enable_qty_increments" => "enable_qty_increments",
135
  "use_config_qty_increments" => "use_config_qty_increments"
136
  )
137
  )->addAttributeToSelect(
@@ -144,11 +149,11 @@ class Magmodules_Channable_Model_Common extends Mage_Core_Helper_Abstract
144
  'qty_increments',
145
  'enable_qty_increments',
146
  'use_config_qty_increments'
147
- )
148
  );
149
 
150
  $collection->getSelect()->group('e.entity_id');
151
-
152
  $products = $collection->load();
153
  } else {
154
  $products = $collection->getSize();
@@ -157,8 +162,77 @@ class Magmodules_Channable_Model_Common extends Mage_Core_Helper_Abstract
157
  return $products;
158
  }
159
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
160
  /**
161
  * Araay of default Attributes
 
162
  * @return array
163
  */
164
  public function getDefaultAttributes()
@@ -188,11 +262,11 @@ class Magmodules_Channable_Model_Common extends Mage_Core_Helper_Abstract
188
  return $attributes;
189
  }
190
 
191
-
192
  /**
193
  * @param $products
194
  * @param $config
195
- * @return array
 
196
  */
197
  public function getParents($products, $config)
198
  {
@@ -203,11 +277,11 @@ class Magmodules_Channable_Model_Common extends Mage_Core_Helper_Abstract
203
  $ids[] = $parentId;
204
  }
205
  }
206
-
207
  if (empty($ids)) {
208
  return array();
209
  }
210
-
211
  $collection = Mage::getResourceModel('catalog/product_collection')
212
  ->setStore($config['store_id'])
213
  ->addStoreFilter($config['store_id'])
@@ -215,17 +289,20 @@ class Magmodules_Channable_Model_Common extends Mage_Core_Helper_Abstract
215
  ->addUrlRewrite()
216
  ->addAttributeToFilter('entity_id', array('in', $ids))
217
  ->addAttributeToSelect(array_unique($config['parent_att']));
218
-
219
- if (!empty($config['hide_no_stock'])) {
220
  Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($collection);
221
- }
222
-
223
- return $collection->load();
224
  }
 
 
225
  }
226
 
227
  /**
228
  * @param $atts
 
229
  * @return array
230
  */
231
  public function getParentAttributeSelection($atts)
@@ -235,72 +312,4 @@ class Magmodules_Channable_Model_Common extends Mage_Core_Helper_Abstract
235
 
236
  return array_merge($attributes, $extraAttributes);
237
  }
238
-
239
- /**
240
- * @param $filters
241
- * @param $collection
242
- */
243
- public function addFilters($filters, $collection)
244
- {
245
- foreach ($filters as $filter) {
246
- $attribute = $filter['attribute'];
247
- if ($filter['type'] == 'select') {
248
- $attribute = $filter['attribute'] . '_value';
249
- }
250
-
251
- $condition = $filter['condition'];
252
- $value = $filter['value'];
253
-
254
- if ($attribute == 'final_price') {
255
- $cType = array('eq'=> '=', 'neq' => '!=', 'gt' => '>', 'gteq' => '>=', 'lt' => '<', 'lteg' => '<=');
256
- if (isset($cType[$condition])) {
257
- $collection->getSelect()->where('price_index.final_price ' . $cType[$condition] . ' ' . $value);
258
- }
259
-
260
- continue;
261
- }
262
-
263
- switch ($condition) {
264
- case 'nin':
265
- if (strpos($value, ',') !== false) {
266
- $value = explode(',', $value);
267
- }
268
-
269
- $collection->addAttributeToFilter(
270
- array(
271
- array(
272
- 'attribute' => $attribute,
273
- $condition => $value
274
- ),
275
- array('attribute' => $attribute, 'null' => true)
276
- )
277
- );
278
- break;
279
- case 'in';
280
- if (strpos($value, ',') !== false) {
281
- $value = explode(',', $value);
282
- }
283
-
284
- $collection->addAttributeToFilter($attribute, array($condition => $value));
285
- break;
286
- case 'neq':
287
- $collection->addAttributeToFilter(
288
- array(
289
- array('attribute' => $attribute, $condition => $value),
290
- array('attribute' => $attribute, 'null' => true)
291
- )
292
- );
293
- break;
294
- case 'empty':
295
- $collection->addAttributeToFilter($attribute, array('null' => true));
296
- break;
297
- case 'not-empty':
298
- $collection->addAttributeToFilter($attribute, array('notnull' => true));
299
- break;
300
- default:
301
- $collection->addAttributeToFilter($attribute, array($condition => $value));
302
- break;
303
- }
304
- }
305
- }
306
  }
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  class Magmodules_Channable_Model_Common extends Mage_Core_Helper_Abstract
23
  {
24
 
25
  /**
26
+ * @param $config
27
  * @param string $limit
28
+ * @param int $page
29
  * @param string $type
30
+ *
31
  * @return mixed
32
  */
33
  public function getProducts($config, $limit = '', $page = 1, $type = '')
74
  if (!empty($config['hide_no_stock'])) {
75
  Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($collection);
76
  }
77
+
78
  if ($type != 'count') {
79
  $attributes = $this->getDefaultAttributes();
80
 
130
 
131
  $collection->joinTable(
132
  'cataloginventory/stock_item', 'product_id=entity_id', array(
133
+ "qty" => "qty",
134
+ "is_in_stock" => "is_in_stock",
135
+ "manage_stock" => "manage_stock",
136
+ "use_config_manage_stock" => "use_config_manage_stock",
137
+ "min_sale_qty" => "min_sale_qty",
138
+ "qty_increments" => "qty_increments",
139
+ "enable_qty_increments" => "enable_qty_increments",
140
  "use_config_qty_increments" => "use_config_qty_increments"
141
  )
142
  )->addAttributeToSelect(
149
  'qty_increments',
150
  'enable_qty_increments',
151
  'use_config_qty_increments'
152
+ )
153
  );
154
 
155
  $collection->getSelect()->group('e.entity_id');
156
+
157
  $products = $collection->load();
158
  } else {
159
  $products = $collection->getSize();
162
  return $products;
163
  }
164
 
165
+ /**
166
+ * @param $filters
167
+ * @param $collection
168
+ */
169
+ public function addFilters($filters, $collection)
170
+ {
171
+ foreach ($filters as $filter) {
172
+ $attribute = $filter['attribute'];
173
+ if ($filter['type'] == 'select') {
174
+ $attribute = $filter['attribute'] . '_value';
175
+ }
176
+
177
+ $condition = $filter['condition'];
178
+ $value = $filter['value'];
179
+
180
+ if ($attribute == 'final_price') {
181
+ $cType = array('eq' => '=', 'neq' => '!=', 'gt' => '>', 'gteq' => '>=', 'lt' => '<', 'lteg' => '<=');
182
+ if (isset($cType[$condition])) {
183
+ $collection->getSelect()->where('price_index.final_price ' . $cType[$condition] . ' ' . $value);
184
+ }
185
+
186
+ continue;
187
+ }
188
+
189
+ switch ($condition) {
190
+ case 'nin':
191
+ if (strpos($value, ',') !== false) {
192
+ $value = explode(',', $value);
193
+ }
194
+
195
+ $collection->addAttributeToFilter(
196
+ array(
197
+ array(
198
+ 'attribute' => $attribute,
199
+ $condition => $value
200
+ ),
201
+ array('attribute' => $attribute, 'null' => true)
202
+ )
203
+ );
204
+ break;
205
+ case 'in';
206
+ if (strpos($value, ',') !== false) {
207
+ $value = explode(',', $value);
208
+ }
209
+
210
+ $collection->addAttributeToFilter($attribute, array($condition => $value));
211
+ break;
212
+ case 'neq':
213
+ $collection->addAttributeToFilter(
214
+ array(
215
+ array('attribute' => $attribute, $condition => $value),
216
+ array('attribute' => $attribute, 'null' => true)
217
+ )
218
+ );
219
+ break;
220
+ case 'empty':
221
+ $collection->addAttributeToFilter($attribute, array('null' => true));
222
+ break;
223
+ case 'not-empty':
224
+ $collection->addAttributeToFilter($attribute, array('notnull' => true));
225
+ break;
226
+ default:
227
+ $collection->addAttributeToFilter($attribute, array($condition => $value));
228
+ break;
229
+ }
230
+ }
231
+ }
232
+
233
  /**
234
  * Araay of default Attributes
235
+ *
236
  * @return array
237
  */
238
  public function getDefaultAttributes()
262
  return $attributes;
263
  }
264
 
 
265
  /**
266
  * @param $products
267
  * @param $config
268
+ *
269
+ * @return array|bool
270
  */
271
  public function getParents($products, $config)
272
  {
277
  $ids[] = $parentId;
278
  }
279
  }
280
+
281
  if (empty($ids)) {
282
  return array();
283
  }
284
+
285
  $collection = Mage::getResourceModel('catalog/product_collection')
286
  ->setStore($config['store_id'])
287
  ->addStoreFilter($config['store_id'])
289
  ->addUrlRewrite()
290
  ->addAttributeToFilter('entity_id', array('in', $ids))
291
  ->addAttributeToSelect(array_unique($config['parent_att']));
292
+
293
+ if (!empty($config['hide_no_stock'])) {
294
  Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($collection);
295
+ }
296
+
297
+ return $collection->load();
298
  }
299
+
300
+ return false;
301
  }
302
 
303
  /**
304
  * @param $atts
305
+ *
306
  * @return array
307
  */
308
  public function getParentAttributeSelection($atts)
312
 
313
  return array_merge($attributes, $extraAttributes);
314
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
315
  }
app/code/community/Magmodules/Channable/controllers/Adminhtml/ChannableController.php CHANGED
@@ -1,18 +1,22 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
 
18
  class Magmodules_Channable_Adminhtml_ChannableController extends Mage_Adminhtml_Controller_Action
@@ -23,17 +27,51 @@ class Magmodules_Channable_Adminhtml_ChannableController extends Mage_Adminhtml_
23
  */
24
  public function addToFlatAction()
25
  {
26
- $nonFlatAttributes = Mage::helper('channable')->checkFlatCatalog(Mage::getModel("channable/channable")->getFeedAttributes());
 
27
 
28
  foreach ($nonFlatAttributes as $key => $value) {
29
- Mage::getModel('catalog/resource_eav_attribute')->load($key)->setUsedInProductListing(1)->save();
 
 
30
  }
31
 
32
- Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('channable')->__('Attributes added to Flat Catalog, please reindex Product Flat Data.'));
 
33
 
34
  $this->_redirect('adminhtml/system_config/edit/section/channable');
35
  }
36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  /**
38
  * @return mixed
39
  */
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  class Magmodules_Channable_Adminhtml_ChannableController extends Mage_Adminhtml_Controller_Action
27
  */
28
  public function addToFlatAction()
29
  {
30
+ $attributes = Mage::getModel("channable/channable")->getFeedAttributes();
31
+ $nonFlatAttributes = Mage::helper('channable')->checkFlatCatalog($attributes);
32
 
33
  foreach ($nonFlatAttributes as $key => $value) {
34
+ Mage::getModel('catalog/resource_eav_attribute')->load($key)
35
+ ->setUsedInProductListing(1)
36
+ ->save();
37
  }
38
 
39
+ $msg = Mage::helper('channable')->__('Attributes added to Flat Catalog, please reindex Product Flat Data.');
40
+ Mage::getSingleton('adminhtml/session')->addSuccess($msg);
41
 
42
  $this->_redirect('adminhtml/system_config/edit/section/channable');
43
  }
44
 
45
+ /**
46
+ * Token create / update function
47
+ */
48
+ public function createTokenAction()
49
+ {
50
+ $oldToken = Mage::getModel('core/config_data')->getCollection()
51
+ ->addFieldToFilter('path', 'channable/connect/token')
52
+ ->addFieldToFilter('scope_id', 0)
53
+ ->addFieldToFilter('scope', 'default')
54
+ ->getFirstItem()
55
+ ->getValue();
56
+
57
+ $token = '';
58
+ $chars = str_split("abcdefghijklmnopqrstuvwxyz0123456789");
59
+ for ($i = 0; $i < 32; $i++) {
60
+ $token .= $chars[array_rand($chars)];
61
+ }
62
+
63
+ Mage::getModel('core/config')->saveConfig('channable/connect/token', Mage::helper('core')->encrypt($token));
64
+
65
+ if (!empty($oldToken)) {
66
+ $msg = 'New Token created, please update Channable Dashboard with this new token';
67
+ } else {
68
+ $msg = 'New Token created, please link your account using the auto update';
69
+ }
70
+
71
+ Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('channable')->__($msg));
72
+ $this->_redirect('adminhtml/system_config/edit/section/channable');
73
+ }
74
+
75
  /**
76
  * @return mixed
77
  */
app/code/community/Magmodules/Channable/controllers/FeedController.php CHANGED
@@ -1,18 +1,22 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
 
18
  class Magmodules_Channable_FeedController extends Mage_Core_Controller_Front_Action
@@ -28,13 +32,20 @@ class Magmodules_Channable_FeedController extends Mage_Core_Controller_Front_Act
28
  $code = $this->getRequest()->getParam('code');
29
  $page = $this->getRequest()->getParam('page');
30
  if ($storeId && $code) {
31
- if ($code == Mage::getStoreConfig('channable/connect/token')) {
32
  $timeStart = microtime(true);
33
  $limit = Mage::getStoreConfig('channable/connect/max_products', $storeId);
34
  $appEmulation = Mage::getSingleton('core/app_emulation');
35
  $initialEnvironmentInfo = $appEmulation->startEnvironmentEmulation($storeId);
36
- Mage::app()->loadAreaPart(Mage_Core_Model_App_Area::AREA_GLOBAL, Mage_Core_Model_App_Area::PART_EVENTS)->loadArea(Mage_Core_Model_App_Area::AREA_FRONTEND);
37
- if ($feed = Mage::getModel('channable/channable')->generateFeed($storeId, $limit, $timeStart, $page)) {
 
 
 
 
 
 
 
38
  if ($this->getRequest()->getParam('array')) {
39
  $this->getResponse()->setBody(Zend_Debug::dump($feed, null, false));
40
  } else {
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  class Magmodules_Channable_FeedController extends Mage_Core_Controller_Front_Action
32
  $code = $this->getRequest()->getParam('code');
33
  $page = $this->getRequest()->getParam('page');
34
  if ($storeId && $code) {
35
+ if ($code == Mage::helper('channable')->getToken()) {
36
  $timeStart = microtime(true);
37
  $limit = Mage::getStoreConfig('channable/connect/max_products', $storeId);
38
  $appEmulation = Mage::getSingleton('core/app_emulation');
39
  $initialEnvironmentInfo = $appEmulation->startEnvironmentEmulation($storeId);
40
+ Mage::app()->loadAreaPart(
41
+ Mage_Core_Model_App_Area::AREA_GLOBAL,
42
+ Mage_Core_Model_App_Area::PART_EVENTS
43
+ )->loadArea(Mage_Core_Model_App_Area::AREA_FRONTEND);
44
+ if ($feed = Mage::getModel('channable/channable')->generateFeed(
45
+ $storeId, $limit, $timeStart,
46
+ $page
47
+ )
48
+ ) {
49
  if ($this->getRequest()->getParam('array')) {
50
  $this->getResponse()->setBody(Zend_Debug::dump($feed, null, false));
51
  } else {
app/code/community/Magmodules/Channable/data/magmodules_channable_setup/data-upgrade-1.4.8-1.4.9.php CHANGED
@@ -1,26 +1,30 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
 
18
  $token = Mage::getModel('core/config_data')->getCollection()
19
- ->addFieldToFilter('path', 'channable/connect/token')
20
  ->addFieldToFilter('scope_id', 0)
21
  ->addFieldToFilter('scope', 'default')
22
  ->getFirstItem()
23
- ->getValue();
24
 
25
  if (empty($token)) {
26
  $chars = str_split("abcdefghijklmnopqrstuvwxyz0123456789");
@@ -29,5 +33,15 @@ if (empty($token)) {
29
  }
30
  }
31
 
32
- Mage::getModel('core/config')->saveConfig('channable/connect/token', Mage::helper('core')->encrypt($token));
33
- Mage::app()->getCacheInstance()->cleanType('config');
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
 
22
  $token = Mage::getModel('core/config_data')->getCollection()
23
+ ->addFieldToFilter('path', 'channable/connect/token')
24
  ->addFieldToFilter('scope_id', 0)
25
  ->addFieldToFilter('scope', 'default')
26
  ->getFirstItem()
27
+ ->getValue();
28
 
29
  if (empty($token)) {
30
  $chars = str_split("abcdefghijklmnopqrstuvwxyz0123456789");
33
  }
34
  }
35
 
36
+ $tokenEncrypted = Mage::getModel('core/config_data')->getCollection()
37
+ ->addFieldToFilter('path', 'channable/connect/token_encrypted')
38
+ ->addFieldToFilter('scope_id', 0)
39
+ ->addFieldToFilter('scope', 'default')
40
+ ->getFirstItem()
41
+ ->getValue();
42
+
43
+ if (empty($tokenEncrypted)) {
44
+ $encrypt = Mage::helper('core')->encrypt($token);
45
+ Mage::getModel('core/config')->saveConfig('channable/connect/token_encrypted', 1);
46
+ Mage::getModel('core/config')->saveConfig('channable/connect/token', $encrypt);
47
+ }
app/code/community/Magmodules/Channable/etc/adminhtml.xml CHANGED
@@ -1,21 +1,25 @@
1
  <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
5
- * =============================================================
6
- * NOTICE OF LICENSE [Single domain license]
7
- * This source file is subject to the EULA that is
8
- * available through the world-wide-web at:
9
- * http://www.magmodules.eu/license-agreement/
10
- * =============================================================
11
- * @category Magmodules
12
- * @package Magmodules_Channable
13
- * @author Magmodules <info@magmodules.eu>
14
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
15
- * @license http://www.magmodules.eu/license-agreement/
16
- * =============================================================
17
- */
18
- -->
 
 
 
 
19
  <config>
20
  <acl>
21
  <resources>
1
  <?xml version="1.0"?>
2
+
3
+ <!--
4
+ ~ Magmodules.eu - http://www.magmodules.eu
5
+ ~
6
+ ~ NOTICE OF LICENSE
7
+ ~ This source file is subject to the Open Software License (OSL 3.0)
8
+ ~ that is bundled with this package in the file LICENSE.txt.
9
+ ~ It is also available through the world-wide-web at this URL:
10
+ ~ http://opensource.org/licenses/osl-3.0.php
11
+ ~ If you did not receive a copy of the license and are unable to
12
+ ~ obtain it through the world-wide-web, please send an email
13
+ ~ to info@magmodules.eu so we can send you a copy immediately.
14
+ ~
15
+ ~ @category Magmodules
16
+ ~ @package Magmodules_Channable
17
+ ~ @author Magmodules <info@magmodules.eu)
18
+ ~ @copyright Copyright (c) 2017 (http://www.magmodules.eu)
19
+ ~ @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
20
+ ~
21
+ -->
22
+
23
  <config>
24
  <acl>
25
  <resources>
app/code/community/Magmodules/Channable/etc/config.xml CHANGED
@@ -1,25 +1,27 @@
1
  <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
5
- * =============================================================
6
- * NOTICE OF LICENSE [Single domain license]
7
- * This source file is subject to the EULA that is
8
- * available through the world-wide-web at:
9
- * http://www.magmodules.eu/license-agreement/
10
- * =============================================================
11
- * @category Magmodules
12
- * @package Magmodules_Channable
13
- * @author Magmodules <info@magmodules.eu>
14
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
15
- * @license http://www.magmodules.eu/license-agreement/
16
- * =============================================================
17
- */
18
- -->
 
 
19
  <config>
20
  <modules>
21
  <Magmodules_Channable>
22
- <version>1.5.1</version>
23
  </Magmodules_Channable>
24
  </modules>
25
  <global>
@@ -103,10 +105,7 @@
103
  <ean>sku</ean>
104
  <sku>sku</sku>
105
  <color>color</color>
106
- <size></size>
107
  <images>all</images>
108
- <material></material>
109
- <gender></gender>
110
  <delivery>fixed</delivery>
111
  <delivery_in>24 Hours</delivery_in>
112
  <delivery_out>1-7 Days</delivery_out>
1
  <?xml version="1.0"?>
2
+ <!--
3
+ ~ Magmodules.eu - http://www.magmodules.eu
4
+ ~
5
+ ~ NOTICE OF LICENSE
6
+ ~ This source file is subject to the Open Software License (OSL 3.0)
7
+ ~ that is bundled with this package in the file LICENSE.txt.
8
+ ~ It is also available through the world-wide-web at this URL:
9
+ ~ http://opensource.org/licenses/osl-3.0.php
10
+ ~ If you did not receive a copy of the license and are unable to
11
+ ~ obtain it through the world-wide-web, please send an email
12
+ ~ to info@magmodules.eu so we can send you a copy immediately.
13
+ ~
14
+ ~ @category Magmodules
15
+ ~ @package Magmodules_Channable
16
+ ~ @author Magmodules <info@magmodules.eu)
17
+ ~ @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ ~ @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ ~
20
+ -->
21
  <config>
22
  <modules>
23
  <Magmodules_Channable>
24
+ <version>1.5.2</version>
25
  </Magmodules_Channable>
26
  </modules>
27
  <global>
105
  <ean>sku</ean>
106
  <sku>sku</sku>
107
  <color>color</color>
 
108
  <images>all</images>
 
 
109
  <delivery>fixed</delivery>
110
  <delivery_in>24 Hours</delivery_in>
111
  <delivery_out>1-7 Days</delivery_out>
app/code/community/Magmodules/Channable/etc/system.xml CHANGED
@@ -1,54 +1,56 @@
1
  <?xml version="1.0"?>
2
- <!--
3
- /**
4
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
5
- * =============================================================
6
- * NOTICE OF LICENSE [Single domain license]
7
- * This source file is subject to the EULA that is
8
- * available through the world-wide-web at:
9
- * http://www.magmodules.eu/license-agreement/
10
- * =============================================================
11
- * @category Magmodules
12
- * @package Magmodules_Channable
13
- * @author Magmodules <info@magmodules.eu>
14
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
15
- * @license http://www.magmodules.eu/license-agreement/
16
- * =============================================================
17
- */
18
- -->
 
 
19
  <config>
20
- <tabs>
21
- <magmodules translate="label" module="channable">
22
- <label>Magmodules</label>
23
- <sort_order>200</sort_order>
24
- </magmodules>
25
- </tabs>
26
- <sections>
27
- <channable translate="label" module="channable">
28
- <label>Channable Feed</label>
29
- <tab>magmodules</tab>
30
- <frontend_type>text</frontend_type>
31
- <sort_order>103</sort_order>
32
- <show_in_default>1</show_in_default>
33
- <show_in_website>1</show_in_website>
34
- <show_in_store>1</show_in_store>
35
- <groups>
36
- <info>
37
- <frontend_model>channable/adminhtml_widget_info_info</frontend_model>
38
- <sort_order>1</sort_order>
39
- <show_in_default>1</show_in_default>
40
- <show_in_website>1</show_in_website>
41
- <show_in_store>1</show_in_store>
42
- </info>
43
- <connect translate="label" module="channable">
44
- <label>General - Settings</label>
45
- <frontend_type>text</frontend_type>
46
- <sort_order>3</sort_order>
47
- <show_in_default>1</show_in_default>
48
- <show_in_website>1</show_in_website>
49
- <show_in_store>1</show_in_store>
50
- <expanded>1</expanded>
51
- <fields>
52
  <version translate="label">
53
  <label>Extension Version</label>
54
  <frontend_type>text</frontend_type>
@@ -67,283 +69,297 @@
67
  <show_in_website>0</show_in_website>
68
  <show_in_store>0</show_in_store>
69
  </token_encrypted>
70
- <connect_heading translate="label">
71
- <label>Feed settings</label>
72
- <frontend_model>channable/adminhtml_system_config_form_field_heading</frontend_model>
73
- <sort_order>10</sort_order>
74
- <show_in_default>1</show_in_default>
75
- <show_in_website>1</show_in_website>
76
- <show_in_store>1</show_in_store>
77
- </connect_heading>
78
- <enabled translate="label">
79
- <label>Enabled Feed</label>
80
- <frontend_type>select</frontend_type>
81
- <source_model>adminhtml/system_config_source_yesno</source_model>
82
- <sort_order>11</sort_order>
83
- <show_in_default>1</show_in_default>
84
- <show_in_website>1</show_in_website>
85
- <show_in_store>1</show_in_store>
86
- </enabled>
87
- <max_products translate="label">
88
- <label>Products per page</label>
89
- <frontend_type>text</frontend_type>
90
- <sort_order>13</sort_order>
91
- <show_in_default>1</show_in_default>
92
- <show_in_website>1</show_in_website>
93
- <show_in_store>1</show_in_store>
94
- <comment>Limits the amount of product Channable will import per run. This setting wil not limit the total products sent to Channable!</comment>
95
- </max_products>
96
- </fields>
97
- </connect>
98
- <data translate="label" module="channable">
99
- <label>Products - Data</label>
100
- <frontend_type>text</frontend_type>
101
- <sort_order>4</sort_order>
102
- <show_in_default>1</show_in_default>
103
- <show_in_website>1</show_in_website>
104
- <show_in_store>1</show_in_store>
105
- <expanded>1</expanded>
106
- <fields>
107
- <note translate="label">
108
- <label><![CDATA[In this section you will see listed all of the standard attributes needed for the Channable Connect. In order to prevent some errors please fill in as many attributes as you can, this will also improve the usability of your data on the Channable platform.]]></label>
109
- <frontend_model>channable/adminhtml_system_config_form_field_note</frontend_model>
110
- <sort_order>1</sort_order>
111
- <show_in_default>1</show_in_default>
112
- <show_in_website>1</show_in_website>
113
- <show_in_store>1</show_in_store>
114
- </note>
115
- <heading_general translate="label">
116
- <label>The General Fields</label>
117
- <frontend_model>channable/adminhtml_system_config_form_field_heading</frontend_model>
118
- <sort_order>10</sort_order>
119
- <show_in_default>1</show_in_default>
120
- <show_in_website>1</show_in_website>
121
- <show_in_store>1</show_in_store>
122
- </heading_general>
123
- <name translate="label">
124
- <label>Name</label>
125
- <frontend_type>select</frontend_type>
126
- <source_model>channable/adminhtml_system_config_source_name</source_model>
127
- <sort_order>11</sort_order>
128
- <show_in_default>1</show_in_default>
129
- <show_in_website>1</show_in_website>
130
- <show_in_store>1</show_in_store>
131
- </name>
132
- <description translate="label">
133
- <label>Description</label>
134
- <frontend_type>select</frontend_type>
135
- <source_model>channable/adminhtml_system_config_source_attribute</source_model>
136
- <sort_order>12</sort_order>
137
- <show_in_default>1</show_in_default>
138
- <show_in_website>1</show_in_website>
139
- <show_in_store>1</show_in_store>
140
- </description>
141
- <brand translate="label">
142
- <label>Brand</label>
143
- <frontend_type>select</frontend_type>
144
- <source_model>channable/adminhtml_system_config_source_attribute</source_model>
145
- <sort_order>13</sort_order>
146
- <show_in_default>1</show_in_default>
147
- <show_in_website>1</show_in_website>
148
- <show_in_store>1</show_in_store>
149
- </brand>
150
- <ean translate="label">
151
- <label>EAN-code</label>
152
- <frontend_type>select</frontend_type>
153
- <source_model>channable/adminhtml_system_config_source_attribute</source_model>
154
- <sort_order>14</sort_order>
155
- <show_in_default>1</show_in_default>
156
- <show_in_website>1</show_in_website>
157
- <show_in_store>1</show_in_store>
158
- </ean>
159
- <heading_images translate="label">
160
- <label>Images</label>
161
- <frontend_model>channable/adminhtml_system_config_form_field_heading</frontend_model>
162
- <sort_order>15</sort_order>
163
- <show_in_default>1</show_in_default>
164
- <show_in_website>1</show_in_website>
165
- <show_in_store>1</show_in_store>
166
- </heading_images>
167
- <images translate="label">
168
- <label>Images</label>
169
- <frontend_type>select</frontend_type>
170
- <source_model>channable/adminhtml_system_config_source_images</source_model>
171
- <sort_order>16</sort_order>
172
- <show_in_default>1</show_in_default>
173
- <show_in_website>1</show_in_website>
174
- <show_in_store>1</show_in_store>
175
- </images>
176
- <default_image translate="label">
177
- <label>Default Image</label>
178
- <frontend_type>select</frontend_type>
179
- <source_model>channable/adminhtml_system_config_source_mainimage</source_model>
180
- <sort_order>17</sort_order>
181
- <show_in_default>1</show_in_default>
182
- <show_in_website>1</show_in_website>
183
- <show_in_store>1</show_in_store>
184
- <depends><images>all</images></depends>
185
- </default_image>
186
- <heading_additional translate="label">
187
- <label>The Additional Fields</label>
188
- <frontend_model>channable/adminhtml_system_config_form_field_heading</frontend_model>
189
- <sort_order>20</sort_order>
190
- <show_in_default>1</show_in_default>
191
- <show_in_website>1</show_in_website>
192
- <show_in_store>1</show_in_store>
193
- </heading_additional>
194
- <sku translate="label">
195
- <label>SKU</label>
196
- <frontend_type>select</frontend_type>
197
- <source_model>channable/adminhtml_system_config_source_attribute</source_model>
198
- <sort_order>21</sort_order>
199
- <show_in_default>1</show_in_default>
200
- <show_in_website>1</show_in_website>
201
- <show_in_store>1</show_in_store>
202
- </sku>
203
- <size translate="label">
204
- <label>Size</label>
205
- <frontend_type>select</frontend_type>
206
- <source_model>channable/adminhtml_system_config_source_attribute</source_model>
207
- <sort_order>22</sort_order>
208
- <show_in_default>1</show_in_default>
209
- <show_in_website>1</show_in_website>
210
- <show_in_store>1</show_in_store>
211
- </size>
212
- <color translate="label">
213
- <label>Color</label>
214
- <frontend_type>select</frontend_type>
215
- <source_model>channable/adminhtml_system_config_source_attribute</source_model>
216
- <sort_order>23</sort_order>
217
- <show_in_default>1</show_in_default>
218
- <show_in_website>1</show_in_website>
219
- <show_in_store>1</show_in_store>
220
- </color>
221
- <material translate="label">
222
- <label>Material</label>
223
- <frontend_type>select</frontend_type>
224
- <source_model>channable/adminhtml_system_config_source_attribute</source_model>
225
- <sort_order>24</sort_order>
226
- <show_in_default>1</show_in_default>
227
- <show_in_website>1</show_in_website>
228
- <show_in_store>1</show_in_store>
229
- </material>
230
- <gender translate="label">
231
- <label>Gender</label>
232
- <frontend_type>select</frontend_type>
233
- <source_model>channable/adminhtml_system_config_source_attribute</source_model>
234
- <sort_order>25</sort_order>
235
- <show_in_default>1</show_in_default>
236
- <show_in_website>1</show_in_website>
237
- <show_in_store>1</show_in_store>
238
- </gender>
239
- <heading_stock translate="label">
240
- <label>Stock</label>
241
- <frontend_model>channable/adminhtml_system_config_form_field_heading</frontend_model>
242
- <sort_order>30</sort_order>
243
- <show_in_default>1</show_in_default>
244
- <show_in_website>1</show_in_website>
245
- <show_in_store>1</show_in_store>
246
- </heading_stock>
247
- <stock translate="label">
248
- <label>Send Stock Level</label>
249
- <frontend_type>select</frontend_type>
250
- <source_model>adminhtml/system_config_source_yesno</source_model>
251
- <sort_order>32</sort_order>
252
- <show_in_default>1</show_in_default>
253
- <show_in_website>1</show_in_website>
254
- <show_in_store>1</show_in_store>
255
- </stock>
256
- <heading_delivery_nl translate="label">
257
- <label>Delivery Time for The Netherlands</label>
258
- <frontend_model>channable/adminhtml_system_config_form_field_heading</frontend_model>
259
- <sort_order>40</sort_order>
260
- <show_in_default>1</show_in_default>
261
- <show_in_website>1</show_in_website>
262
- <show_in_store>1</show_in_store>
263
- </heading_delivery_nl>
264
- <delivery translate="label">
265
- <label>Config</label>
266
- <frontend_type>select</frontend_type>
267
- <source_model>channable/adminhtml_system_config_source_type</source_model>
268
- <sort_order>41</sort_order>
269
- <show_in_default>1</show_in_default>
270
- <show_in_website>1</show_in_website>
271
- <show_in_store>1</show_in_store>
272
- </delivery>
273
- <delivery_att translate="label">
274
- <label>Attribute</label>
275
- <frontend_type>select</frontend_type>
276
- <source_model>channable/adminhtml_system_config_source_attribute</source_model>
277
- <sort_order>42</sort_order>
278
- <show_in_default>1</show_in_default>
279
- <show_in_website>1</show_in_website>
280
- <show_in_store>1</show_in_store>
281
- <depends><delivery>attribute</delivery></depends>
282
- </delivery_att>
283
- <delivery_in translate="label">
284
- <label>Delivery Time for In Stock</label>
285
- <frontend_type>text</frontend_type>
286
- <sort_order>43</sort_order>
287
- <show_in_default>1</show_in_default>
288
- <show_in_website>1</show_in_website>
289
- <show_in_store>1</show_in_store>
290
- <depends><delivery>fixed</delivery></depends>
291
- </delivery_in>
292
- <delivery_out translate="label">
293
- <label>Delivery Time for Out of Stock</label>
294
- <frontend_type>text</frontend_type>
295
- <sort_order>44</sort_order>
296
- <show_in_default>1</show_in_default>
297
- <show_in_website>1</show_in_website>
298
- <show_in_store>1</show_in_store>
299
- <depends><delivery>fixed</delivery></depends>
300
- </delivery_out>
301
- <heading_delivery_be translate="label">
302
- <label>Delivery Time for Belgium</label>
303
- <frontend_model>channable/adminhtml_system_config_form_field_heading</frontend_model>
304
- <sort_order>45</sort_order>
305
- <show_in_default>1</show_in_default>
306
- <show_in_website>1</show_in_website>
307
- <show_in_store>1</show_in_store>
308
- </heading_delivery_be>
309
- <delivery_be translate="label">
310
- <label>Config</label>
311
- <frontend_type>select</frontend_type>
312
- <source_model>channable/adminhtml_system_config_source_type</source_model>
313
- <sort_order>46</sort_order>
314
- <show_in_default>1</show_in_default>
315
- <show_in_website>1</show_in_website>
316
- <show_in_store>1</show_in_store>
317
- </delivery_be>
318
- <delivery_att_be translate="label">
319
- <label>Attribute</label>
320
- <frontend_type>select</frontend_type>
321
- <source_model>channable/adminhtml_system_config_source_attribute</source_model>
322
- <sort_order>47</sort_order>
323
- <show_in_default>1</show_in_default>
324
- <show_in_website>1</show_in_website>
325
- <show_in_store>1</show_in_store>
326
- <depends><delivery_be>attribute</delivery_be></depends>
327
- </delivery_att_be>
328
- <delivery_in_be translate="label">
329
- <label>Delivery Time - In Stock</label>
330
- <frontend_type>text</frontend_type>
331
- <sort_order>48</sort_order>
332
- <show_in_default>1</show_in_default>
333
- <show_in_website>1</show_in_website>
334
- <show_in_store>1</show_in_store>
335
- <depends><delivery_be>fixed</delivery_be></depends>
336
- </delivery_in_be>
337
- <delivery_out_be translate="label">
338
- <label>Delivery Time - Out of Stock</label>
339
- <frontend_type>text</frontend_type>
340
- <sort_order>49</sort_order>
341
- <show_in_default>1</show_in_default>
342
- <show_in_website>1</show_in_website>
343
- <show_in_store>1</show_in_store>
344
- <depends><delivery_be>fixed</delivery_be></depends>
345
- </delivery_out_be>
346
- <weight_heading translate="label">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
347
  <label>Weight</label>
348
  <frontend_model>channable/adminhtml_system_config_form_field_heading</frontend_model>
349
  <sort_order>70</sort_order>
@@ -351,7 +367,7 @@
351
  <show_in_website>1</show_in_website>
352
  <show_in_store>1</show_in_store>
353
  </weight_heading>
354
- <weight translate="label">
355
  <label>Include the Weight Field</label>
356
  <frontend_type>select</frontend_type>
357
  <source_model>adminhtml/system_config_source_yesno</source_model>
@@ -360,17 +376,19 @@
360
  <show_in_website>1</show_in_website>
361
  <show_in_store>1</show_in_store>
362
  </weight>
363
- <weight_units translate="label">
364
- <label>The Weight Units</label>
365
- <frontend_type>select</frontend_type>
366
- <source_model>channable/adminhtml_system_config_source_weight</source_model>
367
- <sort_order>72</sort_order>
368
- <show_in_default>1</show_in_default>
369
- <show_in_website>1</show_in_website>
370
- <show_in_store>1</show_in_store>
371
- <depends><weight>1</weight></depends>
372
- </weight_units>
373
- <price_heading translate="label">
 
 
374
  <label>Price Customization</label>
375
  <frontend_model>channable/adminhtml_system_config_form_field_heading</frontend_model>
376
  <sort_order>80</sort_order>
@@ -378,7 +396,7 @@
378
  <show_in_website>1</show_in_website>
379
  <show_in_store>1</show_in_store>
380
  </price_heading>
381
- <force_tax translate="label">
382
  <label>Force the Tax Usage</label>
383
  <frontend_type>select</frontend_type>
384
  <source_model>channable/adminhtml_system_config_source_tax</source_model>
@@ -387,7 +405,7 @@
387
  <show_in_website>1</show_in_website>
388
  <show_in_store>1</show_in_store>
389
  </force_tax>
390
- <add_tax translate="label">
391
  <label>Manually Add the Tax</label>
392
  <frontend_type>select</frontend_type>
393
  <source_model>adminhtml/system_config_source_yesno</source_model>
@@ -396,17 +414,19 @@
396
  <show_in_website>1</show_in_website>
397
  <show_in_store>1</show_in_store>
398
  </add_tax>
399
- <tax_percentage translate="label">
400
- <label>Percentage</label>
401
- <frontend_type>text</frontend_type>
402
- <sort_order>84</sort_order>
403
- <show_in_default>1</show_in_default>
404
- <show_in_website>1</show_in_website>
405
- <show_in_store>1</show_in_store>
406
- <comment><![CDATA[When the tax percentage is 21% use 21.]]></comment>
407
- <depends><add_tax>1</add_tax></depends>
408
- </tax_percentage>
409
- <configurable_heading translate="label">
 
 
410
  <label>Configurable &amp; Grouped data linkage</label>
411
  <frontend_model>channable/adminhtml_system_config_form_field_heading</frontend_model>
412
  <sort_order>90</sort_order>
@@ -414,7 +434,7 @@
414
  <show_in_website>1</show_in_website>
415
  <show_in_store>1</show_in_store>
416
  </configurable_heading>
417
- <conf_enabled translate="label">
418
  <label>Enable</label>
419
  <frontend_type>select</frontend_type>
420
  <source_model>adminhtml/system_config_source_yesno</source_model>
@@ -423,57 +443,74 @@
423
  <show_in_website>1</show_in_website>
424
  <show_in_store>1</show_in_store>
425
  </conf_enabled>
426
- <conf_fields translate="label">
427
- <label>Use the Parent Data for Simple</label>
428
- <frontend_type>multiselect</frontend_type>
429
- <source_model>channable/adminhtml_system_config_source_configurable</source_model>
430
- <sort_order>92</sort_order>
431
- <show_in_default>1</show_in_default>
432
- <show_in_website>0</show_in_website>
433
- <show_in_store>0</show_in_store>
434
- <depends><conf_enabled>1</conf_enabled></depends>
435
- <comment>Use the parent data</comment>
436
- </conf_fields>
437
- <conf_switch_urls translate="label">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
438
  <label>Configurable Switch Urls</label>
439
  <frontend_type>select</frontend_type>
440
  <source_model>adminhtml/system_config_source_yesno</source_model>
441
- <sort_order>93</sort_order>
442
  <show_in_default>1</show_in_default>
443
  <show_in_website>1</show_in_website>
444
  <show_in_store>1</show_in_store>
445
- <depends><conf_enabled>1</conf_enabled></depends>
446
- <comment>Create a specific url for the simple products inside the configurable products to make sure the prices and information is correct.</comment>
 
 
447
  </conf_switch_urls>
448
- <grouped_price translate="label">
449
  <label>Grouped Price</label>
450
  <frontend_type>select</frontend_type>
451
- <source_model>channable/adminhtml_system_config_source_pricemodel</source_model>
452
- <sort_order>94</sort_order>
453
  <show_in_default>1</show_in_default>
454
  <show_in_website>1</show_in_website>
455
  <show_in_store>1</show_in_store>
456
  </grouped_price>
457
- </fields>
458
- </data>
459
- <advanced translate="label" module="channable">
460
- <label>Products - Extra data fields &amp; Shipping</label>
461
- <frontend_type>text</frontend_type>
462
- <sort_order>5</sort_order>
463
- <show_in_default>1</show_in_default>
464
- <show_in_website>1</show_in_website>
465
- <show_in_store>1</show_in_store>
466
- <expanded>1</expanded>
467
- <fields>
468
- <note translate="label">
469
- <label><![CDATA[We recommend adding as many attributes as possible to the Channable feed as this will greatly improve the quality of your data. Enter the Shipping Price by using the designated extra field.]]></label>
470
- <frontend_model>channable/adminhtml_system_config_form_field_note</frontend_model>
471
- <sort_order>1</sort_order>
472
- <show_in_default>1</show_in_default>
473
- <show_in_website>1</show_in_website>
474
- <show_in_store>1</show_in_store>
475
- </note>
476
- <extra_heading translate="label">
477
  <label>The Additional Fields</label>
478
  <frontend_model>channable/adminhtml_system_config_form_field_heading</frontend_model>
479
  <sort_order>30</sort_order>
@@ -481,24 +518,24 @@
481
  <show_in_website>1</show_in_website>
482
  <show_in_store>1</show_in_store>
483
  </extra_heading>
484
- <extra>
485
- <label>The Additional Fields</label>
486
  <frontend_model>channable/adminhtml_config_form_field_extra</frontend_model>
487
  <backend_model>channable/adminhtml_system_config_backend_design_extra</backend_model>
488
  <sort_order>32</sort_order>
489
  <show_in_default>1</show_in_default>
490
  <show_in_website>1</show_in_website>
491
  <show_in_store>1</show_in_store>
492
- </extra>
493
- <heading_shipping translate="label">
494
- <label>The Shipping Price</label>
495
- <frontend_model>channable/adminhtml_system_config_form_field_heading</frontend_model>
496
- <sort_order>50</sort_order>
497
- <show_in_default>1</show_in_default>
498
- <show_in_website>1</show_in_website>
499
- <show_in_store>1</show_in_store>
500
- </heading_shipping>
501
- <shipping_method translate="label">
502
  <label>Shipping Calculation method</label>
503
  <frontend_type>select</frontend_type>
504
  <source_model>channable/adminhtml_system_config_source_shipping</source_model>
@@ -507,27 +544,27 @@
507
  <show_in_website>1</show_in_website>
508
  <show_in_store>1</show_in_store>
509
  </shipping_method>
510
- <shipping_price>
511
- <label>The Shipping Price</label>
512
- <frontend_model>channable/adminhtml_config_form_field_shipping</frontend_model>
513
- <backend_model>channable/adminhtml_system_config_backend_design_shipping</backend_model>
514
- <sort_order>52</sort_order>
515
- <show_in_default>1</show_in_default>
516
- <show_in_website>1</show_in_website>
517
- <show_in_store>1</show_in_store>
518
- </shipping_price>
519
- </fields>
520
- </advanced>
521
- <filter translate="label" module="channable">
522
- <label>Channable - Filter Conditions</label>
523
- <frontend_type>text</frontend_type>
524
- <sort_order>6</sort_order>
525
- <show_in_default>1</show_in_default>
526
- <show_in_website>1</show_in_website>
527
- <show_in_store>1</show_in_store>
528
- <expanded>1</expanded>
529
- <fields>
530
- <note translate="label">
531
  <label><![CDATA[This option allows you to include/exclude product from the Channable feed. <br>]]></label>
532
  <frontend_model>channable/adminhtml_system_config_form_field_note</frontend_model>
533
  <sort_order>1</sort_order>
@@ -535,7 +572,7 @@
535
  <show_in_website>1</show_in_website>
536
  <show_in_store>1</show_in_store>
537
  </note>
538
- <category_heading translate="label">
539
  <label>Filter based on Category</label>
540
  <frontend_model>channable/adminhtml_system_config_form_field_heading</frontend_model>
541
  <sort_order>20</sort_order>
@@ -552,44 +589,49 @@
552
  <show_in_website>1</show_in_website>
553
  <show_in_store>1</show_in_store>
554
  </category_enabled>
555
- <category_type translate="label">
556
- <label>Type of the filter</label>
557
- <frontend_type>select</frontend_type>
558
- <source_model>channable/adminhtml_system_config_source_categorytype</source_model>
559
- <sort_order>22</sort_order>
560
- <show_in_default>1</show_in_default>
561
- <show_in_website>1</show_in_website>
562
- <show_in_store>1</show_in_store>
563
- <depends><category_enabled>1</category_enabled></depends>
564
- </category_type>
565
- <categories translate="label">
566
- <label>Category</label>
567
- <frontend_type>multiselect</frontend_type>
568
- <source_model>channable/adminhtml_system_config_source_category</source_model>
569
- <sort_order>23</sort_order>
570
- <show_in_default>1</show_in_default>
571
- <show_in_website>1</show_in_website>
572
- <show_in_store>1</show_in_store>
573
- <depends><category_enabled>1</category_enabled></depends>
574
- </categories>
575
- <stock_heading translate="label">
576
- <label>Exclude Products by Stock level</label>
577
- <frontend_model>channable/adminhtml_system_config_form_field_heading</frontend_model>
578
- <sort_order>30</sort_order>
579
- <show_in_default>1</show_in_default>
580
- <show_in_website>1</show_in_website>
581
- <show_in_store>1</show_in_store>
582
- </stock_heading>
583
- <stock translate="label">
584
- <label>Exclude the out of stock products</label>
585
- <frontend_type>select</frontend_type>
586
- <source_model>adminhtml/system_config_source_yesno</source_model>
587
- <sort_order>31</sort_order>
588
- <show_in_default>1</show_in_default>
589
- <show_in_website>1</show_in_website>
590
- <show_in_store>1</show_in_store>
591
- </stock>
592
- <advanced_heading translate="label">
 
 
 
 
 
593
  <label>Advanced</label>
594
  <frontend_model>channable/adminhtml_system_config_form_field_heading</frontend_model>
595
  <sort_order>40</sort_order>
@@ -597,27 +639,27 @@
597
  <show_in_website>1</show_in_website>
598
  <show_in_store>1</show_in_store>
599
  </advanced_heading>
600
- <advanced>
601
- <label>Advanced Filter</label>
602
- <frontend_model>channable/adminhtml_config_form_field_filter</frontend_model>
603
- <backend_model>channable/adminhtml_system_config_backend_design_filter</backend_model>
604
- <sort_order>42</sort_order>
605
- <show_in_default>1</show_in_default>
606
- <show_in_website>1</show_in_website>
607
- <show_in_store>1</show_in_store>
608
- </advanced>
609
- </fields>
610
- </filter>
611
- <server translate="label" module="channable">
612
- <label>Overwrite the server settings</label>
613
- <frontend_type>text</frontend_type>
614
- <sort_order>7</sort_order>
615
- <show_in_default>1</show_in_default>
616
- <show_in_website>1</show_in_website>
617
- <show_in_store>1</show_in_store>
618
- <expanded>1</expanded>
619
- <fields>
620
- <overwrite translate="label">
621
  <label>Enabled</label>
622
  <frontend_type>select</frontend_type>
623
  <source_model>adminhtml/system_config_source_yesno</source_model>
@@ -627,38 +669,42 @@
627
  <show_in_store>0</show_in_store>
628
  <tooltip>Only use this option if it's necessary to overwrite this setting because of your server memory limit or execution time.</tooltip>
629
  </overwrite>
630
- <memory_limit translate="label">
631
- <label>The Memory Limit</label>
632
- <frontend_type>text</frontend_type>
633
- <sort_order>22</sort_order>
634
- <show_in_default>1</show_in_default>
635
- <show_in_website>0</show_in_website>
636
- <show_in_store>0</show_in_store>
637
- <depends><overwrite>1</overwrite></depends>
638
- <comment><![CDATA[This overwrites the maximum amount of memory in bytes that a script is allowed to allocate, eg 1024M.]]></comment>
639
- </memory_limit>
640
- <max_execution_time translate="label">
641
- <label>The Max Execution Time</label>
642
- <frontend_type>text</frontend_type>
643
- <sort_order>23</sort_order>
644
- <show_in_default>1</show_in_default>
645
- <show_in_website>0</show_in_website>
646
- <show_in_store>0</show_in_store>
647
- <depends><overwrite>1</overwrite></depends>
648
- <comment><![CDATA[This overwrites the maximum time in seconds a script is allowed to run before it is terminated by the parser, eg: 300 (for 5 minutes).]]></comment>
649
- </max_execution_time>
650
- </fields>
651
- </server>
652
- <settings translate="label" module="channable">
653
- <label>Feeds - Available</label>
654
- <frontend_type>text</frontend_type>
655
- <sort_order>8</sort_order>
656
- <show_in_default>1</show_in_default>
657
- <show_in_website>1</show_in_website>
658
- <show_in_store>1</show_in_store>
659
- <expanded>1</expanded>
660
- <fields>
661
- <note translate="label">
 
 
 
 
662
  <label><![CDATA[Each store view will have their own Channable feed. Use the auto connect button to connect the Feed with your Channable account.]]></label>
663
  <frontend_model>channable/adminhtml_system_config_form_field_note</frontend_model>
664
  <sort_order>1</sort_order>
@@ -666,17 +712,17 @@
666
  <show_in_website>1</show_in_website>
667
  <show_in_store>1</show_in_store>
668
  </note>
669
- <feeds_text translate="label">
670
- <label>Text</label>
671
  <frontend_model>channable/adminhtml_system_config_form_field_feeds</frontend_model>
672
- <sort_order>11</sort_order>
673
- <show_in_default>1</show_in_default>
674
- <show_in_website>1</show_in_website>
675
- <show_in_store>1</show_in_store>
676
- </feeds_text>
677
- </fields>
678
- </settings>
679
- </groups>
680
- </channable>
681
- </sections>
682
  </config>
1
  <?xml version="1.0"?>
2
+ <!--
3
+ ~ Magmodules.eu - http://www.magmodules.eu
4
+ ~
5
+ ~ NOTICE OF LICENSE
6
+ ~ This source file is subject to the Open Software License (OSL 3.0)
7
+ ~ that is bundled with this package in the file LICENSE.txt.
8
+ ~ It is also available through the world-wide-web at this URL:
9
+ ~ http://opensource.org/licenses/osl-3.0.php
10
+ ~ If you did not receive a copy of the license and are unable to
11
+ ~ obtain it through the world-wide-web, please send an email
12
+ ~ to info@magmodules.eu so we can send you a copy immediately.
13
+ ~
14
+ ~ @category Magmodules
15
+ ~ @package Magmodules_Channable
16
+ ~ @author Magmodules <info@magmodules.eu)
17
+ ~ @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ ~ @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ ~
20
+ -->
21
  <config>
22
+ <tabs>
23
+ <magmodules translate="label" module="channable">
24
+ <label>Magmodules</label>
25
+ <sort_order>200</sort_order>
26
+ </magmodules>
27
+ </tabs>
28
+ <sections>
29
+ <channable translate="label" module="channable">
30
+ <label>Channable Feed</label>
31
+ <tab>magmodules</tab>
32
+ <frontend_type>text</frontend_type>
33
+ <sort_order>103</sort_order>
34
+ <show_in_default>1</show_in_default>
35
+ <show_in_website>1</show_in_website>
36
+ <show_in_store>1</show_in_store>
37
+ <groups>
38
+ <info>
39
+ <frontend_model>channable/adminhtml_widget_info_info</frontend_model>
40
+ <sort_order>1</sort_order>
41
+ <show_in_default>1</show_in_default>
42
+ <show_in_website>1</show_in_website>
43
+ <show_in_store>1</show_in_store>
44
+ </info>
45
+ <connect translate="label" module="channable">
46
+ <label>General - Settings</label>
47
+ <frontend_type>text</frontend_type>
48
+ <sort_order>3</sort_order>
49
+ <show_in_default>1</show_in_default>
50
+ <show_in_website>1</show_in_website>
51
+ <show_in_store>1</show_in_store>
52
+ <expanded>1</expanded>
53
+ <fields>
54
  <version translate="label">
55
  <label>Extension Version</label>
56
  <frontend_type>text</frontend_type>
69
  <show_in_website>0</show_in_website>
70
  <show_in_store>0</show_in_store>
71
  </token_encrypted>
72
+ <connect_heading translate="label">
73
+ <label>Feed settings</label>
74
+ <frontend_model>channable/adminhtml_system_config_form_field_heading</frontend_model>
75
+ <sort_order>10</sort_order>
76
+ <show_in_default>1</show_in_default>
77
+ <show_in_website>1</show_in_website>
78
+ <show_in_store>1</show_in_store>
79
+ </connect_heading>
80
+ <enabled translate="label">
81
+ <label>Enabled Feed</label>
82
+ <frontend_type>select</frontend_type>
83
+ <source_model>adminhtml/system_config_source_yesno</source_model>
84
+ <sort_order>11</sort_order>
85
+ <show_in_default>1</show_in_default>
86
+ <show_in_website>1</show_in_website>
87
+ <show_in_store>1</show_in_store>
88
+ </enabled>
89
+ <max_products translate="label">
90
+ <label>Products per page</label>
91
+ <frontend_type>text</frontend_type>
92
+ <sort_order>13</sort_order>
93
+ <show_in_default>1</show_in_default>
94
+ <show_in_website>1</show_in_website>
95
+ <show_in_store>1</show_in_store>
96
+ <comment>Limits the amount of product Channable will import per run. This setting wil not limit the total products sent to Channable!</comment>
97
+ </max_products>
98
+ </fields>
99
+ </connect>
100
+ <data translate="label" module="channable">
101
+ <label>Products - Data</label>
102
+ <frontend_type>text</frontend_type>
103
+ <sort_order>4</sort_order>
104
+ <show_in_default>1</show_in_default>
105
+ <show_in_website>1</show_in_website>
106
+ <show_in_store>1</show_in_store>
107
+ <expanded>1</expanded>
108
+ <fields>
109
+ <note translate="label">
110
+ <label><![CDATA[In this section you will see listed all of the standard attributes needed for the Channable Connect. In order to prevent some errors please fill in as many attributes as you can, this will also improve the usability of your data on the Channable platform.]]></label>
111
+ <frontend_model>channable/adminhtml_system_config_form_field_note</frontend_model>
112
+ <sort_order>1</sort_order>
113
+ <show_in_default>1</show_in_default>
114
+ <show_in_website>1</show_in_website>
115
+ <show_in_store>1</show_in_store>
116
+ </note>
117
+ <heading_general translate="label">
118
+ <label>The General Fields</label>
119
+ <frontend_model>channable/adminhtml_system_config_form_field_heading</frontend_model>
120
+ <sort_order>10</sort_order>
121
+ <show_in_default>1</show_in_default>
122
+ <show_in_website>1</show_in_website>
123
+ <show_in_store>1</show_in_store>
124
+ </heading_general>
125
+ <name translate="label">
126
+ <label>Name</label>
127
+ <frontend_type>select</frontend_type>
128
+ <source_model>channable/adminhtml_system_config_source_name</source_model>
129
+ <sort_order>11</sort_order>
130
+ <show_in_default>1</show_in_default>
131
+ <show_in_website>1</show_in_website>
132
+ <show_in_store>1</show_in_store>
133
+ </name>
134
+ <description translate="label">
135
+ <label>Description</label>
136
+ <frontend_type>select</frontend_type>
137
+ <source_model>channable/adminhtml_system_config_source_attribute</source_model>
138
+ <sort_order>12</sort_order>
139
+ <show_in_default>1</show_in_default>
140
+ <show_in_website>1</show_in_website>
141
+ <show_in_store>1</show_in_store>
142
+ </description>
143
+ <brand translate="label">
144
+ <label>Brand</label>
145
+ <frontend_type>select</frontend_type>
146
+ <source_model>channable/adminhtml_system_config_source_attribute</source_model>
147
+ <sort_order>13</sort_order>
148
+ <show_in_default>1</show_in_default>
149
+ <show_in_website>1</show_in_website>
150
+ <show_in_store>1</show_in_store>
151
+ </brand>
152
+ <ean translate="label">
153
+ <label>EAN-code</label>
154
+ <frontend_type>select</frontend_type>
155
+ <source_model>channable/adminhtml_system_config_source_attribute</source_model>
156
+ <sort_order>14</sort_order>
157
+ <show_in_default>1</show_in_default>
158
+ <show_in_website>1</show_in_website>
159
+ <show_in_store>1</show_in_store>
160
+ </ean>
161
+ <heading_images translate="label">
162
+ <label>Images</label>
163
+ <frontend_model>channable/adminhtml_system_config_form_field_heading</frontend_model>
164
+ <sort_order>15</sort_order>
165
+ <show_in_default>1</show_in_default>
166
+ <show_in_website>1</show_in_website>
167
+ <show_in_store>1</show_in_store>
168
+ </heading_images>
169
+ <images translate="label">
170
+ <label>Images</label>
171
+ <frontend_type>select</frontend_type>
172
+ <source_model>channable/adminhtml_system_config_source_images</source_model>
173
+ <sort_order>16</sort_order>
174
+ <show_in_default>1</show_in_default>
175
+ <show_in_website>1</show_in_website>
176
+ <show_in_store>1</show_in_store>
177
+ </images>
178
+ <default_image translate="label">
179
+ <label>Default Image</label>
180
+ <frontend_type>select</frontend_type>
181
+ <source_model>channable/adminhtml_system_config_source_mainimage</source_model>
182
+ <sort_order>17</sort_order>
183
+ <show_in_default>1</show_in_default>
184
+ <show_in_website>1</show_in_website>
185
+ <show_in_store>1</show_in_store>
186
+ <depends>
187
+ <images>all</images>
188
+ </depends>
189
+ </default_image>
190
+ <heading_additional translate="label">
191
+ <label>The Additional Fields</label>
192
+ <frontend_model>channable/adminhtml_system_config_form_field_heading</frontend_model>
193
+ <sort_order>20</sort_order>
194
+ <show_in_default>1</show_in_default>
195
+ <show_in_website>1</show_in_website>
196
+ <show_in_store>1</show_in_store>
197
+ </heading_additional>
198
+ <sku translate="label">
199
+ <label>SKU</label>
200
+ <frontend_type>select</frontend_type>
201
+ <source_model>channable/adminhtml_system_config_source_attribute</source_model>
202
+ <sort_order>21</sort_order>
203
+ <show_in_default>1</show_in_default>
204
+ <show_in_website>1</show_in_website>
205
+ <show_in_store>1</show_in_store>
206
+ </sku>
207
+ <size translate="label">
208
+ <label>Size</label>
209
+ <frontend_type>select</frontend_type>
210
+ <source_model>channable/adminhtml_system_config_source_attribute</source_model>
211
+ <sort_order>22</sort_order>
212
+ <show_in_default>1</show_in_default>
213
+ <show_in_website>1</show_in_website>
214
+ <show_in_store>1</show_in_store>
215
+ </size>
216
+ <color translate="label">
217
+ <label>Color</label>
218
+ <frontend_type>select</frontend_type>
219
+ <source_model>channable/adminhtml_system_config_source_attribute</source_model>
220
+ <sort_order>23</sort_order>
221
+ <show_in_default>1</show_in_default>
222
+ <show_in_website>1</show_in_website>
223
+ <show_in_store>1</show_in_store>
224
+ </color>
225
+ <material translate="label">
226
+ <label>Material</label>
227
+ <frontend_type>select</frontend_type>
228
+ <source_model>channable/adminhtml_system_config_source_attribute</source_model>
229
+ <sort_order>24</sort_order>
230
+ <show_in_default>1</show_in_default>
231
+ <show_in_website>1</show_in_website>
232
+ <show_in_store>1</show_in_store>
233
+ </material>
234
+ <gender translate="label">
235
+ <label>Gender</label>
236
+ <frontend_type>select</frontend_type>
237
+ <source_model>channable/adminhtml_system_config_source_attribute</source_model>
238
+ <sort_order>25</sort_order>
239
+ <show_in_default>1</show_in_default>
240
+ <show_in_website>1</show_in_website>
241
+ <show_in_store>1</show_in_store>
242
+ </gender>
243
+ <heading_stock translate="label">
244
+ <label>Stock</label>
245
+ <frontend_model>channable/adminhtml_system_config_form_field_heading</frontend_model>
246
+ <sort_order>30</sort_order>
247
+ <show_in_default>1</show_in_default>
248
+ <show_in_website>1</show_in_website>
249
+ <show_in_store>1</show_in_store>
250
+ </heading_stock>
251
+ <stock translate="label">
252
+ <label>Send Stock Level</label>
253
+ <frontend_type>select</frontend_type>
254
+ <source_model>adminhtml/system_config_source_yesno</source_model>
255
+ <sort_order>32</sort_order>
256
+ <show_in_default>1</show_in_default>
257
+ <show_in_website>1</show_in_website>
258
+ <show_in_store>1</show_in_store>
259
+ </stock>
260
+ <heading_delivery_nl translate="label">
261
+ <label>Delivery Time for The Netherlands</label>
262
+ <frontend_model>channable/adminhtml_system_config_form_field_heading</frontend_model>
263
+ <sort_order>40</sort_order>
264
+ <show_in_default>1</show_in_default>
265
+ <show_in_website>1</show_in_website>
266
+ <show_in_store>1</show_in_store>
267
+ </heading_delivery_nl>
268
+ <delivery translate="label">
269
+ <label>Config</label>
270
+ <frontend_type>select</frontend_type>
271
+ <source_model>channable/adminhtml_system_config_source_type</source_model>
272
+ <sort_order>41</sort_order>
273
+ <show_in_default>1</show_in_default>
274
+ <show_in_website>1</show_in_website>
275
+ <show_in_store>1</show_in_store>
276
+ </delivery>
277
+ <delivery_att translate="label">
278
+ <label>Attribute</label>
279
+ <frontend_type>select</frontend_type>
280
+ <source_model>channable/adminhtml_system_config_source_attribute</source_model>
281
+ <sort_order>42</sort_order>
282
+ <show_in_default>1</show_in_default>
283
+ <show_in_website>1</show_in_website>
284
+ <show_in_store>1</show_in_store>
285
+ <depends>
286
+ <delivery>attribute</delivery>
287
+ </depends>
288
+ </delivery_att>
289
+ <delivery_in translate="label">
290
+ <label>Delivery Time for In Stock</label>
291
+ <frontend_type>text</frontend_type>
292
+ <sort_order>43</sort_order>
293
+ <show_in_default>1</show_in_default>
294
+ <show_in_website>1</show_in_website>
295
+ <show_in_store>1</show_in_store>
296
+ <depends>
297
+ <delivery>fixed</delivery>
298
+ </depends>
299
+ </delivery_in>
300
+ <delivery_out translate="label">
301
+ <label>Delivery Time for Out of Stock</label>
302
+ <frontend_type>text</frontend_type>
303
+ <sort_order>44</sort_order>
304
+ <show_in_default>1</show_in_default>
305
+ <show_in_website>1</show_in_website>
306
+ <show_in_store>1</show_in_store>
307
+ <depends>
308
+ <delivery>fixed</delivery>
309
+ </depends>
310
+ </delivery_out>
311
+ <heading_delivery_be translate="label">
312
+ <label>Delivery Time for Belgium</label>
313
+ <frontend_model>channable/adminhtml_system_config_form_field_heading</frontend_model>
314
+ <sort_order>45</sort_order>
315
+ <show_in_default>1</show_in_default>
316
+ <show_in_website>1</show_in_website>
317
+ <show_in_store>1</show_in_store>
318
+ </heading_delivery_be>
319
+ <delivery_be translate="label">
320
+ <label>Config</label>
321
+ <frontend_type>select</frontend_type>
322
+ <source_model>channable/adminhtml_system_config_source_type</source_model>
323
+ <sort_order>46</sort_order>
324
+ <show_in_default>1</show_in_default>
325
+ <show_in_website>1</show_in_website>
326
+ <show_in_store>1</show_in_store>
327
+ </delivery_be>
328
+ <delivery_att_be translate="label">
329
+ <label>Attribute</label>
330
+ <frontend_type>select</frontend_type>
331
+ <source_model>channable/adminhtml_system_config_source_attribute</source_model>
332
+ <sort_order>47</sort_order>
333
+ <show_in_default>1</show_in_default>
334
+ <show_in_website>1</show_in_website>
335
+ <show_in_store>1</show_in_store>
336
+ <depends>
337
+ <delivery_be>attribute</delivery_be>
338
+ </depends>
339
+ </delivery_att_be>
340
+ <delivery_in_be translate="label">
341
+ <label>Delivery Time - In Stock</label>
342
+ <frontend_type>text</frontend_type>
343
+ <sort_order>48</sort_order>
344
+ <show_in_default>1</show_in_default>
345
+ <show_in_website>1</show_in_website>
346
+ <show_in_store>1</show_in_store>
347
+ <depends>
348
+ <delivery_be>fixed</delivery_be>
349
+ </depends>
350
+ </delivery_in_be>
351
+ <delivery_out_be translate="label">
352
+ <label>Delivery Time - Out of Stock</label>
353
+ <frontend_type>text</frontend_type>
354
+ <sort_order>49</sort_order>
355
+ <show_in_default>1</show_in_default>
356
+ <show_in_website>1</show_in_website>
357
+ <show_in_store>1</show_in_store>
358
+ <depends>
359
+ <delivery_be>fixed</delivery_be>
360
+ </depends>
361
+ </delivery_out_be>
362
+ <weight_heading translate="label">
363
  <label>Weight</label>
364
  <frontend_model>channable/adminhtml_system_config_form_field_heading</frontend_model>
365
  <sort_order>70</sort_order>
367
  <show_in_website>1</show_in_website>
368
  <show_in_store>1</show_in_store>
369
  </weight_heading>
370
+ <weight translate="label">
371
  <label>Include the Weight Field</label>
372
  <frontend_type>select</frontend_type>
373
  <source_model>adminhtml/system_config_source_yesno</source_model>
376
  <show_in_website>1</show_in_website>
377
  <show_in_store>1</show_in_store>
378
  </weight>
379
+ <weight_units translate="label">
380
+ <label>The Weight Units</label>
381
+ <frontend_type>select</frontend_type>
382
+ <source_model>channable/adminhtml_system_config_source_weight</source_model>
383
+ <sort_order>72</sort_order>
384
+ <show_in_default>1</show_in_default>
385
+ <show_in_website>1</show_in_website>
386
+ <show_in_store>1</show_in_store>
387
+ <depends>
388
+ <weight>1</weight>
389
+ </depends>
390
+ </weight_units>
391
+ <price_heading translate="label">
392
  <label>Price Customization</label>
393
  <frontend_model>channable/adminhtml_system_config_form_field_heading</frontend_model>
394
  <sort_order>80</sort_order>
396
  <show_in_website>1</show_in_website>
397
  <show_in_store>1</show_in_store>
398
  </price_heading>
399
+ <force_tax translate="label">
400
  <label>Force the Tax Usage</label>
401
  <frontend_type>select</frontend_type>
402
  <source_model>channable/adminhtml_system_config_source_tax</source_model>
405
  <show_in_website>1</show_in_website>
406
  <show_in_store>1</show_in_store>
407
  </force_tax>
408
+ <add_tax translate="label">
409
  <label>Manually Add the Tax</label>
410
  <frontend_type>select</frontend_type>
411
  <source_model>adminhtml/system_config_source_yesno</source_model>
414
  <show_in_website>1</show_in_website>
415
  <show_in_store>1</show_in_store>
416
  </add_tax>
417
+ <tax_percentage translate="label">
418
+ <label>Percentage</label>
419
+ <frontend_type>text</frontend_type>
420
+ <sort_order>84</sort_order>
421
+ <show_in_default>1</show_in_default>
422
+ <show_in_website>1</show_in_website>
423
+ <show_in_store>1</show_in_store>
424
+ <comment><![CDATA[When the tax percentage is 21% use 21.]]></comment>
425
+ <depends>
426
+ <add_tax>1</add_tax>
427
+ </depends>
428
+ </tax_percentage>
429
+ <configurable_heading translate="label">
430
  <label>Configurable &amp; Grouped data linkage</label>
431
  <frontend_model>channable/adminhtml_system_config_form_field_heading</frontend_model>
432
  <sort_order>90</sort_order>
434
  <show_in_website>1</show_in_website>
435
  <show_in_store>1</show_in_store>
436
  </configurable_heading>
437
+ <conf_enabled translate="label">
438
  <label>Enable</label>
439
  <frontend_type>select</frontend_type>
440
  <source_model>adminhtml/system_config_source_yesno</source_model>
443
  <show_in_website>1</show_in_website>
444
  <show_in_store>1</show_in_store>
445
  </conf_enabled>
446
+ <conf_fields translate="label">
447
+ <label>Use the Parent Data for Simple</label>
448
+ <frontend_type>multiselect</frontend_type>
449
+ <source_model>channable/adminhtml_system_config_source_configurable</source_model>
450
+ <sort_order>92</sort_order>
451
+ <show_in_default>1</show_in_default>
452
+ <show_in_website>0</show_in_website>
453
+ <show_in_store>0</show_in_store>
454
+ <depends>
455
+ <conf_enabled>1</conf_enabled>
456
+ </depends>
457
+ <comment>Use the parent data</comment>
458
+ </conf_fields>
459
+ <simple_price translate="label">
460
+ <label>Use Simple Product Pricing</label>
461
+ <frontend_type>select</frontend_type>
462
+ <source_model>adminhtml/system_config_source_yesno</source_model>
463
+ <sort_order>73</sort_order>
464
+ <show_in_default>1</show_in_default>
465
+ <show_in_website>1</show_in_website>
466
+ <show_in_store>1</show_in_store>
467
+ <depends>
468
+ <conf_enabled>1</conf_enabled>
469
+ </depends>
470
+ <comment>Only enable this option when you have enabled an extension that is using the simple prices in your store.</comment>
471
+ </simple_price>
472
+ <conf_switch_urls translate="label">
473
  <label>Configurable Switch Urls</label>
474
  <frontend_type>select</frontend_type>
475
  <source_model>adminhtml/system_config_source_yesno</source_model>
476
+ <sort_order>94</sort_order>
477
  <show_in_default>1</show_in_default>
478
  <show_in_website>1</show_in_website>
479
  <show_in_store>1</show_in_store>
480
+ <depends>
481
+ <conf_enabled>1</conf_enabled>
482
+ </depends>
483
+ <comment>Create a specific url for the simple products inside the configurable products to make sure the prices and information is correct.</comment>
484
  </conf_switch_urls>
485
+ <grouped_price translate="label">
486
  <label>Grouped Price</label>
487
  <frontend_type>select</frontend_type>
488
+ <source_model>channable/adminhtml_system_config_source_pricemodel</source_model>
489
+ <sort_order>95</sort_order>
490
  <show_in_default>1</show_in_default>
491
  <show_in_website>1</show_in_website>
492
  <show_in_store>1</show_in_store>
493
  </grouped_price>
494
+ </fields>
495
+ </data>
496
+ <advanced translate="label" module="channable">
497
+ <label>Products - Extra data fields &amp; Shipping</label>
498
+ <frontend_type>text</frontend_type>
499
+ <sort_order>5</sort_order>
500
+ <show_in_default>1</show_in_default>
501
+ <show_in_website>1</show_in_website>
502
+ <show_in_store>1</show_in_store>
503
+ <expanded>1</expanded>
504
+ <fields>
505
+ <note translate="label">
506
+ <label><![CDATA[We recommend adding as many attributes as possible to the Channable feed as this will greatly improve the quality of your data. Enter the Shipping Price by using the designated extra field.]]></label>
507
+ <frontend_model>channable/adminhtml_system_config_form_field_note</frontend_model>
508
+ <sort_order>1</sort_order>
509
+ <show_in_default>1</show_in_default>
510
+ <show_in_website>1</show_in_website>
511
+ <show_in_store>1</show_in_store>
512
+ </note>
513
+ <extra_heading translate="label">
514
  <label>The Additional Fields</label>
515
  <frontend_model>channable/adminhtml_system_config_form_field_heading</frontend_model>
516
  <sort_order>30</sort_order>
518
  <show_in_website>1</show_in_website>
519
  <show_in_store>1</show_in_store>
520
  </extra_heading>
521
+ <extra>
522
+ <label>The Additional Fields</label>
523
  <frontend_model>channable/adminhtml_config_form_field_extra</frontend_model>
524
  <backend_model>channable/adminhtml_system_config_backend_design_extra</backend_model>
525
  <sort_order>32</sort_order>
526
  <show_in_default>1</show_in_default>
527
  <show_in_website>1</show_in_website>
528
  <show_in_store>1</show_in_store>
529
+ </extra>
530
+ <heading_shipping translate="label">
531
+ <label>The Shipping Price</label>
532
+ <frontend_model>channable/adminhtml_system_config_form_field_heading</frontend_model>
533
+ <sort_order>50</sort_order>
534
+ <show_in_default>1</show_in_default>
535
+ <show_in_website>1</show_in_website>
536
+ <show_in_store>1</show_in_store>
537
+ </heading_shipping>
538
+ <shipping_method translate="label">
539
  <label>Shipping Calculation method</label>
540
  <frontend_type>select</frontend_type>
541
  <source_model>channable/adminhtml_system_config_source_shipping</source_model>
544
  <show_in_website>1</show_in_website>
545
  <show_in_store>1</show_in_store>
546
  </shipping_method>
547
+ <shipping_price>
548
+ <label>The Shipping Price</label>
549
+ <frontend_model>channable/adminhtml_config_form_field_shipping</frontend_model>
550
+ <backend_model>channable/adminhtml_system_config_backend_design_shipping</backend_model>
551
+ <sort_order>52</sort_order>
552
+ <show_in_default>1</show_in_default>
553
+ <show_in_website>1</show_in_website>
554
+ <show_in_store>1</show_in_store>
555
+ </shipping_price>
556
+ </fields>
557
+ </advanced>
558
+ <filter translate="label" module="channable">
559
+ <label>Channable - Filter Conditions</label>
560
+ <frontend_type>text</frontend_type>
561
+ <sort_order>6</sort_order>
562
+ <show_in_default>1</show_in_default>
563
+ <show_in_website>1</show_in_website>
564
+ <show_in_store>1</show_in_store>
565
+ <expanded>1</expanded>
566
+ <fields>
567
+ <note translate="label">
568
  <label><![CDATA[This option allows you to include/exclude product from the Channable feed. <br>]]></label>
569
  <frontend_model>channable/adminhtml_system_config_form_field_note</frontend_model>
570
  <sort_order>1</sort_order>
572
  <show_in_website>1</show_in_website>
573
  <show_in_store>1</show_in_store>
574
  </note>
575
+ <category_heading translate="label">
576
  <label>Filter based on Category</label>
577
  <frontend_model>channable/adminhtml_system_config_form_field_heading</frontend_model>
578
  <sort_order>20</sort_order>
589
  <show_in_website>1</show_in_website>
590
  <show_in_store>1</show_in_store>
591
  </category_enabled>
592
+ <category_type translate="label">
593
+ <label>Type of the filter</label>
594
+ <frontend_type>select</frontend_type>
595
+ <source_model>channable/adminhtml_system_config_source_categorytype</source_model>
596
+ <sort_order>22</sort_order>
597
+ <show_in_default>1</show_in_default>
598
+ <show_in_website>1</show_in_website>
599
+ <show_in_store>1</show_in_store>
600
+ <depends>
601
+ <category_enabled>1</category_enabled>
602
+ </depends>
603
+ </category_type>
604
+ <categories translate="label">
605
+ <label>Category</label>
606
+ <frontend_type>multiselect</frontend_type>
607
+ <source_model>channable/adminhtml_system_config_source_category</source_model>
608
+ <sort_order>23</sort_order>
609
+ <show_in_default>1</show_in_default>
610
+ <show_in_website>1</show_in_website>
611
+ <show_in_store>1</show_in_store>
612
+ <depends>
613
+ <category_enabled>1</category_enabled>
614
+ </depends>
615
+ </categories>
616
+ <stock_heading translate="label">
617
+ <label>Exclude Products by Stock level</label>
618
+ <frontend_model>channable/adminhtml_system_config_form_field_heading</frontend_model>
619
+ <sort_order>30</sort_order>
620
+ <show_in_default>1</show_in_default>
621
+ <show_in_website>1</show_in_website>
622
+ <show_in_store>1</show_in_store>
623
+ </stock_heading>
624
+ <stock translate="label">
625
+ <label>Exclude the out of stock products</label>
626
+ <frontend_type>select</frontend_type>
627
+ <source_model>adminhtml/system_config_source_yesno</source_model>
628
+ <sort_order>31</sort_order>
629
+ <show_in_default>1</show_in_default>
630
+ <show_in_website>1</show_in_website>
631
+ <show_in_store>1</show_in_store>
632
+ <comment>This function is only working when you still have the product visible in the front-end when it's out of stock.</comment>
633
+ </stock>
634
+ <advanced_heading translate="label">
635
  <label>Advanced</label>
636
  <frontend_model>channable/adminhtml_system_config_form_field_heading</frontend_model>
637
  <sort_order>40</sort_order>
639
  <show_in_website>1</show_in_website>
640
  <show_in_store>1</show_in_store>
641
  </advanced_heading>
642
+ <advanced>
643
+ <label>Advanced Filter</label>
644
+ <frontend_model>channable/adminhtml_config_form_field_filter</frontend_model>
645
+ <backend_model>channable/adminhtml_system_config_backend_design_filter</backend_model>
646
+ <sort_order>42</sort_order>
647
+ <show_in_default>1</show_in_default>
648
+ <show_in_website>1</show_in_website>
649
+ <show_in_store>1</show_in_store>
650
+ </advanced>
651
+ </fields>
652
+ </filter>
653
+ <server translate="label" module="channable">
654
+ <label>Overwrite the server settings</label>
655
+ <frontend_type>text</frontend_type>
656
+ <sort_order>7</sort_order>
657
+ <show_in_default>1</show_in_default>
658
+ <show_in_website>1</show_in_website>
659
+ <show_in_store>1</show_in_store>
660
+ <expanded>1</expanded>
661
+ <fields>
662
+ <overwrite translate="label">
663
  <label>Enabled</label>
664
  <frontend_type>select</frontend_type>
665
  <source_model>adminhtml/system_config_source_yesno</source_model>
669
  <show_in_store>0</show_in_store>
670
  <tooltip>Only use this option if it's necessary to overwrite this setting because of your server memory limit or execution time.</tooltip>
671
  </overwrite>
672
+ <memory_limit translate="label">
673
+ <label>The Memory Limit</label>
674
+ <frontend_type>text</frontend_type>
675
+ <sort_order>22</sort_order>
676
+ <show_in_default>1</show_in_default>
677
+ <show_in_website>0</show_in_website>
678
+ <show_in_store>0</show_in_store>
679
+ <depends>
680
+ <overwrite>1</overwrite>
681
+ </depends>
682
+ <comment><![CDATA[This overwrites the maximum amount of memory in bytes that a script is allowed to allocate, eg 1024M.]]></comment>
683
+ </memory_limit>
684
+ <max_execution_time translate="label">
685
+ <label>The Max Execution Time</label>
686
+ <frontend_type>text</frontend_type>
687
+ <sort_order>23</sort_order>
688
+ <show_in_default>1</show_in_default>
689
+ <show_in_website>0</show_in_website>
690
+ <show_in_store>0</show_in_store>
691
+ <depends>
692
+ <overwrite>1</overwrite>
693
+ </depends>
694
+ <comment><![CDATA[This overwrites the maximum time in seconds a script is allowed to run before it is terminated by the parser, eg: 300 (for 5 minutes).]]></comment>
695
+ </max_execution_time>
696
+ </fields>
697
+ </server>
698
+ <settings translate="label" module="channable">
699
+ <label>Feeds - Available</label>
700
+ <frontend_type>text</frontend_type>
701
+ <sort_order>8</sort_order>
702
+ <show_in_default>1</show_in_default>
703
+ <show_in_website>1</show_in_website>
704
+ <show_in_store>1</show_in_store>
705
+ <expanded>1</expanded>
706
+ <fields>
707
+ <note translate="label">
708
  <label><![CDATA[Each store view will have their own Channable feed. Use the auto connect button to connect the Feed with your Channable account.]]></label>
709
  <frontend_model>channable/adminhtml_system_config_form_field_note</frontend_model>
710
  <sort_order>1</sort_order>
712
  <show_in_website>1</show_in_website>
713
  <show_in_store>1</show_in_store>
714
  </note>
715
+ <feeds_text translate="label">
716
+ <label>Text</label>
717
  <frontend_model>channable/adminhtml_system_config_form_field_feeds</frontend_model>
718
+ <sort_order>11</sort_order>
719
+ <show_in_default>1</show_in_default>
720
+ <show_in_website>1</show_in_website>
721
+ <show_in_store>1</show_in_store>
722
+ </feeds_text>
723
+ </fields>
724
+ </settings>
725
+ </groups>
726
+ </channable>
727
+ </sections>
728
  </config>
app/code/community/Magmodules/Channable/sql/magmodules_channable_setup/upgrade-1.4.8-1.4.9.php CHANGED
@@ -1,35 +1,39 @@
1
  <?php
2
  /**
3
- * Magmodules.eu - http://www.magmodules.eu - info@magmodules.eu
4
- * =============================================================
5
- * NOTICE OF LICENSE [Single domain license]
6
- * This source file is subject to the EULA that is
7
- * available through the world-wide-web at:
8
- * http://www.magmodules.eu/license-agreement/
9
- * =============================================================
10
- * @category Magmodules
11
- * @package Magmodules_Channable
12
- * @author Magmodules <info@magmodules.eu>
13
- * @copyright Copyright (c) 2016 (http://www.magmodules.eu)
14
- * @license http://www.magmodules.eu/license-agreement/
15
- * =============================================================
 
 
 
 
16
  */
17
-
18
  $installer = new Mage_Catalog_Model_Resource_Eav_Mysql4_Setup('core_setup');
19
  $installer->startSetup();
20
 
21
  $installer->addAttribute(
22
  'catalog_category', 'channable_exclude', array(
23
- 'group' => 'Feeds',
24
- 'input' => 'select',
25
- 'type' => 'int',
26
- 'source' => 'eav/entity_attribute_source_boolean',
27
- 'label' => 'Exclude Category for Channable',
28
- 'required' => false,
29
- 'user_defined' => true,
30
- 'visible' => true,
31
- 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
32
- 'position' => 99,
33
  )
34
  );
35
 
1
  <?php
2
  /**
3
+ * Magmodules.eu - http://www.magmodules.eu
4
+ *
5
+ * NOTICE OF LICENSE
6
+ * This source file is subject to the Open Software License (OSL 3.0)
7
+ * that is bundled with this package in the file LICENSE.txt.
8
+ * It is also available through the world-wide-web at this URL:
9
+ * http://opensource.org/licenses/osl-3.0.php
10
+ * If you did not receive a copy of the license and are unable to
11
+ * obtain it through the world-wide-web, please send an email
12
+ * to info@magmodules.eu so we can send you a copy immediately.
13
+ *
14
+ * @category Magmodules
15
+ * @package Magmodules_Channable
16
+ * @author Magmodules <info@magmodules.eu)
17
+ * @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ *
20
  */
21
+
22
  $installer = new Mage_Catalog_Model_Resource_Eav_Mysql4_Setup('core_setup');
23
  $installer->startSetup();
24
 
25
  $installer->addAttribute(
26
  'catalog_category', 'channable_exclude', array(
27
+ 'group' => 'Feeds',
28
+ 'input' => 'select',
29
+ 'type' => 'int',
30
+ 'source' => 'eav/entity_attribute_source_boolean',
31
+ 'label' => 'Exclude Category for Channable',
32
+ 'required' => false,
33
+ 'user_defined' => true,
34
+ 'visible' => true,
35
+ 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
36
+ 'position' => 99,
37
  )
38
  );
39
 
app/etc/modules/Magmodules_Channable.xml CHANGED
@@ -1,9 +1,28 @@
1
  <?xml version="1.0"?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  <config>
3
- <modules>
4
- <Magmodules_Channable>
5
- <active>true</active>
6
- <codePool>community</codePool>
7
- </Magmodules_Channable>
8
- </modules>
9
- </config>
1
  <?xml version="1.0"?>
2
+ <!--
3
+ ~ Magmodules.eu - http://www.magmodules.eu
4
+ ~
5
+ ~ NOTICE OF LICENSE
6
+ ~ This source file is subject to the Open Software License (OSL 3.0)
7
+ ~ that is bundled with this package in the file LICENSE.txt.
8
+ ~ It is also available through the world-wide-web at this URL:
9
+ ~ http://opensource.org/licenses/osl-3.0.php
10
+ ~ If you did not receive a copy of the license and are unable to
11
+ ~ obtain it through the world-wide-web, please send an email
12
+ ~ to info@magmodules.eu so we can send you a copy immediately.
13
+ ~
14
+ ~ @category Magmodules
15
+ ~ @package Magmodules_Channable
16
+ ~ @author Magmodules <info@magmodules.eu)
17
+ ~ @copyright Copyright (c) 2017 (http://www.magmodules.eu)
18
+ ~ @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ ~
20
+ -->
21
  <config>
22
+ <modules>
23
+ <Magmodules_Channable>
24
+ <active>true</active>
25
+ <codePool>community</codePool>
26
+ </Magmodules_Channable>
27
+ </modules>
28
+ </config>
app/locale/da_DK/Magmodules_Channable.csv ADDED
File without changes
app/locale/de_DE/Magmodules_Channable.csv ADDED
File without changes
app/locale/en_US/Magmodules_Channable.csv CHANGED
@@ -1,97 +1,105 @@
1
- "-- None","-- None"
 
 
 
 
 
2
  "-- none","-- none"
3
- "Each store view will have their own Channable feed. Use the auto connect button to connect the Feed with your Channable account.","Each store view will have their own Channable feed. Use the auto connect button to connect the Feed with your Channable account."
4
  "Add Attribute","Add Attribute"
5
- "Always Use Parent Data","Always Use Parent Data"
6
- "Add Option","Add Option"
7
- "The Additional Fields","The Additional Fields"
 
 
8
  "Attribute","Attribute"
9
  "Brand","Brand"
10
- "Based on product price","Based on product price"
11
- "Based on product weight","Based on product weight"
12
- "Channable Connect","Channable Connect"
13
- "Color","Color"
14
- "Country","Country"
15
  "Category","Category"
16
- "Configurable Switch Urls","Configurable Switch Urls"
17
- "Name","Name"
18
- "Connector Code","Connector Code"
19
- "Configurable & Grouped data linkage","Configurable & Grouped data linkage"
20
- "cost","cost"
21
  "Click to auto connect with Channable","Click to auto connect with Channable"
 
 
 
 
 
 
 
22
  "Create a specific url for the simple products inside the configurable products to make sure the prices and information is correct.","Create a specific url for the simple products inside the configurable products to make sure the prices and information is correct."
23
- "Data Selection","Data Selection"
24
- "Delivery Time","Delivery Time"
 
 
25
  "Delivery Time for In Stock","Delivery Time for In Stock"
26
  "Delivery Time for Out of Stock","Delivery Time for Out of Stock"
27
  "Delivery Time for The Netherlands","Delivery Time for The Netherlands"
28
- "Delivery Time for Belgium","Delivery Time for Belgium"
29
  "Description","Description"
 
 
30
  "EAN-code","EAN-code"
31
- "Exclude Products by Stock level","Exclude Products by Stock level"
32
  "Enabled","Enabled"
33
- "Grouped Price","Grouped Price"
34
  "Enabled Feed","Enabled Feed"
 
 
 
35
  "Exclude the out of stock products","Exclude the out of stock products"
36
- "Exclude Products on Stock level","Exclude Products on Stock level"
37
- "Extra Fields","Extra Fields"
38
  "Feeds - Available","Feeds - Available"
39
  "Filter based on Category","Filter based on Category"
 
 
 
40
  "Force the Tax Usage","Force the Tax Usage"
41
  "Gender","Gender"
42
  "General - Settings","General - Settings"
43
- "The General Fields","The General Fields"
 
 
 
 
 
 
 
 
 
 
 
44
  "Limits the amount of product Channable will import per run. This setting wil not limit the total products sent to Channable!","Limits the amount of product Channable will import per run. This setting wil not limit the total products sent to Channable!"
45
- "Licence","Licence"
46
- "License Key","License Key"
47
- "Magento Attribute","Magento Attribute"
48
- "Magmodules","Magmodules"
49
  "Manually Add the Tax","Manually Add the Tax"
50
  "Material","Material"
51
- "Products - Configurable Products","Products - Configurable Products"
52
- "Price from","Price from"
53
- "Price to","Price to"
54
- "Products per page","Products per page"
55
- "Products - Data","Products - Data"
56
- "Products - Data Extra fields & Shipping","Products - Data Extra fields & Shipping"
57
- "Products per feed",""Products per feed"
 
 
 
58
  "Price Customization","Price Customization"
59
- "SKU","SKU"
60
- "Set the configurable products to your needs with the option to always use the parent data from the product inside the configurable product, only when the data is not available (as a fallback) or to use the simple product data anytime.","Set the configurable products to your needs with the option to always use the parent data from the product inside the configurable product, only when the data is not available (as a fallback) or to use the simple product data anytime."
61
- "Send Status","Send Status"
62
  "Send Stock Level","Send Stock Level"
63
- "Server Name","Server Name"
64
  "Shipping Calculation method","Shipping Calculation method"
65
- "The Shipping Price","The Shipping Price"
66
- "Settings","Settings"
67
- "Shipping Price","Shipping Price"
68
  "Size","Size"
 
69
  "Static","Static"
70
  "Stock","Stock"
71
- "Default Image","Default Image"
72
- "Strip Tags","Strip Tags"
73
- "Fill in a valid Channable Connector code and set a product limit to your Feed whenever you want this, use 0 to export all your products into the Channable Feed. You can also enable or disable the Feed generation on certain Store Views.","Fill in a valid Channable Connector code and set a product limit to your Feed whenever you want this, use 0 to export all your products into the Channable Feed. You can also enable or disable the Feed generation on certain Store Views."
74
- "Text","Text"
75
- "Use default price","Use default price"
76
- "Use minimum price","Use minimum price"
77
- "Use maximum price","Use maximum price"
78
- "Use total price","Use total price"
79
- "Use Attribute","Use Attribute"
80
- "Include the Weight Field","Include the Weight Field"
81
- "Include by category","Include by category"
82
- "Use the Parent Data for Simple","Use the Parent Data for Simple"
83
- "Use the parent data","Use the parent data"
84
- "Overwrite the server settings","Overwrite the server settings"
85
- "The Memory Limit","The Memory Limit"
86
- "Type of the filter","Type of the filter"
87
  "This overwrites the maximum amount of memory in bytes that a script is allowed to allocate, eg 1024M.","This overwrites the maximum amount of memory in bytes that a script is allowed to allocate, eg 1024M."
88
- "Max Execution Time","Max Execution Time"
89
  "This overwrites the maximum time in seconds a script is allowed to run before it is terminated by the parser, eg: 300 (for 5 minutes).","This overwrites the maximum time in seconds a script is allowed to run before it is terminated by the parser, eg: 300 (for 5 minutes)."
90
- "Only use this option if it's necessary to overwrite this setting because of your server memory limit or execution time.","Only use this option if it's necessary to overwrite this setting because of your server memory limit or execution time."
91
- "The Weight Units","The Weight Units"
 
 
 
 
92
  "We recommend adding as many attributes as possible to the Channable feed as this will greatly improve the quality of your data. Enter the Shipping Price by using the designated extra field.","We recommend adding as many attributes as possible to the Channable feed as this will greatly improve the quality of your data. Enter the Shipping Price by using the designated extra field."
93
- "In this section you will see listed all of the standard attributes needed for the Channable Connect. In order to prevent some errors please fill in as many attributes as you can, this will also improve the usability of your data on the Channable platform.","In this section you will see listed all of the standard attributes needed for the Channable Connect. In order to prevent some errors please fill in as many attributes as you can, this will also improve the usability of your data on the Channable platform."
94
- "Title","Title"
95
- "Type","Type"
96
- "The Max Execution Time","The Max Execution Time"
97
- "This option allows you to include/exclude product from the Channable feed. <br>","This option allows you to include/exclude product from the Channable feed. <br>"
1
+ "- Attribute Set","- Attribute Set"
2
+ "- Final Price","- Final Price"
3
+ "- Product ID","- Product ID"
4
+ "- Product Type","- Product Type"
5
+ "-- All Countries","-- All Countries"
6
+ "-- Custom:","-- Custom:"
7
  "-- none","-- none"
 
8
  "Add Attribute","Add Attribute"
9
+ "Add Filter","Add Filter"
10
+ "Advanced","Advanced"
11
+ "Advanced Filter","Advanced Filter"
12
+ "All Images","All Images"
13
+ "attribute","attribute"
14
  "Attribute","Attribute"
15
  "Brand","Brand"
 
 
 
 
 
16
  "Category","Category"
17
+ "Channable - Filter Conditions","Channable - Filter Conditions"
 
 
 
 
18
  "Click to auto connect with Channable","Click to auto connect with Channable"
19
+ "Color","Color"
20
+ "condition","condition"
21
+ "Config","Config"
22
+ "Configurable &amp; Grouped data linkage","Configurable &amp; Grouped data linkage"
23
+ "Configurable Switch Urls","Configurable Switch Urls"
24
+ "Connect Token","Connect Token"
25
+ "country","country"
26
  "Create a specific url for the simple products inside the configurable products to make sure the prices and information is correct.","Create a specific url for the simple products inside the configurable products to make sure the prices and information is correct."
27
+ "Default Image","Default Image"
28
+ "Delivery Time - In Stock","Delivery Time - In Stock"
29
+ "Delivery Time - Out of Stock","Delivery Time - Out of Stock"
30
+ "Delivery Time for Belgium","Delivery Time for Belgium"
31
  "Delivery Time for In Stock","Delivery Time for In Stock"
32
  "Delivery Time for Out of Stock","Delivery Time for Out of Stock"
33
  "Delivery Time for The Netherlands","Delivery Time for The Netherlands"
 
34
  "Description","Description"
35
+ "Disabled","Disabled"
36
+ "Each store view will have their own Channable feed. Use the auto connect button to connect the Feed with your Channable account.","Each store view will have their own Channable feed. Use the auto connect button to connect the Feed with your Channable account."
37
  "EAN-code","EAN-code"
38
+ "Empty","Empty"
39
  "Enabled","Enabled"
 
40
  "Enabled Feed","Enabled Feed"
41
+ "Equal","Equal"
42
+ "Exclude by Category","Exclude by Category"
43
+ "Exclude Products by Stock level","Exclude Products by Stock level"
44
  "Exclude the out of stock products","Exclude the out of stock products"
45
+ "Extension Version","Extension Version"
46
+ "Feed settings","Feed settings"
47
  "Feeds - Available","Feeds - Available"
48
  "Filter based on Category","Filter based on Category"
49
+ "First Image","First Image"
50
+ "Force excluding Tax","Force excluding Tax"
51
+ "Force including Tax","Force including Tax"
52
  "Force the Tax Usage","Force the Tax Usage"
53
  "Gender","Gender"
54
  "General - Settings","General - Settings"
55
+ "Greater than","Greater than"
56
+ "Greater than or equal to","Greater than or equal to"
57
+ "Grouped Price","Grouped Price"
58
+ "Images","Images"
59
+ "In","In"
60
+ "In this section you will see listed all of the standard attributes needed for the Channable Connect. In order to prevent some errors please fill in as many attributes as you can, this will also improve the usability of your data on the Channable platform.","In this section you will see listed all of the standard attributes needed for the Channable Connect. In order to prevent some errors please fill in as many attributes as you can, this will also improve the usability of your data on the Channable platform."
61
+ "Include by Category","Include by Category"
62
+ "Include the Weight Field","Include the Weight Field"
63
+ "Last Image","Last Image"
64
+ "Less than","Less than"
65
+ "Less than or equal to","Less than or equal to"
66
+ "Like","Like"
67
  "Limits the amount of product Channable will import per run. This setting wil not limit the total products sent to Channable!","Limits the amount of product Channable will import per run. This setting wil not limit the total products sent to Channable!"
 
 
 
 
68
  "Manually Add the Tax","Manually Add the Tax"
69
  "Material","Material"
70
+ "Name","Name"
71
+ "No","No"
72
+ "Not equal","Not equal"
73
+ "Not in","Not in"
74
+ "Only Base Image","Only Base Image"
75
+ "Only use this option if it's necessary to overwrite this setting because of your server memory limit or execution time.","Only use this option if it's necessary to overwrite this setting because of your server memory limit or execution time."
76
+ "Overwrite the server settings","Overwrite the server settings"
77
+ "Percentage","Percentage"
78
+ "Preview","Preview"
79
+ "Price","Price"
80
  "Price Customization","Price Customization"
81
+ "Products - Data","Products - Data"
82
+ "Products - Extra data fields &amp; Shipping","Products - Extra data fields &amp; Shipping"
83
+ "Products per page","Products per page"
84
  "Send Stock Level","Send Stock Level"
 
85
  "Shipping Calculation method","Shipping Calculation method"
 
 
 
86
  "Size","Size"
87
+ "SKU","SKU"
88
  "Static","Static"
89
  "Stock","Stock"
90
+ "The Additional Fields","The Additional Fields"
91
+ "The General Fields","The General Fields"
92
+ "The Max Execution Time","The Max Execution Time"
93
+ "The Shipping Price","The Shipping Price"
94
+ "The Weight Units","The Weight Units"
95
+ "This option allows you to include/exclude product from the Channable feed. <br>","This option allows you to include/exclude product from the Channable feed. <br>"
 
 
 
 
 
 
 
 
 
 
96
  "This overwrites the maximum amount of memory in bytes that a script is allowed to allocate, eg 1024M.","This overwrites the maximum amount of memory in bytes that a script is allowed to allocate, eg 1024M."
 
97
  "This overwrites the maximum time in seconds a script is allowed to run before it is terminated by the parser, eg: 300 (for 5 minutes).","This overwrites the maximum time in seconds a script is allowed to run before it is terminated by the parser, eg: 300 (for 5 minutes)."
98
+ "This function is only working when you still have the product visible in the front-end when it's out of stock.","This function is only working when you still have the product visible in the front-end when it's out of stock."
99
+ "Type of the filter","Type of the filter"
100
+ "Use default","Use default"
101
+ "Use the parent data","Use the parent data"
102
+ "Use the Parent Data for Simple","Use the Parent Data for Simple"
103
+ "Warning: The following used attribute(s) were not found in the flat catalog: %s. This can result in empty data or higher resource usage. Click <a href=""%s"">here</a> to add these to the flat catalog. ","Warning: The following used attribute(s) were not found in the flat catalog: %s. This can result in empty data or higher resource usage. Click <a href=""%s"">here</a> to add these to the flat catalog. "
104
  "We recommend adding as many attributes as possible to the Channable feed as this will greatly improve the quality of your data. Enter the Shipping Price by using the designated extra field.","We recommend adding as many attributes as possible to the Channable feed as this will greatly improve the quality of your data. Enter the Shipping Price by using the designated extra field."
105
+ "Weight","Weight"
 
 
 
 
app/locale/es_ES/Magmodules_Channable.csv ADDED
File without changes
app/locale/fr_FR/Magmodules_Channable.csv ADDED
File without changes
app/locale/it_IT/Magmodules_Channable.csv ADDED
File without changes
app/locale/nl_NL/Magmodules_Channable.csv CHANGED
@@ -85,6 +85,7 @@
85
  "The Memory Limit","Geheugen limiet"
86
  "Type of the filter","Type filter"
87
  "This overwrites the maximum amount of memory in bytes that a script is allowed to allocate, eg 1024M.","Dit overschrijft de maximale hoeveelheid geheugen in bytes dat het script maximaal mag gebruiken, bijvoorbeeld 1024M."
 
88
  "Max Execution Time","Maximale uitvoer tijd"
89
  "This overwrites the maximum time in seconds a script is allowed to run before it is terminated by the parser, eg: 300 (for 5 minutes).","Dit overschrijft de maximale tijd in seconden dat het script mag draaien voordat het wordt beëindigd, bijvoorbeeld: 300 (5 minuten)."
90
  "Only use this option if it's necessary to overwrite this setting because of your server memory limit or execution time.","Gebruik deze optie alleen als het nodig is om de instelling van het geheugen limiet of uitvoertijd van je server te overschrijven."
@@ -95,4 +96,4 @@
95
  "Type","Type"
96
  "The Max Execution Time","Maximale uitvoertijd"
97
  "This option allows you to include/exclude product from the Channable feed. <br>","Deze optie staat het toe om producten uit of in te sluiten van de Channable Feed.<br>"
98
- "Please enable "Flat Catalog Category" and "Flat Catalog Product" for the extension to work properly. <a href=""https://www.magmodules.eu/help/enable-flat-catalog/"" target=""_blank"">More information.</a>","Activeer de "Platte catalogus voor producten" en de "Platte catalogus voor categorieën" om de extensie juist te laten functioneren. <a href=""https://www.magmodules.eu/help/enable-flat-catalog/"" target=""_blank""> Meer informatie.</a>"
85
  "The Memory Limit","Geheugen limiet"
86
  "Type of the filter","Type filter"
87
  "This overwrites the maximum amount of memory in bytes that a script is allowed to allocate, eg 1024M.","Dit overschrijft de maximale hoeveelheid geheugen in bytes dat het script maximaal mag gebruiken, bijvoorbeeld 1024M."
88
+ "This function is only working when you still have the product visible in the front-end when it's out of stock.","Deze functie werkt enkel indien het product welke uit de voorraad is nog steeds zichtbaar is in de front-end."
89
  "Max Execution Time","Maximale uitvoer tijd"
90
  "This overwrites the maximum time in seconds a script is allowed to run before it is terminated by the parser, eg: 300 (for 5 minutes).","Dit overschrijft de maximale tijd in seconden dat het script mag draaien voordat het wordt beëindigd, bijvoorbeeld: 300 (5 minuten)."
91
  "Only use this option if it's necessary to overwrite this setting because of your server memory limit or execution time.","Gebruik deze optie alleen als het nodig is om de instelling van het geheugen limiet of uitvoertijd van je server te overschrijven."
96
  "Type","Type"
97
  "The Max Execution Time","Maximale uitvoertijd"
98
  "This option allows you to include/exclude product from the Channable feed. <br>","Deze optie staat het toe om producten uit of in te sluiten van de Channable Feed.<br>"
99
+ "Please enable ""Flat Catalog Category"" and ""Flat Catalog Product"" for the extension to work properly. <a href=""https://www.magmodules.eu/help/enable-flat-catalog/"" target=""_blank"">More information.</a>","Activeer de ""Platte catalogus voor producten"" en de ""Platte catalogus voor categorieën"" om de extensie juist te laten functioneren. <a href=""https://www.magmodules.eu/help/enable-flat-catalog/"" target=""_blank""> Meer informatie.</a>"
app/locale/pl_PL/Magmodules_Channable.csv ADDED
File without changes
app/locale/pt_PT/Magmodules_Channable.csv ADDED
File without changes
app/locale/sv_SE/Magmodules_Channable.csv ADDED
File without changes
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Magmodules_Channable</name>
4
- <version>1.5.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.magmodules.eu/license-agreement/">Single Server License</license>
7
  <channel>community</channel>
@@ -10,9 +10,9 @@
10
  <description>Magmodules_Channable</description>
11
  <notes>Channable Connect</notes>
12
  <authors><author><name>Magmodules</name><user>magmodules</user><email>info@magmodules.nl</email></author></authors>
13
- <date>2016-12-09</date>
14
- <time>08:37:59</time>
15
- <contents><target name="magecommunity"><dir name="Magmodules"><dir name="Channable"><dir name="Block"><dir name="Adminhtml"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Extra.php" hash="c3de2d254516fb969aa32e77e420cec0"/><file name="Filter.php" hash="c18a5c2b289ef4c8cb1950990aad824a"/><file name="Shipping.php" hash="6ff0ceaf1170cc1c8d6e322377d51c55"/></dir><dir name="Renderer"><file name="Select.php" hash="de38e69b1251f094e1818615a02278fb"/></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Feeds.php" hash="14f14219d1c08ad938a6db512f71eacf"/><file name="Heading.php" hash="4b406e44f5b9d36cdf15f3c52984df88"/><file name="Note.php" hash="f0898ebfb7883e3d1e4ef2aba7c4b1f6"/><file name="Token.php" hash="7c0a7173abe2dc5e0763f62236c57875"/><file name="Version.php" hash="afcf324b22f7b496eb24ee0e5c4827ed"/></dir></dir></dir></dir><dir name="Widget"><dir name="Info"><file name="Info.php" hash="086595fa1457f59c4b536703376ff34f"/></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="b1758b644b6aca18fc9891d175128259"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Design"><file name="Extra.php" hash="8ed25fdc80ab735ad7d20f565bff4d65"/><file name="Filter.php" hash="c396481ef9e8ec62629a7ed0c9a6aef4"/><file name="Shipping.php" hash="126481e0e3599cb62b9613ac5d462dbe"/></dir></dir><dir name="Source"><file name="Action.php" hash="f9eef61712b067c43db7a32c6e5933f1"/><file name="Attribute.php" hash="c278ab2184e9129dece4a22121e22e33"/><file name="Category.php" hash="c877eb5be8f84a8ec352b933e7ac2cd1"/><file name="Categorytype.php" hash="b330bd5d575592b933c810384f95acbc"/><file name="Conditions.php" hash="aa7c3018a74f60fb41388c307e4d928d"/><file name="Configurable.php" hash="24a00a6d577ab18f3a4b20200f92cad0"/><file name="Countries.php" hash="c678e1f8625630313f78654901ed7275"/><file name="Images.php" hash="847f4d99908923bf835cefc826fbbd4a"/><file name="Mainimage.php" hash="96a2d8df1920956113f5b4509506df47"/><file name="Name.php" hash="0bdf3102e7e52e74bcbbdbb6640f0c01"/><file name="Pricemodel.php" hash="d93cbeed02dd5d38e4dc835ed06cc46f"/><file name="Selectattribute.php" hash="eea82ac436e2b999d37954c4706c690d"/><file name="Shipping.php" hash="8a8b0753092eac24484508f541a317c0"/><file name="Tax.php" hash="fbdc14e6c556d3281f8fdf652c8c637f"/><file name="Textattribute.php" hash="b601321ea8f84413c201f6f1bd5da15d"/><file name="Type.php" hash="f0bd14bb3c19b0fe59e64e2f9d96ae7f"/><file name="Visibility.php" hash="ca3d49287963398b35a905f068cfd647"/><file name="Weight.php" hash="1b05f0f69a7ebd6e0ea445ae11544fc9"/></dir></dir></dir></dir><file name="Channable.php" hash="753c50313cc773d65615817a2f0cd7eb"/><file name="Common.php" hash="b6aae848464576dcb4c8bada2ad8e6f3"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ChannableController.php" hash="957b06156e54c3e78c3ee2fa1549f358"/></dir><file name="FeedController.php" hash="8ad6ae001206426a4476aeafcc8fda08"/></dir><dir name="data"><dir name="magmodules_channable_setup"><file name="data-upgrade-1.4.8-1.4.9.php" hash="66a5f5720815c9e738b54a039877c9c9"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="0bc11d7499e07c074d3b7ecab3a2400b"/><file name="config.xml" hash="96a46885d540b04243dda14f5bdff76e"/><file name="system.xml" hash="1868aa41d072cb856e044e8bc6eb92a8"/></dir><dir name="sql"><dir name="magmodules_channable_setup"><file name="upgrade-1.4.8-1.4.9.php" hash="572c087cac6aa281aa23af1ad4b7ef6e"/></dir></dir></dir></dir></target><target name="magelocale"><dir><dir name="en_US"><file name="Magmodules_Channable.csv" hash="b7f6f15de57f502ccf1c98e71006a823"/></dir><dir name="nl_NL"><file name="Magmodules_Channable.csv" hash="2eaec8847182a0005c575e0acf6e1c1d"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Magmodules_Channable.xml" hash="061032d718f1ddd64de211fc7133685c"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.1.0</min><max>7.9.9</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Magmodules_Channable</name>
4
+ <version>1.5.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.magmodules.eu/license-agreement/">Single Server License</license>
7
  <channel>community</channel>
10
  <description>Magmodules_Channable</description>
11
  <notes>Channable Connect</notes>
12
  <authors><author><name>Magmodules</name><user>magmodules</user><email>info@magmodules.nl</email></author></authors>
13
+ <date>2017-02-23</date>
14
+ <time>20:39:37</time>
15
+ <contents><target name="magecommunity"><dir name="Magmodules"><dir name="Channable"><dir name="Block"><dir name="Adminhtml"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Extra.php" hash="fc53f0c561ca32bc6ffc3d17dde7570e"/><file name="Filter.php" hash="0bfd9fefc4a7f04af7aeccd0fe9fcad5"/><file name="Shipping.php" hash="48f0c405e83631ebb165cc50f4e035da"/></dir><dir name="Renderer"><file name="Select.php" hash="c8a97ab2a71f5474d11318fd50bc168b"/></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Feeds.php" hash="dc680e24f97f9a769e5a4ff4c750fa90"/><file name="Heading.php" hash="09777edbb0062b0f99ea3824fd127e84"/><file name="Note.php" hash="42e26d74ad76ac7eca12d5a212a5f2be"/><file name="Token.php" hash="6e809966d3aed97b842c68477996343e"/><file name="Version.php" hash="ad660b7959fa06a590c8c00f02e39066"/></dir></dir></dir></dir><dir name="Widget"><dir name="Info"><file name="Info.php" hash="63116f51d3a75ec69d7f74b6b9950b5f"/></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="cbfa8733617d6c96e4e8ae5cf3850d69"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Design"><file name="Extra.php" hash="bcbf696fdd327b12a0895816ae66ada7"/><file name="Filter.php" hash="93abb519f912add18195cfc2a3f60b3f"/><file name="Shipping.php" hash="b433283a8fed0936c7c2fdbbff06c10e"/></dir></dir><dir name="Source"><file name="Action.php" hash="6aaed6e376b2ce9fe6871027b4f4d079"/><file name="Attribute.php" hash="3e9e6d6dc48cc500b72f90f89482be79"/><file name="Category.php" hash="5901ec44903748a44e7c4c69f7de6868"/><file name="Categorytype.php" hash="0f69fbca909d1135c25965eb9cfdf41a"/><file name="Conditions.php" hash="680e2fb975de6a33ff168fb04a8d4ade"/><file name="Configurable.php" hash="abed96b3926da39bb0a751fdcc28484e"/><file name="Countries.php" hash="34622dbc2cee8c451e181a1f1db33136"/><file name="Images.php" hash="28216f43b0c78770ae0bc84232d9520e"/><file name="Mainimage.php" hash="86b5ac701685fcc0b3b56f50a862b03c"/><file name="Name.php" hash="dbe143cf77290b595cd052e5fdfe6fe0"/><file name="Pricemodel.php" hash="9fdfa8270bd9536b7a4c9048095a73a9"/><file name="Selectattribute.php" hash="5e331ad6c91bb4b99473ead9d5132512"/><file name="Shipping.php" hash="a4b1bb51f3e31be2af09175f35f4fc68"/><file name="Tax.php" hash="05e5924fab96857d05a45e97d52a0ae2"/><file name="Textattribute.php" hash="66f0b262767536a8becfbf4d3dca1bbd"/><file name="Type.php" hash="f0a0699a41b7be8d3cd4bd2fa0b8d27d"/><file name="Visibility.php" hash="1508553037c72cf06161a1dbeb569e5f"/><file name="Weight.php" hash="f7e9cab8b3242ff87a0f014e5165d60f"/></dir></dir></dir></dir><file name="Channable.php" hash="25ee4059bdbdad283a776c33382fd8ad"/><file name="Common.php" hash="d521bf371d151171bd36d119e30cfe85"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ChannableController.php" hash="f712fd77b6f4dc486d3d44f5df890867"/></dir><file name="FeedController.php" hash="b91d04adafefa324a6905f7062f585f1"/></dir><dir name="data"><dir name="magmodules_channable_setup"><file name="data-upgrade-1.4.8-1.4.9.php" hash="d95271975c1ec02cf63930561ac9492f"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="d23b65e6c4fe7b127729813b52b52fe5"/><file name="config.xml" hash="ba93d04bf262647a5f430b730d781a05"/><file name="system.xml" hash="e6353f04b11c0b26b3af0fcbf176129f"/></dir><dir name="sql"><dir name="magmodules_channable_setup"><file name="upgrade-1.4.8-1.4.9.php" hash="5605fa6c600a98089ebb2e7459258a40"/></dir></dir></dir></dir></target><target name="magelocale"><dir><dir name="da_DK"><file name="Magmodules_Channable.csv" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><dir name="de_DE"><file name="Magmodules_Channable.csv" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><dir name="en_US"><file name="Magmodules_Channable.csv" hash="a9b4826f541118a32379e79c8d76eed5"/></dir><dir name="es_ES"><file name="Magmodules_Channable.csv" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><dir name="fr_FR"><file name="Magmodules_Channable.csv" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><dir name="it_IT"><file name="Magmodules_Channable.csv" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><dir name="nl_NL"><file name="Magmodules_Channable.csv" hash="f30dde1524db77662e17b0e24492ca40"/></dir><dir name="pl_PL"><file name="Magmodules_Channable.csv" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><dir name="pt_PT"><file name="Magmodules_Channable.csv" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><dir name="sv_SE"><file name="Magmodules_Channable.csv" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Magmodules_Channable.xml" hash="66249a224021f304abc72c666c605240"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.1.0</min><max>7.9.9</max></php></required></dependencies>
18
  </package>