Contiamo_Connector - Version 1.1.0

Version Notes

Added support for user defined attributes in the export.

Minor: Include "name" in order item export.

Download this release

Release Info

Developer Chris Baynes
Extension Contiamo_Connector
Version 1.1.0
Comparing to
See all releases


Code changes from version 1.0.2 to 1.1.0

app/code/community/Contiamo/Connector/Helper/Data.php CHANGED
@@ -16,4 +16,9 @@ class Contiamo_Connector_Helper_Data extends Mage_Core_Helper_Abstract
16
  {
17
  return Mage::getConfig()->getNode()->modules->Contiamo_Connector->version;
18
  }
 
 
 
 
 
19
  }
16
  {
17
  return Mage::getConfig()->getNode()->modules->Contiamo_Connector->version;
18
  }
19
+
20
+ public function snakeCaseToTitle($s)
21
+ {
22
+ return ucwords(str_replace('_', ' ', $s));
23
+ }
24
  }
app/code/community/Contiamo/Connector/Model/Admin/AbstractSource.php ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ abstract class Contiamo_Connector_Model_Admin_AbstractSource
4
+ {
5
+ public function toOptionArray()
6
+ {
7
+ $attributes = $this->attributes();
8
+
9
+ $options = array();
10
+ foreach ($attributes as $attribute){
11
+ $value = $attribute->getAttributecode();
12
+ $label = $attribute->getFrontendLabel();
13
+
14
+ if (static::$_ignoreEmptyLabels && !$label) continue;
15
+
16
+ // if the label is empty use the titled version of value
17
+ $label = $label ? $label : Mage::helper('contiamo')->snakeCaseToTitle($value);
18
+
19
+ $options[] = array(
20
+ 'value' => $value,
21
+ 'label' => $label
22
+ );
23
+ }
24
+
25
+ // sort options by label
26
+ $sorter = function($a, $b) {
27
+ return strcasecmp($a['label'], $b['label']);
28
+ };
29
+ usort($options, $sorter);
30
+
31
+ // add default none option
32
+ array_unshift($options, array('value' => '', 'label' => 'none'));
33
+
34
+ return $options;
35
+ }
36
+ }
app/code/community/Contiamo/Connector/Model/Admin/CustomerSource.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Contiamo_Connector_Model_Admin_CustomerSource extends Contiamo_Connector_Model_Admin_AbstractSource
4
+ {
5
+ // ignore empty labels as we don't want to allow system fields (e.g. password hash)
6
+ protected static $_ignoreEmptyLabels = true;
7
+
8
+ public function attributes()
9
+ {
10
+ return Mage::getModel('customer/entity_attribute_collection')->getItems();
11
+ }
12
+ }
app/code/community/Contiamo/Connector/Model/Admin/SaleItemSource.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Contiamo_Connector_Model_Admin_SaleItemSource extends Contiamo_Connector_Model_Admin_AbstractSource
4
+ {
5
+ protected static $_ignoreEmptyLabels = false;
6
+
7
+ public function attributes()
8
+ {
9
+ return Mage::getResourceModel('catalog/product_attribute_collection')->getItems();
10
+ }
11
+ }
app/code/community/Contiamo/Connector/Model/Admin/SaleSource.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Contiamo_Connector_Model_Admin_SaleSource extends Contiamo_Connector_Model_Admin_AbstractSource
4
+ {
5
+ protected static $_ignoreEmptyLabels = false;
6
+
7
+ // Sales do not have attributes so fetch a list of all columns on the sales table.
8
+ public function attributes()
9
+ {
10
+ $resource = Mage::getSingleton('core/resource');
11
+ $connection = $resource->getConnection('core_read');
12
+ $orderTbl = $resource->getTableName('sales/order');
13
+ $cols = $connection->fetchAll('SHOW COLUMNS FROM ' . $orderTbl);
14
+
15
+ $attributes = array();
16
+ foreach ($cols as $col) {
17
+ $field = $col['Field'];
18
+ $label = Mage::helper('contiamo')->snakeCaseToTitle($field);
19
+ $attribute = new Varien_Object();
20
+ $attribute->setAttributecode($field);
21
+ $attribute->setFrontendLabel($label);
22
+ $attributes[] = $attribute;
23
+ }
24
+
25
+ return $attributes;
26
+ }
27
+ }
app/code/community/Contiamo/Connector/Model/Export/Collection.php CHANGED
@@ -11,7 +11,7 @@ class Contiamo_Connector_Model_Export_Collection extends Mage_Core_Model_Abstrac
11
  // memoize
12
  if ($this->_exportData) return $this->_exportData;
13
 
14
- $itemAttrs = static::$_itemAttributes;
15
 
16
  // set header row
17
  $this->_exportData = array(array_keys($itemAttrs));
@@ -24,8 +24,18 @@ class Contiamo_Connector_Model_Export_Collection extends Mage_Core_Model_Abstrac
24
  $exportItem = $this->_exportItem($item);
25
 
26
  // add item value for each attribute
27
- foreach ($itemAttrs as $attr) {
28
- $itemData[] = $exportItem->getData($attr);
 
 
 
 
 
 
 
 
 
 
29
  }
30
 
31
  $this->_exportData[] = $itemData;
@@ -33,4 +43,10 @@ class Contiamo_Connector_Model_Export_Collection extends Mage_Core_Model_Abstrac
33
 
34
  return $this->_exportData;
35
  }
 
 
 
 
 
 
36
  }
11
  // memoize
12
  if ($this->_exportData) return $this->_exportData;
13
 
14
+ $itemAttrs = $this->_itemAttributes();
15
 
16
  // set header row
17
  $this->_exportData = array(array_keys($itemAttrs));
24
  $exportItem = $this->_exportItem($item);
25
 
26
  // add item value for each attribute
27
+ foreach ($itemAttrs as $attrKey => $attr) {
28
+ if (!$attr) {
29
+ $itemData[] = '';
30
+ continue;
31
+ }
32
+
33
+ if (substr($attrKey, 0, 7) === 'custom_') {
34
+ // get a custom attribute
35
+ $itemData[] = $exportItem->getCustomData($attr);
36
+ } else {
37
+ $itemData[] = $exportItem->getData($attr);
38
+ }
39
  }
40
 
41
  $this->_exportData[] = $itemData;
43
 
44
  return $this->_exportData;
45
  }
46
+
47
+ protected function _itemAttributes()
48
+ {
49
+ $customAttributes = static::customAttributes();
50
+ return array_merge(static::$_fixedItemAttributes, $customAttributes);
51
+ }
52
  }
app/code/community/Contiamo/Connector/Model/Export/CustomAttributes.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Contiamo_Connector_Model_Export_CustomAttributes
4
+ {
5
+ public function export()
6
+ {
7
+ $header = array();
8
+ foreach (range(1,10) as $i) {
9
+ $header[] = 'custom_' . $i;
10
+ }
11
+
12
+ $customerLookup = $this->_generateLookup(Mage::getModel('contiamo/admin_customerSource')->attributes());
13
+ $orderItemLookup = $this->_generateLookup(Mage::getModel('contiamo/admin_saleItemSource')->attributes());
14
+ $orderLookup = $this->_generateLookup(Mage::getModel('contiamo/admin_saleSource')->attributes());
15
+
16
+ $customerAttrs = array_values(Contiamo_Connector_Model_Export_Customers::customAttributes());
17
+ $customerLabels = array();
18
+ foreach ($customerAttrs as $attr) {
19
+ $customerLabels[] = $customerLookup[$attr];
20
+ }
21
+
22
+ $orderItemAttrs = array_values(Contiamo_Connector_Model_Export_OrderItems::customAttributes());
23
+ $orderItemLabels = array();
24
+ foreach ($orderItemAttrs as $attr) {
25
+ $orderItemLabels[] = $orderItemLookup[$attr];
26
+ }
27
+
28
+ $orderAttrs = array_values(Contiamo_Connector_Model_Export_Orders::customAttributes());
29
+ $orderLabels = array();
30
+ foreach ($orderAttrs as $attr) {
31
+ $orderLabels[] = $orderLookup[$attr];
32
+ }
33
+
34
+ // add type information column to the beginning of the export data
35
+ array_unshift($header, 'type', 'label');
36
+ array_unshift($customerAttrs, 'customers', false);
37
+ array_unshift($customerLabels, 'customers', true);
38
+ array_unshift($orderItemAttrs, 'order_items', false);
39
+ array_unshift($orderItemLabels, 'order_items', true);
40
+ array_unshift($orderAttrs, 'orders', false);
41
+ array_unshift($orderLabels, 'orders', true);
42
+
43
+ return array(
44
+ $header,
45
+ $customerAttrs,
46
+ $customerLabels,
47
+ $orderItemAttrs,
48
+ $orderItemLabels,
49
+ $orderAttrs,
50
+ $orderLabels
51
+ );
52
+ }
53
+
54
+ private function _generateLookup($collection)
55
+ {
56
+ $lookup = array();
57
+ foreach ($collection as $attribute) {
58
+ $lookup[$attribute->getAttributecode()] = $attribute->getFrontendLabel();
59
+ }
60
+ return $lookup;
61
+ }
62
+ }
app/code/community/Contiamo/Connector/Model/Export/Customer.php CHANGED
@@ -48,4 +48,27 @@ class Contiamo_Connector_Model_Export_Customer
48
  return $this->customer->getData($field);
49
  }
50
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  }
48
  return $this->customer->getData($field);
49
  }
50
  }
51
+
52
+ public function getCustomData($field)
53
+ {
54
+ $data = $this->customer->getData($field);
55
+ // if data is a number, try to get the attribute text (if it exists)
56
+ if (ctype_digit($data)) {
57
+ $attr = $this->customer->getResource()->getAttribute($field);
58
+ try {
59
+ $attrText = $attr->getSource()->getOptionText($data);
60
+ // overwrite $data only if attrText has a value
61
+ if ($attrText) {
62
+ if (is_array($attrText)) {
63
+ $data = $attrText['label'];
64
+ } else {
65
+ $data = $attrText;
66
+ }
67
+ }
68
+ } catch (Mage_Eav_Exception $e) {
69
+ }
70
+ }
71
+
72
+ return $data;
73
+ }
74
  }
app/code/community/Contiamo/Connector/Model/Export/Customers.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  class Contiamo_Connector_Model_Export_Customers extends Contiamo_Connector_Model_Export_Collection
4
  {
5
- protected static $_itemAttributes = array(
6
  'user_reference' => 'entity_id',
7
  'signup_date' => 'created_at',
8
  'email' => 'email',
@@ -12,10 +12,23 @@ class Contiamo_Connector_Model_Export_Customers extends Contiamo_Connector_Model
12
  'newsletter_subscribed' => 'newsletter_subscribed'
13
  );
14
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  public function init($dateFrom, $pageNum, $pageSize)
16
  {
17
  $this->_items = Mage::getModel('customer/customer')->getCollection()
18
- ->addAttributeToSelect(array('dob', 'gender'))
19
  ->setCurPage($pageNum)
20
  ->setPageSize($pageSize);
21
 
2
 
3
  class Contiamo_Connector_Model_Export_Customers extends Contiamo_Connector_Model_Export_Collection
4
  {
5
+ protected static $_fixedItemAttributes = array(
6
  'user_reference' => 'entity_id',
7
  'signup_date' => 'created_at',
8
  'email' => 'email',
12
  'newsletter_subscribed' => 'newsletter_subscribed'
13
  );
14
 
15
+ public static function customAttributes()
16
+ {
17
+ $customAttributes = Mage::getStoreConfig('contiamo_settings/customer_attributes');
18
+ $sorter = function($a, $b) {
19
+ $a = intval(str_replace('custom_', '', $a));
20
+ $b = intval(str_replace('custom_', '', $b));
21
+ return $a - $b;
22
+ };
23
+ uksort($customAttributes, $sorter);
24
+
25
+ return $customAttributes;
26
+ }
27
+
28
  public function init($dateFrom, $pageNum, $pageSize)
29
  {
30
  $this->_items = Mage::getModel('customer/customer')->getCollection()
31
+ ->addAttributeToSelect('*')
32
  ->setCurPage($pageNum)
33
  ->setPageSize($pageSize);
34
 
app/code/community/Contiamo/Connector/Model/Export/Order.php CHANGED
@@ -46,4 +46,9 @@ class Contiamo_Connector_Model_Export_Order
46
  return $this->order->getData($field);
47
  }
48
  }
 
 
 
 
 
49
  }
46
  return $this->order->getData($field);
47
  }
48
  }
49
+
50
+ public function getCustomData($field)
51
+ {
52
+ return $this->order->getData($field);
53
+ }
54
  }
app/code/community/Contiamo/Connector/Model/Export/OrderItem.php CHANGED
@@ -43,4 +43,26 @@ class Contiamo_Connector_Model_Export_OrderItem
43
  $catId = $this->categoryIds[$index];
44
  return Mage::getModel('catalog/category')->load($catId);
45
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  }
43
  $catId = $this->categoryIds[$index];
44
  return Mage::getModel('catalog/category')->load($catId);
45
  }
46
+
47
+ public function getCustomData($field)
48
+ {
49
+ $data = $this->product->getData($field);
50
+
51
+ if ($dataVal = $this->_getAttributeData($field, $data)) {
52
+ $data = $dataVal;
53
+ }
54
+
55
+ return $data;
56
+ }
57
+
58
+ private function _getAttributeData($field, $id)
59
+ {
60
+ if (preg_match('/^[0-9,]+$/', $id)) {
61
+ $val = $this->product->getAttributeText($field);
62
+ if (is_array($val)) {
63
+ return implode(',', $val);
64
+ }
65
+ return $val;
66
+ }
67
+ }
68
  }
app/code/community/Contiamo/Connector/Model/Export/OrderItems.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  class Contiamo_Connector_Model_Export_OrderItems extends Contiamo_Connector_Model_Export_Collection
4
  {
5
- protected static $_itemAttributes = array(
6
  'date' => 'created_at',
7
 
8
  // unique references
@@ -11,6 +11,7 @@ class Contiamo_Connector_Model_Export_OrderItems extends Contiamo_Connector_Mode
11
  // product info
12
  'product_reference' => 'sku',
13
  'product_sku' => 'sku',
 
14
  'product_brand' => 'product_brand',
15
  'product_category' => 'product_category',
16
  'product_subcategory' => 'product_subcategory',
@@ -23,6 +24,19 @@ class Contiamo_Connector_Model_Export_OrderItems extends Contiamo_Connector_Mode
23
  'discount_total' => 'discount_amount'
24
  );
25
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  public function init($dateFrom, $pageNum, $pageSize)
27
  {
28
  $this->_items = Mage::getModel('sales/order_item')->getCollection()
2
 
3
  class Contiamo_Connector_Model_Export_OrderItems extends Contiamo_Connector_Model_Export_Collection
4
  {
5
+ protected static $_fixedItemAttributes = array(
6
  'date' => 'created_at',
7
 
8
  // unique references
11
  // product info
12
  'product_reference' => 'sku',
13
  'product_sku' => 'sku',
14
+ 'product_name' => 'name',
15
  'product_brand' => 'product_brand',
16
  'product_category' => 'product_category',
17
  'product_subcategory' => 'product_subcategory',
24
  'discount_total' => 'discount_amount'
25
  );
26
 
27
+ public static function customAttributes()
28
+ {
29
+ $customAttributes = Mage::getStoreConfig('contiamo_settings/sale_item_attributes');
30
+ $sorter = function($a, $b) {
31
+ $a = intval(str_replace('custom_', '', $a));
32
+ $b = intval(str_replace('custom_', '', $b));
33
+ return $a - $b;
34
+ };
35
+ uksort($customAttributes, $sorter);
36
+
37
+ return $customAttributes;
38
+ }
39
+
40
  public function init($dateFrom, $pageNum, $pageSize)
41
  {
42
  $this->_items = Mage::getModel('sales/order_item')->getCollection()
app/code/community/Contiamo/Connector/Model/Export/OrderUpdates.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  class Contiamo_Connector_Model_Export_OrderUpdates extends Contiamo_Connector_Model_Export_Collection
4
  {
5
- protected static $_itemAttributes = array(
6
  // unique references
7
  'sale_reference' => 'increment_id',
8
 
@@ -11,6 +11,10 @@ class Contiamo_Connector_Model_Export_OrderUpdates extends Contiamo_Connector_Mo
11
  'custom_status' => 'status'
12
  );
13
 
 
 
 
 
14
  public function init($dateFrom, $pageNum, $pageSize)
15
  {
16
  $this->_items = Mage::getModel('sales/order')->getCollection()
2
 
3
  class Contiamo_Connector_Model_Export_OrderUpdates extends Contiamo_Connector_Model_Export_Collection
4
  {
5
+ protected static $_fixedItemAttributes = array(
6
  // unique references
7
  'sale_reference' => 'increment_id',
8
 
11
  'custom_status' => 'status'
12
  );
13
 
14
+ public static function customAttributes() {
15
+ return array();
16
+ }
17
+
18
  public function init($dateFrom, $pageNum, $pageSize)
19
  {
20
  $this->_items = Mage::getModel('sales/order')->getCollection()
app/code/community/Contiamo/Connector/Model/Export/Orders.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  class Contiamo_Connector_Model_Export_Orders extends Contiamo_Connector_Model_Export_Collection
4
  {
5
- protected static $_itemAttributes = array(
6
  'date' => 'created_at',
7
 
8
  // unique references
@@ -46,6 +46,19 @@ class Contiamo_Connector_Model_Export_Orders extends Contiamo_Connector_Model_Ex
46
  'discount_total' => 'discount_amount'
47
  );
48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  public function init($dateFrom, $pageNum, $pageSize)
50
  {
51
  $this->_items = Mage::getModel('sales/order')->getCollection()
2
 
3
  class Contiamo_Connector_Model_Export_Orders extends Contiamo_Connector_Model_Export_Collection
4
  {
5
+ protected static $_fixedItemAttributes = array(
6
  'date' => 'created_at',
7
 
8
  // unique references
46
  'discount_total' => 'discount_amount'
47
  );
48
 
49
+ public static function customAttributes()
50
+ {
51
+ $customAttributes = Mage::getStoreConfig('contiamo_settings/sale_attributes');
52
+ $sorter = function($a, $b) {
53
+ $a = intval(str_replace('custom_', '', $a));
54
+ $b = intval(str_replace('custom_', '', $b));
55
+ return $a - $b;
56
+ };
57
+ uksort($customAttributes, $sorter);
58
+
59
+ return $customAttributes;
60
+ }
61
+
62
  public function init($dateFrom, $pageNum, $pageSize)
63
  {
64
  $this->_items = Mage::getModel('sales/order')->getCollection()
app/code/community/Contiamo/Connector/controllers/ExportController.php CHANGED
@@ -78,6 +78,20 @@ class Contiamo_Connector_ExportController extends Mage_Core_Controller_Front_Act
78
  }
79
  }
80
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  public function statusAction()
82
  {
83
  try {
78
  }
79
  }
80
 
81
+ public function customAttributesAction()
82
+ {
83
+ try {
84
+ $this->_authorize();
85
+
86
+ $attributes = Mage::getModel('contiamo/export_customAttributes');
87
+ $response = $attributes->export();
88
+
89
+ $this->_respondCsv($response);
90
+ } catch (Exception $e) {
91
+ $this->_logEx($e);
92
+ }
93
+ }
94
+
95
  public function statusAction()
96
  {
97
  try {
app/code/community/Contiamo/Connector/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Contiamo_Connector>
5
- <version>1.0.0</version>
6
  </Contiamo_Connector>
7
  </modules>
8
 
2
  <config>
3
  <modules>
4
  <Contiamo_Connector>
5
+ <version>1.1.0</version>
6
  </Contiamo_Connector>
7
  </modules>
8
 
app/code/community/Contiamo/Connector/etc/system.xml CHANGED
@@ -43,6 +43,306 @@
43
  </secret_key>
44
  </fields>
45
  </general>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  </groups>
47
  </contiamo_settings>
48
  </sections>
43
  </secret_key>
44
  </fields>
45
  </general>
46
+ <sale_item_attributes translate="label">
47
+ <label>Sale Item Attributes</label>
48
+ <frontend_type>text</frontend_type>
49
+ <sort_order>20</sort_order>
50
+ <show_in_default>1</show_in_default>
51
+ <show_in_website>1</show_in_website>
52
+ <show_in_store>1</show_in_store>
53
+ <fields>
54
+ <custom_1 translate="label">
55
+ <label>Custom 1</label>
56
+ <frontend_type>select</frontend_type>
57
+ <source_model>contiamo/admin_saleItemSource</source_model>
58
+ <sort_order>0</sort_order>
59
+ <show_in_default>1</show_in_default>
60
+ <show_in_website>1</show_in_website>
61
+ <show_in_store>1</show_in_store>
62
+ </custom_1>
63
+ <custom_2 translate="label">
64
+ <label>Custom 2</label>
65
+ <frontend_type>select</frontend_type>
66
+ <source_model>contiamo/admin_saleItemSource</source_model>
67
+ <sort_order>10</sort_order>
68
+ <show_in_default>1</show_in_default>
69
+ <show_in_website>1</show_in_website>
70
+ <show_in_store>1</show_in_store>
71
+ </custom_2>
72
+ <custom_3 translate="label">
73
+ <label>Custom 3</label>
74
+ <frontend_type>select</frontend_type>
75
+ <source_model>contiamo/admin_saleItemSource</source_model>
76
+ <sort_order>20</sort_order>
77
+ <show_in_default>1</show_in_default>
78
+ <show_in_website>1</show_in_website>
79
+ <show_in_store>1</show_in_store>
80
+ </custom_3>
81
+ <custom_4 translate="label">
82
+ <label>Custom 4</label>
83
+ <frontend_type>select</frontend_type>
84
+ <source_model>contiamo/admin_saleItemSource</source_model>
85
+ <sort_order>30</sort_order>
86
+ <show_in_default>1</show_in_default>
87
+ <show_in_website>1</show_in_website>
88
+ <show_in_store>1</show_in_store>
89
+ </custom_4>
90
+ <custom_5 translate="label">
91
+ <label>Custom 5</label>
92
+ <frontend_type>select</frontend_type>
93
+ <source_model>contiamo/admin_saleItemSource</source_model>
94
+ <sort_order>40</sort_order>
95
+ <show_in_default>1</show_in_default>
96
+ <show_in_website>1</show_in_website>
97
+ <show_in_store>1</show_in_store>
98
+ </custom_5>
99
+ <custom_6 translate="label">
100
+ <label>Custom 6</label>
101
+ <frontend_type>select</frontend_type>
102
+ <source_model>contiamo/admin_saleItemSource</source_model>
103
+ <sort_order>50</sort_order>
104
+ <show_in_default>1</show_in_default>
105
+ <show_in_website>1</show_in_website>
106
+ <show_in_store>1</show_in_store>
107
+ </custom_6>
108
+ <custom_7 translate="label">
109
+ <label>Custom 7</label>
110
+ <frontend_type>select</frontend_type>
111
+ <source_model>contiamo/admin_saleItemSource</source_model>
112
+ <sort_order>60</sort_order>
113
+ <show_in_default>1</show_in_default>
114
+ <show_in_website>1</show_in_website>
115
+ <show_in_store>1</show_in_store>
116
+ </custom_7>
117
+ <custom_8 translate="label">
118
+ <label>Custom 8</label>
119
+ <frontend_type>select</frontend_type>
120
+ <source_model>contiamo/admin_saleItemSource</source_model>
121
+ <sort_order>70</sort_order>
122
+ <show_in_default>1</show_in_default>
123
+ <show_in_website>1</show_in_website>
124
+ <show_in_store>1</show_in_store>
125
+ </custom_8>
126
+ <custom_9 translate="label">
127
+ <label>Custom 9</label>
128
+ <frontend_type>select</frontend_type>
129
+ <source_model>contiamo/admin_saleItemSource</source_model>
130
+ <sort_order>80</sort_order>
131
+ <show_in_default>1</show_in_default>
132
+ <show_in_website>1</show_in_website>
133
+ <show_in_store>1</show_in_store>
134
+ </custom_9>
135
+ <custom_10 translate="label">
136
+ <label>Custom 10</label>
137
+ <frontend_type>select</frontend_type>
138
+ <source_model>contiamo/admin_saleItemSource</source_model>
139
+ <sort_order>90</sort_order>
140
+ <show_in_default>1</show_in_default>
141
+ <show_in_website>1</show_in_website>
142
+ <show_in_store>1</show_in_store>
143
+ </custom_10>
144
+ </fields>
145
+ </sale_item_attributes>
146
+ <sale_attributes translate="label">
147
+ <label>Sale Attributes</label>
148
+ <frontend_type>text</frontend_type>
149
+ <sort_order>30</sort_order>
150
+ <show_in_default>1</show_in_default>
151
+ <show_in_website>1</show_in_website>
152
+ <show_in_store>1</show_in_store>
153
+ <fields>
154
+ <custom_1 translate="label">
155
+ <label>Custom 1</label>
156
+ <frontend_type>select</frontend_type>
157
+ <source_model>contiamo/admin_saleSource</source_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
+ </custom_1>
163
+ <custom_2 translate="label">
164
+ <label>Custom 2</label>
165
+ <frontend_type>select</frontend_type>
166
+ <source_model>contiamo/admin_saleSource</source_model>
167
+ <sort_order>10</sort_order>
168
+ <show_in_default>1</show_in_default>
169
+ <show_in_website>1</show_in_website>
170
+ <show_in_store>1</show_in_store>
171
+ </custom_2>
172
+ <custom_3 translate="label">
173
+ <label>Custom 3</label>
174
+ <frontend_type>select</frontend_type>
175
+ <source_model>contiamo/admin_saleSource</source_model>
176
+ <sort_order>20</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
+ </custom_3>
181
+ <custom_4 translate="label">
182
+ <label>Custom 4</label>
183
+ <frontend_type>select</frontend_type>
184
+ <source_model>contiamo/admin_saleSource</source_model>
185
+ <sort_order>30</sort_order>
186
+ <show_in_default>1</show_in_default>
187
+ <show_in_website>1</show_in_website>
188
+ <show_in_store>1</show_in_store>
189
+ </custom_4>
190
+ <custom_5 translate="label">
191
+ <label>Custom 5</label>
192
+ <frontend_type>select</frontend_type>
193
+ <source_model>contiamo/admin_saleSource</source_model>
194
+ <sort_order>40</sort_order>
195
+ <show_in_default>1</show_in_default>
196
+ <show_in_website>1</show_in_website>
197
+ <show_in_store>1</show_in_store>
198
+ </custom_5>
199
+ <custom_6 translate="label">
200
+ <label>Custom 6</label>
201
+ <frontend_type>select</frontend_type>
202
+ <source_model>contiamo/admin_saleSource</source_model>
203
+ <sort_order>50</sort_order>
204
+ <show_in_default>1</show_in_default>
205
+ <show_in_website>1</show_in_website>
206
+ <show_in_store>1</show_in_store>
207
+ </custom_6>
208
+ <custom_7 translate="label">
209
+ <label>Custom 7</label>
210
+ <frontend_type>select</frontend_type>
211
+ <source_model>contiamo/admin_saleSource</source_model>
212
+ <sort_order>60</sort_order>
213
+ <show_in_default>1</show_in_default>
214
+ <show_in_website>1</show_in_website>
215
+ <show_in_store>1</show_in_store>
216
+ </custom_7>
217
+ <custom_8 translate="label">
218
+ <label>Custom 8</label>
219
+ <frontend_type>select</frontend_type>
220
+ <source_model>contiamo/admin_saleSource</source_model>
221
+ <sort_order>70</sort_order>
222
+ <show_in_default>1</show_in_default>
223
+ <show_in_website>1</show_in_website>
224
+ <show_in_store>1</show_in_store>
225
+ </custom_8>
226
+ <custom_9 translate="label">
227
+ <label>Custom 9</label>
228
+ <frontend_type>select</frontend_type>
229
+ <source_model>contiamo/admin_saleSource</source_model>
230
+ <sort_order>80</sort_order>
231
+ <show_in_default>1</show_in_default>
232
+ <show_in_website>1</show_in_website>
233
+ <show_in_store>1</show_in_store>
234
+ </custom_9>
235
+ <custom_10 translate="label">
236
+ <label>Custom 10</label>
237
+ <frontend_type>select</frontend_type>
238
+ <source_model>contiamo/admin_saleSource</source_model>
239
+ <sort_order>90</sort_order>
240
+ <show_in_default>1</show_in_default>
241
+ <show_in_website>1</show_in_website>
242
+ <show_in_store>1</show_in_store>
243
+ </custom_10>
244
+ </fields>
245
+ </sale_attributes>
246
+ <customer_attributes translate="label">
247
+ <label>Customer Attributes</label>
248
+ <frontend_type>text</frontend_type>
249
+ <sort_order>40</sort_order>
250
+ <show_in_default>1</show_in_default>
251
+ <show_in_website>1</show_in_website>
252
+ <show_in_store>1</show_in_store>
253
+ <fields>
254
+ <custom_1 translate="label">
255
+ <label>Custom 1</label>
256
+ <frontend_type>select</frontend_type>
257
+ <source_model>contiamo/admin_customerSource</source_model>
258
+ <sort_order>0</sort_order>
259
+ <show_in_default>1</show_in_default>
260
+ <show_in_website>1</show_in_website>
261
+ <show_in_store>1</show_in_store>
262
+ </custom_1>
263
+ <custom_2 translate="label">
264
+ <label>Custom 2</label>
265
+ <frontend_type>select</frontend_type>
266
+ <source_model>contiamo/admin_customerSource</source_model>
267
+ <sort_order>10</sort_order>
268
+ <show_in_default>1</show_in_default>
269
+ <show_in_website>1</show_in_website>
270
+ <show_in_store>1</show_in_store>
271
+ </custom_2>
272
+ <custom_3 translate="label">
273
+ <label>Custom 3</label>
274
+ <frontend_type>select</frontend_type>
275
+ <source_model>contiamo/admin_customerSource</source_model>
276
+ <sort_order>20</sort_order>
277
+ <show_in_default>1</show_in_default>
278
+ <show_in_website>1</show_in_website>
279
+ <show_in_store>1</show_in_store>
280
+ </custom_3>
281
+ <custom_4 translate="label">
282
+ <label>Custom 4</label>
283
+ <frontend_type>select</frontend_type>
284
+ <source_model>contiamo/admin_customerSource</source_model>
285
+ <sort_order>30</sort_order>
286
+ <show_in_default>1</show_in_default>
287
+ <show_in_website>1</show_in_website>
288
+ <show_in_store>1</show_in_store>
289
+ </custom_4>
290
+ <custom_5 translate="label">
291
+ <label>Custom 5</label>
292
+ <frontend_type>select</frontend_type>
293
+ <source_model>contiamo/admin_customerSource</source_model>
294
+ <sort_order>40</sort_order>
295
+ <show_in_default>1</show_in_default>
296
+ <show_in_website>1</show_in_website>
297
+ <show_in_store>1</show_in_store>
298
+ </custom_5>
299
+ <custom_6 translate="label">
300
+ <label>Custom 6</label>
301
+ <frontend_type>select</frontend_type>
302
+ <source_model>contiamo/admin_customerSource</source_model>
303
+ <sort_order>50</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
+ </custom_6>
308
+ <custom_7 translate="label">
309
+ <label>Custom 7</label>
310
+ <frontend_type>select</frontend_type>
311
+ <source_model>contiamo/admin_customerSource</source_model>
312
+ <sort_order>60</sort_order>
313
+ <show_in_default>1</show_in_default>
314
+ <show_in_website>1</show_in_website>
315
+ <show_in_store>1</show_in_store>
316
+ </custom_7>
317
+ <custom_8 translate="label">
318
+ <label>Custom 8</label>
319
+ <frontend_type>select</frontend_type>
320
+ <source_model>contiamo/admin_customerSource</source_model>
321
+ <sort_order>70</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
+ </custom_8>
326
+ <custom_9 translate="label">
327
+ <label>Custom 9</label>
328
+ <frontend_type>select</frontend_type>
329
+ <source_model>contiamo/admin_customerSource</source_model>
330
+ <sort_order>80</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
+ </custom_9>
335
+ <custom_10 translate="label">
336
+ <label>Custom 10</label>
337
+ <frontend_type>select</frontend_type>
338
+ <source_model>contiamo/admin_customerSource</source_model>
339
+ <sort_order>90</sort_order>
340
+ <show_in_default>1</show_in_default>
341
+ <show_in_website>1</show_in_website>
342
+ <show_in_store>1</show_in_store>
343
+ </custom_10>
344
+ </fields>
345
+ </customer_attributes>
346
  </groups>
347
  </contiamo_settings>
348
  </sections>
package.xml CHANGED
@@ -1,18 +1,20 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Contiamo_Connector</name>
4
- <version>1.0.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Use Contiamo to analyze your sale trends and customer base.</summary>
10
  <description>Use Contiamo to analyze your sale trends and customer base.</description>
11
- <notes>notes</notes>
 
 
12
  <authors><author><name>Chris Baynes</name><user>contiamo</user><email>info@contiamo.com</email></author></authors>
13
- <date>2014-03-20</date>
14
- <time>10:18:53</time>
15
- <contents><target name="magecommunity"><dir name="Contiamo"><dir name="Connector"><dir name="Helper"><file name="Data.php" hash="83306c7ffef68bf0addcaf3b8592bfd4"/></dir><dir name="Model"><file name="Contiamo.php" hash="7ed0a780d45c090cdd5af6738830ac62"/><dir name="Export"><file name="Collection.php" hash="59cb561791bcd4024e48498c73dcc483"/><file name="Customer.php" hash="9b84c1f8b77975306fdce8075b0190ff"/><file name="Customers.php" hash="afef917259e93ad62edcc773124f07a9"/><file name="Order.php" hash="d2d3a76fd5f261262b4b01910e8319d1"/><file name="OrderItem.php" hash="a5055e7d93e99e5e7479d0402e673a7a"/><file name="OrderItems.php" hash="196ee418e0d1243baf64c974e8f58a68"/><file name="OrderUpdates.php" hash="16d4922cbba9f085f4ea865c54d30638"/><file name="Orders.php" hash="7c10362af9fd17ace8c27577bc5add10"/><file name="Status.php" hash="9f2fb6a8241a071168dddf726c988878"/></dir><dir name="Resource"><dir name="Mysql4"><file name="Setup.php" hash="3d4b6ecfc461825f115eb6dc8ba3677f"/></dir></dir></dir><dir name="controllers"><file name="ExportController.php" hash="5515ecc47d6578975a15f71785e3d146"/></dir><dir name="etc"><file name="adminhtml.xml" hash="70f5bf8121d1a276e649b9b5fb4ac9cc"/><file name="config.xml" hash="a875fe5a3433c6535d8e7a0bdce8d944"/><file name="system.xml" hash="f1f8f4576c8510bcfdd5fe4dacf7ced5"/></dir><dir name="sql"><dir name="contiamo_setup"><file name="mysql4-install-0.0.1.php" hash="8b799197fe5d2567f1510b0777b137b1"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Contiamo_Connector.xml" hash="54eb6cba356dc238f94212376cbd86c1"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Contiamo_Connector</name>
4
+ <version>1.1.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Use Contiamo to analyze your sale trends and customer base.</summary>
10
  <description>Use Contiamo to analyze your sale trends and customer base.</description>
11
+ <notes>Added support for user defined attributes in the export.&#xD;
12
+ &#xD;
13
+ Minor: Include "name" in order item export. </notes>
14
  <authors><author><name>Chris Baynes</name><user>contiamo</user><email>info@contiamo.com</email></author></authors>
15
+ <date>2015-02-11</date>
16
+ <time>16:57:13</time>
17
+ <contents><target name="magecommunity"><dir name="Contiamo"><dir name="Connector"><dir name="Helper"><file name="Data.php" hash="e354215a2c6bbb79c4d83c49f4bb7e65"/></dir><dir name="Model"><dir name="Admin"><file name="AbstractSource.php" hash="649e273afe1ed9833eaa93c3c9dd9ce0"/><file name="CustomerSource.php" hash="832645ffd3dfc57e0d98ad83325ece02"/><file name="SaleItemSource.php" hash="3d24b9f71dee66d0b3f91c25deec6dc4"/><file name="SaleSource.php" hash="e6a42a4efe291823d2b3cd5cb38c7518"/></dir><file name="Contiamo.php" hash="7ed0a780d45c090cdd5af6738830ac62"/><dir name="Export"><file name="Collection.php" hash="2ca6280af2cdd7412e9f9bbdc04be6b1"/><file name="CustomAttributes.php" hash="3d798281b48857947316642e86fdd584"/><file name="Customer.php" hash="2b31447c49506f07b42d968619cab062"/><file name="Customers.php" hash="3d8c29a0bccc29e08e314c6c02396b19"/><file name="Order.php" hash="882fe4101b27df47036ab0d565a5b36b"/><file name="OrderItem.php" hash="56249ebb4dce0f77da92a14268128ee0"/><file name="OrderItems.php" hash="a6e7dac5289196e79275e768b076024b"/><file name="OrderUpdates.php" hash="0bba8474dfa37f09a8f55216e1985cd4"/><file name="Orders.php" hash="bf6893fedb3739842bb72e95a70e360a"/><file name="Status.php" hash="9f2fb6a8241a071168dddf726c988878"/></dir><dir name="Resource"><dir name="Mysql4"><file name="Setup.php" hash="3d4b6ecfc461825f115eb6dc8ba3677f"/></dir></dir></dir><dir name="controllers"><file name="ExportController.php" hash="2a6fe5fece69bfbf9395b61e1b91a4bb"/></dir><dir name="etc"><file name="adminhtml.xml" hash="70f5bf8121d1a276e649b9b5fb4ac9cc"/><file name="config.xml" hash="86265a601408ff8aec600e04e347dd6b"/><file name="system.xml" hash="c1aaa3061a5e8fc4ba3ac66a0f408c58"/></dir><dir name="sql"><dir name="contiamo_setup"><file name="mysql4-install-0.0.1.php" hash="8b799197fe5d2567f1510b0777b137b1"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Contiamo_Connector.xml" hash="54eb6cba356dc238f94212376cbd86c1"/></dir></target></contents>
18
  <compatible/>
19
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
20
  </package>