Channelpilotsolutions_Channelpilot - Version 2.1.0

Version Notes

- some bug fixes
- optimize price control
- new design

Download this release

Release Info

Developer Magento Core Team
Extension Channelpilotsolutions_Channelpilot
Version 2.1.0
Comparing to
See all releases


Code changes from version 2.0.0.2 to 2.1.0

Files changed (33) hide show
  1. app/{design/adminhtml/default/default/layout/Channelpilotsolutions/channelpilot.xml → code/community/Channelpilotsolutions/Channelpilot/Adminhtml/Model/Grossnet/Values.php} +16 -13
  2. app/code/community/Channelpilotsolutions/Channelpilot/Adminhtml/Model/Imagenumber/Values.php +53 -0
  3. app/code/community/Channelpilotsolutions/Channelpilot/Adminhtml/Model/Truefalse/Values.php +10 -8
  4. app/code/community/Channelpilotsolutions/Channelpilot/Adminhtml/Model/Truefalsesecurity/Values.php +10 -8
  5. app/code/community/Channelpilotsolutions/Channelpilot/Block/Adminhtml/Field/Exportfields.php +38 -40
  6. app/code/community/Channelpilotsolutions/Channelpilot/Block/Adminhtml/Field/Replacefields.php +37 -39
  7. app/code/community/Channelpilotsolutions/Channelpilot/Block/Adminhtml/Field/Specialfields.php +32 -32
  8. app/code/community/Channelpilotsolutions/Channelpilot/Block/Adminhtml/Field/Trackingkeys.php +35 -36
  9. app/code/community/Channelpilotsolutions/Channelpilot/Block/Adminhtml/Hintlogo.php +11 -0
  10. app/code/community/Channelpilotsolutions/Channelpilot/Helper/Data.php +2 -2
  11. app/code/community/Channelpilotsolutions/Channelpilot/Helper/ExportData.php +30 -4
  12. app/code/community/Channelpilotsolutions/Channelpilot/Helper/handler/CPAbstractHandler.php +1 -0
  13. app/code/community/Channelpilotsolutions/Channelpilot/Helper/handler/CPDeliveryHandler.php +6 -5
  14. app/code/community/Channelpilotsolutions/Channelpilot/Helper/handler/CPNewPriceHandler.php +43 -24
  15. app/code/community/Channelpilotsolutions/Channelpilot/Helper/handler/CPOrderHandler.php +75 -21
  16. app/code/community/Channelpilotsolutions/Channelpilot/Helper/handler/CPStatusHandler.php +30 -14
  17. app/code/community/Channelpilotsolutions/Channelpilot/Helper/special/CustomerFunctions.php +16 -11
  18. app/code/community/Channelpilotsolutions/Channelpilot/Model/Abstract.php +201 -0
  19. app/code/community/Channelpilotsolutions/Channelpilot/Model/Payment.php +112 -0
  20. app/code/community/Channelpilotsolutions/Channelpilot/Model/PaymentTypes.php +24 -0
  21. app/code/community/Channelpilotsolutions/Channelpilot/Model/Paymenttypes.php +18 -0
  22. app/code/community/Channelpilotsolutions/Channelpilot/etc/config.xml +17 -11
  23. app/code/community/Channelpilotsolutions/Channelpilot/etc/system.xml +235 -128
  24. app/code/community/Channelpilotsolutions/Channelpilot/sql/channelpilot_setup/mysql4-install-2.0.0.php +127 -126
  25. app/design/adminhtml/base/default/template/Channelpilotsolutions/array_dropdown.phtml +0 -174
  26. app/design/frontend/base/default/template/Channelpilotsolutions/channelpilot.phtml +1 -1
  27. app/etc/modules/Channelpilotsolutions_Channelpilot.xml +3 -0
  28. app/locale/de_AT/Channelpilotsolutions_Channelpilot.csv +0 -37
  29. app/locale/de_CH/Channelpilotsolutions_Channelpilot.csv +40 -31
  30. app/locale/de_DE/Channelpilotsolutions_Channelpilot.csv +42 -31
  31. app/locale/fr_FR/Channelpilotsolutions_Channelpilot.csv +46 -0
  32. package.xml +7 -6
  33. skin/adminhtml/default/default/Channelpilotsolutions/Channelpilot/icon.css +0 -4
app/{design/adminhtml/default/default/layout/Channelpilotsolutions/channelpilot.xml → code/community/Channelpilotsolutions/Channelpilot/Adminhtml/Model/Grossnet/Values.php} RENAMED
@@ -1,4 +1,5 @@
1
- <?xml version="1.0"?><!--
 
2
  /**
3
  *
4
  * NOTICE OF LICENSE
@@ -13,20 +14,22 @@
13
  * needs please refer to http://www.channelpilot.com for more information.
14
  *
15
  * @category Channelpilotsolutions
16
- * @package design_adminhtml_default_default
17
- * @subpackage layout
18
  * @copyright Copyright (c) 2012 <info@channelpilot.com> - www.channelpilot.com
19
  * @author Peter Hoffmann <info@channelpilot.com>
20
  * @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
21
  * @link http://www.channelpilot.com
22
  */
23
- -->
24
- <layout>
25
- <default>
26
- <reference name="head">
27
- <action method="addCss">
28
- <name>Channelpilotsolutions/channelpilot/icon.css</name>
29
- </action>
30
- </reference>
31
- </default>
32
- </layout>
 
 
1
+ <?php
2
+
3
  /**
4
  *
5
  * NOTICE OF LICENSE
14
  * needs please refer to http://www.channelpilot.com for more information.
15
  *
16
  * @category Channelpilotsolutions
17
+ * @package Channelpilotsolutions_Channelpilot
18
+ * @subpackage adminhtml_model_cookiemode
19
  * @copyright Copyright (c) 2012 <info@channelpilot.com> - www.channelpilot.com
20
  * @author Peter Hoffmann <info@channelpilot.com>
21
  * @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
22
  * @link http://www.channelpilot.com
23
  */
24
+ class Channelpilotsolutions_Channelpilot_Adminhtml_Model_Grossnet_Values {
25
+
26
+ public function toOptionArray() {
27
+ return array(
28
+ array('value' => 'gross', 'label' => 'gross'),
29
+ array('value' => 'net', 'label' => 'net')
30
+ );
31
+ }
32
+
33
+ }
34
+
35
+ ?>
app/code/community/Channelpilotsolutions/Channelpilot/Adminhtml/Model/Imagenumber/Values.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the GNU General Public License (GPL 3)
8
+ * that is bundled with this package in the file LICENSE.txt
9
+ *
10
+ * DISCLAIMER
11
+ *
12
+ * Do not edit or add to this file if you wish to upgrade Channelpilotsolutions_Channelpilot to newer
13
+ * versions in the future. If you wish to customize Channelpilotsolutions_Channelpilot for your
14
+ * needs please refer to http://www.channelpilot.com for more information.
15
+ *
16
+ * @category Channelpilotsolutions
17
+ * @package Channelpilotsolutions_Channelpilot
18
+ * @subpackage adminhtml_model_cookiemode
19
+ * @copyright Copyright (c) 2012 <info@channelpilot.com> - www.channelpilot.com
20
+ * @author Peter Hoffmann <info@channelpilot.com>
21
+ * @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
22
+ * @link http://www.channelpilot.com
23
+ */
24
+ class Channelpilotsolutions_Channelpilot_Adminhtml_Model_Imagenumber_Values {
25
+
26
+ public function toOptionArray() {
27
+ return array(
28
+ array('value' => '1', 'label' => '1'),
29
+ array('value' => '2', 'label' => '2'),
30
+ array('value' => '3', 'label' => '3'),
31
+ array('value' => '4', 'label' => '4'),
32
+ array('value' => '5', 'label' => '5'),
33
+ array('value' => '6', 'label' => '6'),
34
+ array('value' => '7', 'label' => '7'),
35
+ array('value' => '8', 'label' => '8'),
36
+ array('value' => '9', 'label' => '9'),
37
+ array('value' => '10', 'label' => '10'),
38
+ array('value' => '11', 'label' => '11'),
39
+ array('value' => '12', 'label' => '12'),
40
+ array('value' => '13', 'label' => '13'),
41
+ array('value' => '14', 'label' => '14'),
42
+ array('value' => '15', 'label' => '15'),
43
+ array('value' => '16', 'label' => '16'),
44
+ array('value' => '17', 'label' => '17'),
45
+ array('value' => '18', 'label' => '18'),
46
+ array('value' => '19', 'label' => '19'),
47
+ array('value' => '20', 'label' => '20')
48
+ );
49
+ }
50
+
51
+ }
52
+
53
+ ?>
app/code/community/Channelpilotsolutions/Channelpilot/Adminhtml/Model/Truefalse/Values.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  /**
3
  *
4
  * NOTICE OF LICENSE
@@ -20,14 +21,15 @@
20
  * @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
21
  * @link http://www.channelpilot.com
22
  */
23
- class Channelpilotsolutions_Channelpilot_Adminhtml_Model_Truefalse_Values
24
- {
25
- public function toOptionArray()
26
- {
27
  return array(
28
- array('value' => 'false', 'label'=>'No'),
29
- array('value' => 'true', 'label'=>'Yes')
30
- );
31
- }
 
32
  }
 
33
  ?>
1
  <?php
2
+
3
  /**
4
  *
5
  * NOTICE OF LICENSE
21
  * @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
22
  * @link http://www.channelpilot.com
23
  */
24
+ class Channelpilotsolutions_Channelpilot_Adminhtml_Model_Truefalse_Values {
25
+
26
+ public function toOptionArray() {
 
27
  return array(
28
+ array('value' => 'false', 'label' => 'CP No'),
29
+ array('value' => 'true', 'label' => 'CP Yes')
30
+ );
31
+ }
32
+
33
  }
34
+
35
  ?>
app/code/community/Channelpilotsolutions/Channelpilot/Adminhtml/Model/Truefalsesecurity/Values.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  /**
3
  *
4
  * NOTICE OF LICENSE
@@ -20,14 +21,15 @@
20
  * @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
21
  * @link http://www.channelpilot.com
22
  */
23
- class Channelpilotsolutions_Channelpilot_Adminhtml_Model_Truefalsesecurity_Values
24
- {
25
- public function toOptionArray()
26
- {
27
  return array(
28
- array('value' => 'true', 'label'=>'Yes'),
29
- array('value' => 'false', 'label'=>'No')
30
- );
31
- }
 
32
  }
 
33
  ?>
1
  <?php
2
+
3
  /**
4
  *
5
  * NOTICE OF LICENSE
21
  * @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
22
  * @link http://www.channelpilot.com
23
  */
24
+ class Channelpilotsolutions_Channelpilot_Adminhtml_Model_Truefalsesecurity_Values {
25
+
26
+ public function toOptionArray() {
 
27
  return array(
28
+ array('value' => 'true', 'label' => 'Yes'),
29
+ array('value' => 'false', 'label' => 'No')
30
+ );
31
+ }
32
+
33
  }
34
+
35
  ?>
app/code/community/Channelpilotsolutions/Channelpilot/Block/Adminhtml/Field/Exportfields.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  /**
3
  *
4
  * NOTICE OF LICENSE
@@ -20,64 +21,61 @@
20
  * @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
21
  * @link http://www.channelpilot.com
22
  */
23
- class Channelpilotsolutions_Channelpilot_Block_Adminhtml_Field_Exportfields
24
- extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
25
- {
26
-
27
  private $_standardattributes;
28
-
29
- public function __construct()
30
- {
31
- $this->addColumn('productattribute', array(
32
- 'label' => Mage::helper('adminhtml')->__('Data field'),
33
- 'size' => 30
34
- ));
35
- $this->_addAfter = false;
36
-
37
- parent::__construct();
38
- $this->setTemplate('Channelpilotsolutions/array_dropdown.phtml');
39
- }
40
-
41
- protected function _renderCellTemplate($columnName)
42
- {
43
- $this->_standardattributes = "('sku','price','name','description','manufacturer','color','weight')";
44
- if (empty($this->_columns[$columnName])) {
45
- throw new Exception('Wrong column name specified.');
46
- }
47
- $column = $this->_columns[$columnName];
48
- $inputName = $this->getElement()->getName() . '[#{_id}][' . $columnName . ']';
49
-
50
- if($columnName == 'productattribute')
51
- {
52
- $rendered = '<select name="'.$inputName.'">';
53
-
54
  $tableName = Mage::getSingleton('core/resource')->getTableName('core_website');
55
  $tablePrefix = substr($tableName, 0, strpos($tableName, 'core_website'));
56
- $dbConnection = Mage::getSingleton('core/resource') ->getConnection('core_read');
57
-
58
  // Get attribute codes and types
59
  $query = "SELECT attribute_code
60
  FROM ChannelPilotSolutions_ChannelPilot_eav_attribute
61
- WHERE entity_type_id = (SELECT entity_type_id FROM
62
  ChannelPilotSolutions_ChannelPilot_eav_entity_type WHERE entity_type_code = 'catalog_product') AND
63
  attribute_code NOT IN $this->_standardattributes
64
  ";
65
  $query = str_replace('ChannelPilotSolutions_ChannelPilot_', $tablePrefix, $query);
66
  $attributes = $dbConnection->FetchAssoc($query);
67
-
68
  $attributes[]['attribute_code'] = 'qty';
69
  $attributes[]['attribute_code'] = 'stock_status';
70
  $attributes[]['attribute_code'] = 'cp_color_attribute_id';
71
- $attributes[]['attribute_code'] = 'parent_id';
72
  asort($attributes);
73
  foreach ($attributes as $attribute) {
74
- $rendered .= '<option value="'.$attribute['attribute_code'].'">'.$attribute['attribute_code'].'</option>';
75
  }
76
  $rendered .= '</select>';
77
  return $rendered;
78
- }
79
-
80
- return '<input type="text" name="'.$inputName.'" value="#{' . $columnName . '}"/>';
81
- }
 
82
  }
 
83
  ?>
1
  <?php
2
+
3
  /**
4
  *
5
  * NOTICE OF LICENSE
21
  * @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
22
  * @link http://www.channelpilot.com
23
  */
24
+ class Channelpilotsolutions_Channelpilot_Block_Adminhtml_Field_Exportfields extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract {
25
+
 
 
26
  private $_standardattributes;
27
+
28
+ public function __construct() {
29
+ $this->addColumn('productattribute', array(
30
+ 'label' => Mage::helper('adminhtml')->__('Data field'),
31
+ 'size' => 30
32
+ ));
33
+ $this->_addAfter = false;
34
+
35
+ parent::__construct();
36
+ $this->setTemplate('channelpilotsolutions/array_dropdown.phtml');
37
+ }
38
+
39
+ protected function _renderCellTemplate($columnName) {
40
+ $this->_standardattributes = "('sku','price','name','description','manufacturer','color','weight', 'parent_id')";
41
+ if (empty($this->_columns[$columnName])) {
42
+ throw new Exception('Wrong column name specified.');
43
+ }
44
+ $column = $this->_columns[$columnName];
45
+ $inputName = $this->getElement()->getName() . '[#{_id}][' . $columnName . ']';
46
+
47
+ if ($columnName == 'productattribute') {
48
+ $rendered = '<select name="' . $inputName . '">';
49
+
 
 
 
50
  $tableName = Mage::getSingleton('core/resource')->getTableName('core_website');
51
  $tablePrefix = substr($tableName, 0, strpos($tableName, 'core_website'));
52
+ $dbConnection = Mage::getSingleton('core/resource')->getConnection('core_read');
53
+
54
  // Get attribute codes and types
55
  $query = "SELECT attribute_code
56
  FROM ChannelPilotSolutions_ChannelPilot_eav_attribute
57
+ WHERE entity_type_id = (SELECT entity_type_id FROM
58
  ChannelPilotSolutions_ChannelPilot_eav_entity_type WHERE entity_type_code = 'catalog_product') AND
59
  attribute_code NOT IN $this->_standardattributes
60
  ";
61
  $query = str_replace('ChannelPilotSolutions_ChannelPilot_', $tablePrefix, $query);
62
  $attributes = $dbConnection->FetchAssoc($query);
63
+
64
  $attributes[]['attribute_code'] = 'qty';
65
  $attributes[]['attribute_code'] = 'stock_status';
66
  $attributes[]['attribute_code'] = 'cp_color_attribute_id';
67
+ // $attributes[]['attribute_code'] = 'parent_id';
68
  asort($attributes);
69
  foreach ($attributes as $attribute) {
70
+ $rendered .= '<option value="' . $attribute['attribute_code'] . '">' . $attribute['attribute_code'] . '</option>';
71
  }
72
  $rendered .= '</select>';
73
  return $rendered;
74
+ }
75
+
76
+ return '<input type="text" name="' . $inputName . '" value="#{' . $columnName . '}"/>';
77
+ }
78
+
79
  }
80
+
81
  ?>
app/code/community/Channelpilotsolutions/Channelpilot/Block/Adminhtml/Field/Replacefields.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  /**
3
  *
4
  * NOTICE OF LICENSE
@@ -20,56 +21,51 @@
20
  * @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
21
  * @link http://www.channelpilot.com
22
  */
23
- class Channelpilotsolutions_Channelpilot_Block_Adminhtml_Field_Replacefields
24
- extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
25
- {
26
-
27
  private $_standardattributes;
28
-
29
- public function __construct()
30
- {
31
- $this->addColumn('productattribute', array(
32
- 'label' => Mage::helper('adminhtml')->__('Data field'),
33
- 'size' => 30
34
- ));
35
- $this->_addAfter = false;
36
-
37
- parent::__construct();
38
- $this->setTemplate('Channelpilotsolutions/array_dropdown.phtml');
39
- }
40
-
41
- protected function _renderCellTemplate($columnName)
42
- {
43
  $this->_standardattributes = "('sku','price','name','description','manufacturer','color','weight')";
44
- if (empty($this->_columns[$columnName])) {
45
- throw new Exception('Wrong column name specified.');
46
- }
47
- $column = $this->_columns[$columnName];
48
- $inputName = $this->getElement()->getName() . '[#{_id}][' . $columnName . ']';
49
-
50
- if($columnName == 'productattribute')
51
- {
52
- $rendered = '<select name="'.$inputName.'">';
53
-
54
  $tableName = Mage::getSingleton('core/resource')->getTableName('core_website');
55
  $tablePrefix = substr($tableName, 0, strpos($tableName, 'core_website'));
56
- $dbConnection = Mage::getSingleton('core/resource') ->getConnection('core_read');
57
-
58
  // Get attribute codes and types
59
  $query = "SELECT attribute_code
60
  FROM ChannelPilotSolutions_ChannelPilot_eav_attribute
61
- WHERE entity_type_id = (SELECT entity_type_id FROM
62
  ChannelPilotSolutions_ChannelPilot_eav_entity_type WHERE entity_type_code = 'catalog_product') AND
63
  attribute_code NOT IN $this->_standardattributes
64
  ";
65
  $query = str_replace('ChannelPilotSolutions_ChannelPilot_', $tablePrefix, $query);
66
  $attributes = $dbConnection->FetchAssoc($query);
67
-
68
  $attributes[]['attribute_code'] = 'qty';
69
  $attributes[]['attribute_code'] = 'stock_status';
70
  $attributes[]['attribute_code'] = 'cp_color_attribute_id';
71
  $attributes[]['attribute_code'] = 'parent_id';
72
-
73
  $attributes[]['attribute_code'] = 'categories';
74
  $attributes[]['attribute_code'] = 'cp_image_url';
75
  $attributes[]['attribute_code'] = 'cp_product_url';
@@ -78,13 +74,15 @@ class Channelpilotsolutions_Channelpilot_Block_Adminhtml_Field_Replacefields
78
  $attributes[]['attribute_code'] = 'cp_additional_image_3';
79
  asort($attributes);
80
  foreach ($attributes as $attribute) {
81
- $rendered .= '<option value="'.$attribute['attribute_code'].'">'.$attribute['attribute_code'].'</option>';
82
  }
83
  $rendered .= '</select>';
84
  return $rendered;
85
- }
86
-
87
- return '<input type="text" name="'.$inputName.'" value="#{' . $columnName . '}"/>';
88
- }
 
89
  }
 
90
  ?>
1
  <?php
2
+
3
  /**
4
  *
5
  * NOTICE OF LICENSE
21
  * @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
22
  * @link http://www.channelpilot.com
23
  */
24
+ class Channelpilotsolutions_Channelpilot_Block_Adminhtml_Field_Replacefields extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract {
25
+
 
 
26
  private $_standardattributes;
27
+
28
+ public function __construct() {
29
+ $this->addColumn('productattribute', array(
30
+ 'label' => Mage::helper('adminhtml')->__('Data field'),
31
+ 'size' => 30
32
+ ));
33
+ $this->_addAfter = false;
34
+
35
+ parent::__construct();
36
+ $this->setTemplate('channelpilotsolutions/array_dropdown.phtml');
37
+ }
38
+
39
+ protected function _renderCellTemplate($columnName) {
 
 
40
  $this->_standardattributes = "('sku','price','name','description','manufacturer','color','weight')";
41
+ if (empty($this->_columns[$columnName])) {
42
+ throw new Exception('Wrong column name specified.');
43
+ }
44
+ $column = $this->_columns[$columnName];
45
+ $inputName = $this->getElement()->getName() . '[#{_id}][' . $columnName . ']';
46
+
47
+ if ($columnName == 'productattribute') {
48
+ $rendered = '<select name="' . $inputName . '">';
49
+
 
50
  $tableName = Mage::getSingleton('core/resource')->getTableName('core_website');
51
  $tablePrefix = substr($tableName, 0, strpos($tableName, 'core_website'));
52
+ $dbConnection = Mage::getSingleton('core/resource')->getConnection('core_read');
53
+
54
  // Get attribute codes and types
55
  $query = "SELECT attribute_code
56
  FROM ChannelPilotSolutions_ChannelPilot_eav_attribute
57
+ WHERE entity_type_id = (SELECT entity_type_id FROM
58
  ChannelPilotSolutions_ChannelPilot_eav_entity_type WHERE entity_type_code = 'catalog_product') AND
59
  attribute_code NOT IN $this->_standardattributes
60
  ";
61
  $query = str_replace('ChannelPilotSolutions_ChannelPilot_', $tablePrefix, $query);
62
  $attributes = $dbConnection->FetchAssoc($query);
63
+
64
  $attributes[]['attribute_code'] = 'qty';
65
  $attributes[]['attribute_code'] = 'stock_status';
66
  $attributes[]['attribute_code'] = 'cp_color_attribute_id';
67
  $attributes[]['attribute_code'] = 'parent_id';
68
+
69
  $attributes[]['attribute_code'] = 'categories';
70
  $attributes[]['attribute_code'] = 'cp_image_url';
71
  $attributes[]['attribute_code'] = 'cp_product_url';
74
  $attributes[]['attribute_code'] = 'cp_additional_image_3';
75
  asort($attributes);
76
  foreach ($attributes as $attribute) {
77
+ $rendered .= '<option value="' . $attribute['attribute_code'] . '">' . $attribute['attribute_code'] . '</option>';
78
  }
79
  $rendered .= '</select>';
80
  return $rendered;
81
+ }
82
+
83
+ return '<input type="text" name="' . $inputName . '" value="#{' . $columnName . '}"/>';
84
+ }
85
+
86
  }
87
+
88
  ?>
app/code/community/Channelpilotsolutions/Channelpilot/Block/Adminhtml/Field/Specialfields.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  /**
3
  *
4
  * NOTICE OF LICENSE
@@ -20,37 +21,36 @@
20
  * @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
21
  * @link http://www.channelpilot.com
22
  */
23
- class Channelpilotsolutions_Channelpilot_Block_Adminhtml_Field_Specialfields
24
- extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
25
- {
26
- protected $magentoAttributes;
27
-
28
- public function __construct()
29
- {
30
- $this->addColumn('name', array(
31
- 'label' => Mage::helper('adminhtml')->__('Data field name'),
32
- 'size' => 30
33
- ));
34
- $this->addColumn('value', array(
35
- 'label' => Mage::helper('adminhtml')->__('Data field value'),
36
- 'size' => 30
37
- ));
38
- $this->_addAfter = false;
39
-
40
- parent::__construct();
41
- $this->setTemplate('Channelpilotsolutions/array_dropdown.phtml');
42
- }
43
-
44
- protected function _renderCellTemplate($columnName)
45
- {
46
- if (empty($this->_columns[$columnName])) {
47
- throw new Exception('Wrong column name specified.');
48
- }
49
- $column = $this->_columns[$columnName];
50
- $inputName = $this->getElement()->getName() . '[#{_id}][' . $columnName . ']';
51
-
52
-
53
- return '<input type="text" name="'.$inputName.'" value="#{' . $columnName . '}"/>';
54
- }
55
  }
 
56
  ?>
1
  <?php
2
+
3
  /**
4
  *
5
  * NOTICE OF LICENSE
21
  * @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
22
  * @link http://www.channelpilot.com
23
  */
24
+ class Channelpilotsolutions_Channelpilot_Block_Adminhtml_Field_Specialfields extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract {
25
+
26
+ protected $magentoAttributes;
27
+
28
+ public function __construct() {
29
+ $this->addColumn('name', array(
30
+ 'label' => Mage::helper('adminhtml')->__('Data field name'),
31
+ 'size' => 30
32
+ ));
33
+ $this->addColumn('value', array(
34
+ 'label' => Mage::helper('adminhtml')->__('Data field value'),
35
+ 'size' => 30
36
+ ));
37
+ $this->_addAfter = false;
38
+
39
+ parent::__construct();
40
+ $this->setTemplate('channelpilotsolutions/array_dropdown.phtml');
41
+ }
42
+
43
+ protected function _renderCellTemplate($columnName) {
44
+ if (empty($this->_columns[$columnName])) {
45
+ throw new Exception('Wrong column name specified.');
46
+ }
47
+ $column = $this->_columns[$columnName];
48
+ $inputName = $this->getElement()->getName() . '[#{_id}][' . $columnName . ']';
49
+
50
+
51
+ return '<input type="text" name="' . $inputName . '" value="#{' . $columnName . '}"/>';
52
+ }
53
+
 
 
54
  }
55
+
56
  ?>
app/code/community/Channelpilotsolutions/Channelpilot/Block/Adminhtml/Field/Trackingkeys.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  /**
3
  *
4
  * NOTICE OF LICENSE
@@ -20,50 +21,48 @@
20
  * @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
21
  * @link http://www.channelpilot.com
22
  */
23
- class Channelpilotsolutions_Channelpilot_Block_Adminhtml_Field_Trackingkeys
24
- extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
25
- {
26
- protected $magentoAttributes;
27
-
28
- public function __construct()
29
- {
30
- $this->addColumn('shop', array(
31
- 'label' => Mage::helper('adminhtml')->__('Shop'),
32
- 'size' => 15
33
- ));
34
- $this->addColumn('trackingkey', array(
35
- 'label' => Mage::helper('adminhtml')->__('TrackingKey'),
36
- 'size' => 28
37
- ));
38
- $this->_addAfter = false;
39
-
40
- parent::__construct();
41
- $this->setTemplate('Channelpilotsolutions/array_dropdown.phtml');
42
- }
43
-
44
- protected function _renderCellTemplate($columnName)
45
- {
46
- if (empty($this->_columns[$columnName])) {
47
- throw new Exception('Wrong column name specified.');
48
- }
49
- $column = $this->_columns[$columnName];
50
- $inputName = $this->getElement()->getName() . '[#{_id}][' . $columnName . ']';
51
-
52
- if($columnName == 'shop')
53
- {
54
- $rendered = '<select name="'.$inputName.'">';
55
  foreach (Mage::app()->getWebsites() as $website) {
56
  foreach ($website->getGroups() as $group) {
57
  $stores = $group->getStores();
58
  foreach ($stores as $store) {
59
- $rendered .= '<option value="'.$store->getId().'">'.$store->getName().'</option>';
60
  }
61
  }
62
  }
63
  $rendered .= '</select>';
64
  return $rendered;
65
- }
66
- return '<input type="text" name="'.$inputName.'" value="#{' . $columnName . '}"/>';
67
- }
 
68
  }
 
69
  ?>
1
  <?php
2
+
3
  /**
4
  *
5
  * NOTICE OF LICENSE
21
  * @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
22
  * @link http://www.channelpilot.com
23
  */
24
+ class Channelpilotsolutions_Channelpilot_Block_Adminhtml_Field_Trackingkeys extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract {
25
+
26
+ protected $magentoAttributes;
27
+
28
+ public function __construct() {
29
+ $this->addColumn('shop', array(
30
+ 'label' => Mage::helper('adminhtml')->__('Shop'),
31
+ 'size' => 15
32
+ ));
33
+ $this->addColumn('trackingkey', array(
34
+ 'label' => Mage::helper('adminhtml')->__('TrackingKey'),
35
+ 'size' => 28
36
+ ));
37
+ $this->_addAfter = false;
38
+
39
+ parent::__construct();
40
+ $this->setTemplate('channelpilotsolutions/array_dropdown.phtml');
41
+ }
42
+
43
+ protected function _renderCellTemplate($columnName) {
44
+ if (empty($this->_columns[$columnName])) {
45
+ throw new Exception('Wrong column name specified.');
46
+ }
47
+ $column = $this->_columns[$columnName];
48
+ $inputName = $this->getElement()->getName() . '[#{_id}][' . $columnName . ']';
49
+
50
+ if ($columnName == 'shop') {
51
+ $rendered = '<select name="' . $inputName . '">';
 
 
 
 
52
  foreach (Mage::app()->getWebsites() as $website) {
53
  foreach ($website->getGroups() as $group) {
54
  $stores = $group->getStores();
55
  foreach ($stores as $store) {
56
+ $rendered .= '<option value="' . $store->getId() . '">' . $store->getName() . '</option>';
57
  }
58
  }
59
  }
60
  $rendered .= '</select>';
61
  return $rendered;
62
+ }
63
+ return '<input type="text" name="' . $inputName . '" value="#{' . $columnName . '}"/>';
64
+ }
65
+
66
  }
67
+
68
  ?>
app/code/community/Channelpilotsolutions/Channelpilot/Block/Adminhtml/Hintlogo.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Channelpilotsolutions_Channelpilot_Block_Adminhtml_Hintlogo extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface {
4
+
5
+ protected $_template = 'channelpilotsolutions/config_hint.phtml';
6
+
7
+ public function render(Varien_Data_Form_Element_Abstract $element) {
8
+ return $this->toHtml();
9
+ }
10
+
11
+ }
app/code/community/Channelpilotsolutions/Channelpilot/Helper/Data.php CHANGED
@@ -66,7 +66,7 @@ class Channelpilotsolutions_Channelpilot_Helper_Data extends Mage_Core_Helper_Ab
66
  }
67
 
68
  public function createXml() {
69
- if (strcmp(Mage::getStoreConfig('channelpilot_export/channelpilot_productfeed/channelpilot_useExport'), "true") === 0) {
70
  $password = Mage::getStoreConfig('channelpilot_export/channelpilot_productfeed/channelpilot_password');
71
  if ($password == '' || (isset($_GET['password']) AND $_GET['password'] == $password)) {
72
  header('Content-Type: text/xml; charset=utf-8');
@@ -101,7 +101,7 @@ class Channelpilotsolutions_Channelpilot_Helper_Data extends Mage_Core_Helper_Ab
101
  $marketplaceActive = true;
102
  }
103
  $pricecontrolActive = false;
104
- if (strcmp(Mage::getStoreConfig('channelpilot_pricecontrol/general/channelpilot_usePricecontrol'), "true") === 0) {
105
  $pricecontrolActive = true;
106
  }
107
  $exportActive = false;
66
  }
67
 
68
  public function createXml() {
69
+ if (strpos(Mage::getStoreConfig('channelpilot_export/channelpilot_productfeed/channelpilot_useExport'), "true") !== false || strpos(Mage::getStoreConfig('channelpilot_export/channelpilot_productfeed/channelpilot_useExport'), "1") !== false) {
70
  $password = Mage::getStoreConfig('channelpilot_export/channelpilot_productfeed/channelpilot_password');
71
  if ($password == '' || (isset($_GET['password']) AND $_GET['password'] == $password)) {
72
  header('Content-Type: text/xml; charset=utf-8');
101
  $marketplaceActive = true;
102
  }
103
  $pricecontrolActive = false;
104
+ if (strcmp(Mage::getStoreConfig('channelpilot_pricecontrol/channelpilot_general/channelpilot_usePricecontrol'), "true") === 0) {
105
  $pricecontrolActive = true;
106
  }
107
  $exportActive = false;
app/code/community/Channelpilotsolutions/Channelpilot/Helper/ExportData.php CHANGED
@@ -86,7 +86,7 @@ class ExportData {
86
 
87
  // Extract natively directly from the database
88
  private function _extractFromMySQL() {
89
- $selectLimit = 1000;
90
 
91
  // Increase maximium length for group_concat (for additional image URLs field)
92
  $query = "SET SESSION group_concat_max_len = 1000000;";
@@ -163,6 +163,8 @@ class ExportData {
163
  $blankProduct = array();
164
  $blankProduct['entity_id'] = '';
165
  $blankProduct['sku'] = '';
 
 
166
  $blankProduct['name'] = '';
167
  $blankProduct['description'] = '';
168
  $blankProduct['price'] = '';
@@ -172,7 +174,6 @@ class ExportData {
172
  $blankProduct['cp_image_url'] = '';
173
  $blankProduct['color'] = '';
174
  $blankProduct['weight'] = '';
175
-
176
  $blankProduct['cp_additional_image_1'] = '';
177
  $blankProduct['cp_additional_image_2'] = '';
178
  $blankProduct['cp_additional_image_3'] = '';
@@ -333,7 +334,7 @@ class ExportData {
333
  $parentProductArray = array();
334
  $replace_fields = unserialize(Mage::getStoreConfig('channelpilot_export/channelpilot_productfeed/channelpilot_replacefields'));
335
 
336
-
337
  while ($counter <= $border) {
338
  // Get all entity_ids for all products in the selected store
339
  $query = "
@@ -358,6 +359,8 @@ class ExportData {
358
  // Loop through each product and output the data
359
  foreach ($EntityIds as $entity) {
360
 
 
 
361
  // Fill the master query with the entity ID
362
  // $entity[0] = entity_id
363
  // $entity[1] = sku
@@ -365,9 +368,32 @@ class ExportData {
365
  $query = $this->_applyTablePrefix($query);
366
  $result = $this->_dbConnection->query($query);
367
 
368
- // Create a new product record
 
369
  $product = $blankProduct;
370
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
371
  // Initialize basic product data
372
  $product['entity_id'] = $entity[0];
373
  $product['sku'] = $entity[1];
86
 
87
  // Extract natively directly from the database
88
  private function _extractFromMySQL() {
89
+ $selectLimit = 100;
90
 
91
  // Increase maximium length for group_concat (for additional image URLs field)
92
  $query = "SET SESSION group_concat_max_len = 1000000;";
163
  $blankProduct = array();
164
  $blankProduct['entity_id'] = '';
165
  $blankProduct['sku'] = '';
166
+ $blankProduct['parent_id'] = '';
167
+ $blankProduct['variationTheme'] = '';
168
  $blankProduct['name'] = '';
169
  $blankProduct['description'] = '';
170
  $blankProduct['price'] = '';
174
  $blankProduct['cp_image_url'] = '';
175
  $blankProduct['color'] = '';
176
  $blankProduct['weight'] = '';
 
177
  $blankProduct['cp_additional_image_1'] = '';
178
  $blankProduct['cp_additional_image_2'] = '';
179
  $blankProduct['cp_additional_image_3'] = '';
334
  $parentProductArray = array();
335
  $replace_fields = unserialize(Mage::getStoreConfig('channelpilot_export/channelpilot_productfeed/channelpilot_replacefields'));
336
 
337
+ $variationThemes = array();
338
  while ($counter <= $border) {
339
  // Get all entity_ids for all products in the selected store
340
  $query = "
359
  // Loop through each product and output the data
360
  foreach ($EntityIds as $entity) {
361
 
362
+
363
+
364
  // Fill the master query with the entity ID
365
  // $entity[0] = entity_id
366
  // $entity[1] = sku
368
  $query = $this->_applyTablePrefix($query);
369
  $result = $this->_dbConnection->query($query);
370
 
371
+
372
+ // Create a new product record
373
  $product = $blankProduct;
374
 
375
+ if (intval($entity[3]) > 0) {
376
+ $varQuery = "SELECT ea.attribute_code FROM ChannelPilotSolutions_ChannelPilot_catalog_product_super_attribute cpsa
377
+ LEFT JOIN ChannelPilotSolutions_ChannelPilot_eav_attribute ea ON ea.attribute_id = cpsa.attribute_id
378
+ WHERE cpsa.product_id = '$entity[0]' ORDER BY ea.attribute_id; ";
379
+ $varQuery = $this->_applyTablePrefix($varQuery);
380
+ $varresults = $this->_dbConnection->fetchAll($varQuery);
381
+ $variationTheme = "";
382
+ foreach ($varresults as $varresult) {
383
+ $variationTheme = $variationTheme . "|" . $varresult[0];
384
+ }
385
+ $product['variationTheme'] = ltrim($variationTheme, "|");
386
+ $variationThemes[$entity[0]] = ltrim($variationTheme, "|");
387
+ } else {
388
+ if (empty($entity[2]) != true) {
389
+ $product['variationTheme'] = $variationThemes[$entity[2]];
390
+ }
391
+ }
392
+
393
+
394
+
395
+
396
+
397
  // Initialize basic product data
398
  $product['entity_id'] = $entity[0];
399
  $product['sku'] = $entity[1];
app/code/community/Channelpilotsolutions/Channelpilot/Helper/handler/CPAbstractHandler.php CHANGED
@@ -11,6 +11,7 @@ class CPAbstractHandler {
11
  const errorHeader_forbidden = "HTTP/1.0 403 Forbidden";
12
  const ChannelPilot_IP = "148.251.65.130";
13
  const DB_REGISTRATION = "cp_registration";
 
14
  const DB_ORDERS = "cp_marketplace_orders";
15
  const DB_ORDER_ITEMS = "cp_marketplace_order_items";
16
 
11
  const errorHeader_forbidden = "HTTP/1.0 403 Forbidden";
12
  const ChannelPilot_IP = "148.251.65.130";
13
  const DB_REGISTRATION = "cp_registration";
14
+ const DB_PRICES = "cp_prices";
15
  const DB_ORDERS = "cp_marketplace_orders";
16
  const DB_ORDER_ITEMS = "cp_marketplace_order_items";
17
 
app/code/community/Channelpilotsolutions/Channelpilot/Helper/handler/CPDeliveryHandler.php CHANGED
@@ -17,11 +17,12 @@ class CPDeliveryHandler extends CPAbstractHandler {
17
  if (isset($_GET['limit'])) {
18
  $dbReadConnection = null;
19
  $dbWriteConnection = null;
20
- $query = "SELECT @CP_ORDERS.order_id, @CP_ORDERS.order_nr, @CP_ORDERS.marketplace, sales_flat_shipment_track.track_number, sales_flat_shipment_track.created_at, sales_flat_shipment_track.title, sales_flat_order.shipping_method
21
- FROM @CP_ORDERS
22
- LEFT JOIN sales_flat_shipment_track ON sales_flat_shipment_track.order_id = @CP_ORDERS.order_id
23
- LEFT JOIN sales_flat_order ON sales_flat_order.entity_id = @CP_ORDERS.order_id
24
- WHERE @CP_ORDERS.status = '" . CPOrderStatus::ID_IMPORTED . "' GROUP BY sales_flat_shipment_track.order_id LIMIT " . intval($_GET['limit']) . ";";
 
25
  try {
26
  $query = str_replace('@CP_ORDERS', self::DB_ORDERS, $query);
27
  $dbReadConnection = Mage::getSingleton('core/resource')->getConnection('core_read');
17
  if (isset($_GET['limit'])) {
18
  $dbReadConnection = null;
19
  $dbWriteConnection = null;
20
+ $query = "SELECT @CP_ORDERS.order_id, @CP_ORDERS.order_nr, @CP_ORDERS.marketplace, sales_flat_shipment_track.track_number, sales_flat_shipment.created_at, sales_flat_shipment_track.title, sales_flat_order.shipping_method
21
+ FROM @CP_ORDERS
22
+ LEFT JOIN sales_flat_shipment ON sales_flat_shipment.order_id = @CP_ORDERS.order_id
23
+ LEFT JOIN sales_flat_shipment_track ON sales_flat_shipment_track.order_id = @CP_ORDERS.order_id
24
+ LEFT JOIN sales_flat_order ON sales_flat_order.entity_id = @CP_ORDERS.order_id
25
+ WHERE @CP_ORDERS.status = '" . CPOrderStatus::ID_IMPORTED . "' AND sales_flat_shipment.created_at IS NOT NULL GROUP BY @CP_ORDERS.order_id LIMIT " . intval($_GET['limit']) . ";";
26
  try {
27
  $query = str_replace('@CP_ORDERS', self::DB_ORDERS, $query);
28
  $dbReadConnection = Mage::getSingleton('core/resource')->getConnection('core_read');
app/code/community/Channelpilotsolutions/Channelpilot/Helper/handler/CPNewPriceHandler.php CHANGED
@@ -16,60 +16,71 @@ class CPNewPriceHandler extends CPAbstractHandler {
16
  if (isset($_GET['token']) && self::isIpAllowedViaSecurityToken($_GET['token'])) {
17
  if (isset($_GET['priceId'])) {
18
  $merchantId = self::getMerchantId($_GET['token']);
19
- $api = new ChannelPilotSellerAPI_v1_0($merchantId, $_GET['token']);
 
 
 
20
  $priceId = $_GET['priceId'];
21
- $filterFrom = self::getLastPriceUpdate($_GET['token']);
22
  $method = "all";
23
  if (isset($filterFrom)) {
24
  $method = "update";
25
  }
26
  $filterArticles = null;
 
 
27
  $result = $api->getDynamicArticlePrices($priceId, $method, $filterArticles, $filterFrom);
28
  $unknownArticles = array();
29
  $lastPriceUpdate = null;
30
 
31
  if (isset($result->managedArticlePrices)) {
 
 
 
 
 
 
 
32
  foreach ($result->managedArticlePrices as $articlePrice) {
33
  $id = $articlePrice->article->id;
34
- $price = $articlePrice->price;
35
-
36
  $articleNumber = Mage::getStoreConfig('channelpilot_general/channelpilot_general/channelpilot_articlenumber');
37
  $product = null;
38
  switch ($articleNumber) {
39
  case 'product_id':
40
- $product = Mage::getModel('catalog/product')->load($id);
41
  break;
42
-
43
  case 'sku':
44
- $product = Mage::getModel('catalog/product')->loadByAttribute('sku', $id);
45
  break;
46
-
47
  default:
48
  CPErrorHandler::handle(CPResultCodes::SYSTEM_ERROR, "Error by choosing article number '$articleNumber'", "Error by choosing article number '$articleNumber'");
49
  break;
50
  }
51
- if (isset($product['entity_id'])) {
 
 
 
 
 
 
52
  $field = Mage::getStoreConfig('channelpilot_pricecontrol/general_prices/channelpilot_generalPriceField');
53
  switch ($field) {
54
  case 'price':
55
- $product->setPrice($price);
56
  break;
57
  case 'special_price':
58
- $product->setSpecialPrice($price);
59
- break;
60
- case 'minimal_price':
61
- $product->setMinimalPrice($price);
62
  break;
63
  default:
64
- CPErrorHandler::handle(CPResultCodes::SYSTEM_ERROR, "Error by choosing price field '$field'", "Error by choosing price field '$field'");
65
  break;
66
  }
67
- $product->save();
68
- } else {
69
- $unknownArticles[] = $id;
70
  }
71
  $lastPriceUpdate = $articlePrice->lastUpdate;
72
  }
 
 
 
73
  }
74
 
75
  if (isset($lastPriceUpdate)) {
@@ -79,8 +90,7 @@ class CPNewPriceHandler extends CPAbstractHandler {
79
  $dbWriteConnection->query($sQuery);
80
  $dbWriteConnection->closeConnection();
81
  } catch (Exception $e) {
82
- $dbWriteConnection->closeConnection();
83
- CPErrorHandler::handle(CPResultCodes::SYSTEM_ERROR, "Exception during set last_price_update: " . $e->getMessage(), "Exception during set last_price_update: '$sQuery'\n" . $e->getMessage());
84
  }
85
  }
86
  self::hookResult($result->moreAvailable, $unknownArticles);
@@ -109,22 +119,31 @@ class CPNewPriceHandler extends CPAbstractHandler {
109
  $hook->writeResponse(self::defaultHeader, json_encode($hook));
110
  }
111
 
112
- private function getLastPriceUpdate($token) {
113
  $dbConnection = Mage::getSingleton('core/resource')->getConnection('core_read');
114
- $sQuery = "SELECT last_price_update FROM " . self::DB_REGISTRATION . " WHERE securityToken = ?;";
115
- $array = array($token);
116
  try {
117
  $sResult = $dbConnection->fetchOne($sQuery, $array);
118
  $dbConnection->closeConnection();
119
  if (isset($sResult)) {
120
  $date = new DateTime($sResult);
121
  return date_format($date, 'Y-m-d') . "T" . date_format($date, 'H:i:s');
 
 
 
 
 
 
 
 
 
 
122
  }
123
  } catch (Exception $e) {
124
  $dbConnection->closeConnection();
125
  CPErrorHandler::handle(CPResultCodes::SYSTEM_ERROR, "Exception in getLastPriceUpdate(): " . $e->getMessage(), "Exception in getLastPriceUpdate(): '$sQuery'\n" . print_r($array, true) . "\n" . $e->getMessage());
126
  }
127
- return null;
128
  }
129
 
130
  }
16
  if (isset($_GET['token']) && self::isIpAllowedViaSecurityToken($_GET['token'])) {
17
  if (isset($_GET['priceId'])) {
18
  $merchantId = self::getMerchantId($_GET['token']);
19
+ $shopId = self::getShopId($_GET['token'], Mage::getSingleton('core/resource')->getConnection('core_read'));
20
+ $store = Mage::getSingleton('core/store')->load($shopId);
21
+
22
+
23
  $priceId = $_GET['priceId'];
24
+ $filterFrom = self::getLastPriceUpdate($priceId);
25
  $method = "all";
26
  if (isset($filterFrom)) {
27
  $method = "update";
28
  }
29
  $filterArticles = null;
30
+
31
+ $api = new ChannelPilotSellerAPI_v1_0($merchantId, $_GET['token']);
32
  $result = $api->getDynamicArticlePrices($priceId, $method, $filterArticles, $filterFrom);
33
  $unknownArticles = array();
34
  $lastPriceUpdate = null;
35
 
36
  if (isset($result->managedArticlePrices)) {
37
+ $useNet = false;
38
+ if (Mage::getStoreConfig('channelpilot_pricecontrol/channelpilot_general/channelpilot_saveGrossOrNetPrices') === "net") {
39
+ $useNet = true;
40
+ }
41
+ $taxCalculation = Mage::getModel('tax/calculation');
42
+ $taxRateRequest = $taxCalculation->getRateRequest(null, null, null, $store);
43
+ $taxRates = array();
44
  foreach ($result->managedArticlePrices as $articlePrice) {
45
  $id = $articlePrice->article->id;
 
 
46
  $articleNumber = Mage::getStoreConfig('channelpilot_general/channelpilot_general/channelpilot_articlenumber');
47
  $product = null;
48
  switch ($articleNumber) {
49
  case 'product_id':
50
+ $product = Mage::getSingleton('catalog/product')->load($id);
51
  break;
 
52
  case 'sku':
53
+ $product = Mage::getSingleton('catalog/product')->loadByAttribute('sku', $id);
54
  break;
 
55
  default:
56
  CPErrorHandler::handle(CPResultCodes::SYSTEM_ERROR, "Error by choosing article number '$articleNumber'", "Error by choosing article number '$articleNumber'");
57
  break;
58
  }
59
+ if (empty($product)) {
60
+ $unknownArticles[] = $id;
61
+ } else {
62
+ if ($useNet && empty($taxRates[$product->getTaxClassId()])) {
63
+ $taxRates[$product->getTaxClassId()] = $taxCalculation->getRate($taxRateRequest->setProductClassId($product->getTaxClassId()));
64
+ }
65
+ $price = $useNet ? $articlePrice->price / (($taxRates[$product->getTaxClassId()] / 100) + 1) : $articlePrice->price;
66
  $field = Mage::getStoreConfig('channelpilot_pricecontrol/general_prices/channelpilot_generalPriceField');
67
  switch ($field) {
68
  case 'price':
69
+ Mage::getSingleton('catalog/product_action')->updateAttributes(array($product->entityId), array('price' => round($price, 4)), $shopId);
70
  break;
71
  case 'special_price':
72
+ Mage::getSingleton('catalog/product_action')->updateAttributes(array($product->entityId), array('special_price' => round($price, 4)), $shopId);
 
 
 
73
  break;
74
  default:
75
+ CPErrorHandler::handle(CPResultCodes::SYSTEM_ERROR, " Error by choosing price field '$field'", "Error by choosing price field '$field'");
76
  break;
77
  }
 
 
 
78
  }
79
  $lastPriceUpdate = $articlePrice->lastUpdate;
80
  }
81
+
82
+ // reindex prices
83
+ Mage::getModel('index/process')->load(2)->reindexEverything();
84
  }
85
 
86
  if (isset($lastPriceUpdate)) {
90
  $dbWriteConnection->query($sQuery);
91
  $dbWriteConnection->closeConnection();
92
  } catch (Exception $e) {
93
+ CPErrorHandler::handle(CPResultCodes::SYSTEM_ERROR, "Exception during set last_price_update: " . $e->getMessage(), " Exception during set last_price_update: '$sQuery'\n" . $e->getMessage());
 
94
  }
95
  }
96
  self::hookResult($result->moreAvailable, $unknownArticles);
119
  $hook->writeResponse(self::defaultHeader, json_encode($hook));
120
  }
121
 
122
+ private function getLastPriceUpdate($priceId) {
123
  $dbConnection = Mage::getSingleton('core/resource')->getConnection('core_read');
124
+ $sQuery = "SELECT last_price_update FROM " . self::DB_PRICES . " WHERE price_id = ?;";
125
+ $array = array($priceId);
126
  try {
127
  $sResult = $dbConnection->fetchOne($sQuery, $array);
128
  $dbConnection->closeConnection();
129
  if (isset($sResult)) {
130
  $date = new DateTime($sResult);
131
  return date_format($date, 'Y-m-d') . "T" . date_format($date, 'H:i:s');
132
+ } else {
133
+ $sQuery = "INSERT INTO " . self::DB_PRICES . " (price_id) VALUES ('" . $priceId . "');";
134
+ try {
135
+ $dbWriteConnection = Mage::getSingleton('core/resource')->getConnection('core_write');
136
+ $dbWriteConnection->query($sQuery);
137
+ $dbWriteConnection->closeConnection();
138
+ return null;
139
+ } catch (Exception $e) {
140
+ CPErrorHandler::handle(CPResultCodes::SYSTEM_ERROR, "Exception during set last_price_update: " . $e->getMessage(), " Exception during set last_price_update: '$sQuery'\n" . $e->getMessage());
141
+ }
142
  }
143
  } catch (Exception $e) {
144
  $dbConnection->closeConnection();
145
  CPErrorHandler::handle(CPResultCodes::SYSTEM_ERROR, "Exception in getLastPriceUpdate(): " . $e->getMessage(), "Exception in getLastPriceUpdate(): '$sQuery'\n" . print_r($array, true) . "\n" . $e->getMessage());
146
  }
 
147
  }
148
 
149
  }
app/code/community/Channelpilotsolutions/Channelpilot/Helper/handler/CPOrderHandler.php CHANGED
@@ -32,7 +32,6 @@ class CPOrderHandler extends CPAbstractHandler {
32
  ini_set('allow_url_fopen', 'On');
33
  $api = new ChannelPilotSellerAPI_v1_0($merchantId, $_GET['token']);
34
  $result = $api->getNewMarketplaceOrders();
35
-
36
  // Check ResultCode of getNewMarketplaceOrders Result
37
  if ($result->header->resultCode == CPResultCodes::SUCCESS) {
38
  $moreAvailable = (bool) $result->moreAvailable;
@@ -109,7 +108,7 @@ class CPOrderHandler extends CPAbstractHandler {
109
 
110
  foreach ($apiOrder->itemsOrdered as $orderItem) {
111
  $product = $this->getProduct($orderItem->article->id);
112
- if ($product->getName() == null) {
113
  CPErrorHandler::logError("NO ARTICLE FOR IDENTIFIER: " . $orderItem->article->id);
114
  $apiOrder->orderHeader->status->hasError = true;
115
  $apiOrder->orderHeader->status->errorMessage = "Unknown article: " . $orderItem->article->id;
@@ -120,7 +119,13 @@ class CPOrderHandler extends CPAbstractHandler {
120
  }
121
 
122
  $quote->getBillingAddress()->importCustomerAddress(Mage::getModel('customer/address')->load($customer->getDefaultBilling()));
 
123
  $shippingAddress = $quote->getShippingAddress()->importCustomerAddress(Mage::getModel('customer/address')->load($customer->getDefaultShipping()));
 
 
 
 
 
124
  $shippingAddress
125
  ->setCollectShippingRates(true)
126
  ->collectShippingRates()
@@ -128,7 +133,15 @@ class CPOrderHandler extends CPAbstractHandler {
128
  ->setPaymentMethod($apiOrder->payment->typeId);
129
  $quote->setShippingAddress($shippingAddress);
130
 
131
- $quote->getPayment()->importData(array('method' => $apiOrder->payment->typeId));
 
 
 
 
 
 
 
 
132
  $quote->collectTotals()->save();
133
 
134
  $service = Mage::getModel('sales/service_quote', $quote);
@@ -156,8 +169,9 @@ class CPOrderHandler extends CPAbstractHandler {
156
  $orderItemsResponse = array();
157
  try {
158
  foreach ($items as $item) {
 
159
  foreach ($apiOrder->itemsOrdered as $orderItem) {
160
- if ($orderItem->article->id == $item->getSku()) {
161
  $item->setPrice($orderItem->costsSingle->net);
162
  $item->setCustomPrice($orderItem->costsSingle->net);
163
  $item->setBasePrice($orderItem->costsSingle->net);
@@ -175,10 +189,22 @@ class CPOrderHandler extends CPAbstractHandler {
175
  $item->save();
176
  $orderItem->id = $item->getId();
177
  $orderItemsResponse[] = $orderItem;
178
-
179
  $query = "insert into " . self::DB_ORDER_ITEMS . " (order_item_id, marketplace_order_item_id, order_id) VALUES (?, ?, ?);";
180
  $array = array($item->getId(), $orderItem->idExternal, $order->getId());
181
- $this->dbWriteConnection->query($query, $array);
 
 
 
 
 
 
 
 
 
 
 
 
 
182
  }
183
  }
184
  }
@@ -228,7 +254,7 @@ class CPOrderHandler extends CPAbstractHandler {
228
  }
229
 
230
  /**
231
- *
232
  * @param type $id
233
  */
234
  private function getProduct($id) {
@@ -237,10 +263,17 @@ class CPOrderHandler extends CPAbstractHandler {
237
  switch ($selectedArticleId) {
238
  case "product_id":
239
  $product = Mage::getModel('catalog/product')->load($id);
 
 
 
240
  break;
241
  case "sku":
242
  $product = Mage::getModel('catalog/product')->loadByAttribute('sku', $id);
243
- $product = Mage::getModel('catalog/product')->load($product->getId());
 
 
 
 
244
  break;
245
  default:
246
  break;
@@ -251,7 +284,7 @@ class CPOrderHandler extends CPAbstractHandler {
251
  private function getCustomer($apiOrder) {
252
  $customer = Mage::getModel('customer/customer')
253
  ->setWebsiteId($this->websiteId)
254
- ->loadByEmail($apiOrder->customer->email);
255
  if ($customer->getId() == null) {
256
  $customer = Mage::getModel("customer/customer");
257
  $customer->website_id = $this->websiteId;
@@ -284,6 +317,7 @@ class CPOrderHandler extends CPAbstractHandler {
284
  }
285
  }
286
  $customer->setCreatedAt($apiOrder->orderHeader->orderTime);
 
287
  $customer->save();
288
 
289
  $shippingAddress = Mage::getModel('customer/address');
@@ -297,8 +331,13 @@ class CPOrderHandler extends CPAbstractHandler {
297
  $shippingRegion = Mage::getModel('directory/region')->loadByName($apiOrder->addressDelivery->state, $apiOrder->addressDelivery->countryIso2);
298
  $shippingAddress->setRegion($shippingRegion->getName());
299
  $shippingAddress->setRegionId($shippingRegion->getId());
300
- $shippingAddress->setCompany($apiOrder->addressDelivery->company);
301
- $shippingAddress->setTelephone(empty($apiOrder->addressDelivery->phone) ? "0000000000" : $apiOrder->addressDelivery->phone);
 
 
 
 
 
302
  $shippingAddress->setIsDefaultShipping(true);
303
  $shippingAddress->save();
304
  $customer->setDefaultShipping($shippingAddress->getId());
@@ -315,8 +354,13 @@ class CPOrderHandler extends CPAbstractHandler {
315
  $billingRegion = Mage::getModel('directory/region')->loadByName($apiOrder->addressInvoice->state, $apiOrder->addressInvoice->countryIso2);
316
  $billingAddress->setRegion($billingRegion->getName());
317
  $billingAddress->setRegionId($billingRegion->getId());
318
- $billingAddress->setCompany($apiOrder->addressInvoice->company);
319
- $billingAddress->setTelephone($apiOrder->addressInvoice->phone);
 
 
 
 
 
320
  $billingAddress->setIsDefaultBilling(true);
321
  $billingAddress->save();
322
 
@@ -358,8 +402,13 @@ class CPOrderHandler extends CPAbstractHandler {
358
  $shippingRegion = Mage::getModel('directory/region')->loadByName($apiOrder->addressDelivery->state, $apiOrder->addressDelivery->countryIso2);
359
  $shippingAddress->setRegion($shippingRegion->getName());
360
  $shippingAddress->setRegionId($shippingRegion->getId());
361
- $shippingAddress->setCompany($apiOrder->addressDelivery->company);
362
- $shippingAddress->setTelephone(empty($apiOrder->addressDelivery->phone) ? "0000000000" : $apiOrder->addressDelivery->phone);
 
 
 
 
 
363
  $shippingAddress->setIsDefaultShipping(true);
364
  $shippingAddress->save();
365
 
@@ -374,8 +423,13 @@ class CPOrderHandler extends CPAbstractHandler {
374
  $billingRegion = Mage::getModel('directory/region')->loadByName($apiOrder->addressInvoice->state, $apiOrder->addressInvoice->countryIso2);
375
  $billingAddress->setRegion($billingRegion->getName());
376
  $billingAddress->setRegionId($billingRegion->getId());
377
- $billingAddress->setCompany($apiOrder->addressInvoice->company);
378
- $billingAddress->setTelephone($apiOrder->addressInvoice->phone);
 
 
 
 
 
379
  $billingAddress->setIsDefaultBilling(true);
380
  $billingAddress->save();
381
  }
@@ -383,15 +437,15 @@ class CPOrderHandler extends CPAbstractHandler {
383
  }
384
 
385
  /**
386
- *
387
  * @param type $apiOrder
388
  * @return boolean
389
  */
390
  private function getOrderItems($apiOrder) {
391
  $dbOrderItems = array();
392
- $query = "SELECT cp_items.order_item_id, cp_items.marketplace_order_item_id
393
  FROM " . self::DB_ORDER_ITEMS . " cp_items
394
- LEFT JOIN " . self::DB_ORDERS . " cp_orders ON cp_orders.order_id = cp_items.order_id
395
  WHERE cp_orders.marketplace_order_id = ? AND cp_orders.marketplace = ?";
396
  $array = array($apiOrder->orderHeader->orderIdExternal, $apiOrder->orderHeader->source);
397
  $sResult = $this->dbReadConnection->fetchAll($query, $array);
@@ -433,7 +487,7 @@ class CPOrderHandler extends CPAbstractHandler {
433
  $orders = array();
434
 
435
  $query = "SELECT cp_orders.order_nr AS orderId, cp_orders.marketplace_order_id AS externalOrderId,
436
- cp_orders.marketplace AS source, cp_items.order_item_id AS orderItemId,
437
  cp_items.marketplace_order_item_id AS externalOrderItemId, cp_orders.status
438
  FROM " . self::DB_ORDER_ITEMS . " cp_items
439
  LEFT JOIN " . self::DB_ORDERS . " cp_orders ON cp_orders.order_id = cp_items.order_id
32
  ini_set('allow_url_fopen', 'On');
33
  $api = new ChannelPilotSellerAPI_v1_0($merchantId, $_GET['token']);
34
  $result = $api->getNewMarketplaceOrders();
 
35
  // Check ResultCode of getNewMarketplaceOrders Result
36
  if ($result->header->resultCode == CPResultCodes::SUCCESS) {
37
  $moreAvailable = (bool) $result->moreAvailable;
108
 
109
  foreach ($apiOrder->itemsOrdered as $orderItem) {
110
  $product = $this->getProduct($orderItem->article->id);
111
+ if ($product == null) {
112
  CPErrorHandler::logError("NO ARTICLE FOR IDENTIFIER: " . $orderItem->article->id);
113
  $apiOrder->orderHeader->status->hasError = true;
114
  $apiOrder->orderHeader->status->errorMessage = "Unknown article: " . $orderItem->article->id;
119
  }
120
 
121
  $quote->getBillingAddress()->importCustomerAddress(Mage::getModel('customer/address')->load($customer->getDefaultBilling()));
122
+
123
  $shippingAddress = $quote->getShippingAddress()->importCustomerAddress(Mage::getModel('customer/address')->load($customer->getDefaultShipping()));
124
+ if (substr(Mage::getVersion(), 2, 3) >= 9) {
125
+ $quote->getBillingAddress()->setCompany($apiOrder->addressInvoice->company);
126
+ $shippingAddress->setCompany($apiOrder->addressDelivery->company);
127
+ }
128
+
129
  $shippingAddress
130
  ->setCollectShippingRates(true)
131
  ->collectShippingRates()
133
  ->setPaymentMethod($apiOrder->payment->typeId);
134
  $quote->setShippingAddress($shippingAddress);
135
 
136
+ if (strpos($apiOrder->payment->typeId, 'cp_mp') === false) {
137
+ $quote->getPayment()->importData(array('method' => $apiOrder->payment->typeId));
138
+ } else {
139
+ $quote->getPayment()->importData(array('method' => 'cp_mp',
140
+ 'cc_type' => $apiOrder->payment->typeId
141
+ )
142
+ );
143
+ }
144
+
145
  $quote->collectTotals()->save();
146
 
147
  $service = Mage::getModel('sales/service_quote', $quote);
169
  $orderItemsResponse = array();
170
  try {
171
  foreach ($items as $item) {
172
+
173
  foreach ($apiOrder->itemsOrdered as $orderItem) {
174
+ if ($orderItem->article->id == $item->getSku() || $orderItem->article->id == $item->getProductId()) {
175
  $item->setPrice($orderItem->costsSingle->net);
176
  $item->setCustomPrice($orderItem->costsSingle->net);
177
  $item->setBasePrice($orderItem->costsSingle->net);
189
  $item->save();
190
  $orderItem->id = $item->getId();
191
  $orderItemsResponse[] = $orderItem;
 
192
  $query = "insert into " . self::DB_ORDER_ITEMS . " (order_item_id, marketplace_order_item_id, order_id) VALUES (?, ?, ?);";
193
  $array = array($item->getId(), $orderItem->idExternal, $order->getId());
194
+ try {
195
+ $this->dbWriteConnection->query($query, $array);
196
+ } catch (Exception $e) {
197
+ self::deleteCPOrder($order->getId());
198
+ $this->closeConnections();
199
+ Mage::register('isSecureArea', true);
200
+ Mage::app('admin');
201
+ $order->delete();
202
+ CPErrorHandler::logError("Exception during insert into " . self::DB_ORDER_ITEMS . ": '$query'\n" . print_r($array, true) . "\n" . $e->getMessage() . "\n" . $e->getTraceAsString());
203
+ $apiOrder->orderHeader->status->hasError = true;
204
+ $apiOrder->orderHeader->status->errorMessage = "Exception during insert into " . self::DB_ORDER_ITEMS . ": " . $e->getMessage();
205
+ $apiOrder->orderHeader->status->errorCode = CPResultCodes::SYSTEM_ERROR;
206
+ return $apiOrder;
207
+ }
208
  }
209
  }
210
  }
254
  }
255
 
256
  /**
257
+ *
258
  * @param type $id
259
  */
260
  private function getProduct($id) {
263
  switch ($selectedArticleId) {
264
  case "product_id":
265
  $product = Mage::getModel('catalog/product')->load($id);
266
+ if (!is_object($product)) {
267
+ $product = null;
268
+ }
269
  break;
270
  case "sku":
271
  $product = Mage::getModel('catalog/product')->loadByAttribute('sku', $id);
272
+ if (is_object($product)) {
273
+ $product = Mage::getModel('catalog/product')->load($product->getId());
274
+ } else {
275
+ $product = null;
276
+ }
277
  break;
278
  default:
279
  break;
284
  private function getCustomer($apiOrder) {
285
  $customer = Mage::getModel('customer/customer')
286
  ->setWebsiteId($this->websiteId)
287
+ ->loadByEmail(CustomerFunctions::getUserName($apiOrder->customer->email));
288
  if ($customer->getId() == null) {
289
  $customer = Mage::getModel("customer/customer");
290
  $customer->website_id = $this->websiteId;
317
  }
318
  }
319
  $customer->setCreatedAt($apiOrder->orderHeader->orderTime);
320
+ $customer = CustomerFunctions::insertOrUpdateUser($customer, $apiOrder);
321
  $customer->save();
322
 
323
  $shippingAddress = Mage::getModel('customer/address');
331
  $shippingRegion = Mage::getModel('directory/region')->loadByName($apiOrder->addressDelivery->state, $apiOrder->addressDelivery->countryIso2);
332
  $shippingAddress->setRegion($shippingRegion->getName());
333
  $shippingAddress->setRegionId($shippingRegion->getId());
334
+ if (substr(Mage::getVersion(), 2, 3) < 9) {
335
+ $shippingAddress->setCompany($apiOrder->addressDelivery->company);
336
+ }
337
+ if (isset($apiOrder->addressDelivery->phone)) {
338
+ $shippingAddress->setTelephone($apiOrder->addressDelivery->phone);
339
+ }
340
+ $shippingAddress = CustomerFunctions::createAddress($shippingAddress, $apiOrder);
341
  $shippingAddress->setIsDefaultShipping(true);
342
  $shippingAddress->save();
343
  $customer->setDefaultShipping($shippingAddress->getId());
354
  $billingRegion = Mage::getModel('directory/region')->loadByName($apiOrder->addressInvoice->state, $apiOrder->addressInvoice->countryIso2);
355
  $billingAddress->setRegion($billingRegion->getName());
356
  $billingAddress->setRegionId($billingRegion->getId());
357
+ if (substr(Mage::getVersion(), 2, 3) < 9) {
358
+ $billingAddress->setCompany($apiOrder->addressInvoice->company);
359
+ }
360
+ if (isset($apiOrder->addressInvoice->phone)) {
361
+ $billingAddress->setTelephone($apiOrder->addressInvoice->phone);
362
+ }
363
+ $billingAddress = CustomerFunctions::createAddress($billingAddress, $apiOrder);
364
  $billingAddress->setIsDefaultBilling(true);
365
  $billingAddress->save();
366
 
402
  $shippingRegion = Mage::getModel('directory/region')->loadByName($apiOrder->addressDelivery->state, $apiOrder->addressDelivery->countryIso2);
403
  $shippingAddress->setRegion($shippingRegion->getName());
404
  $shippingAddress->setRegionId($shippingRegion->getId());
405
+ if (substr(Mage::getVersion(), 2, 3) < 9) {
406
+ $shippingAddress->setCompany($apiOrder->addressDelivery->company);
407
+ }
408
+ if (isset($apiOrder->addressDelivery->phone)) {
409
+ $shippingAddress->setTelephone($apiOrder->addressDelivery->phone);
410
+ }
411
+ $shippingAddress = CustomerFunctions::createAddress($shippingAddress, $apiOrder);
412
  $shippingAddress->setIsDefaultShipping(true);
413
  $shippingAddress->save();
414
 
423
  $billingRegion = Mage::getModel('directory/region')->loadByName($apiOrder->addressInvoice->state, $apiOrder->addressInvoice->countryIso2);
424
  $billingAddress->setRegion($billingRegion->getName());
425
  $billingAddress->setRegionId($billingRegion->getId());
426
+ if (substr(Mage::getVersion(), 2, 3) < 9) {
427
+ $billingAddress->setCompany($apiOrder->addressInvoice->company);
428
+ }
429
+ if (isset($apiOrder->addressInvoice->phone)) {
430
+ $billingAddress->setTelephone($apiOrder->addressInvoice->phone);
431
+ }
432
+ $billingAddress = CustomerFunctions::createAddress($billingAddress, $apiOrder);
433
  $billingAddress->setIsDefaultBilling(true);
434
  $billingAddress->save();
435
  }
437
  }
438
 
439
  /**
440
+ *
441
  * @param type $apiOrder
442
  * @return boolean
443
  */
444
  private function getOrderItems($apiOrder) {
445
  $dbOrderItems = array();
446
+ $query = "SELECT cp_items.order_item_id, cp_items.marketplace_order_item_id
447
  FROM " . self::DB_ORDER_ITEMS . " cp_items
448
+ LEFT JOIN " . self::DB_ORDERS . " cp_orders ON cp_orders.order_id = cp_items.order_id
449
  WHERE cp_orders.marketplace_order_id = ? AND cp_orders.marketplace = ?";
450
  $array = array($apiOrder->orderHeader->orderIdExternal, $apiOrder->orderHeader->source);
451
  $sResult = $this->dbReadConnection->fetchAll($query, $array);
487
  $orders = array();
488
 
489
  $query = "SELECT cp_orders.order_nr AS orderId, cp_orders.marketplace_order_id AS externalOrderId,
490
+ cp_orders.marketplace AS source, cp_items.order_item_id AS orderItemId,
491
  cp_items.marketplace_order_item_id AS externalOrderItemId, cp_orders.status
492
  FROM " . self::DB_ORDER_ITEMS . " cp_items
493
  LEFT JOIN " . self::DB_ORDERS . " cp_orders ON cp_orders.order_id = cp_items.order_id
app/code/community/Channelpilotsolutions/Channelpilot/Helper/handler/CPStatusHandler.php CHANGED
@@ -22,6 +22,7 @@ class CPShop {
22
  * @version 1.0
23
  */
24
  class CPPaymentType {
 
25
  public $title;
26
  public $id;
27
  public $active;
@@ -95,7 +96,7 @@ class CPStatusHandler extends CPAbstractHandler {
95
  $deliveryTypes = array();
96
  foreach ($methods as $_ccode => $_carrier) {
97
  if ($carrierMethods = $_carrier->getAllowedMethods()) {
98
- if (!$_title = Mage::getStoreConfig("carriers/$_ccode/title", $shopId)){
99
  $_title = $_ccode;
100
  }
101
  foreach ($carrierMethods as $_mcode => $_method) {
@@ -115,21 +116,36 @@ class CPStatusHandler extends CPAbstractHandler {
115
  $paymentTypes = array();
116
  $payments = Mage::getSingleton('payment/config')->getActiveMethods();
117
  foreach ($payments as $paymentCode => $paymentModel) {
118
- $paymentTitle = Mage::getStoreConfig('payment/' . $paymentCode . '/title', $shopId);
119
- $paymentType = new CPPaymentType();
120
- $paymentType->id = $paymentCode;
121
- if (empty($paymentTitle)) {
122
- $paymentType->title = $paymentCode;
123
- } else {
124
- $paymentType->title = $paymentTitle;
125
- }
126
- $status = $paymentModel->canUseCheckout();
127
- if ($status == 1 && $paymentCode != 'free') {
128
- $paymentType->active = true;
 
129
  } else {
130
- $paymentType->active = false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
  }
132
- $paymentTypes[] = $paymentType;
133
  }
134
  return $paymentTypes;
135
  }
22
  * @version 1.0
23
  */
24
  class CPPaymentType {
25
+
26
  public $title;
27
  public $id;
28
  public $active;
96
  $deliveryTypes = array();
97
  foreach ($methods as $_ccode => $_carrier) {
98
  if ($carrierMethods = $_carrier->getAllowedMethods()) {
99
+ if (!$_title = Mage::getStoreConfig("carriers/$_ccode/title", $shopId)) {
100
  $_title = $_ccode;
101
  }
102
  foreach ($carrierMethods as $_mcode => $_method) {
116
  $paymentTypes = array();
117
  $payments = Mage::getSingleton('payment/config')->getActiveMethods();
118
  foreach ($payments as $paymentCode => $paymentModel) {
119
+ if ($paymentCode === Mage::getSingleton('channelpilot/payment')->getCode()) {
120
+ $types = Mage::getStoreConfig('payment/' . $paymentCode . '/types', $shopId);
121
+ $cpmp_types = Mage::getSingleton('channelpilot/payment')->getCcTypes();
122
+ foreach (explode(',', $types) as $type) {
123
+ if (isset($cpmp_types[$type])) {
124
+ $paymentType = new CPPaymentType();
125
+ $paymentType->id = $type;
126
+ $paymentType->title = $cpmp_types[$type];
127
+ $paymentType->active = true;
128
+ $paymentTypes[] = $paymentType;
129
+ }
130
+ }
131
  } else {
132
+
133
+ $paymentTitle = Mage::getStoreConfig('payment/' . $paymentCode . '/title', $shopId);
134
+ $paymentType = new CPPaymentType();
135
+ $paymentType->id = $paymentCode;
136
+ if (empty($paymentTitle)) {
137
+ $paymentType->title = $paymentCode;
138
+ } else {
139
+ $paymentType->title = $paymentTitle;
140
+ }
141
+ $status = $paymentModel->canUseCheckout();
142
+ if ($status == 1 && $paymentCode != 'free') {
143
+ $paymentType->active = true;
144
+ } else {
145
+ $paymentType->active = false;
146
+ }
147
+ $paymentTypes[] = $paymentType;
148
  }
 
149
  }
150
  return $paymentTypes;
151
  }
app/code/community/Channelpilotsolutions/Channelpilot/Helper/special/CustomerFunctions.php CHANGED
@@ -1,24 +1,29 @@
1
  <?php
 
2
  /**
3
  * special customer functions
4
  * @author Channel Pilot Solutions GmbH <api@channelpilot.com>
5
  * @version 1.0
6
  */
7
  class CustomerFunctions {
8
-
9
- public static function insertOrder($oOrder, $apiOrder){
10
- $oOrder->oxorder__oxbillemail->value = str_replace("@","[at]",$apiOrder->customer->email);
11
  return $oOrder;
12
  }
13
-
14
- public static function insertOrUpdateUser($oUser, $apiOrder){
15
- $oUser->oxuser__oxusername->value = str_replace("@","[at]",$apiOrder->customer->email);
16
- return $oUser;
17
  }
18
-
19
- public static function getUserName($userName){
20
- return str_replace("@","[at]",$userName);
21
  }
22
-
 
 
 
 
23
  }
 
24
  ?>
1
  <?php
2
+
3
  /**
4
  * special customer functions
5
  * @author Channel Pilot Solutions GmbH <api@channelpilot.com>
6
  * @version 1.0
7
  */
8
  class CustomerFunctions {
9
+
10
+ public static function insertOrder($oOrder, $apiOrder) {
 
11
  return $oOrder;
12
  }
13
+
14
+ public static function insertOrUpdateUser($oCustomer, $apiOrder) {
15
+ $oCustomer->email = str_replace("@", "[at]", $apiOrder->customer->email);
16
+ return $oCustomer;
17
  }
18
+
19
+ public static function getUserName($userName) {
20
+ return str_replace("@", "[at]", $userName);
21
  }
22
+
23
+ public static function createAddress($oAddress, $apiOrder) {
24
+ return $oAddress;
25
+ }
26
+
27
  }
28
+
29
  ?>
app/code/community/Channelpilotsolutions/Channelpilot/Model/Abstract.php ADDED
@@ -0,0 +1,201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Channelpilotsolutions_Channelpilot_Model_Abstract extends Mage_Payment_Model_Method_Abstract {
4
+
5
+ protected $_formBlockType = 'payment/form_cc';
6
+ protected $_infoBlockType = 'payment/info_cc';
7
+ protected $_canSaveCc = false;
8
+
9
+ public function assignData($data) {
10
+ if (!($data instanceof Varien_Object)) {
11
+ $data = new Varien_Object($data);
12
+ }
13
+ $info = $this->getInfoInstance();
14
+ $info->setCcType($data->getCcType())
15
+ ->setCcOwner($data->getCcOwner())
16
+ ->setCcLast4(substr($data->getCcNumber(), -4))
17
+ ->setCcNumber($data->getCcNumber())
18
+ ->setCcCid($data->getCcCid())
19
+ ->setCcExpMonth($data->getCcExpMonth())
20
+ ->setCcExpYear($data->getCcExpYear())
21
+ ->setCcSsIssue($data->getCcSsIssue())
22
+ ->setCcSsStartMonth($data->getCcSsStartMonth())
23
+ ->setCcSsStartYear($data->getCcSsStartYear())
24
+ ;
25
+ return $this;
26
+ }
27
+
28
+ public function prepareSave() {
29
+ $info = $this->getInfoInstance();
30
+ if ($this->_canSaveCc) {
31
+ $info->setCcNumberEnc($info->encrypt($info->getCcNumber()));
32
+ }
33
+ //$info->setCcCidEnc($info->encrypt($info->getCcCid()));
34
+ $info->setCcNumber(null)
35
+ ->setCcCid(null);
36
+ return $this;
37
+ }
38
+
39
+ public function validate() {
40
+ $info = $this->getInfoInstance();
41
+ $errorMsg = false;
42
+ $availableTypes = explode(',', $this->getConfigData('cctypes'));
43
+
44
+ $ccNumber = $info->getCcNumber();
45
+
46
+ // remove credit card number delimiters such as "-" and space
47
+ $ccNumber = preg_replace('/[\-\s]+/', '', $ccNumber);
48
+ $info->setCcNumber($ccNumber);
49
+
50
+ $ccType = '';
51
+ $specifiedCCType = $info->getCcType();
52
+
53
+ return $this;
54
+ }
55
+
56
+ public function hasVerification() {
57
+ Mage::log("hasVerification\n", null, 'cp_plugincc.log');
58
+ $configData = $this->getConfigData('useccv');
59
+ if (is_null($configData)) {
60
+ return true;
61
+ }
62
+ return (bool) $configData;
63
+ }
64
+
65
+ public function getVerificationRegEx() {
66
+ Mage::log("getVerificationRegEx\n", null, 'cp_plugincc.log');
67
+ $verificationExpList = array(
68
+ 'VI' => '/^[0-9]{3}$/', // Visa
69
+ 'MC' => '/^[0-9]{3}$/', // Master Card
70
+ 'AE' => '/^[0-9]{4}$/', // American Express
71
+ 'DI' => '/^[0-9]{3}$/', // Discovery
72
+ 'SS' => '/^[0-9]{3,4}$/',
73
+ 'SM' => '/^[0-9]{3,4}$/', // Switch or Maestro
74
+ 'SO' => '/^[0-9]{3,4}$/', // Solo
75
+ 'OT' => '/^[0-9]{3,4}$/',
76
+ 'JCB' => '/^[0-9]{3,4}$/' //JCB
77
+ );
78
+ return $verificationExpList;
79
+ }
80
+
81
+ public function validateCcNum($ccNumber) {
82
+
83
+
84
+ $cardNumber = strrev($ccNumber);
85
+ $numSum = 0;
86
+
87
+ for ($i = 0; $i < strlen($cardNumber); $i++) {
88
+ $currentNum = substr($cardNumber, $i, 1);
89
+
90
+ /**
91
+ * Double every second digit
92
+ */
93
+ if ($i % 2 == 1) {
94
+ $currentNum *= 2;
95
+ }
96
+
97
+ /**
98
+ * Add digits of 2-digit numbers together
99
+ */
100
+ if ($currentNum > 9) {
101
+ $firstNum = $currentNum % 10;
102
+ $secondNum = ($currentNum - $firstNum) / 10;
103
+ $currentNum = $firstNum + $secondNum;
104
+ }
105
+
106
+ $numSum += $currentNum;
107
+ }
108
+
109
+ /**
110
+ * If the total has no remainder it's OK
111
+ */
112
+ Mage::log("validateCcNum: " . ($numSum % 10 == 0) . "\n", null, 'cp_plugincc.log');
113
+ return ($numSum % 10 == 0);
114
+ }
115
+
116
+ public function validateCcNumOther($ccNumber) {
117
+
118
+ return preg_match('/^\\d+$/', $ccNumber);
119
+ }
120
+
121
+ public function isAvailable($quote = null) {
122
+ Mage::log($this->getConfigData('cctypes', ($quote ? $quote->getStoreId() : null)) && parent::isAvailable($quote) . " isAvailable\n", null, 'cp_plugincc.log');
123
+ return $this->getConfigData('cctypes', ($quote ? $quote->getStoreId() : null)) && parent::isAvailable($quote);
124
+ }
125
+
126
+ public function getIsCentinelValidationEnabled() {
127
+ return false !== Mage::getConfig()->getNode('modules/Mage_Centinel') && 1 == $this->getConfigData('centinel');
128
+ }
129
+
130
+ public function getCentinelValidator() {
131
+ $validator = Mage::getSingleton('centinel/service');
132
+ $validator
133
+ ->setIsModeStrict($this->getConfigData('centinel_is_mode_strict'))
134
+ ->setCustomApiEndpointUrl($this->getConfigData('centinel_api_url'))
135
+ ->setStore($this->getStore())
136
+ ->setIsPlaceOrder($this->_isPlaceOrder());
137
+ return $validator;
138
+ }
139
+
140
+ public function getCentinelValidationData() {
141
+ $info = $this->getInfoInstance();
142
+ $params = new Varien_Object();
143
+ $params
144
+ ->setPaymentMethodCode($this->getCode())
145
+ ->setCardType($info->getCcType())
146
+ ->setCardNumber($info->getCcNumber())
147
+ ->setCardExpMonth($info->getCcExpMonth())
148
+ ->setCardExpYear($info->getCcExpYear())
149
+ ->setAmount($this->_getAmount())
150
+ ->setCurrencyCode($this->_getCurrencyCode())
151
+ ->setOrderNumber($this->_getOrderId());
152
+ return $params;
153
+ }
154
+
155
+ private function _getOrderId() {
156
+ $info = $this->getInfoInstance();
157
+
158
+ if ($this->_isPlaceOrder()) {
159
+ return $info->getOrder()->getIncrementId();
160
+ } else {
161
+ if (!$info->getQuote()->getReservedOrderId()) {
162
+ $info->getQuote()->reserveOrderId();
163
+ }
164
+ return $info->getQuote()->getReservedOrderId();
165
+ }
166
+ }
167
+
168
+ private function _getAmount() {
169
+ $info = $this->getInfoInstance();
170
+ if ($this->_isPlaceOrder()) {
171
+ return (double) $info->getOrder()->getQuoteBaseGrandTotal();
172
+ } else {
173
+ return (double) $info->getQuote()->getBaseGrandTotal();
174
+ }
175
+ }
176
+
177
+ private function _getCurrencyCode() {
178
+ $info = $this->getInfoInstance();
179
+
180
+ if ($this->_isPlaceOrder()) {
181
+ return $info->getOrder()->getBaseCurrencyCode();
182
+ } else {
183
+ return $info->getQuote()->getBaseCurrencyCode();
184
+ }
185
+ }
186
+
187
+ private function _isPlaceOrder() {
188
+ $info = $this->getInfoInstance();
189
+ if ($info instanceof Mage_Sales_Model_Quote_Payment) {
190
+ return false;
191
+ } elseif ($info instanceof Mage_Sales_Model_Order_Payment) {
192
+ return true;
193
+ }
194
+ }
195
+
196
+ public function getInfoInstance() {
197
+ $instance = Mage::getSingleton('channelpilot/payment');
198
+ return $instance;
199
+ }
200
+
201
+ }
app/code/community/Channelpilotsolutions/Channelpilot/Model/Payment.php ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Channelpilotsolutions_Channelpilot_Model_Payment extends Mage_Payment_Model_Method_Abstract {
4
+
5
+ /**
6
+ * unique internal payment method identifier
7
+ *
8
+ * @var string [a-z0-9_]
9
+ */
10
+ protected $_code = 'cp_mp';
11
+
12
+ /**
13
+ * Is this payment method a gateway (online auth/charge) ?
14
+ */
15
+ protected $_isGateway = false;
16
+
17
+ /**
18
+ * Can authorize online?
19
+ */
20
+ protected $_canAuthorize = true;
21
+
22
+ /**
23
+ * Can capture funds online?
24
+ */
25
+ protected $_canCapture = true;
26
+
27
+ /**
28
+ * Can capture partial amounts online?
29
+ */
30
+ protected $_canCapturePartial = false;
31
+
32
+ /**
33
+ * Can refund online?
34
+ */
35
+ protected $_canRefund = false;
36
+
37
+ /**
38
+ * Can void transactions online?
39
+ */
40
+ protected $_canVoid = true;
41
+
42
+ /**
43
+ * Can use this payment method in administration panel?
44
+ */
45
+ protected $_canUseInternal = true;
46
+
47
+ /**
48
+ * Can show this payment method as an option on checkout payment page?
49
+ */
50
+ protected $_canUseCheckout = false;
51
+
52
+ /**
53
+ * Is this payment method suitable for multi-shipping checkout?
54
+ */
55
+ protected $_canUseForMultishipping = true;
56
+
57
+ /**
58
+ * Can save credit card information for future processing?
59
+ */
60
+ protected $_canSaveCc = false;
61
+
62
+ public function getCode() {
63
+ return $this->_code;
64
+ }
65
+
66
+ public function getCcTypes() {
67
+ $types = array();
68
+ $types["cp_mp_default"] = "ChannelPilot Marketplace Payment Default";
69
+ $types["cp_mp_amazon"] = "ChannelPilot Marketplace Payment Amazon";
70
+ // $types["cp_mp_ebay"] = "ChannelPilot Marketplace Payment Ebay";
71
+ // $types["cp_mp_rakuten"] = "ChannelPilot Marketplace Payment Rakuten";
72
+ // $types["cp_mp_cdiscount"] = "ChannelPilot Marketplace Payment CDiscount";
73
+ return $types;
74
+ }
75
+
76
+ protected $_formBlockType = 'payment/form_cc';
77
+ protected $_infoBlockType = 'payment/info_cc';
78
+
79
+ public function assignData($data) {
80
+ if (!($data instanceof Varien_Object)) {
81
+ $data = new Varien_Object($data);
82
+ }
83
+ $info = $this->getInfoInstance();
84
+ $tmp = $this->getCCTypes();
85
+ $info->setCcType($tmp[$data->getCcType()]);
86
+ return $this;
87
+ }
88
+
89
+ public function prepareSave() {
90
+ $info = $this->getInfoInstance();
91
+ $info->setCcNumber(null)
92
+ ->setCcCid(null);
93
+ return $this;
94
+ }
95
+
96
+ public function validate() {
97
+ parent::validate();
98
+
99
+ $info = $this->getInfoInstance();
100
+ $tmp = $this->getCCTypes();
101
+ $activeTypes = explode(',', Mage::getStoreConfig('payment/' . $this->_code . '/types', Mage::app()->getStore()->getStoreId()));
102
+ foreach ($activeTypes as $value) {
103
+ if ($tmp[$value] === $info->getCcType()) {
104
+ return $this;
105
+ }
106
+ }
107
+ Mage::throwException('unknown type for ' . $this->_code);
108
+ }
109
+
110
+ }
111
+
112
+ ?>
app/code/community/Channelpilotsolutions/Channelpilot/Model/PaymentTypes.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * To change this license header, choose License Headers in Project Properties.
5
+ * To change this template file, choose Tools | Templates
6
+ * and open the template in the editor.
7
+ */
8
+
9
+ class Channelpilotsolutions_Channelpilot_Model_Paymenttypes {
10
+
11
+ public function toOptionArray() {
12
+ $options = array();
13
+
14
+ foreach (Mage::getSingleton('channelpilot/payment')->getCcTypes() as $code => $name) {
15
+ $options[] = array(
16
+ 'value' => $code,
17
+ 'label' => $name
18
+ );
19
+ }
20
+
21
+ return $options;
22
+ }
23
+
24
+ }
app/code/community/Channelpilotsolutions/Channelpilot/Model/Paymenttypes.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Channelpilotsolutions_Channelpilot_Model_Paymenttypes {
4
+
5
+ public function toOptionArray() {
6
+ $options = array();
7
+
8
+ foreach (Mage::getSingleton('channelpilot/payment')->getCcTypes() as $code => $name) {
9
+ $options[] = array(
10
+ 'value' => $code,
11
+ 'label' => $name
12
+ );
13
+ }
14
+
15
+ return $options;
16
+ }
17
+
18
+ }
app/code/community/Channelpilotsolutions/Channelpilot/etc/config.xml CHANGED
@@ -24,7 +24,7 @@
24
  <config>
25
  <modules>
26
  <Channelpilotsolutions_Channelpilot>
27
- <version>2.0.0</version>
28
  </Channelpilotsolutions_Channelpilot>
29
  </modules>
30
  <global>
@@ -47,6 +47,9 @@
47
  <items>
48
  <table>cp_marketplace_order_items</table>
49
  </items>
 
 
 
50
  <logs>
51
  <table>cp_logging</table>
52
  </logs>
@@ -68,16 +71,6 @@
68
  <use>core_setup</use>
69
  </connection>
70
  </channelpilot_setup>
71
- <!-- <channelpilot_write>
72
- <connection>
73
- <use>core_write</use>
74
- </connection>
75
- </channelpilot_write>
76
- <channelpilot_read>
77
- <connection>
78
- <use>core_read</use>
79
- </connection>
80
- </channelpilot_read>-->
81
  </resources>
82
  <extraconfig />
83
  <blocks>
@@ -127,4 +120,17 @@
127
  </updates>
128
  </layout>
129
  </frontend>
 
 
 
 
 
 
 
 
 
 
 
 
 
130
  </config>
24
  <config>
25
  <modules>
26
  <Channelpilotsolutions_Channelpilot>
27
+ <version>2.1.0</version>
28
  </Channelpilotsolutions_Channelpilot>
29
  </modules>
30
  <global>
47
  <items>
48
  <table>cp_marketplace_order_items</table>
49
  </items>
50
+ <prices>
51
+ <table>cp_prices</table>
52
+ </prices>
53
  <logs>
54
  <table>cp_logging</table>
55
  </logs>
71
  <use>core_setup</use>
72
  </connection>
73
  </channelpilot_setup>
 
 
 
 
 
 
 
 
 
 
74
  </resources>
75
  <extraconfig />
76
  <blocks>
120
  </updates>
121
  </layout>
122
  </frontend>
123
+ <default>
124
+ <payment>
125
+ <cp_mp>
126
+ <active>0</active>
127
+ <model>channelpilot/payment</model>
128
+ <order_status>processing</order_status>
129
+ <payment_action>authorize</payment_action>
130
+ <allowspecific>0</allowspecific>
131
+ <email_customer>0</email_customer>
132
+ <title>ChannelPilot Marketplace Payment</title>
133
+ </cp_mp>
134
+ </payment>
135
+ </default>
136
  </config>
app/code/community/Channelpilotsolutions/Channelpilot/etc/system.xml CHANGED
@@ -24,14 +24,15 @@
24
  <config>
25
  <tabs>
26
  <channelpilot_config translate="label" module="channelpilot">
27
- <label>Channelpilot</label>
28
- <class>tab-channelpilot</class>
 
29
  <sort_order>401</sort_order>
30
  </channelpilot_config>
31
  </tabs>
32
  <sections>
33
  <channelpilot_general translate="label" module="channelpilot">
34
- <label>General</label>
35
  <tab>channelpilot_config</tab>
36
  <frontend_type>text</frontend_type>
37
  <sort_order>1000</sort_order>
@@ -39,9 +40,16 @@
39
  <show_in_website>1</show_in_website>
40
  <show_in_store>1</show_in_store>
41
  <groups>
 
 
 
 
 
 
 
42
  <channelpilot_general translate="label">
43
- <label>General ChannelPilot Settings</label>
44
- <frontend_type>text</frontend_type>
45
  <expanded>1</expanded>
46
  <sort_order>1</sort_order>
47
  <show_in_default>1</show_in_default>
@@ -49,39 +57,39 @@
49
  <show_in_store>1</show_in_store>
50
  <fields>
51
  <channelpilot_useNews>
52
- <label>Activate backendnews?</label>
53
  <frontend_type>select</frontend_type>
54
- <source_model>channelpilot_adminhtml/truefalse_values</source_model>
55
- <sort_order>1</sort_order>
56
- <show_in_default>1</show_in_default>
57
- <show_in_website>1</show_in_website>
58
- <show_in_store>1</show_in_store>
59
  </channelpilot_useNews>
60
  <channelpilot_checkIp>
61
- <label>Should the IP for API access be checked?</label>
62
  <frontend_type>select</frontend_type>
63
- <source_model>channelpilot_adminhtml/truefalsesecurity_values</source_model>
64
- <sort_order>2</sort_order>
65
- <show_in_default>1</show_in_default>
66
- <show_in_website>1</show_in_website>
67
- <show_in_store>1</show_in_store>
68
  </channelpilot_checkIp>
69
  <channelpilot_articlenumber>
70
- <label>Articlenumber</label>
71
- <comment>This applies to the tracking as well as the market place connection or the price control.</comment>
72
  <frontend_type>select</frontend_type>
73
- <source_model>channelpilot_adminhtml/articlenumber_values</source_model>
74
- <sort_order>3</sort_order>
75
- <show_in_default>1</show_in_default>
76
- <show_in_website>1</show_in_website>
77
- <show_in_store>1</show_in_store>
78
  </channelpilot_articlenumber>
79
  </fields>
80
  </channelpilot_general>
81
  </groups>
82
  </channelpilot_general>
83
  <channelpilot_tracking translate="label" module="channelpilot">
84
- <label>Tracking</label>
85
  <tab>channelpilot_config</tab>
86
  <frontend_type>text</frontend_type>
87
  <sort_order>2000</sort_order>
@@ -89,9 +97,16 @@
89
  <show_in_website>1</show_in_website>
90
  <show_in_store>1</show_in_store>
91
  <groups>
 
 
 
 
 
 
 
92
  <channelpilot_tracking translate="label">
93
- <label>Tracking Settings</label>
94
- <frontend_type>text</frontend_type>
95
  <expanded>1</expanded>
96
  <sort_order>2</sort_order>
97
  <show_in_default>1</show_in_default>
@@ -99,38 +114,38 @@
99
  <show_in_store>1</show_in_store>
100
  <fields>
101
  <channelpilot_useTracking>
102
- <label>Activate tracking?</label>
103
  <frontend_type>select</frontend_type>
104
- <source_model>channelpilot_adminhtml/truefalse_values</source_model>
105
- <sort_order>0</sort_order>
106
- <show_in_default>1</show_in_default>
107
- <show_in_website>1</show_in_website>
108
- <show_in_store>1</show_in_store>
109
  </channelpilot_useTracking>
110
  <channelpilot_cookiemode>
111
- <label>Cookiemode</label>
112
  <frontend_type>select</frontend_type>
113
- <source_model>channelpilot_adminhtml/cookiemode_values</source_model>
114
- <sort_order>1</sort_order>
115
- <show_in_default>1</show_in_default>
116
- <show_in_website>1</show_in_website>
117
- <show_in_store>1</show_in_store>
118
  </channelpilot_cookiemode>
119
  <channelpilot_trackingkeys>
120
- <label>Trackingkeys</label>
121
- <frontend_model>channelpilot_core/adminhtml_field_trackingkeys</frontend_model>
122
- <backend_model>adminhtml/system_config_backend_serialized_array</backend_model>
123
- <sort_order>2</sort_order>
124
- <show_in_default>1</show_in_default>
125
- <show_in_website>1</show_in_website>
126
- <show_in_store>1</show_in_store>
127
- </channelpilot_trackingkeys>
128
  </fields>
129
  </channelpilot_tracking>
130
  </groups>
131
  </channelpilot_tracking>
132
  <channelpilot_export translate="label" module="channelpilot">
133
- <label>Export</label>
134
  <tab>channelpilot_config</tab>
135
  <frontend_type>text</frontend_type>
136
  <sort_order>3000</sort_order>
@@ -138,9 +153,16 @@
138
  <show_in_website>1</show_in_website>
139
  <show_in_store>1</show_in_store>
140
  <groups>
 
 
 
 
 
 
 
141
  <channelpilot_productfeed translate="label">
142
- <label>Catalogue Export Settings</label>
143
- <frontend_type>text</frontend_type>
144
  <expanded>1</expanded>
145
  <sort_order>1</sort_order>
146
  <show_in_default>1</show_in_default>
@@ -148,17 +170,17 @@
148
  <show_in_store>1</show_in_store>
149
  <fields>
150
  <channelpilot_useExport>
151
- <label>Active export?</label>
152
  <frontend_type>select</frontend_type>
153
- <source_model>channelpilot_adminhtml/truefalse_values</source_model>
154
- <sort_order>0</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
  </channelpilot_useExport>
159
  <channelpilot_password translate="label">
160
- <label>Password</label>
161
- <comment>Protect your productfeed with a password. For example: 'www.testshop.com/channelpilot?password=12345'</comment>
162
  <frontend_type>password</frontend_type>
163
  <sort_order>1</sort_order>
164
  <show_in_default>1</show_in_default>
@@ -166,41 +188,51 @@
166
  <show_in_store>1</show_in_store>
167
  </channelpilot_password>
168
  <channelpilot_exportfields>
169
- <label>Select data fields</label>
170
- <comment>Select the data fields you want to provide on ChannelPilot. Some product attributes are always included. (Entity_Id, Sku, name, description, price, manufacturer, color, categories, product_url, image_url, additional_image_1, additional_image_2, additional_image_3, weight)</comment>
171
- <frontend_model>channelpilot_core/adminhtml_field_exportfields</frontend_model>
172
- <backend_model>adminhtml/system_config_backend_serialized_array</backend_model>
173
- <sort_order>2</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
- </channelpilot_exportfields>
178
  <channelpilot_specialexportfields>
179
- <label>Create static data fields</label>
180
- <comment>Set up additional data fields. These fields have for every product the same value. E.g. for additional delivery costs.</comment>
181
- <frontend_model>channelpilot_core/adminhtml_field_specialfields</frontend_model>
182
- <backend_model>adminhtml/system_config_backend_serialized_array</backend_model>
183
- <sort_order>3</sort_order>
184
- <show_in_default>1</show_in_default>
185
- <show_in_website>1</show_in_website>
186
- <show_in_store>1</show_in_store>
187
- </channelpilot_specialexportfields>
188
  <channelpilot_replacefields>
189
- <label>Product variant data fields</label>
190
- <comment>Select the data fields you want to be overwritten by the respective value of the parent article.</comment>
191
- <frontend_model>channelpilot_core/adminhtml_field_replacefields</frontend_model>
192
- <backend_model>adminhtml/system_config_backend_serialized_array</backend_model>
193
- <sort_order>4</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
- </channelpilot_replacefields>
 
 
 
 
 
 
 
 
 
 
198
  </fields>
199
  </channelpilot_productfeed>
200
  </groups>
201
  </channelpilot_export>
202
  <channelpilot_marketplace translate="label" module="channelpilot">
203
- <label>Marketplace</label>
204
  <tab>channelpilot_config</tab>
205
  <frontend_type>text</frontend_type>
206
  <sort_order>4000</sort_order>
@@ -208,9 +240,16 @@
208
  <show_in_website>1</show_in_website>
209
  <show_in_store>1</show_in_store>
210
  <groups>
 
 
 
 
 
 
 
211
  <channelpilot_marketplace translate="label">
212
- <label>Marketplace Connector</label>
213
- <frontend_type>text</frontend_type>
214
  <expanded>1</expanded>
215
  <sort_order>3</sort_order>
216
  <show_in_default>1</show_in_default>
@@ -218,20 +257,20 @@
218
  <show_in_store>1</show_in_store>
219
  <fields>
220
  <channelpilot_useMarketplaces>
221
- <label>Active</label>
222
  <frontend_type>select</frontend_type>
223
- <source_model>channelpilot_adminhtml/truefalse_values</source_model>
224
- <sort_order>0</sort_order>
225
- <show_in_default>1</show_in_default>
226
- <show_in_website>1</show_in_website>
227
- <show_in_store>1</show_in_store>
228
  </channelpilot_useMarketplaces>
229
  </fields>
230
  </channelpilot_marketplace>
231
  </groups>
232
  </channelpilot_marketplace>
233
  <channelpilot_pricecontrol translate="label" module="channelpilot">
234
- <label>Pricecontrol</label>
235
  <tab>channelpilot_config</tab>
236
  <frontend_type>text</frontend_type>
237
  <sort_order>5000</sort_order>
@@ -239,9 +278,16 @@
239
  <show_in_website>1</show_in_website>
240
  <show_in_store>1</show_in_store>
241
  <groups>
242
- <general translate="label">
243
- <label>General</label>
244
- <frontend_type>text</frontend_type>
 
 
 
 
 
 
 
245
  <expanded>1</expanded>
246
  <sort_order>1</sort_order>
247
  <show_in_default>1</show_in_default>
@@ -249,48 +295,58 @@
249
  <show_in_store>1</show_in_store>
250
  <fields>
251
  <channelpilot_usePricecontrol>
252
- <label>Active</label>
253
  <frontend_type>select</frontend_type>
254
- <source_model>channelpilot_adminhtml/truefalse_values</source_model>
255
- <sort_order>0</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
  </channelpilot_usePricecontrol>
260
- </fields>
261
- </general>
 
 
 
 
 
 
 
 
 
262
  <general_prices translate="label">
263
- <label>General Price Control</label>
264
- <frontend_type>text</frontend_type>
 
265
  <sort_order>2</sort_order>
266
  <show_in_default>1</show_in_default>
267
  <show_in_website>1</show_in_website>
268
  <show_in_store>1</show_in_store>
269
  <fields>
270
- <!-- <channelpilot_usePricecontrol>
271
  <label>Active</label>
272
  <frontend_type>select</frontend_type>
273
- <source_model>channelpilot_adminhtml/truefalse_values</source_model>
274
- <sort_order>0</sort_order>
275
- <show_in_default>1</show_in_default>
276
- <show_in_website>1</show_in_website>
277
- <show_in_store>1</show_in_store>
278
  </channelpilot_usePricecontrol>-->
279
  <channelpilot_generalPriceField>
280
- <label>Field for price</label>
281
- <comment>This field would be overwritten by the new product price.</comment>
282
  <frontend_type>select</frontend_type>
283
- <source_model>channelpilot_adminhtml/pricefield_values</source_model>
284
- <sort_order>1</sort_order>
285
- <show_in_default>1</show_in_default>
286
- <show_in_website>1</show_in_website>
287
- <show_in_store>1</show_in_store>
288
  </channelpilot_generalPriceField>
289
  </fields>
290
  </general_prices>
291
- <!-- <campaign_prices translate="label">
292
  <label>Campaign Price Control</label>
293
- <frontend_type>text</frontend_type>
294
  <sort_order>3</sort_order>
295
  <show_in_default>1</show_in_default>
296
  <show_in_website>1</show_in_website>
@@ -299,15 +355,66 @@
299
  <channelpilot_usePricecontrol>
300
  <label>Active</label>
301
  <frontend_type>select</frontend_type>
302
- <source_model>channelpilot_adminhtml/truefalse_values</source_model>
303
- <sort_order>0</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
  </channelpilot_usePricecontrol>
308
  </fields>
309
  </campaign_prices>-->
310
  </groups>
311
  </channelpilot_pricecontrol>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
312
  </sections>
313
  </config>
24
  <config>
25
  <tabs>
26
  <channelpilot_config translate="label" module="channelpilot">
27
+ <!--<label>Channelpilot</label>-->
28
+ <label><![CDATA[<div style="overflow:hidden; background-image: url('https://go.channelpilot.com/css/gfx/logo.channelPilot.png');background-size: 150px; background-repeat: no-repeat; background-position: -4px -9px;"><div style="display:block; height: 20px;"></div></div>]]></label>
29
+ <class>tab-channelpilot</class>
30
  <sort_order>401</sort_order>
31
  </channelpilot_config>
32
  </tabs>
33
  <sections>
34
  <channelpilot_general translate="label" module="channelpilot">
35
+ <label>CP General</label>
36
  <tab>channelpilot_config</tab>
37
  <frontend_type>text</frontend_type>
38
  <sort_order>1000</sort_order>
40
  <show_in_website>1</show_in_website>
41
  <show_in_store>1</show_in_store>
42
  <groups>
43
+ <hint>
44
+ <frontend_model>channelpilot_core/adminhtml_hintlogo</frontend_model>
45
+ <sort_order>0</sort_order>
46
+ <show_in_default>1</show_in_default>
47
+ <show_in_website>1</show_in_website>
48
+ <show_in_store>1</show_in_store>
49
+ </hint>
50
  <channelpilot_general translate="label">
51
+ <label>CP General Settings</label>
52
+ <frontend_type>text</frontend_type>
53
  <expanded>1</expanded>
54
  <sort_order>1</sort_order>
55
  <show_in_default>1</show_in_default>
57
  <show_in_store>1</show_in_store>
58
  <fields>
59
  <channelpilot_useNews>
60
+ <label>CP Activate backendnews?</label>
61
  <frontend_type>select</frontend_type>
62
+ <source_model>adminhtml/system_config_source_yesno</source_model>
63
+ <sort_order>1</sort_order>
64
+ <show_in_default>1</show_in_default>
65
+ <show_in_website>1</show_in_website>
66
+ <show_in_store>1</show_in_store>
67
  </channelpilot_useNews>
68
  <channelpilot_checkIp>
69
+ <label>CP Should the IP for API access be checked?</label>
70
  <frontend_type>select</frontend_type>
71
+ <source_model>adminhtml/system_config_source_yesno</source_model>
72
+ <sort_order>2</sort_order>
73
+ <show_in_default>1</show_in_default>
74
+ <show_in_website>1</show_in_website>
75
+ <show_in_store>1</show_in_store>
76
  </channelpilot_checkIp>
77
  <channelpilot_articlenumber>
78
+ <label>CP Articlenumber</label>
79
+ <comment>CP This applies to the tracking as well as the marketplace integration or the repricing.</comment>
80
  <frontend_type>select</frontend_type>
81
+ <source_model>channelpilot_adminhtml/articlenumber_values</source_model>
82
+ <sort_order>3</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
  </channelpilot_articlenumber>
87
  </fields>
88
  </channelpilot_general>
89
  </groups>
90
  </channelpilot_general>
91
  <channelpilot_tracking translate="label" module="channelpilot">
92
+ <label>CP Tracking</label>
93
  <tab>channelpilot_config</tab>
94
  <frontend_type>text</frontend_type>
95
  <sort_order>2000</sort_order>
97
  <show_in_website>1</show_in_website>
98
  <show_in_store>1</show_in_store>
99
  <groups>
100
+ <hint>
101
+ <frontend_model>channelpilot_core/adminhtml_hintlogo</frontend_model>
102
+ <sort_order>0</sort_order>
103
+ <show_in_default>1</show_in_default>
104
+ <show_in_website>1</show_in_website>
105
+ <show_in_store>1</show_in_store>
106
+ </hint>
107
  <channelpilot_tracking translate="label">
108
+ <label>CP Tracking Settings</label>
109
+ <frontend_type>text</frontend_type>
110
  <expanded>1</expanded>
111
  <sort_order>2</sort_order>
112
  <show_in_default>1</show_in_default>
114
  <show_in_store>1</show_in_store>
115
  <fields>
116
  <channelpilot_useTracking>
117
+ <label>CP Activate?</label>
118
  <frontend_type>select</frontend_type>
119
+ <source_model>adminhtml/system_config_source_yesno</source_model>
120
+ <sort_order>0</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
  </channelpilot_useTracking>
125
  <channelpilot_cookiemode>
126
+ <label>CP Cookiemode</label>
127
  <frontend_type>select</frontend_type>
128
+ <source_model>channelpilot_adminhtml/cookiemode_values</source_model>
129
+ <sort_order>1</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
  </channelpilot_cookiemode>
134
  <channelpilot_trackingkeys>
135
+ <label>CP Trackingkeys</label>
136
+ <frontend_model>channelpilot_core/adminhtml_field_trackingkeys</frontend_model>
137
+ <backend_model>adminhtml/system_config_backend_serialized_array</backend_model>
138
+ <sort_order>2</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
+ </channelpilot_trackingkeys>
143
  </fields>
144
  </channelpilot_tracking>
145
  </groups>
146
  </channelpilot_tracking>
147
  <channelpilot_export translate="label" module="channelpilot">
148
+ <label>CP Data Feed Export</label>
149
  <tab>channelpilot_config</tab>
150
  <frontend_type>text</frontend_type>
151
  <sort_order>3000</sort_order>
153
  <show_in_website>1</show_in_website>
154
  <show_in_store>1</show_in_store>
155
  <groups>
156
+ <hint>
157
+ <frontend_model>channelpilot_core/adminhtml_hintlogo</frontend_model>
158
+ <sort_order>0</sort_order>
159
+ <show_in_default>1</show_in_default>
160
+ <show_in_website>1</show_in_website>
161
+ <show_in_store>1</show_in_store>
162
+ </hint>
163
  <channelpilot_productfeed translate="label">
164
+ <label>CP Export Settings</label>
165
+ <frontend_type>text</frontend_type>
166
  <expanded>1</expanded>
167
  <sort_order>1</sort_order>
168
  <show_in_default>1</show_in_default>
170
  <show_in_store>1</show_in_store>
171
  <fields>
172
  <channelpilot_useExport>
173
+ <label>CP Activate?</label>
174
  <frontend_type>select</frontend_type>
175
+ <source_model>adminhtml/system_config_source_yesno</source_model>
176
+ <sort_order>0</sort_order>
177
+ <show_in_default>1</show_in_default>
178
+ <show_in_website>1</show_in_website>
179
+ <show_in_store>1</show_in_store>
180
  </channelpilot_useExport>
181
  <channelpilot_password translate="label">
182
+ <label>CP Password</label>
183
+ <comment>CP Protect your data feed with a password. For example: 'www.testshop.com/channelpilot?password=12345'</comment>
184
  <frontend_type>password</frontend_type>
185
  <sort_order>1</sort_order>
186
  <show_in_default>1</show_in_default>
188
  <show_in_store>1</show_in_store>
189
  </channelpilot_password>
190
  <channelpilot_exportfields>
191
+ <label>CP Select data fields</label>
192
+ <comment>CP Select the data fields you want to provide on ChannelPilot. Some product attributes are always included. (Entity_Id, Sku, name, description, price, manufacturer, color, categories, product_url, image_url, additional_image_1, additional_image_2, additional_image_3, weight)</comment>
193
+ <frontend_model>channelpilot_core/adminhtml_field_exportfields</frontend_model>
194
+ <backend_model>adminhtml/system_config_backend_serialized_array</backend_model>
195
+ <sort_order>2</sort_order>
196
+ <show_in_default>1</show_in_default>
197
+ <show_in_website>1</show_in_website>
198
+ <show_in_store>1</show_in_store>
199
+ </channelpilot_exportfields>
200
  <channelpilot_specialexportfields>
201
+ <label>CP Create static data fields</label>
202
+ <comment>CP Set up additional data fields. These fields have for every product the same value. E.g. for additional delivery costs.</comment>
203
+ <frontend_model>channelpilot_core/adminhtml_field_specialfields</frontend_model>
204
+ <backend_model>adminhtml/system_config_backend_serialized_array</backend_model>
205
+ <sort_order>3</sort_order>
206
+ <show_in_default>1</show_in_default>
207
+ <show_in_website>1</show_in_website>
208
+ <show_in_store>1</show_in_store>
209
+ </channelpilot_specialexportfields>
210
  <channelpilot_replacefields>
211
+ <label>CP Product variant data fields</label>
212
+ <comment>CP Select the data fields you want to be overwritten by the respective value of the parent article.</comment>
213
+ <frontend_model>channelpilot_core/adminhtml_field_replacefields</frontend_model>
214
+ <backend_model>adminhtml/system_config_backend_serialized_array</backend_model>
215
+ <sort_order>4</sort_order>
216
+ <show_in_default>1</show_in_default>
217
+ <show_in_website>1</show_in_website>
218
+ <show_in_store>1</show_in_store>
219
+ </channelpilot_replacefields>
220
+ <channelpilot_imagenumber>
221
+ <label>CP Number additional productimages</label>
222
+ <comment>CP How many additional product images should be exported?</comment>
223
+ <frontend_type>select</frontend_type>
224
+ <source_model>channelpilot_adminhtml/imagenumber_values</source_model>
225
+ <sort_order>5</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
+ </channelpilot_imagenumber>
230
  </fields>
231
  </channelpilot_productfeed>
232
  </groups>
233
  </channelpilot_export>
234
  <channelpilot_marketplace translate="label" module="channelpilot">
235
+ <label>CP Marketplace Integration</label>
236
  <tab>channelpilot_config</tab>
237
  <frontend_type>text</frontend_type>
238
  <sort_order>4000</sort_order>
240
  <show_in_website>1</show_in_website>
241
  <show_in_store>1</show_in_store>
242
  <groups>
243
+ <hint>
244
+ <frontend_model>channelpilot_core/adminhtml_hintlogo</frontend_model>
245
+ <sort_order>0</sort_order>
246
+ <show_in_default>1</show_in_default>
247
+ <show_in_website>1</show_in_website>
248
+ <show_in_store>1</show_in_store>
249
+ </hint>
250
  <channelpilot_marketplace translate="label">
251
+ <label>CP Marketplace Integration Settings</label>
252
+ <frontend_type>text</frontend_type>
253
  <expanded>1</expanded>
254
  <sort_order>3</sort_order>
255
  <show_in_default>1</show_in_default>
257
  <show_in_store>1</show_in_store>
258
  <fields>
259
  <channelpilot_useMarketplaces>
260
+ <label>CP Activate?</label>
261
  <frontend_type>select</frontend_type>
262
+ <source_model>adminhtml/system_config_source_yesno</source_model>
263
+ <sort_order>0</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
  </channelpilot_useMarketplaces>
268
  </fields>
269
  </channelpilot_marketplace>
270
  </groups>
271
  </channelpilot_marketplace>
272
  <channelpilot_pricecontrol translate="label" module="channelpilot">
273
+ <label>CP Repricing</label>
274
  <tab>channelpilot_config</tab>
275
  <frontend_type>text</frontend_type>
276
  <sort_order>5000</sort_order>
278
  <show_in_website>1</show_in_website>
279
  <show_in_store>1</show_in_store>
280
  <groups>
281
+ <hint>
282
+ <frontend_model>channelpilot_core/adminhtml_hintlogo</frontend_model>
283
+ <sort_order>0</sort_order>
284
+ <show_in_default>1</show_in_default>
285
+ <show_in_website>1</show_in_website>
286
+ <show_in_store>1</show_in_store>
287
+ </hint>
288
+ <channelpilot_general translate="label">
289
+ <label>CP Repricing Settings</label>
290
+ <frontend_type>text</frontend_type>
291
  <expanded>1</expanded>
292
  <sort_order>1</sort_order>
293
  <show_in_default>1</show_in_default>
295
  <show_in_store>1</show_in_store>
296
  <fields>
297
  <channelpilot_usePricecontrol>
298
+ <label>CP Activate?</label>
299
  <frontend_type>select</frontend_type>
300
+ <source_model>adminhtml/system_config_source_yesno</source_model>
301
+ <sort_order>0</sort_order>
302
+ <show_in_default>1</show_in_default>
303
+ <show_in_website>1</show_in_website>
304
+ <show_in_store>1</show_in_store>
305
  </channelpilot_usePricecontrol>
306
+ <channelpilot_saveGrossOrNetPrices>
307
+ <label>CP Save prices net or gross?</label>
308
+ <frontend_type>select</frontend_type>
309
+ <source_model>channelpilot_adminhtml/grossnet_values</source_model>
310
+ <sort_order>1</sort_order>
311
+ <show_in_default>1</show_in_default>
312
+ <show_in_website>1</show_in_website>
313
+ <show_in_store>1</show_in_store>
314
+ </channelpilot_saveGrossOrNetPrices>
315
+ </fields>
316
+ </channelpilot_general>
317
  <general_prices translate="label">
318
+ <label>CP General Repricing</label>
319
+ <frontend_type>text</frontend_type>
320
+ <expanded>1</expanded>
321
  <sort_order>2</sort_order>
322
  <show_in_default>1</show_in_default>
323
  <show_in_website>1</show_in_website>
324
  <show_in_store>1</show_in_store>
325
  <fields>
326
+ <!-- <channelpilot_usePricecontrol>
327
  <label>Active</label>
328
  <frontend_type>select</frontend_type>
329
+ <source_model>channelpilot_adminhtml/truefalse_values</source_model>
330
+ <sort_order>0</sort_order>
331
+ <show_in_default>1</show_in_default>
332
+ <show_in_website>1</show_in_website>
333
+ <show_in_store>1</show_in_store>
334
  </channelpilot_usePricecontrol>-->
335
  <channelpilot_generalPriceField>
336
+ <label>CP Field for price</label>
337
+ <comment>CP This field would be overwritten by the new product price.</comment>
338
  <frontend_type>select</frontend_type>
339
+ <source_model>channelpilot_adminhtml/pricefield_values</source_model>
340
+ <sort_order>1</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
  </channelpilot_generalPriceField>
345
  </fields>
346
  </general_prices>
347
+ <!-- <campaign_prices translate="label">
348
  <label>Campaign Price Control</label>
349
+ <frontend_type>text</frontend_type>
350
  <sort_order>3</sort_order>
351
  <show_in_default>1</show_in_default>
352
  <show_in_website>1</show_in_website>
355
  <channelpilot_usePricecontrol>
356
  <label>Active</label>
357
  <frontend_type>select</frontend_type>
358
+ <source_model>channelpilot_adminhtml/truefalse_values</source_model>
359
+ <sort_order>0</sort_order>
360
+ <show_in_default>1</show_in_default>
361
+ <show_in_website>1</show_in_website>
362
+ <show_in_store>1</show_in_store>
363
  </channelpilot_usePricecontrol>
364
  </fields>
365
  </campaign_prices>-->
366
  </groups>
367
  </channelpilot_pricecontrol>
368
+ <payment>
369
+ <groups>
370
+ <cp_mp translate="label comment" module="channelpilot">
371
+ <label>CP ChannelPilot-Payment</label>
372
+ <expanded>1</expanded>
373
+ <sort_order>670</sort_order>
374
+ <show_in_default>1</show_in_default>
375
+ <show_in_website>1</show_in_website>
376
+ <show_in_store>0</show_in_store>
377
+ <comment>CP !!!This is no real payment method!!!</comment>
378
+ <fields>
379
+ <title translate="label">
380
+ <label>CP Title</label>
381
+ <frontend_type>text</frontend_type>
382
+ <sort_order>1</sort_order>
383
+ <show_in_default>1</show_in_default>
384
+ <show_in_website>1</show_in_website>
385
+ <show_in_store>0</show_in_store>
386
+ </title>
387
+ <active translate="label">
388
+ <label>CP Activate?</label>
389
+ <frontend_type>select</frontend_type>
390
+ <source_model>adminhtml/system_config_source_yesno</source_model>
391
+ <sort_order>2</sort_order>
392
+ <show_in_default>1</show_in_default>
393
+ <show_in_website>1</show_in_website>
394
+ <show_in_store>0</show_in_store>
395
+ </active>
396
+ <order_status translate="label">
397
+ <label>CP Order Status</label>
398
+ <frontend_type>select</frontend_type>
399
+ <source_model>adminhtml/system_config_source_order_status_processing</source_model>
400
+ <sort_order>3</sort_order>
401
+ <show_in_default>1</show_in_default>
402
+ <show_in_website>1</show_in_website>
403
+ <show_in_store>0</show_in_store>
404
+ </order_status>
405
+ <types translate="label">
406
+ <label>CP Payment Types</label>
407
+ <frontend_type>multiselect</frontend_type>
408
+ <source_model>channelpilot/paymenttypes</source_model>
409
+ <sort_order>4</sort_order>
410
+ <show_in_default>1</show_in_default>
411
+ <show_in_website>1</show_in_website>
412
+ <show_in_store>0</show_in_store>
413
+ <can_be_empty>1</can_be_empty>
414
+ </types>
415
+ </fields>
416
+ </cp_mp>
417
+ </groups>
418
+ </payment>
419
  </sections>
420
  </config>
app/code/community/Channelpilotsolutions/Channelpilot/sql/channelpilot_setup/mysql4-install-2.0.0.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  $installer = $this;
3
 
4
  $installer->startSetup();
@@ -10,152 +11,152 @@ $adapter = $installer->getConnection();
10
  * Create table 'channelpilot/registration'
11
  */
12
  $table = $adapter->newTable($installer->getTable('channelpilot/registration'))
13
- ->addColumn('shopId', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(
14
- 'nullable' => false,
15
- 'primary' => true
16
- ), 'shopId')
17
- ->addColumn('ips_authorized', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(
18
- 'nullable' => false
19
- ), 'ips_authorized')
20
- ->addColumn('merchantId', Varien_Db_Ddl_Table::TYPE_VARCHAR, 150, array(
21
- 'nullable' => false
22
- ), 'merchantId')
23
- ->addColumn('securityToken', Varien_Db_Ddl_Table::TYPE_VARCHAR, 150, array(
24
- 'nullable' => false
25
- ), 'securityToken')
26
- ->addColumn('last_stock_update', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(
27
- 'nullable' => true
28
- ), 'last_stock_update')
29
- ->addColumn('last_price_update', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(
30
- 'nullable' => true
31
- ), 'last_price_update')
32
- ->addColumn('last_catalog_update', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(
33
- 'nullable' => true
34
- ), 'last_catalog_update')
35
- ->addIndex(
36
- $installer->getIdxName(
37
- $installer->getTable('channelpilot/registration'),
38
- array('merchantId', 'securityToken'),
39
- Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE
40
- ),
41
- array('merchantId', 'securityToken'),
42
- array('type' => Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE)
43
- );
44
  $adapter->createTable($table);
45
 
46
  /**
47
  * Create table 'channelpilot/orders'
48
  */
49
  $table = $adapter->newTable($installer->getTable('channelpilot/orders'))
50
- ->addColumn('order_id', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(
51
- 'nullable' => false,
52
- 'primary' => true
53
- ), 'order_id')
54
- ->addColumn('order_nr', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(
55
- 'nullable' => false
56
- ), 'order_nr')
57
- ->addColumn('marketplace_order_id', Varien_Db_Ddl_Table::TYPE_VARCHAR, 150, array(
58
- 'nullable' => false
59
- ), 'marketplace_order_id')
60
- ->addColumn('marketplace', Varien_Db_Ddl_Table::TYPE_VARCHAR, 150, array(
61
- 'nullable' => false
62
- ), 'marketplace')
63
- ->addColumn('shop', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(
64
- 'nullable' => false
65
- ), 'shop')
66
- ->addColumn('created', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(
67
- 'default' => Varien_Db_Ddl_Table::TIMESTAMP_INIT,
68
- 'nullable' => false
69
- ), 'created')
70
- ->addColumn('status', Varien_Db_Ddl_Table::TYPE_INTEGER, 10, array(
71
- 'nullable' => true
72
- ), 'status')
73
- ->addIndex($installer->getIdxName(
74
- 'channelpilot/orders',
75
- array('order_nr'),
76
- Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE
77
- ),
78
- array('order_nr'),
79
- array('type' => Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE)
80
- )
81
- ->addIndex(
82
- $installer->getIdxName(
83
- $installer->getTable('channelpilot/orders'),
84
- array('marketplace_order_id', 'marketplace'),
85
- Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE
86
- ),
87
- array('marketplace_order_id', 'marketplace'),
88
- array('type' => Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE)
89
- );
90
  $adapter->createTable($table);
91
 
92
  /**
93
  * Create table 'channelpilot/order_items'
94
  */
95
  $table = $adapter->newTable($installer->getTable('channelpilot/items'))
96
- ->addColumn('order_item_id', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(
97
- 'nullable' => false,
98
- 'primary' => true
99
- ), 'order_item_id')
100
- ->addColumn('marketplace_order_item_id', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(
101
- 'nullable' => false
102
- ), 'marketplace_order_item_id')
103
- ->addColumn('order_id', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(
104
- 'nullable' => false
105
- ), 'order_id')
106
- ->addColumn('cancelled', Varien_Db_Ddl_Table::TYPE_INTEGER, 11, array(
107
- 'default' => 0,
108
- 'nullable' => false
109
- ), 'cancelled')
110
- ->addColumn('amount', Varien_Db_Ddl_Table::TYPE_INTEGER, 11, array(
111
- 'default' => 0,
112
- 'nullable' => false
113
- ), 'amount')
114
- ->addColumn('amount_delivered', Varien_Db_Ddl_Table::TYPE_INTEGER, 11, array(
115
- 'default' => 0,
116
- 'nullable' => false
117
- ), 'amount_delivered')
118
- ->addIndex($installer->getIdxName(
119
- 'channelpilot/items',
120
- array('order_item_id'),
121
- Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE
122
- ),
123
- array('order_item_id'),
124
- array('type' => Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE)
125
- )
126
- ->addIndex($installer->getIdxName(
127
- 'channelpilot/items',
128
- array('marketplace_order_item_id'),
129
- Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE
130
- ),
131
- array('marketplace_order_item_id'),
132
- array('type' => Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE)
133
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
  $adapter->createTable($table);
135
 
136
  /**
137
  * Create table 'channelpilot/logs'
138
  */
139
  $table = $adapter->newTable($installer->getTable('channelpilot/logs'))
140
- ->addColumn('id', Varien_Db_Ddl_Table::TYPE_INTEGER, 11, array(
141
  'auto_increment' => true,
142
- 'nullable' => false,
143
- 'primary' => true
144
- ), 'id')
145
- ->addColumn('created', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(
146
- 'default' => Varien_Db_Ddl_Table::TIMESTAMP_INIT,
147
- 'nullable' => false
148
- ), 'created')
149
- ->addColumn('content', Varien_Db_Ddl_Table::TYPE_TEXT, '64k', array(
150
- 'nullable' => false
151
- ), 'content')
152
- ->addIndex($installer->getIdxName(
153
- 'channelpilot/logs',
154
- array('created')
155
- ),
156
- array('created'));
157
  $adapter->createTable($table);
158
-
159
  $installer->endSetup();
160
 
161
 
1
  <?php
2
+
3
  $installer = $this;
4
 
5
  $installer->startSetup();
11
  * Create table 'channelpilot/registration'
12
  */
13
  $table = $adapter->newTable($installer->getTable('channelpilot/registration'))
14
+ ->addColumn('shopId', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(
15
+ 'nullable' => false,
16
+ 'primary' => true
17
+ ), 'shopId')
18
+ ->addColumn('ips_authorized', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(
19
+ 'nullable' => false
20
+ ), 'ips_authorized')
21
+ ->addColumn('merchantId', Varien_Db_Ddl_Table::TYPE_VARCHAR, 150, array(
22
+ 'nullable' => false
23
+ ), 'merchantId')
24
+ ->addColumn('securityToken', Varien_Db_Ddl_Table::TYPE_VARCHAR, 150, array(
25
+ 'nullable' => false
26
+ ), 'securityToken')
27
+ ->addColumn('last_stock_update', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(
28
+ 'nullable' => true
29
+ ), 'last_stock_update')
30
+ ->addColumn('last_price_update', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(
31
+ 'nullable' => true
32
+ ), 'last_price_update')
33
+ ->addColumn('last_catalog_update', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(
34
+ 'nullable' => true
35
+ ), 'last_catalog_update')
36
+ ->addIndex(
37
+ $installer->getIdxName(
38
+ $installer->getTable('channelpilot/registration'), array('merchantId', 'securityToken'), Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE
39
+ ), array('merchantId', 'securityToken'), array('type' => Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE)
40
+ );
 
 
 
 
41
  $adapter->createTable($table);
42
 
43
  /**
44
  * Create table 'channelpilot/orders'
45
  */
46
  $table = $adapter->newTable($installer->getTable('channelpilot/orders'))
47
+ ->addColumn('order_id', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(
48
+ 'nullable' => false,
49
+ 'primary' => true
50
+ ), 'order_id')
51
+ ->addColumn('order_nr', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(
52
+ 'nullable' => false
53
+ ), 'order_nr')
54
+ ->addColumn('marketplace_order_id', Varien_Db_Ddl_Table::TYPE_VARCHAR, 150, array(
55
+ 'nullable' => false
56
+ ), 'marketplace_order_id')
57
+ ->addColumn('marketplace', Varien_Db_Ddl_Table::TYPE_VARCHAR, 150, array(
58
+ 'nullable' => false
59
+ ), 'marketplace')
60
+ ->addColumn('shop', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(
61
+ 'nullable' => false
62
+ ), 'shop')
63
+ ->addColumn('created', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(
64
+ 'default' => Varien_Db_Ddl_Table::TIMESTAMP_INIT,
65
+ 'nullable' => false
66
+ ), 'created')
67
+ ->addColumn('status', Varien_Db_Ddl_Table::TYPE_INTEGER, 10, array(
68
+ 'nullable' => true
69
+ ), 'status')
70
+ ->addIndex($installer->getIdxName(
71
+ 'channelpilot/orders', array('order_nr'), Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE
72
+ ), array('order_nr'), array('type' => Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE)
73
+ )
74
+ ->addIndex(
75
+ $installer->getIdxName(
76
+ $installer->getTable('channelpilot/orders'), array('marketplace_order_id', 'marketplace'), Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE
77
+ ), array('marketplace_order_id', 'marketplace'), array('type' => Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE)
78
+ );
 
 
 
 
 
 
 
 
79
  $adapter->createTable($table);
80
 
81
  /**
82
  * Create table 'channelpilot/order_items'
83
  */
84
  $table = $adapter->newTable($installer->getTable('channelpilot/items'))
85
+ ->addColumn('id', Varien_Db_Ddl_Table::TYPE_INTEGER, 11, array(
86
+ 'auto_increment' => true,
87
+ 'unsigned' => true,
88
+ 'nullable' => false,
89
+ 'primary' => true,
90
+ ), 'id')
91
+ ->addColumn('order_item_id', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(
92
+ 'nullable' => false,
93
+ ), 'order_item_id')
94
+ ->addColumn('marketplace_order_item_id', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(
95
+ 'nullable' => false
96
+ ), 'marketplace_order_item_id')
97
+ ->addColumn('order_id', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(
98
+ 'nullable' => false
99
+ ), 'order_id')
100
+ ->addColumn('cancelled', Varien_Db_Ddl_Table::TYPE_INTEGER, 11, array(
101
+ 'default' => 0,
102
+ 'nullable' => false
103
+ ), 'cancelled')
104
+ ->addColumn('amount', Varien_Db_Ddl_Table::TYPE_INTEGER, 11, array(
105
+ 'default' => 0,
106
+ 'nullable' => false
107
+ ), 'amount')
108
+ ->addColumn('amount_delivered', Varien_Db_Ddl_Table::TYPE_INTEGER, 11, array(
109
+ 'default' => 0,
110
+ 'nullable' => false
111
+ ), 'amount_delivered')
112
+ ->addIndex($installer->getIdxName(
113
+ 'channelpilot/items', array('order_item_id'), Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE
114
+ ), array('order_item_id'), array('type' => Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE)
115
+ )
116
+ ->addIndex($installer->getIdxName(
117
+ 'channelpilot/items', array('marketplace_order_item_id'), Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE
118
+ ), array('marketplace_order_item_id'), array('type' => Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE)
119
+ )
120
+ ->addIndex($installer->getIdxName(
121
+ $installer->getTable('channelpilot/items'), array('marketplace_order_item_id', 'order_item_id'), Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE
122
+ ), array('marketplace_order_item_id', 'order_item_id'), array('type' => Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE)
123
+ );
124
+ $adapter->createTable($table);
125
+
126
+ /**
127
+ * Create table 'channelpilot/prices'
128
+ */
129
+ $table = $adapter->newTable($installer->getTable('channelpilot/prices'))
130
+ ->addColumn('price_id', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(
131
+ 'nullable' => false,
132
+ 'primary' => true
133
+ ), 'price_id')
134
+ ->addColumn('last_price_update', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(
135
+ 'nullable' => true
136
+ ), 'last_price_update');
137
  $adapter->createTable($table);
138
 
139
  /**
140
  * Create table 'channelpilot/logs'
141
  */
142
  $table = $adapter->newTable($installer->getTable('channelpilot/logs'))
143
+ ->addColumn('id', Varien_Db_Ddl_Table::TYPE_INTEGER, 11, array(
144
  'auto_increment' => true,
145
+ 'nullable' => false,
146
+ 'primary' => true
147
+ ), 'id')
148
+ ->addColumn('created', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(
149
+ 'default' => Varien_Db_Ddl_Table::TIMESTAMP_INIT,
150
+ 'nullable' => false
151
+ ), 'created')
152
+ ->addColumn('content', Varien_Db_Ddl_Table::TYPE_TEXT, '64k', array(
153
+ 'nullable' => false
154
+ ), 'content')
155
+ ->addIndex($installer->getIdxName(
156
+ 'channelpilot/logs', array('created')
157
+ ), array('created'));
 
 
158
  $adapter->createTable($table);
159
+
160
  $installer->endSetup();
161
 
162
 
app/design/adminhtml/base/default/template/Channelpilotsolutions/array_dropdown.phtml DELETED
@@ -1,174 +0,0 @@
1
- <?php
2
- /**
3
- *
4
- * NOTICE OF LICENSE
5
- *
6
- * This source file is subject to the GNU General Public License (GPL 3)
7
- * that is bundled with this package in the file LICENSE.txt
8
- *
9
- * DISCLAIMER
10
- *
11
- * Do not edit or add to this file if you wish to upgrade Channelpilotsolutions_Channelpilot to newer
12
- * versions in the future. If you wish to customize Channelpilotsolutions_Channelpilot for your
13
- * needs please refer to http://www.channelpilot.com for more information.
14
- *
15
- * @category Channelpilotsolutions
16
- * @package design_adminhtml_base_default
17
- * @subpackage template_channelpilotsolutions
18
- * @copyright Copyright (c) 2012 <info@channelpilot.com> - www.channelpilot.com
19
- * @author Peter Hoffmann <info@channelpilot.com>
20
- * @license <http://www.gnu.org/licenses/> GNU General Public License (GPL 3)
21
- * @link http://www.channelpilot.com
22
- */
23
- ?>
24
-
25
- <?php
26
- $_htmlId = $this->getHtmlId() ? $this->getHtmlId() : '_' . uniqid();
27
-
28
- $_colspan = 2;
29
- if (!$this->_addAfter) {
30
- $_colspan -= 1;
31
- }
32
- $_colspan = $_colspan > 1 ? 'colspan="' . $_colspan . '"' : '';
33
- ?>
34
-
35
- <div class="grid" id="grid<?php echo $_htmlId ?>">
36
- <table cellpadding="0" cellspacing="0" class="border">
37
- <tbody>
38
-
39
- <tr class="headings" id="headings<?php echo $_htmlId ?>">
40
- <?php foreach ($this->_columns as $columnName => $column):?>
41
- <th><?php echo $column['label'] ?></th>
42
- <?php endforeach;?>
43
- <th <?php echo $_colspan?>></th>
44
- </tr>
45
-
46
- <tr id="addRow<?php echo $_htmlId ?>">
47
- <td colspan="<?php echo count($this->_columns) ?>"></td>
48
- <td <?php echo $_colspan?>>
49
- <button style="" onclick="" class="scalable add" type="button" id="addToEndBtn<?php echo $_htmlId ?>">
50
- <span><span><span><?php echo $this->_addButtonLabel ?></span></span></span>
51
- </button>
52
- </td>
53
- </tr>
54
-
55
- </tbody>
56
- </table>
57
- <input type="hidden" name="<?php echo $this->getElement()->getName() ?>[__empty]" value="" />
58
- </div>
59
- <div id="empty<?php echo $_htmlId ?>">
60
- <button style="" onclick="" class="scalable add" type="button" id="emptyAddBtn<?php echo $_htmlId ?>">
61
- <span><span><span><?php echo $this->_addButtonLabel ?></span></span></span>
62
- </button>
63
- </div>
64
-
65
- <script type="text/javascript">
66
- //<![CDATA[
67
- // create row creator
68
- var arrayRow<?php echo $_htmlId ?> = {
69
- // define row prototypeJS template
70
- template : new Template(
71
- '<tr id="#{_id}">'
72
- <?php foreach ($this->_columns as $columnName => $column):?>
73
- +'<td class="#{_id}-<?php echo $columnName?>">'
74
- +'<?php echo $this->_renderCellTemplate($columnName)?>'
75
- +'<\/td>'
76
- <?php endforeach;?>
77
- <?php if ($this->_addAfter):?>
78
- +'<td><button onclick="" class="scalable add" type="button" id="addAfterBtn#{_id}"><span><span><span><?php echo Mage::helper('adminhtml')->__('Add after') ?><\/span><\/span><\/span><\/button><\/td>'
79
- <?php endif;?>
80
- +'<td><button onclick="arrayRow<?php echo $_htmlId ?>.del(\'#{_id}\')" class="scalable delete" type="button"><span><span><span><?php echo Mage::helper('adminhtml')->__('Delete') ?><\/span><\/span><\/span><\/button><\/td>'
81
- +'<\/tr>'
82
- ),
83
-
84
- rowsCount : 0,
85
-
86
- add : function(templateData, insertAfterId)
87
- {
88
- // generate default template data
89
- if ('' == templateData) {
90
- var d = new Date();
91
- var templateData = {
92
- <?php foreach ($this->_columns as $columnName => $column):?>
93
- <?php echo $columnName ?> : '',
94
- <?php endforeach;?>
95
- _id : '_' + d.getTime() + '_' + d.getMilliseconds()
96
- };
97
- }
98
-
99
- // insert before last row
100
- if ('' == insertAfterId) {
101
- Element.insert($('addRow<?php echo $_htmlId ?>'), {before: this.template.evaluate(templateData)});
102
- }
103
- // insert after specified row
104
- else {
105
- Element.insert($(insertAfterId), {after: this.template.evaluate(templateData)});
106
- }
107
-
108
- // set the selected drop-down list item
109
- <?php foreach ($this->_columns as $columnName => $column):?>
110
- var options = $$('td.' + templateData._id + '-' + '<?php echo $columnName?>' + ' option')
111
- for(var index = 0; index < options.length; ++index)
112
- {
113
- var option = options[index]
114
- if(option.getAttribute('value') == templateData.<?php echo $columnName?>)
115
- {
116
- option.selected = true
117
- }
118
- }
119
- <?php endforeach;?>
120
-
121
- <?php if ($this->_addAfter):?>
122
- Event.observe('addAfterBtn' + templateData._id, 'click', this.add.bind(this, '', templateData._id));
123
- <?php endif;?>
124
-
125
- this.rowsCount += 1;
126
- },
127
-
128
- del : function(rowId)
129
- {
130
- $(rowId).remove();
131
- this.rowsCount -= 1;
132
- if (0 == this.rowsCount) {
133
- this.showButtonOnly();
134
- }
135
- },
136
-
137
- showButtonOnly : function()
138
- {
139
- $('grid<?php echo $_htmlId ?>').hide();
140
- $('empty<?php echo $_htmlId ?>').show();
141
- }
142
- }
143
-
144
- // bind add action to "Add" button in last row
145
- Event.observe('addToEndBtn<?php echo $_htmlId ?>', 'click', arrayRow<?php echo $_htmlId ?>.add.bind(arrayRow<?php echo $_htmlId ?>, '', ''));
146
-
147
- // add existing rows
148
- <?php
149
- $_addAfterId = "headings{$_htmlId}";
150
- foreach ($this->getArrayRows() as $_rowId => $_row) {
151
- echo "arrayRow{$_htmlId}.add(" . $_row->toJson() . ", '{$_addAfterId}');\n";
152
- $_addAfterId = $_rowId;
153
- }
154
- ?>
155
-
156
- // initialize standalone button
157
- $('empty<?php echo $_htmlId ?>').hide();
158
- Event.observe('emptyAddBtn<?php echo $_htmlId ?>', 'click', function () {
159
- $('grid<?php echo $_htmlId ?>').show();
160
- $('empty<?php echo $_htmlId ?>').hide();
161
- arrayRow<?php echo $_htmlId ?>.add('', '');
162
- });
163
-
164
- // if no rows, hide grid and show button only
165
- <?php if (!$this->getArrayRows()):?>
166
- arrayRow<?php echo $_htmlId ?>.showButtonOnly();
167
- <?php endif;?>
168
-
169
- // toggle the grid, if element is disabled (depending on scope)
170
- <?php if ($this->getElement()->getDisabled()):?>
171
- toggleValueElements({checked:true}, $('grid<?php echo $_htmlId ?>').parentNode);
172
- <?php endif;?>
173
- //]]>
174
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/frontend/base/default/template/Channelpilotsolutions/channelpilot.phtml CHANGED
@@ -112,7 +112,7 @@ WHERE order_id = '" . $ORDER['entity_id'] . "' ORDER BY parent_item_id DESC";
112
  <?php
113
  } else {
114
  ?>
115
- <script type="text/javascript">/* CP Tracking deactivated*/</script>
116
  <?php
117
  }
118
  }
112
  <?php
113
  } else {
114
  ?>
115
+ <script type="text/javascript">/*<?php echo "--".Mage::getStoreConfig('channelpilot_tracking/channelpilot_tracking/channelpilot_useTracking')."--"; ?> CP Tracking deactivated*/</script>
116
  <?php
117
  }
118
  }
app/etc/modules/Channelpilotsolutions_Channelpilot.xml CHANGED
@@ -26,6 +26,9 @@
26
  <Channelpilotsolutions_Channelpilot>
27
  <active>true</active>
28
  <codePool>community</codePool>
 
 
 
29
  </Channelpilotsolutions_Channelpilot>
30
  </modules>
31
  </config>
26
  <Channelpilotsolutions_Channelpilot>
27
  <active>true</active>
28
  <codePool>community</codePool>
29
+ <depends>
30
+ <Mage_Payment/>
31
+ </depends>
32
  </Channelpilotsolutions_Channelpilot>
33
  </modules>
34
  </config>
app/locale/de_AT/Channelpilotsolutions_Channelpilot.csv DELETED
@@ -1,37 +0,0 @@
1
- "General","Allgemein"
2
-
3
-
4
- "General ChannelPilot Settings","Allgemeine ChannelPilot Einstellungen"
5
- "Activate backendnews?","Backendnews aktivieren?"
6
- "Should the IP for API access be checked?","Soll die IP beim API-Zugriff überprüft werden?"
7
- "Articlenumber","Artikelnummer"
8
- "This applies to the tracking as well as the market place connection or the price control.","Dies gilt für das Tracking sowie die Marktplatzanbindung und die Preissteuerung."
9
-
10
- "Tracking Settings","Tracking Einstellungen"
11
- "Activate tracking?","Tracking aktivieren?"
12
- "Cookiemode","Cookiemodus"
13
- "Trackingkeys,"Trackingkeys"
14
- "Shop","Shop"
15
- "TrackingKey","TrackingKey"
16
-
17
- "Catalogue Export Settings","Produktkatalog Export Einstellungen"
18
- "Activate export?","Export aktivieren?"
19
- "Password","Passwort"
20
- "Protect your productfeed with a password. For example: 'www.testshop.com/channelpilot?password=12345'","Schützen Sie Ihren Produktkatalog mit einem Passwort. Zum Beispiel: 'www.testshop.com/channelpilot?password=12345'"
21
- "Select data fields","Datenfelder auswählen"
22
- "Data field","Datenfeld"
23
- "Select the data fields that you want to provide on ChannelPilot. Some product attributes are always included. (Entity_Id, Sku, name, description, price, manufacturer, color, categories, product_url, image_url, additional_image_1, additional_image_2, additional_image_3, weight)","Wählen Sie die Datenfelder aus, die Sie ChannelPilot bereitstellen möchten. Einige Datenfelder sind immer im Produktkatalog enthalten. (Entity_Id, Sku, name, description, price, manufacturer, color, categories, product_url, image_url, additional_image_1, additional_image_2, additional_image_3, weight)"
24
- "Create static data fields","Statische Datenfelder erstellen"
25
- "Data field name","Datenfeld Name"
26
- "Data field value","Datenfeld Wert"
27
- "Set up additional data fields. These fields have for every product the same value. E.g. for additional delivery costs.","Richten Sie zusätzliche Datenfelder ein, die für jedes Produkt einen statischen Wert haben. Z.B. für zusätzliche Versandkosten."
28
- "Product variant data fields","Variantenfelder anpassen"
29
- "Select the data fields you want to be overwritten by the respective value of the parent article.","Wählen Sie die Datenfelder die vom Datenfeld des Parentartikel überschrieben werden sollen."
30
-
31
- "Pricecontrol","Preissteuerung"
32
- "General Price Control","Globale Preissteuerung"
33
- "Field for price","Preisfeld"
34
- "This field would be overwritten by the new product price.","Dieses Preisfeld wird von dem neuen Preis überschrieben."
35
-
36
- "Add","Hinzufügen"
37
- "Delete","Löschen"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/locale/de_CH/Channelpilotsolutions_Channelpilot.csv CHANGED
@@ -1,37 +1,46 @@
1
- "General","Allgemein"
 
 
 
 
 
2
 
 
 
 
 
 
 
3
 
4
- "General ChannelPilot Settings","Allgemeine ChannelPilot Einstellungen"
5
- "Activate backendnews?","Backendnews aktivieren?"
6
- "Should the IP for API access be checked?","Soll die IP beim API-Zugriff überprüft werden?"
7
- "Articlenumber","Artikelnummer"
8
- "This applies to the tracking as well as the market place connection or the price control.","Dies gilt für das Tracking sowie die Marktplatzanbindung und die Preissteuerung."
 
 
 
 
 
 
 
 
9
 
10
- "Tracking Settings","Tracking Einstellungen"
11
- "Activate tracking?","Tracking aktivieren?"
12
- "Cookiemode","Cookiemodus"
13
- "Trackingkeys,"Trackingkeys"
14
- "Shop","Shop"
15
- "TrackingKey","TrackingKey"
16
 
17
- "Catalogue Export Settings","Produktkatalog Export Einstellungen"
18
- "Activate export?","Export aktivieren?"
19
- "Password","Passwort"
20
- "Protect your productfeed with a password. For example: 'www.testshop.com/channelpilot?password=12345'","Schützen Sie Ihren Produktkatalog mit einem Passwort. Zum Beispiel: 'www.testshop.com/channelpilot?password=12345'"
21
- "Select data fields","Datenfelder auswählen"
22
- "Data field","Datenfeld"
23
- "Select the data fields that you want to provide on ChannelPilot. Some product attributes are always included. (Entity_Id, Sku, name, description, price, manufacturer, color, categories, product_url, image_url, additional_image_1, additional_image_2, additional_image_3, weight)","Wählen Sie die Datenfelder aus, die Sie ChannelPilot bereitstellen möchten. Einige Datenfelder sind immer im Produktkatalog enthalten. (Entity_Id, Sku, name, description, price, manufacturer, color, categories, product_url, image_url, additional_image_1, additional_image_2, additional_image_3, weight)"
24
- "Create static data fields","Statische Datenfelder erstellen"
25
- "Data field name","Datenfeld Name"
26
- "Data field value","Datenfeld Wert"
27
- "Set up additional data fields. These fields have for every product the same value. E.g. for additional delivery costs.","Richten Sie zusätzliche Datenfelder ein, die für jedes Produkt einen statischen Wert haben. Z.B. für zusätzliche Versandkosten."
28
- "Product variant data fields","Variantenfelder anpassen"
29
- "Select the data fields you want to be overwritten by the respective value of the parent article.","Wählen Sie die Datenfelder die vom Datenfeld des Parentartikel überschrieben werden sollen."
30
 
31
- "Pricecontrol","Preissteuerung"
32
- "General Price Control","Globale Preissteuerung"
33
- "Field for price","Preisfeld"
34
- "This field would be overwritten by the new product price.","Dieses Preisfeld wird von dem neuen Preis überschrieben."
 
35
 
36
- "Add","Hinzufügen"
37
- "Delete","Löschen"
 
1
+ "CP General","Allgemein"
2
+ "CP General Settings","Allgemeine Einstellungen"
3
+ "CP Activate backendnews?","Backendnews aktivieren?"
4
+ "CP Should the IP for API access be checked?","Soll die IP beim API-Zugriff überprüft werden?"
5
+ "CP Articlenumber","Artikelnummer"
6
+ "CP This applies to the tracking as well as the marketplace integration or the repricing.","Dies gilt für das Tracking sowie die Marktplatzanbindung und die Preissteuerung."
7
 
8
+ "CP Tracking","Tracking"
9
+ "CP Tracking Settings","Tracking Einstellungen"
10
+ "CP Cookiemode","Cookiemodus"
11
+ "CP Trackingkeys","Trackingkeys"
12
+ "CP Shop","Shop"
13
+ "CP TrackingKey","TrackingKey"
14
 
15
+ "CP Data Feed Export","Export"
16
+ "CP Export Settings","Export konfigurieren"
17
+ "CP Password","Passwort"
18
+ "CP Protect your data feed with a password. For example: 'www.testshop.com/channelpilot?password=12345'","Schützen Sie Ihren Produktkatalog mit einem Passwort. Zum Beispiel: 'www.testshop.com/channelpilot?password=12345'"
19
+ "CP Select data fields","Datenfelder auswählen"
20
+ "CP Data field","Datenfeld"
21
+ "CP Select the data fields you want to provide on ChannelPilot. Some product attributes are always included. (Entity_Id, Sku, name, description, price, manufacturer, color, categories, product_url, image_url, additional_image_1, additional_image_2, additional_image_3, weight)","Wählen Sie die Datenfelder aus, die Sie ChannelPilot bereitstellen möchten. Einige Datenfelder sind immer im Produktkatalog enthalten. (Entity_Id, Sku, name, description, price, manufacturer, color, categories, product_url, image_url, additional_image_1, additional_image_2, additional_image_3, weight)"
22
+ "CP Create static data fields","Statische Datenfelder erstellen"
23
+ "CP Data field name","Datenfeld Name"
24
+ "CP Data field value","Datenfeld Wert"
25
+ "CP Set up additional data fields. These fields have for every product the same value. E.g. for additional delivery costs.","Richten Sie zusätzliche Datenfelder ein, die für jedes Produkt einen statischen Wert haben. Z.B. für zusätzliche Versandkosten."
26
+ "CP Product variant data fields","Variantenfelder anpassen"
27
+ "CP Select the data fields you want to be overwritten by the respective value of the parent article.","Wählen Sie die Datenfelder die vom Datenfeld des Parentartikel überschrieben werden sollen."
28
 
29
+ "CP Marketplace Integration","Marktplatzanbindung"
30
+ "CP Marketplace Integration Settings","Marktplatzanbindung Einstellungen"
 
 
 
 
31
 
32
+ "CP Repricing","Preissteuerung"
33
+ "CP Repricing Settings","Preissteuerung konfigurieren"
34
+ "CP General Repricing","Globale Preissteuerung"
35
+ "CP Field for price","Preisfeld"
36
+ "CP This field would be overwritten by the new product price.","Dieses Preisfeld wird von dem neuen Preis überschrieben."
 
 
 
 
 
 
 
 
37
 
38
+ "CP ChannelPilot-Payment","ChannelPilot Payment"
39
+ "CP !!!This is no real payment method!!!","!!!Das ist keine richtige Zahlmethode!!!"
40
+ "CP Title","Bezeichnung"
41
+ "CP Order Status","Bestellstatus"
42
+ "CP Payment Types","Zahlarten"
43
 
44
+ "CP Activate?","Aktivieren?"
45
+ "CP Add","Hinzufügen"
46
+ "CP Delete","Löschen"
app/locale/de_DE/Channelpilotsolutions_Channelpilot.csv CHANGED
@@ -1,37 +1,48 @@
1
- "General","Allgemein"
 
 
 
 
 
2
 
 
 
 
 
 
 
3
 
4
- "General ChannelPilot Settings","Allgemeine ChannelPilot Einstellungen"
5
- "Activate backendnews?","Backendnews aktivieren?"
6
- "Should the IP for API access be checked?","Soll die IP beim API-Zugriff überprüft werden?"
7
- "Articlenumber","Artikelnummer"
8
- "This applies to the tracking as well as the market place connection or the price control.","Dies gilt für das Tracking sowie die Marktplatzanbindung und die Preissteuerung."
 
 
 
 
 
 
 
 
 
 
9
 
10
- "Tracking Settings","Tracking Einstellungen"
11
- "Activate tracking?","Tracking aktivieren?"
12
- "Cookiemode","Cookiemodus"
13
- "Trackingkeys,"Trackingkeys"
14
- "Shop","Shop"
15
- "TrackingKey","TrackingKey"
16
 
17
- "Catalogue Export Settings","Produktkatalog Export Einstellungen"
18
- "Activate export?","Export aktivieren?"
19
- "Password","Passwort"
20
- "Protect your productfeed with a password. For example: 'www.testshop.com/channelpilot?password=12345'","Schützen Sie Ihren Produktkatalog mit einem Passwort. Zum Beispiel: 'www.testshop.com/channelpilot?password=12345'"
21
- "Select data fields","Datenfelder auswählen"
22
- "Data field","Datenfeld"
23
- "Select the data fields that you want to provide on ChannelPilot. Some product attributes are always included. (Entity_Id, Sku, name, description, price, manufacturer, color, categories, product_url, image_url, additional_image_1, additional_image_2, additional_image_3, weight)","Wählen Sie die Datenfelder aus, die Sie ChannelPilot bereitstellen möchten. Einige Datenfelder sind immer im Produktkatalog enthalten. (Entity_Id, Sku, name, description, price, manufacturer, color, categories, product_url, image_url, additional_image_1, additional_image_2, additional_image_3, weight)"
24
- "Create static data fields","Statische Datenfelder erstellen"
25
- "Data field name","Datenfeld Name"
26
- "Data field value","Datenfeld Wert"
27
- "Set up additional data fields. These fields have for every product the same value. E.g. for additional delivery costs.","Richten Sie zusätzliche Datenfelder ein, die für jedes Produkt einen statischen Wert haben. Z.B. für zusätzliche Versandkosten."
28
- "Product variant data fields","Variantenfelder anpassen"
29
- "Select the data fields you want to be overwritten by the respective value of the parent article.","Wählen Sie die Datenfelder die vom Datenfeld des Parentartikel überschrieben werden sollen."
30
 
31
- "Pricecontrol","Preissteuerung"
32
- "General Price Control","Globale Preissteuerung"
33
- "Field for price","Preisfeld"
34
- "This field would be overwritten by the new product price.","Dieses Preisfeld wird von dem neuen Preis überschrieben."
 
35
 
36
- "Add","Hinzufügen"
37
- "Delete","Löschen"
 
1
+ "CP General","Allgemein"
2
+ "CP General Settings","Allgemeine Einstellungen"
3
+ "CP Activate backendnews?","Backendnews aktivieren?"
4
+ "CP Should the IP for API access be checked?","Soll die IP beim API-Zugriff überprüft werden?"
5
+ "CP Articlenumber","Artikelnummer"
6
+ "CP This applies to the tracking as well as the marketplace integration or the repricing.","Dies gilt für das Tracking sowie die Marktplatzanbindung und die Preissteuerung."
7
 
8
+ "CP Tracking","Tracking"
9
+ "CP Tracking Settings","Tracking Einstellungen"
10
+ "CP Cookiemode","Cookiemodus"
11
+ "CP Trackingkeys","Trackingkeys"
12
+ "CP Shop","Shop"
13
+ "CP TrackingKey","TrackingKey"
14
 
15
+ "CP Data Feed Export","Export"
16
+ "CP Export Settings","Export konfigurieren"
17
+ "CP Password","Passwort"
18
+ "CP Protect your data feed with a password. For example: 'www.testshop.com/channelpilot?password=12345'","Schützen Sie Ihren Produktkatalog mit einem Passwort. Zum Beispiel: 'www.testshop.com/channelpilot?password=12345'"
19
+ "CP Select data fields","Datenfelder auswählen"
20
+ "CP Data field","Datenfeld"
21
+ "CP Select the data fields you want to provide on ChannelPilot. Some product attributes are always included. (Entity_Id, Sku, name, description, price, manufacturer, color, categories, product_url, image_url, additional_image_1, additional_image_2, additional_image_3, weight)","Wählen Sie die Datenfelder aus, die Sie ChannelPilot bereitstellen möchten. Einige Datenfelder sind immer im Produktkatalog enthalten. (Entity_Id, Sku, name, description, price, manufacturer, color, categories, product_url, image_url, additional_image_1, additional_image_2, additional_image_3, weight)"
22
+ "CP Create static data fields","Statische Datenfelder erstellen"
23
+ "CP Data field name","Datenfeld Name"
24
+ "CP Data field value","Datenfeld Wert"
25
+ "CP Set up additional data fields. These fields have for every product the same value. E.g. for additional delivery costs.","Richten Sie zusätzliche Datenfelder ein, die für jedes Produkt einen statischen Wert haben. Z.B. für zusätzliche Versandkosten."
26
+ "CP Product variant data fields","Variantenfelder anpassen"
27
+ "CP Select the data fields you want to be overwritten by the respective value of the parent article.","Wählen Sie die Datenfelder die vom Datenfeld des Parentartikel überschrieben werden sollen."
28
+ "CP Number additional productimages","Anzahl zusätzlicher Produktbilder"
29
+ "CP How many additional productimages should be exported?","Wieviele zusätzliche Produktbilder sollen exportiert werden?"
30
 
31
+ "CP Marketplace Integration","Marktplatzanbindung"
32
+ "CP Marketplace Integration Settings","Marktplatzanbindung Einstellungen"
 
 
 
 
33
 
34
+ "CP Repricing","Preissteuerung"
35
+ "CP Repricing Settings","Preissteuerung konfigurieren"
36
+ "CP General Repricing","Globale Preissteuerung"
37
+ "CP Field for price","Preisfeld"
38
+ "CP This field would be overwritten by the new product price.","Dieses Preisfeld wird von dem neuen Preis überschrieben."
 
 
 
 
 
 
 
 
39
 
40
+ "CP ChannelPilot-Payment","ChannelPilot Payment"
41
+ "CP !!!This is no real payment method!!!","!!!Das ist keine richtige Zahlmethode!!!"
42
+ "CP Title","Bezeichnung"
43
+ "CP Order Status","Bestellstatus"
44
+ "CP Payment Types","Zahlarten"
45
 
46
+ "CP Activate?","Aktivieren?"
47
+ "CP Add","Hinzufügen"
48
+ "CP Delete","Löschen"
app/locale/fr_FR/Channelpilotsolutions_Channelpilot.csv ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "CP General","Général"
2
+ "CP General Settings","Paramètres généraux"
3
+ "CP Activate backendnews?","Activer les informations de Backend?"
4
+ "CP Should the IP for API access be checked?","L'IP de l'accès API doit-il être vérifié?"
5
+ "CP Articlenumber","Numéro de l'article"
6
+ "CP This applies to the tracking as well as the marketplace integration or the repricing.","Ceci vaut pour le Tracking mais aussi pour l'intégration aux places de marché et pour le Repricing"
7
+
8
+ "CP Tracking","Tracking"
9
+ "CP Tracking Settings","Paramètres du Tracking"
10
+ "CP Cookiemode","Mode du cookie"
11
+ "CP Trackingkeys","Clés de Tracking"
12
+ "CP Shop","E-boutique"
13
+ "CP TrackingKey","Clé de Tracking"
14
+
15
+ "CP Data Feed Export","Exportation"
16
+ "CP Export Settings","Configuration de l'exportation"
17
+ "CP Password","Mot de passe"
18
+ "CP Protect your data feed with a password. For example: 'www.testshop.com/channelpilot?password=12345'","Protégez votre flux de données grâce à un mot de passe. Par exemple : 'www.testshop.com/channelpilot?password=12345'"
19
+ "CP Select data fields","Choisir un champ de données"
20
+ "CP Data field","Champ de données"
21
+ "CP Select the data fields you want to provide on ChannelPilot. Some product attributes are always included. (Entity_Id, Sku, name, description, price, manufacturer, color, categories, product_url, image_url, additional_image_1, additional_image_2, additional_image_3, weight)","Sélectionnez le champ de données que vous souhaitez apporter à ChannelPilot. Certains champs de données sont toujours compris dans le catalogue de produit. (Entity_Id, Sku, name, description, price, manufacturer, color, categories, product_url, image_url, additional_image_1, additional_image_2, additional_image_3, weight)"
22
+ "CP Create static data fields","Créer des champs de données stratistiques"
23
+ "CP Data field name","Nom des champs de données"
24
+ "CP Data field value","Valeur des champs de données"
25
+ "CP Set up additional data fields. These fields have for every product the same value. E.g. for additional delivery costs.","Créer des champs de données supplémentaires. Chaque produit de ces champs ont la même valeur, par exemple, pour les frais de port."
26
+ "CP Product variant data fields","Adapter le champ de données des produits variants"
27
+ "CP Select the data fields you want to be overwritten by the respective value of the parent article.","Choissiez le champ de données, qui doivent être intituler comme les champs des données des articles parents."
28
+
29
+ "CP Marketplace Integration","Connexion aux places de marché"
30
+ "CP Marketplace Integration Settings","Paramètres de connexion aux places de marché"
31
+ <<<<
32
+ "CP Repricing","Repricing"
33
+ "CP Repricing Settings","Paramètres de Repricing"
34
+ "CP General Repricing","Repricing général"
35
+ "CP Field for price","Champ de prix"
36
+ "CP This field would be overwritten by the new product price.","Ce champ de prix sera remplacé par le nouveau prix."
37
+
38
+ "CP ChannelPilot-Payment","Paiement ChannelPilot"
39
+ "CP !!!This is no real payment method!!!","!!! Ceci n'est pas un vrai moyen de paiement!!!"
40
+ "CP Title","Titre"
41
+ "CP Order Status","Statut de la commande"
42
+ "CP Payment Types","Moyens de paiement"
43
+
44
+ "CP Activate?","Activer?"
45
+ "CP Add","Ajouter"
46
+ "CP Delete","Supprimer"
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Channelpilotsolutions_Channelpilot</name>
4
- <version>2.0.0.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/gpl-license.php">GPL</license>
7
  <channel>community</channel>
@@ -26,12 +26,13 @@
26
  &lt;li&gt;&lt;b&gt;ChannelPilot Multi-Platform:&lt;/b&gt; Access ChannelPilot on any device (e.g. computer, tablet or smartphone) and keep a firm hold on your online marketing- wherever you are!&lt;/li&gt;&#xD;
27
  &lt;/ul&gt;&#xD;
28
  Just get more information about ChannelPilot: &lt;a href="http://www.channelpilot.com"&gt;www.channelpilot.com&lt;/a&gt;</description>
29
- <notes>new plugin for new ChannelPilot release&#xD;
30
- - small bug fixes</notes>
 
31
  <authors><author><name>ChannelPilot Solutions GmbH</name><user>auto-converted</user><email>info@channelpilot.com</email></author></authors>
32
- <date>2014-08-04</date>
33
- <time>15:39:35</time>
34
- <contents><target name="magecommunity"><dir name="Channelpilotsolutions"><dir name="Channelpilot"><dir name="Adminhtml"><dir name="Model"><dir name="Articlenumber"><file name="Values.php" hash="f2744ef8301e25e096318f34eb97c2bf"/></dir><dir name="Cookiemode"><file name="Values.php" hash="1ec39f85bb7562c1b6a4614f759d9124"/></dir><dir name="Pricefield"><file name="Values.php" hash="6b02dfa3fa93daafa8325d66a986b4ac"/></dir><dir name="Truefalse"><file name="Values.php" hash="fcd5374f41de3cddc9463c2faa8e8c75"/></dir><dir name="Truefalsesecurity"><file name="Values.php" hash="8f45d26c937ba833c3e3483665b6d5df"/></dir></dir></dir><dir name="Block"><dir name="Adminhtml"><dir name="Field"><file name="Exportfields.php" hash="81525753cbe46549daa7a09997b46130"/><file name="Replacefields.php" hash="1e4ddda15b611616f9d097ba301562ac"/><file name="Specialfields.php" hash="a8c88591141c672e772128c9605b52b9"/><file name="Trackingkeys.php" hash="6365f16bc6a5ebf13ada33a79892a857"/></dir></dir></dir><dir name="Helper"><dir name="api"><dir name="1_0"><dir name="responses"><file name="GetManagedArticlePricesResponse.php" hash="9ad5adee1952b9408b442449791a1f34"/><file name="GetNewMarketplaceOrdersResponse.php" hash="cd5db953a84759b93a35a360956c4624"/><file name="GetServerTimeResponse.php" hash="07d157639b5bf715aa3f93b0d9e4b736"/><file name="Response.php" hash="c76ce62707a862e1c59346c668055b5d"/><file name="UpdateArticleResult.php" hash="a014c60be447fbb9cf48c947c8e9822f"/><file name="UpdateArticlesResponse.php" hash="338619d50391d91defb5c9d41370022f"/><file name="UpdateOrderResult.php" hash="0fbd88371624270a8cb2c4209a89cfac"/><file name="UpdateOrdersResponse.php" hash="b0ad5828da633b05e654da393b15526a"/></dir><dir name="thin"><file name="CPAddress.php" hash="885fb4517335421fbd8cbc882ae336b1"/><file name="CPArticle.php" hash="1adce1ce33acdd0185dee06010040b18"/><file name="CPArticleUpdate.php" hash="45f514823895c754010f8f11a1ff683a"/><file name="CPAuth.php" hash="cf5fe570dbd98e3e6339b20cec826b7b"/><file name="CPCancellation.php" hash="9bf808e265e09d166466313405a167fc"/><file name="CPCustomer.php" hash="62babdf11e9b4d80ae0afbbf96ba329d"/><file name="CPDelivery.php" hash="c8c54883370efd519249a9a9551668d0"/><file name="CPDiscount.php" hash="5d6f2766869134a86761c12230dc32d1"/><file name="CPManagedArticlePrice.php" hash="65c4c0df04b7c8d20294874de11640d6"/><file name="CPMoney.php" hash="952131eccc8470e107c78e15c94b6495"/><file name="CPOrder.php" hash="32623885f664e9b5871fc48b6ba0c801"/><file name="CPOrderHeader.php" hash="828377182e8197c304f230a783606993"/><file name="CPOrderItem.php" hash="dfe2440a08e3d0f13e638fc4090e6c52"/><file name="CPOrderStatus.php" hash="e0e767388dd9a1ab8be5a990f1ab1259"/><file name="CPOrderSummary.php" hash="fceaa6a79b5fc892062681f518fd0243"/><file name="CPPayment.php" hash="446ffde1318d001c213de2b80855af07"/><file name="CPResponseHeader.php" hash="53930210d68046183e3be306996ea9b9"/><file name="CPShipping.php" hash="eaddceace28cdc6ba72434a6321d8c47"/></dir><file name="CPResultCodes.php" hash="955180ee33f14b4afa93f6eb1b5df53f"/><file name="ChannelPilotSellerAPI_v1_0.php" hash="26a64c7251790d823507ce1e40617b2e"/></dir></dir><dir name="handler"><file name="CPAbstractHandler.php" hash="bcdf959495e60bbf90ac9fe11a24cca7"/><file name="CPCancellationHandler.php" hash="9b77706089a26ae42ad2e00c303b66ae"/><file name="CPDebugHandler.php" hash="43f2e8da6e44adfb20d7ec813ca54cad"/><file name="CPDeliveryHandler.php" hash="98e4cdd670e8b82724ed31f3248f117f"/><file name="CPErrorHandler.php" hash="5d728c064c068fdf8354fa87882e4dba"/><file name="CPExportHandler.php" hash="fa1ad717314260ccc9a6b09c899e5d53"/><file name="CPNewPriceHandler.php" hash="4d3f328502eac33e5a9608ef62e6146a"/><file name="CPNewsHandler.php" hash="4975a6271baf09af3b2f007f13bb587c"/><file name="CPOrderHandler.php" hash="3fe672eeae5c0f014cf5c666c36fc146"/><file name="CPRegisterHandler.php" hash="43a7baff372b472049dc0e52deb2549f"/><file name="CPStatusHandler.php" hash="3f9c9e8ef563d12d16051fcd9b996a54"/><file name="todoCPPaymentHandler.php" hash="34ea64beda7c8bc5309ebea280146c32"/></dir><dir name="responses"><file name="CPGetStatusHookResponse.php" hash="672609ebcaa23aa0de85aed04c7662d8"/><file name="CPHookResponse.php" hash="9acdda5838cae8b6022af2f4e0a9314b"/><file name="CPRegisterHookResponse.php" hash="206de6433d0795ebdabff98129cc2fb7"/></dir><dir name="special"><file name="CustomerFunctions.php" hash="c9f4d1d28b3978fcc7824cdbeddbcc73"/></dir><file name="CPErrors.php" hash="3659c38a1ed3be4aa4ec03d93e68a84e"/><file name="Data.php" hash="d7501ab1c2667da79d4201f1c78ad945"/><file name="ExportData.php" hash="d6b5cdc2eff0dbd213772ef549fc4491"/></dir><dir name="controllers"><file name="IndexController.php" hash="36e391b61d1914f8669cd48207dd06da"/></dir><dir name="etc"><file name="adminhtml.xml" hash="62fad9ef0e77e858b74d2a7bdd6a6879"/><file name="config.xml" hash="a321e8a3b8a9c38aa0a801983f9cda20"/><file name="system.xml" hash="1622d955b12a3725b5ad67ff25d33ea7"/></dir><dir name="sql"><dir name="channelpilot_setup"><file name="mysql4-install-2.0.0.php" hash="f8bede180155763a6cee1b901a8e0118"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Channelpilotsolutions_Channelpilot.xml" hash="a64f082fbb324d006d05566a4eb63d3f"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="Channelpilotsolutions"><file name="channelpilot.xml" hash="732f1d98851f3c1bf0cb9e655a4a0359"/></dir></dir><dir name="template"><dir name="Channelpilotsolutions"><file name="channelpilot.phtml" hash="2c1299423849d8a245d12b043ca8f058"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="template"><dir name="Channelpilotsolutions"><file name="array_dropdown.phtml" hash="cb1230cd8a92ce0a0961f71b396736ec"/></dir></dir></dir></dir><dir name="default"><dir name="default"><dir name="layout"><dir name="Channelpilotsolutions"><file name="channelpilot.xml" hash="ee23fe0af5078ab653c5341116c21ddb"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="Channelpilotsolutions"><dir name="Channelpilot"><file name="icon.css" hash="ee075d8ba7c5c45dcb8c87ba1205eaa0"/></dir></dir></dir></dir><dir name="base"><dir name="default"><dir name="Channelpilotsolutions"><file name="channelpilot" hash=""/></dir></dir></dir></dir></target><target name="magelocale"><dir name="de_DE"><file name="Channelpilotsolutions_Channelpilot.csv" hash="bbc431d629000b2d166509614f9ef935"/></dir><dir name="de_CH"><file name="Channelpilotsolutions_Channelpilot.csv" hash="bbc431d629000b2d166509614f9ef935"/></dir><dir name="de_AT"><file name="Channelpilotsolutions_Channelpilot.csv" hash="bbc431d629000b2d166509614f9ef935"/></dir></target></contents>
35
  <compatible/>
36
  <dependencies/>
37
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Channelpilotsolutions_Channelpilot</name>
4
+ <version>2.1.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/gpl-license.php">GPL</license>
7
  <channel>community</channel>
26
  &lt;li&gt;&lt;b&gt;ChannelPilot Multi-Platform:&lt;/b&gt; Access ChannelPilot on any device (e.g. computer, tablet or smartphone) and keep a firm hold on your online marketing- wherever you are!&lt;/li&gt;&#xD;
27
  &lt;/ul&gt;&#xD;
28
  Just get more information about ChannelPilot: &lt;a href="http://www.channelpilot.com"&gt;www.channelpilot.com&lt;/a&gt;</description>
29
+ <notes>- some bug fixes&#xD;
30
+ - optimize price control&#xD;
31
+ - new design</notes>
32
  <authors><author><name>ChannelPilot Solutions GmbH</name><user>auto-converted</user><email>info@channelpilot.com</email></author></authors>
33
+ <date>2015-01-29</date>
34
+ <time>09:44:25</time>
35
+ <contents><target name="magecommunity"><dir name="Channelpilotsolutions"><dir name="Channelpilot"><dir name="Adminhtml"><dir name="Model"><dir name="Articlenumber"><file name="Values.php" hash="f2744ef8301e25e096318f34eb97c2bf"/></dir><dir name="Cookiemode"><file name="Values.php" hash="1ec39f85bb7562c1b6a4614f759d9124"/></dir><dir name="Grossnet"><file name="Values.php" hash="11eaf553b0ec34299524ec6d5a9f1e13"/></dir><dir name="Imagenumber"><file name="Values.php" hash="010dbb2ec946627f338bc500d3d8d747"/></dir><dir name="Pricefield"><file name="Values.php" hash="6b02dfa3fa93daafa8325d66a986b4ac"/></dir><dir name="Truefalse"><file name="Values.php" hash="e07f105d7d8dc9881690f162cd23472d"/></dir><dir name="Truefalsesecurity"><file name="Values.php" hash="509b5e1cc7cabbe179373bc0ed490499"/></dir></dir></dir><dir name="Block"><dir name="Adminhtml"><dir name="Field"><file name="Exportfields.php" hash="ca3e562dff7272ed6e72592d65d2466f"/><file name="Replacefields.php" hash="998c731b9e0419271f5ef13237405ad0"/><file name="Specialfields.php" hash="617a423f8632d0bee669bab5a463ce74"/><file name="Trackingkeys.php" hash="383c5112824ccb2998c74dbc3fe10da1"/></dir><file name="Hintlogo.php" hash="be78974a79e7cc59601254a8df0dc48b"/></dir></dir><dir name="Helper"><dir name="api"><dir name="1_0"><dir name="responses"><file name="GetManagedArticlePricesResponse.php" hash="9ad5adee1952b9408b442449791a1f34"/><file name="GetNewMarketplaceOrdersResponse.php" hash="cd5db953a84759b93a35a360956c4624"/><file name="GetServerTimeResponse.php" hash="07d157639b5bf715aa3f93b0d9e4b736"/><file name="Response.php" hash="c76ce62707a862e1c59346c668055b5d"/><file name="UpdateArticleResult.php" hash="a014c60be447fbb9cf48c947c8e9822f"/><file name="UpdateArticlesResponse.php" hash="338619d50391d91defb5c9d41370022f"/><file name="UpdateOrderResult.php" hash="0fbd88371624270a8cb2c4209a89cfac"/><file name="UpdateOrdersResponse.php" hash="b0ad5828da633b05e654da393b15526a"/></dir><dir name="thin"><file name="CPAddress.php" hash="885fb4517335421fbd8cbc882ae336b1"/><file name="CPArticle.php" hash="1adce1ce33acdd0185dee06010040b18"/><file name="CPArticleUpdate.php" hash="45f514823895c754010f8f11a1ff683a"/><file name="CPAuth.php" hash="cf5fe570dbd98e3e6339b20cec826b7b"/><file name="CPCancellation.php" hash="9bf808e265e09d166466313405a167fc"/><file name="CPCustomer.php" hash="62babdf11e9b4d80ae0afbbf96ba329d"/><file name="CPDelivery.php" hash="c8c54883370efd519249a9a9551668d0"/><file name="CPDiscount.php" hash="5d6f2766869134a86761c12230dc32d1"/><file name="CPManagedArticlePrice.php" hash="65c4c0df04b7c8d20294874de11640d6"/><file name="CPMoney.php" hash="952131eccc8470e107c78e15c94b6495"/><file name="CPOrder.php" hash="32623885f664e9b5871fc48b6ba0c801"/><file name="CPOrderHeader.php" hash="828377182e8197c304f230a783606993"/><file name="CPOrderItem.php" hash="dfe2440a08e3d0f13e638fc4090e6c52"/><file name="CPOrderStatus.php" hash="e0e767388dd9a1ab8be5a990f1ab1259"/><file name="CPOrderSummary.php" hash="fceaa6a79b5fc892062681f518fd0243"/><file name="CPPayment.php" hash="446ffde1318d001c213de2b80855af07"/><file name="CPResponseHeader.php" hash="53930210d68046183e3be306996ea9b9"/><file name="CPShipping.php" hash="eaddceace28cdc6ba72434a6321d8c47"/></dir><file name="CPResultCodes.php" hash="955180ee33f14b4afa93f6eb1b5df53f"/><file name="ChannelPilotSellerAPI_v1_0.php" hash="26a64c7251790d823507ce1e40617b2e"/></dir></dir><dir name="handler"><file name="CPAbstractHandler.php" hash="3ff636f82a10e452f8b76e0747d64644"/><file name="CPCancellationHandler.php" hash="9b77706089a26ae42ad2e00c303b66ae"/><file name="CPDebugHandler.php" hash="43f2e8da6e44adfb20d7ec813ca54cad"/><file name="CPDeliveryHandler.php" hash="a392ca48d781dd0db4e6fb9bdd863b7e"/><file name="CPErrorHandler.php" hash="5d728c064c068fdf8354fa87882e4dba"/><file name="CPExportHandler.php" hash="fa1ad717314260ccc9a6b09c899e5d53"/><file name="CPNewPriceHandler.php" hash="5e636b0c9a9fdd45347c7f2134bc3e36"/><file name="CPNewsHandler.php" hash="4975a6271baf09af3b2f007f13bb587c"/><file name="CPOrderHandler.php" hash="b605bf698acd1803bb6d3be8a65dd27c"/><file name="CPRegisterHandler.php" hash="43a7baff372b472049dc0e52deb2549f"/><file name="CPStatusHandler.php" hash="713feca664739aeacda6260318f5c26a"/><file name="todoCPPaymentHandler.php" hash="34ea64beda7c8bc5309ebea280146c32"/></dir><dir name="responses"><file name="CPGetStatusHookResponse.php" hash="672609ebcaa23aa0de85aed04c7662d8"/><file name="CPHookResponse.php" hash="9acdda5838cae8b6022af2f4e0a9314b"/><file name="CPRegisterHookResponse.php" hash="206de6433d0795ebdabff98129cc2fb7"/></dir><dir name="special"><file name="CustomerFunctions.php" hash="0d343d3c9c3cb87232c833e0772f730e"/></dir><file name="CPErrors.php" hash="3659c38a1ed3be4aa4ec03d93e68a84e"/><file name="Data.php" hash="56a9ef3bb2f137cd3ec2dae77e4b429a"/><file name="ExportData.php" hash="2e9fb9a11383b4d436936ce383d93083"/></dir><dir name="Model"><file name="Abstract.php" hash="0e9349f1023527a77e59742dfdb21308"/><file name="Payment.php" hash="5160ffe0422a9a46dc2bd7a79e512b8b"/><file name="PaymentTypes.php" hash="adc3931280cfe313adcbdd4702191a01"/><file name="Paymenttypes.php" hash="b217cdabf427beadb8d74acff069af4d"/></dir><dir name="controllers"><file name="IndexController.php" hash="36e391b61d1914f8669cd48207dd06da"/></dir><dir name="etc"><file name="adminhtml.xml" hash="62fad9ef0e77e858b74d2a7bdd6a6879"/><file name="config.xml" hash="69ed726729fe84d75014ae336d56f460"/><file name="system.xml" hash="33d311ca704780d078533f62381895b1"/></dir><dir name="sql"><dir name="channelpilot_setup"><file name="mysql4-install-2.0.0.php" hash="8910b9b0507d1b38c8b8465845fb3849"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Channelpilotsolutions_Channelpilot.xml" hash="4cc80daa0c7f8dda239e41a6b17321bf"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="Channelpilotsolutions"><file name="channelpilot.xml" hash="732f1d98851f3c1bf0cb9e655a4a0359"/></dir></dir><dir name="template"><dir name="Channelpilotsolutions"><file name="channelpilot.phtml" hash="cff9533bc583c15d1cb041ee60ffd80a"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="Channelpilotsolutions"><file name="channelpilot" hash=""/></dir></dir></dir></dir><dir name="de_DE"><file name="Channelpilotsolutions_Channelpilot.csv" hash="57d54b69d4c7cb28373764403069eb6d"/></dir><dir name="de_CH"><file name="Channelpilotsolutions_Channelpilot.csv" hash="c5c7fd72d8a8778b5f1228c356111695"/></dir><dir name="fr_FR"><file name="Channelpilotsolutions_Channelpilot.csv" hash="9a49d3ba87895fb14b234cfa838b9fab"/></dir></target><target name="mageskin"><dir name="de_AT"><file name="Channelpilotsolutions_Channelpilot.csv" hash=""/></dir></target><target name="magelocal"><dir name="fr_CA"><file name="Channelpilotsolutions_Channelpilot.csv" hash=""/></dir><dir name="en_AU"><file name="Channelpilotsolutions_Channelpilot.csv" hash=""/></dir><dir name="en_CA"><file name="Channelpilotsolutions_Channelpilot.csv" hash=""/></dir><dir name="en_GB"><file name="Channelpilotsolutions_Channelpilot.csv" hash=""/></dir><dir name="en_IE"><file name="Channelpilotsolutions_Channelpilot.csv" hash=""/></dir><dir name="en_NZ"><file name="Channelpilotsolutions_Channelpilot.csv" hash=""/></dir><dir name="en_US"><file name="Channelpilotsolutions_Channelpilot.csv" hash=""/></dir><dir name="es_AR"><file name="Channelpilotsolutions_Channelpilot.csv" hash=""/></dir><dir name="es_CL"><file name="Channelpilotsolutions_Channelpilot.csv" hash=""/></dir><dir name="es_CO"><file name="Channelpilotsolutions_Channelpilot.csv" hash=""/></dir><dir name="es_CR"><file name="Channelpilotsolutions_Channelpilot.csv" hash=""/></dir><dir name="es_ES"><file name="Channelpilotsolutions_Channelpilot.csv" hash=""/></dir><dir name="es_MX"><file name="Channelpilotsolutions_Channelpilot.csv" hash=""/></dir><dir name="es_PA"><file name="Channelpilotsolutions_Channelpilot.csv" hash=""/></dir><dir name="es_PE"><file name="Channelpilotsolutions_Channelpilot.csv" hash=""/></dir><dir name="es_VE"><file name="Channelpilotsolutions_Channelpilot.csv" hash=""/></dir></target></contents>
36
  <compatible/>
37
  <dependencies/>
38
  </package>
skin/adminhtml/default/default/Channelpilotsolutions/Channelpilot/icon.css DELETED
@@ -1,4 +0,0 @@
1
- li.tab-channelpilot dl dt {
2
- background: url("https://go.channelpilot.com/favicon.ico") no-repeat scroll 0px 1px #D1DEDF;
3
- background-size: 18px 18px;
4
- }