eBay_Enterprise_Affiliate_Extension - Version 1.1.3

Version Notes

Changelog for 1.1.3
DE5743 Fix Duplicate Rows in Itemized Feed
Tabs to Spaces for Support Files
PSR2 Formatting for PHP Files
XML Tabs to Spaces and Formatting
Refactor Docker Scripts

Download this release

Release Info

Developer Michael A. Smith
Extension eBay_Enterprise_Affiliate_Extension
Version 1.1.3
Comparing to
See all releases


Code changes from version 1.1.2 to 1.1.3

Files changed (27) hide show
  1. app/code/community/EbayEnterprise/Affiliate/Block/Beacon.php +153 -153
  2. app/code/community/EbayEnterprise/Affiliate/Exception/Configuration.php +1 -2
  3. app/code/community/EbayEnterprise/Affiliate/Helper/Config.php +189 -189
  4. app/code/community/EbayEnterprise/Affiliate/Helper/Data.php +108 -109
  5. app/code/community/EbayEnterprise/Affiliate/Helper/Map.php +73 -71
  6. app/code/community/EbayEnterprise/Affiliate/Helper/Map/Order.php +134 -132
  7. app/code/community/EbayEnterprise/Affiliate/Helper/Map/Product.php +110 -110
  8. app/code/community/EbayEnterprise/Affiliate/Model/Feed/Abstract.php +313 -312
  9. app/code/community/EbayEnterprise/Affiliate/Model/Feed/Order/Abstract.php +52 -51
  10. app/code/community/EbayEnterprise/Affiliate/Model/Feed/Order/Basic.php +52 -52
  11. app/code/community/EbayEnterprise/Affiliate/Model/Feed/Order/Itemized.php +59 -57
  12. app/code/community/EbayEnterprise/Affiliate/Model/Feed/Product.php +79 -79
  13. app/code/community/EbayEnterprise/Affiliate/Model/Observer.php +40 -40
  14. app/code/community/EbayEnterprise/Affiliate/Model/System/Config/Source/Attributes.php +54 -55
  15. app/code/community/EbayEnterprise/Affiliate/Model/System/Config/Source/Categories.php +16 -16
  16. app/code/community/EbayEnterprise/Affiliate/Model/System/Config/Source/Stockquantity.php +16 -16
  17. app/code/community/EbayEnterprise/Affiliate/Model/System/Config/Source/Stockyesno.php +16 -16
  18. app/code/community/EbayEnterprise/Affiliate/Model/System/Config/Source/Transactiontype.php +9 -9
  19. app/code/community/EbayEnterprise/Affiliate/Model/System/Config/Source/Visibilityyesno.php +16 -16
  20. app/code/community/EbayEnterprise/Affiliate/etc/adminhtml.xml +29 -30
  21. app/code/community/EbayEnterprise/Affiliate/etc/config.xml +970 -966
  22. app/code/community/EbayEnterprise/Affiliate/etc/system.xml +887 -884
  23. app/design/frontend/base/default/layout/eems_affiliate.xml +24 -27
  24. app/design/frontend/base/default/template/eems_affiliate/beacon.phtml +17 -15
  25. app/design/frontend/base/default/template/eems_affiliate/tracking.phtml +4 -2
  26. app/etc/modules/EbayEnterprise_Affiliate.xml +16 -17
  27. package.xml +6 -3
app/code/community/EbayEnterprise/Affiliate/Block/Beacon.php CHANGED
@@ -17,47 +17,47 @@
17
 
18
  class EbayEnterprise_Affiliate_Block_Beacon extends Mage_Core_Block_Template
19
  {
20
- /**
21
- * The 'PID' beacon URL querystring key
22
- */
23
- const KEY_PID = 'PID';
24
- /**
25
- * The 'OID' beacon URL querystring key
26
- */
27
- const KEY_OID = 'OID';
28
- /**
29
- * The 'AMOUNT' beacon URL querystring key
30
- */
31
- const KEY_AMOUNT = 'AMOUNT';
32
- /**
33
- * The 'TYPE' beacon URL querystring key
34
- */
35
- const KEY_TYPE = 'TYPE';
36
- /**
37
- * The 'QTY' beacon URL querystring key
38
- */
39
- const KEY_QTY = 'QTY';
40
- /**
41
- * The 'TOTALAMOUNT' beacon URL querystring key
42
- */
43
- const KEY_TOTALAMOUNT = 'TOTALAMOUNT';
44
- /**
45
- * The 'INT' beacon URL querystring key
46
- */
47
- const KEY_INT = 'INT';
48
- /**
49
- * The 'ITEM' beacon URL querystring key
50
- */
51
- const KEY_ITEM = 'ITEM';
52
- /**
53
- * The 'PROMOCODE' beacon URL querystring key
54
- */
55
- const KEY_PROMOCODE = 'PROMOCODE';
56
- /**
57
- * @var Mage_Sales_Model_Order
58
- * @see self::_getOrder
59
- */
60
- protected $_order;
61
  /** @var EbayEnterprise_Affiliate_Helper_Data */
62
  protected $_helper = null;
63
  /** @var EbayEnterprise_Affiliate_Helper_Config */
@@ -87,123 +87,123 @@ class EbayEnterprise_Affiliate_Block_Beacon extends Mage_Core_Block_Template
87
  return $this->_configHelper;
88
  }
89
 
90
- /**
91
- * Get the last order.
92
- * @return Mage_Sales_Model_Order | null
93
- */
94
- protected function _getOrder()
95
- {
96
- if (!($this->_order instanceof Mage_Sales_Model_Order)) {
97
- $orderId = Mage::getSingleton('checkout/session')->getLastOrderId();
98
- if ($orderId) {
99
- $this->_order = Mage::getModel('sales/order')->load($orderId);
100
- }
101
- }
102
- return $this->_order;
103
- }
104
- /**
105
- * Get the beacon URL.
106
- * @return string | null
107
- */
108
- public function getBeaconUrl()
109
- {
110
- $order = $this->_getOrder();
111
- return ($order instanceof Mage_Sales_Model_Order) ?
112
- Mage::helper('eems_affiliate')->buildBeaconUrl(
113
- Mage::helper('eems_affiliate/config')->isItemizedOrders() ?
114
- $this->_buildItemizedParams($order) : $this->_buildBasicParams($order)
115
- ) : null;
116
- }
117
- /**
118
- * build common params array
119
- * @param Mage_Sales_Model_Order $order
120
- * @return array
121
- */
122
- protected function _buildCommonParams(Mage_Sales_Model_Order $order)
123
- {
124
- $params = array(
125
- static::KEY_PID => Mage::helper('eems_affiliate/config')->getProgramId(),
126
- static::KEY_OID => $order->getIncrementId(),
127
- );
128
- $couponCode = trim($order->getCouponCode());
129
- return ($couponCode !== '')?
130
- array_merge($params, array(static::KEY_PROMOCODE => $couponCode)) : $params;
131
- }
132
- /**
133
- * build basic params array for non itemized beacon URL
134
- * @param Mage_Sales_Model_Order $order
135
- * @return array
136
- */
137
- protected function _buildBasicParams(Mage_Sales_Model_Order $order)
138
- {
139
- return array_merge($this->_buildCommonParams($order), array(
140
- static::KEY_AMOUNT => number_format($order->getSubtotal() + $order->getDiscountAmount() + $order->getShippingDiscountAmount(), 2, '.', ''),
141
- static::KEY_TYPE => Mage::helper('eems_affiliate/config')->getTransactionType()
142
- ));
143
- }
144
- /**
145
- * build itemized order params array for itemized beacon URL
146
- * @param Mage_Sales_Model_Order $order
147
- * @return array
148
- */
149
- protected function _buildItemizedParams(Mage_Sales_Model_Order $order)
150
- {
151
- $params = array(static::KEY_INT => Mage::helper('eems_affiliate/config')->getInt());
152
- $increment = 1; // incrementer for the unique item keys
153
- foreach ($order->getAllItems() as $item) {
154
- // need to ignore the bundle parent as it will contain collected total
155
- // for children but not discounts
156
- $position = $this->_getDupePosition($params, $item);
157
- // ignore the parent configurable quantity - quantity of config products
158
- // will come from the simple used product with the same SKU
159
- $quantity = $item->getProductType() === Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE ?
160
- 0 : (int) $item->getQtyOrdered();
161
- // consider parent bundle products to be 0.00 total - total of the bundle
162
- // is the sum of all child products which are also included in the beacon
163
- // so including both totals would effectively double the price of the bundle
164
- $total = $item->getProductType() === Mage_Catalog_Model_Product_Type::TYPE_BUNDLE ?
165
- 0.00 : $item->getRowTotal() - $item->getDiscountAmount();
166
- if ($position) {
167
- // we detected that the current item already exist in the params array
168
- // and have the key increment position let's simply adjust
169
- // the qty and total amount
170
- $params[static::KEY_QTY . $position] += $quantity;
171
- $amtKey = static::KEY_TOTALAMOUNT . $position;
172
- $params[$amtKey] = number_format($params[$amtKey] + $total, 2, '.', '');
173
- } else {
174
- $params = array_merge($params, array(
175
- static::KEY_ITEM . $increment => $item->getSku(),
176
- static::KEY_QTY . $increment => $quantity,
177
- static::KEY_TOTALAMOUNT . $increment => number_format($total, 2, '.', ''),
178
- ));
179
- $increment++; // only get incremented when a unique key have been appended
180
- }
181
- }
182
- return array_merge($this->_buildCommonParams($order), $params);
183
- }
184
- /**
185
- * check if the current sku already exists in the params data if so return
186
- * the position it is found in
187
- * @param array $params the given array of keys needed to build the beacon URL querystring
188
- * @param Mage_Sales_Model_Order_Item $item
189
- * @return int the item position where dupe found otherwise zero
190
- */
191
- protected function _getDupePosition(array $params, Mage_Sales_Model_Order_Item $item)
192
- {
193
- $key = array_search($item->getSku(), $params, true);
194
- return ($key !== false)?
195
- (int) str_replace(static::KEY_ITEM, '', $key) : 0;
196
- }
197
- /**
198
- * Whether or not to display the beacon.
199
  *
200
  * Show the pixel only if tracking is enabled and we have a valid order
201
  * AND either conditional pixel logic is OFF or it is ON and we have
202
  * a valid cookie.
203
  *
204
- * @return bool
205
- */
206
- public function showBeacon()
207
  {
208
  $config = $this->_getConfigHelper();
209
 
17
 
18
  class EbayEnterprise_Affiliate_Block_Beacon extends Mage_Core_Block_Template
19
  {
20
+ /**
21
+ * The 'PID' beacon URL querystring key
22
+ */
23
+ const KEY_PID = 'PID';
24
+ /**
25
+ * The 'OID' beacon URL querystring key
26
+ */
27
+ const KEY_OID = 'OID';
28
+ /**
29
+ * The 'AMOUNT' beacon URL querystring key
30
+ */
31
+ const KEY_AMOUNT = 'AMOUNT';
32
+ /**
33
+ * The 'TYPE' beacon URL querystring key
34
+ */
35
+ const KEY_TYPE = 'TYPE';
36
+ /**
37
+ * The 'QTY' beacon URL querystring key
38
+ */
39
+ const KEY_QTY = 'QTY';
40
+ /**
41
+ * The 'TOTALAMOUNT' beacon URL querystring key
42
+ */
43
+ const KEY_TOTALAMOUNT = 'TOTALAMOUNT';
44
+ /**
45
+ * The 'INT' beacon URL querystring key
46
+ */
47
+ const KEY_INT = 'INT';
48
+ /**
49
+ * The 'ITEM' beacon URL querystring key
50
+ */
51
+ const KEY_ITEM = 'ITEM';
52
+ /**
53
+ * The 'PROMOCODE' beacon URL querystring key
54
+ */
55
+ const KEY_PROMOCODE = 'PROMOCODE';
56
+ /**
57
+ * @var Mage_Sales_Model_Order
58
+ * @see self::_getOrder
59
+ */
60
+ protected $_order;
61
  /** @var EbayEnterprise_Affiliate_Helper_Data */
62
  protected $_helper = null;
63
  /** @var EbayEnterprise_Affiliate_Helper_Config */
87
  return $this->_configHelper;
88
  }
89
 
90
+ /**
91
+ * Get the last order.
92
+ * @return Mage_Sales_Model_Order | null
93
+ */
94
+ protected function _getOrder()
95
+ {
96
+ if (!($this->_order instanceof Mage_Sales_Model_Order)) {
97
+ $orderId = Mage::getSingleton('checkout/session')->getLastOrderId();
98
+ if ($orderId) {
99
+ $this->_order = Mage::getModel('sales/order')->load($orderId);
100
+ }
101
+ }
102
+ return $this->_order;
103
+ }
104
+ /**
105
+ * Get the beacon URL.
106
+ * @return string | null
107
+ */
108
+ public function getBeaconUrl()
109
+ {
110
+ $order = $this->_getOrder();
111
+ return ($order instanceof Mage_Sales_Model_Order) ?
112
+ Mage::helper('eems_affiliate')->buildBeaconUrl(
113
+ Mage::helper('eems_affiliate/config')->isItemizedOrders() ?
114
+ $this->_buildItemizedParams($order) : $this->_buildBasicParams($order)
115
+ ) : null;
116
+ }
117
+ /**
118
+ * build common params array
119
+ * @param Mage_Sales_Model_Order $order
120
+ * @return array
121
+ */
122
+ protected function _buildCommonParams(Mage_Sales_Model_Order $order)
123
+ {
124
+ $params = array(
125
+ static::KEY_PID => Mage::helper('eems_affiliate/config')->getProgramId(),
126
+ static::KEY_OID => $order->getIncrementId(),
127
+ );
128
+ $couponCode = trim($order->getCouponCode());
129
+ return ($couponCode !== '')?
130
+ array_merge($params, array(static::KEY_PROMOCODE => $couponCode)) : $params;
131
+ }
132
+ /**
133
+ * build basic params array for non itemized beacon URL
134
+ * @param Mage_Sales_Model_Order $order
135
+ * @return array
136
+ */
137
+ protected function _buildBasicParams(Mage_Sales_Model_Order $order)
138
+ {
139
+ return array_merge($this->_buildCommonParams($order), array(
140
+ static::KEY_AMOUNT => number_format($order->getSubtotal() + $order->getDiscountAmount() + $order->getShippingDiscountAmount(), 2, '.', ''),
141
+ static::KEY_TYPE => Mage::helper('eems_affiliate/config')->getTransactionType()
142
+ ));
143
+ }
144
+ /**
145
+ * build itemized order params array for itemized beacon URL
146
+ * @param Mage_Sales_Model_Order $order
147
+ * @return array
148
+ */
149
+ protected function _buildItemizedParams(Mage_Sales_Model_Order $order)
150
+ {
151
+ $params = array(static::KEY_INT => Mage::helper('eems_affiliate/config')->getInt());
152
+ $increment = 1; // incrementer for the unique item keys
153
+ foreach ($order->getAllItems() as $item) {
154
+ // need to ignore the bundle parent as it will contain collected total
155
+ // for children but not discounts
156
+ $position = $this->_getDupePosition($params, $item);
157
+ // ignore the parent configurable quantity - quantity of config products
158
+ // will come from the simple used product with the same SKU
159
+ $quantity = $item->getProductType() === Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE ?
160
+ 0 : (int) $item->getQtyOrdered();
161
+ // consider parent bundle products to be 0.00 total - total of the bundle
162
+ // is the sum of all child products which are also included in the beacon
163
+ // so including both totals would effectively double the price of the bundle
164
+ $total = $item->getProductType() === Mage_Catalog_Model_Product_Type::TYPE_BUNDLE ?
165
+ 0.00 : $item->getRowTotal() - $item->getDiscountAmount();
166
+ if ($position) {
167
+ // we detected that the current item already exist in the params array
168
+ // and have the key increment position let's simply adjust
169
+ // the qty and total amount
170
+ $params[static::KEY_QTY . $position] += $quantity;
171
+ $amtKey = static::KEY_TOTALAMOUNT . $position;
172
+ $params[$amtKey] = number_format($params[$amtKey] + $total, 2, '.', '');
173
+ } else {
174
+ $params = array_merge($params, array(
175
+ static::KEY_ITEM . $increment => $item->getSku(),
176
+ static::KEY_QTY . $increment => $quantity,
177
+ static::KEY_TOTALAMOUNT . $increment => number_format($total, 2, '.', ''),
178
+ ));
179
+ $increment++; // only get incremented when a unique key have been appended
180
+ }
181
+ }
182
+ return array_merge($this->_buildCommonParams($order), $params);
183
+ }
184
+ /**
185
+ * check if the current sku already exists in the params data if so return
186
+ * the position it is found in
187
+ * @param array $params the given array of keys needed to build the beacon URL querystring
188
+ * @param Mage_Sales_Model_Order_Item $item
189
+ * @return int the item position where dupe found otherwise zero
190
+ */
191
+ protected function _getDupePosition(array $params, Mage_Sales_Model_Order_Item $item)
192
+ {
193
+ $key = array_search($item->getSku(), $params, true);
194
+ return ($key !== false)?
195
+ (int) str_replace(static::KEY_ITEM, '', $key) : 0;
196
+ }
197
+ /**
198
+ * Whether or not to display the beacon.
199
  *
200
  * Show the pixel only if tracking is enabled and we have a valid order
201
  * AND either conditional pixel logic is OFF or it is ON and we have
202
  * a valid cookie.
203
  *
204
+ * @return bool
205
+ */
206
+ public function showBeacon()
207
  {
208
  $config = $this->_getConfigHelper();
209
 
app/code/community/EbayEnterprise/Affiliate/Exception/Configuration.php CHANGED
@@ -16,7 +16,6 @@
16
  */
17
 
18
 
19
- class EbayEnterprise_Affiliate_Exception_Configuration
20
- extends Mage_Core_Exception
21
  {
22
  }
16
  */
17
 
18
 
19
+ class EbayEnterprise_Affiliate_Exception_Configuration extends Mage_Core_Exception
 
20
  {
21
  }
app/code/community/EbayEnterprise/Affiliate/Helper/Config.php CHANGED
@@ -20,198 +20,198 @@
20
  */
21
  class EbayEnterprise_Affiliate_Helper_Config
22
  {
23
- const BEACON_URL_PATH = 'marketing_solutions/eems_affiliate/beacon_url';
24
- const ENABLED_PATH = 'marketing_solutions/eems_affiliate/active';
25
- const INT_PATH = 'marketing_solutions/eems_affiliate/int';
26
- const ITEMIZED_ORDERS_PATH = 'marketing_solutions/eems_affiliate/itemized_orders';
27
- const PROGRAM_ID_PATH = 'marketing_solutions/eems_affiliate/program_id';
28
- const TRANSACTION_TYPE_PATH = 'marketing_solutions/eems_affiliate/transaction_type';
29
- const EXPORT_FILE_PATH_CONFIG_PATH = 'marketing_solutions/eems_affiliate/export_path';
30
- const CALLBACK_MAPPINGS_PATH = 'marketing_solutions/eems_affiliate/feeds/callback_mappings';
31
- const PRODUCT_FEED_MAPPING_PATH = 'marketing_solutions/eems_affiliate_product_attribute_map';
32
- const PRODUCT_FEED_FILENAME_FORMAT_PATH = 'marketing_solutions/eems_affiliate/feeds/product/file_name_format';
33
- const ITEMIZED_ORDER_FEED_MAPPING_PATH = 'marketing_solutions/eems_affiliate/feeds/order_itemized/fields';
34
- const BASIC_ORDER_FEED_MAPPING_PATH = 'marketing_solutions/eems_affiliate/feeds/order_basic/fields';
35
- const ITEMIZED_ORDER_FEED_FILE_FORMAT_PATH = 'marketing_solutions/eems_affiliate/feeds/order_itemized/file_name_format';
36
- const BASIC_ORDER_FEED_FILE_FORMAT_PATH = 'marketing_solutions/eems_affiliate/feeds/order_basic/file_name_format';
37
- const ORDER_LAST_RUN_PATH = 'marketing_solutions/eems_affiliate/feed/last_run_time';
38
- const JS_FILES = 'marketing_solutions/eems_affiliate/js_files';
39
  const CONDITIONAL_PIXEL_ENABLED = 'marketing_solutions/eems_affiliate/conditional_pixel_enabled';
40
  const SOURCE_KEY_NAME = 'marketing_solutions/eems_affiliate/source_key_name';
41
- const TRANSACTION_TYPE_SALE = '1';
42
- const TRANSACTION_TYPE_LEAD = '2';
43
 
44
- /**
45
- * retrieve the program id from store config
46
- * @param mixed $store
47
- * @return string
48
- */
49
- public function getProgramId($store=null)
50
- {
51
- return Mage::getStoreConfig(static::PROGRAM_ID_PATH, $store);
52
- }
53
- /**
54
- * retrieve the transaction type from store config
55
- * @param mixed $store
56
- * @return string
57
- */
58
- public function getTransactionType($store=null)
59
- {
60
- return Mage::getStoreConfig(static::TRANSACTION_TYPE_PATH, $store);
61
- }
62
- /**
63
- * retrieve the itemized orders from store config
64
- * @param mixed $store
65
- * @return bool
66
- */
67
- public function isItemizedOrders($store=null)
68
- {
69
- return Mage::getStoreConfigFlag(static::ITEMIZED_ORDERS_PATH, $store);
70
- }
71
- /**
72
- * check if beacon pixel is enable in the store config
73
- * @param mixed $store
74
- * @return bool
75
- */
76
- public function isEnabled($store=null)
77
- {
78
- return Mage::getStoreConfigFlag(static::ENABLED_PATH, $store);
79
- }
80
- /**
81
- * retrieve the int from store config
82
- * @param mixed $store
83
- * @return string
84
- */
85
- public function getInt($store=null)
86
- {
87
- return Mage::getStoreConfig(static::INT_PATH, $store);
88
- }
89
- /**
90
- * retrieve the base url of the beacon from store config
91
- * @param mixed $store
92
- * @return string
93
- */
94
- public function getBeaconBaseUrl($store=null)
95
- {
96
- return Mage::getStoreConfig(static::BEACON_URL_PATH, $store);
97
- }
98
- /**
99
- * Get the configured export file path.
100
- * @param mixed $store
101
- * @return string
102
- */
103
- public function getExportFilePath($store=null)
104
- {
105
- return Mage::getStoreConfig(static::EXPORT_FILE_PATH_CONFIG_PATH, $store);
106
- }
107
- /**
108
- * Get the callback mappings from the config
109
- * @param mixed $store
110
- * @return array
111
- */
112
- public function getCallbackMappings($store=null)
113
- {
114
- return Mage::getStoreConfig(static::CALLBACK_MAPPINGS_PATH, $store);
115
- }
116
- /**
117
- * Get the configured feed mapping for the product feed.
118
- * @param mixed $store
119
- * @return array
120
- */
121
- public function getProductFeedFields($store=null)
122
- {
123
- return array_filter(Mage::getStoreConfig(static::PRODUCT_FEED_MAPPING_PATH, $store));
124
- }
125
- /**
126
- * Get the configured product feed file name format
127
- * @param mixed $store
128
- * @return string
129
- */
130
- public function getProductFeedFilenameFormat($store=null)
131
- {
132
- return Mage::getStoreConfig(static::PRODUCT_FEED_FILENAME_FORMAT_PATH, $store);
133
- }
134
- /**
135
- * Get the configured feed mapping for the itemized orders feed.
136
- * @param mixed $store
137
- * @return array
138
- */
139
- public function getItemizedOrderFeedFields($store=null)
140
- {
141
- return Mage::getStoreConfig(static::ITEMIZED_ORDER_FEED_MAPPING_PATH, $store);
142
- }
143
- /**
144
- * Get the configured feed mapping for the basic orders feed.
145
- * @param mixed $store
146
- * @return array
147
- */
148
- public function getBasicOrderFeedFields($store=null)
149
- {
150
- return Mage::getStoreConfig(static::BASIC_ORDER_FEED_MAPPING_PATH, $store);
151
- }
152
- /**
153
- * Get the configured itemized order feed file format
154
- * @param mixed $store
155
- * @return string
156
- */
157
- public function getItemizedOrderFeedFileFormat($store=null)
158
- {
159
- return Mage::getStoreConfig(static::ITEMIZED_ORDER_FEED_FILE_FORMAT_PATH, $store);
160
- }
161
- /**
162
- * Get the configured basic order feed file format
163
- * @param mixed $store
164
- * @return string
165
- */
166
- public function getBasicOrderFeedFileFormat($store=null)
167
- {
168
- return Mage::getStoreConfig(static::BASIC_ORDER_FEED_FILE_FORMAT_PATH, $store);
169
- }
170
- /**
171
- * Update the last run time of the order create feed to the specified time,
172
- * or the current time it no time is given. Always set globally so no need to
173
- * ever be given a store context.
174
- * @param string $time
175
- * @return self
176
- */
177
- public function updateOrderLastRunTime($time=null)
178
- {
179
- Mage::getConfig()->saveConfig(self::ORDER_LAST_RUN_PATH, $time ?: time());
180
- Mage::app()->getStore()->resetConfig();
181
- return $this;
182
- }
183
- /**
184
- * Get the last time the order corrections feed was run. Returns the string
185
- * value saved in config. Always set globally so no need for a store context.
186
- * @return string
187
- */
188
- public function getOrderLastRunTime()
189
- {
190
- return Mage::getStoreConfig(self::ORDER_LAST_RUN_PATH);
191
- }
192
 
193
- /**
194
- * Enable/disable conditional pixel logic
195
- *
196
- * @param null $store
197
- * @return bool
198
- */
199
- public function isConditionalPixelEnabled($store=null)
200
- {
201
- return Mage::getStoreConfig(self::CONDITIONAL_PIXEL_ENABLED, $store);
202
- }
203
 
204
- /**
205
- * Name of the affiliate source
206
- *
207
- * If conditional pixel logic is enabled then only display the pixel
208
- * if the query string contains a key with this name
209
- *
210
- * @param null $store
211
- * @return string
212
- */
213
- public function getSourceKeyName($store=null)
214
- {
215
- return Mage::getStoreConfig(self::SOURCE_KEY_NAME, $store);
216
- }
217
  }
20
  */
21
  class EbayEnterprise_Affiliate_Helper_Config
22
  {
23
+ const BEACON_URL_PATH = 'marketing_solutions/eems_affiliate/beacon_url';
24
+ const ENABLED_PATH = 'marketing_solutions/eems_affiliate/active';
25
+ const INT_PATH = 'marketing_solutions/eems_affiliate/int';
26
+ const ITEMIZED_ORDERS_PATH = 'marketing_solutions/eems_affiliate/itemized_orders';
27
+ const PROGRAM_ID_PATH = 'marketing_solutions/eems_affiliate/program_id';
28
+ const TRANSACTION_TYPE_PATH = 'marketing_solutions/eems_affiliate/transaction_type';
29
+ const EXPORT_FILE_PATH_CONFIG_PATH = 'marketing_solutions/eems_affiliate/export_path';
30
+ const CALLBACK_MAPPINGS_PATH = 'marketing_solutions/eems_affiliate/feeds/callback_mappings';
31
+ const PRODUCT_FEED_MAPPING_PATH = 'marketing_solutions/eems_affiliate_product_attribute_map';
32
+ const PRODUCT_FEED_FILENAME_FORMAT_PATH = 'marketing_solutions/eems_affiliate/feeds/product/file_name_format';
33
+ const ITEMIZED_ORDER_FEED_MAPPING_PATH = 'marketing_solutions/eems_affiliate/feeds/order_itemized/fields';
34
+ const BASIC_ORDER_FEED_MAPPING_PATH = 'marketing_solutions/eems_affiliate/feeds/order_basic/fields';
35
+ const ITEMIZED_ORDER_FEED_FILE_FORMAT_PATH = 'marketing_solutions/eems_affiliate/feeds/order_itemized/file_name_format';
36
+ const BASIC_ORDER_FEED_FILE_FORMAT_PATH = 'marketing_solutions/eems_affiliate/feeds/order_basic/file_name_format';
37
+ const ORDER_LAST_RUN_PATH = 'marketing_solutions/eems_affiliate/feed/last_run_time';
38
+ const JS_FILES = 'marketing_solutions/eems_affiliate/js_files';
39
  const CONDITIONAL_PIXEL_ENABLED = 'marketing_solutions/eems_affiliate/conditional_pixel_enabled';
40
  const SOURCE_KEY_NAME = 'marketing_solutions/eems_affiliate/source_key_name';
41
+ const TRANSACTION_TYPE_SALE = '1';
42
+ const TRANSACTION_TYPE_LEAD = '2';
43
 
44
+ /**
45
+ * retrieve the program id from store config
46
+ * @param mixed $store
47
+ * @return string
48
+ */
49
+ public function getProgramId($store = null)
50
+ {
51
+ return Mage::getStoreConfig(static::PROGRAM_ID_PATH, $store);
52
+ }
53
+ /**
54
+ * retrieve the transaction type from store config
55
+ * @param mixed $store
56
+ * @return string
57
+ */
58
+ public function getTransactionType($store = null)
59
+ {
60
+ return Mage::getStoreConfig(static::TRANSACTION_TYPE_PATH, $store);
61
+ }
62
+ /**
63
+ * retrieve the itemized orders from store config
64
+ * @param mixed $store
65
+ * @return bool
66
+ */
67
+ public function isItemizedOrders($store = null)
68
+ {
69
+ return Mage::getStoreConfigFlag(static::ITEMIZED_ORDERS_PATH, $store);
70
+ }
71
+ /**
72
+ * check if beacon pixel is enable in the store config
73
+ * @param mixed $store
74
+ * @return bool
75
+ */
76
+ public function isEnabled($store = null)
77
+ {
78
+ return Mage::getStoreConfigFlag(static::ENABLED_PATH, $store);
79
+ }
80
+ /**
81
+ * retrieve the int from store config
82
+ * @param mixed $store
83
+ * @return string
84
+ */
85
+ public function getInt($store = null)
86
+ {
87
+ return Mage::getStoreConfig(static::INT_PATH, $store);
88
+ }
89
+ /**
90
+ * retrieve the base url of the beacon from store config
91
+ * @param mixed $store
92
+ * @return string
93
+ */
94
+ public function getBeaconBaseUrl($store = null)
95
+ {
96
+ return Mage::getStoreConfig(static::BEACON_URL_PATH, $store);
97
+ }
98
+ /**
99
+ * Get the configured export file path.
100
+ * @param mixed $store
101
+ * @return string
102
+ */
103
+ public function getExportFilePath($store = null)
104
+ {
105
+ return Mage::getStoreConfig(static::EXPORT_FILE_PATH_CONFIG_PATH, $store);
106
+ }
107
+ /**
108
+ * Get the callback mappings from the config
109
+ * @param mixed $store
110
+ * @return array
111
+ */
112
+ public function getCallbackMappings($store = null)
113
+ {
114
+ return Mage::getStoreConfig(static::CALLBACK_MAPPINGS_PATH, $store);
115
+ }
116
+ /**
117
+ * Get the configured feed mapping for the product feed.
118
+ * @param mixed $store
119
+ * @return array
120
+ */
121
+ public function getProductFeedFields($store = null)
122
+ {
123
+ return array_filter(Mage::getStoreConfig(static::PRODUCT_FEED_MAPPING_PATH, $store));
124
+ }
125
+ /**
126
+ * Get the configured product feed file name format
127
+ * @param mixed $store
128
+ * @return string
129
+ */
130
+ public function getProductFeedFilenameFormat($store = null)
131
+ {
132
+ return Mage::getStoreConfig(static::PRODUCT_FEED_FILENAME_FORMAT_PATH, $store);
133
+ }
134
+ /**
135
+ * Get the configured feed mapping for the itemized orders feed.
136
+ * @param mixed $store
137
+ * @return array
138
+ */
139
+ public function getItemizedOrderFeedFields($store = null)
140
+ {
141
+ return Mage::getStoreConfig(static::ITEMIZED_ORDER_FEED_MAPPING_PATH, $store);
142
+ }
143
+ /**
144
+ * Get the configured feed mapping for the basic orders feed.
145
+ * @param mixed $store
146
+ * @return array
147
+ */
148
+ public function getBasicOrderFeedFields($store = null)
149
+ {
150
+ return Mage::getStoreConfig(static::BASIC_ORDER_FEED_MAPPING_PATH, $store);
151
+ }
152
+ /**
153
+ * Get the configured itemized order feed file format
154
+ * @param mixed $store
155
+ * @return string
156
+ */
157
+ public function getItemizedOrderFeedFileFormat($store = null)
158
+ {
159
+ return Mage::getStoreConfig(static::ITEMIZED_ORDER_FEED_FILE_FORMAT_PATH, $store);
160
+ }
161
+ /**
162
+ * Get the configured basic order feed file format
163
+ * @param mixed $store
164
+ * @return string
165
+ */
166
+ public function getBasicOrderFeedFileFormat($store = null)
167
+ {
168
+ return Mage::getStoreConfig(static::BASIC_ORDER_FEED_FILE_FORMAT_PATH, $store);
169
+ }
170
+ /**
171
+ * Update the last run time of the order create feed to the specified time,
172
+ * or the current time it no time is given. Always set globally so no need to
173
+ * ever be given a store context.
174
+ * @param string $time
175
+ * @return self
176
+ */
177
+ public function updateOrderLastRunTime($time = null)
178
+ {
179
+ Mage::getConfig()->saveConfig(self::ORDER_LAST_RUN_PATH, $time ?: time());
180
+ Mage::app()->getStore()->resetConfig();
181
+ return $this;
182
+ }
183
+ /**
184
+ * Get the last time the order corrections feed was run. Returns the string
185
+ * value saved in config. Always set globally so no need for a store context.
186
+ * @return string
187
+ */
188
+ public function getOrderLastRunTime()
189
+ {
190
+ return Mage::getStoreConfig(self::ORDER_LAST_RUN_PATH);
191
+ }
192
 
193
+ /**
194
+ * Enable/disable conditional pixel logic
195
+ *
196
+ * @param null $store
197
+ * @return bool
198
+ */
199
+ public function isConditionalPixelEnabled($store = null)
200
+ {
201
+ return Mage::getStoreConfig(self::CONDITIONAL_PIXEL_ENABLED, $store);
202
+ }
203
 
204
+ /**
205
+ * Name of the affiliate source
206
+ *
207
+ * If conditional pixel logic is enabled then only display the pixel
208
+ * if the query string contains a key with this name
209
+ *
210
+ * @param null $store
211
+ * @return string
212
+ */
213
+ public function getSourceKeyName($store = null)
214
+ {
215
+ return Mage::getStoreConfig(self::SOURCE_KEY_NAME, $store);
216
+ }
217
  }
app/code/community/EbayEnterprise/Affiliate/Helper/Data.php CHANGED
@@ -18,119 +18,118 @@
18
 
19
  class EbayEnterprise_Affiliate_Helper_Data extends Mage_Core_Helper_Abstract
20
  {
21
- /** value for the source cookie */
22
- const SOURCE_KEY_VALUE = 'eean';
23
- /** prefix added to the source key name set in the admin panel to create a unique cookie name */
24
- const SOURCE_COOKIE_PREFIX = 'ebay_enterprise_affiliate_';
25
 
26
- /**
27
- * Build the beacon url given an array keys
28
- * @param array $params
29
- * @return string
30
- */
31
- public function buildBeaconUrl(array $params)
32
- {
33
- return Mage::helper('eems_affiliate/config')->getBeaconBaseUrl() . '?' .
34
- http_build_query($params);
35
- }
36
- /**
37
- * Get all unique configured program ids. Program ids may only be set at the
38
- * website level, so only get the program id for the default store for
39
- * each website.
40
- * @return array
41
- */
42
- public function getAllProgramIds()
43
- {
44
- $config = Mage::helper('eems_affiliate/config');
45
- return array_unique(array_filter(array_map(
46
- function ($website) use ($config) {
47
- return $config->getProgramId($website->getDefaultStore());
48
- },
49
- Mage::app()->getWebsites()
50
- )));
51
- }
52
- /**
53
- * Get a single store view for a program id. As program ids are configured
54
- * only at the global or website level, the store view selecetd will be
55
- * the default store view for the scope the configuration is set at. When
56
- * set globally, the default store view for the Magento instance will be
57
- * selected. When set at a website level, the default store view for that
58
- * website will be used.
59
- * @param string $programId
60
- * @return Mage_Core_Model_Store|null
61
- */
62
- public function getStoreForProgramId($programId)
63
- {
64
- $config = Mage::helper('eems_affiliate/config');
65
- // Check for the default store view to be this program id first, will match
66
- // when the program id is set at the global level.
67
- $defaultStoreView = Mage::app()->getDefaultStoreView();
68
- $defaultProgramId = $config->getProgramId($defaultStoreView);
69
- if ($programId === $defaultProgramId) {
70
- return $defaultStoreView;
71
- }
72
- // When set at the website level, use the first website encountered
73
- // with a matching program id
74
- foreach (Mage::app()->getWebsites() as $website) {
75
- $storeView = $website->getDefaultStore();
76
- if ($config->getProgramId($storeView) === $programId) {
77
- return $storeView;
78
- }
79
- }
80
- return null;
81
- }
82
- /**
83
- * Get all store views that have a program id that matches the given
84
- * program id
85
- * @param string $programId
86
- * @return Mage_Core_Model_Store[]
87
- */
88
- public function getAllStoresForProgramId($programId)
89
- {
90
- $config = Mage::helper('eems_affiliate/config');
91
- return array_filter(
92
- Mage::app()->getStores(),
93
- function ($store) use ($config, $programId) {
94
- return $config->getProgramId($store) === $programId;
95
- }
96
- );
97
- }
98
- /**
99
- * take a boolean value and return the string 'yes' or 'no' when the boolean
100
- * value is true or false
101
- * @param bool $value
102
- * @return string
103
- * @codeCoverageIgnore
104
- */
105
- public function parseBoolToYesNo($value)
106
- {
107
- return $value?'yes':'no';
108
- }
109
 
110
- /**
111
- * helper function to take the source key name set in the admin panel
112
- * and prepend a string to create a unique name for the cookie
113
- *
114
- * @return string
115
- */
116
- public function getSourceCookieName()
117
- {
118
- $key = Mage::helper('eems_affiliate/config')->getSourceKeyName();
119
 
120
- return self::SOURCE_COOKIE_PREFIX.$key;
121
- }
122
 
123
- /**
124
- * True if the cookie exists and has a value of SOURCE_KEY_VALUE
125
- * False otherwise
126
- *
127
- * @return bool
128
- */
129
- public function isValidCookie()
130
- {
131
- $cookie = $this->getSourceCookieName();
132
  $value = Mage::getModel('core/cookie')->get($cookie);
133
  return ($value === self::SOURCE_KEY_VALUE);
134
- }
135
  }
136
-
18
 
19
  class EbayEnterprise_Affiliate_Helper_Data extends Mage_Core_Helper_Abstract
20
  {
21
+ /** value for the source cookie */
22
+ const SOURCE_KEY_VALUE = 'eean';
23
+ /** prefix added to the source key name set in the admin panel to create a unique cookie name */
24
+ const SOURCE_COOKIE_PREFIX = 'ebay_enterprise_affiliate_';
25
 
26
+ /**
27
+ * Build the beacon url given an array keys
28
+ * @param array $params
29
+ * @return string
30
+ */
31
+ public function buildBeaconUrl(array $params)
32
+ {
33
+ return Mage::helper('eems_affiliate/config')->getBeaconBaseUrl() . '?' .
34
+ http_build_query($params);
35
+ }
36
+ /**
37
+ * Get all unique configured program ids. Program ids may only be set at the
38
+ * website level, so only get the program id for the default store for
39
+ * each website.
40
+ * @return array
41
+ */
42
+ public function getAllProgramIds()
43
+ {
44
+ $config = Mage::helper('eems_affiliate/config');
45
+ return array_unique(array_filter(array_map(
46
+ function ($website) use ($config) {
47
+ return $config->getProgramId($website->getDefaultStore());
48
+ },
49
+ Mage::app()->getWebsites()
50
+ )));
51
+ }
52
+ /**
53
+ * Get a single store view for a program id. As program ids are configured
54
+ * only at the global or website level, the store view selecetd will be
55
+ * the default store view for the scope the configuration is set at. When
56
+ * set globally, the default store view for the Magento instance will be
57
+ * selected. When set at a website level, the default store view for that
58
+ * website will be used.
59
+ * @param string $programId
60
+ * @return Mage_Core_Model_Store|null
61
+ */
62
+ public function getStoreForProgramId($programId)
63
+ {
64
+ $config = Mage::helper('eems_affiliate/config');
65
+ // Check for the default store view to be this program id first, will match
66
+ // when the program id is set at the global level.
67
+ $defaultStoreView = Mage::app()->getDefaultStoreView();
68
+ $defaultProgramId = $config->getProgramId($defaultStoreView);
69
+ if ($programId === $defaultProgramId) {
70
+ return $defaultStoreView;
71
+ }
72
+ // When set at the website level, use the first website encountered
73
+ // with a matching program id
74
+ foreach (Mage::app()->getWebsites() as $website) {
75
+ $storeView = $website->getDefaultStore();
76
+ if ($config->getProgramId($storeView) === $programId) {
77
+ return $storeView;
78
+ }
79
+ }
80
+ return null;
81
+ }
82
+ /**
83
+ * Get all store views that have a program id that matches the given
84
+ * program id
85
+ * @param string $programId
86
+ * @return Mage_Core_Model_Store[]
87
+ */
88
+ public function getAllStoresForProgramId($programId)
89
+ {
90
+ $config = Mage::helper('eems_affiliate/config');
91
+ return array_filter(
92
+ Mage::app()->getStores(),
93
+ function ($store) use ($config, $programId) {
94
+ return $config->getProgramId($store) === $programId;
95
+ }
96
+ );
97
+ }
98
+ /**
99
+ * take a boolean value and return the string 'yes' or 'no' when the boolean
100
+ * value is true or false
101
+ * @param bool $value
102
+ * @return string
103
+ * @codeCoverageIgnore
104
+ */
105
+ public function parseBoolToYesNo($value)
106
+ {
107
+ return $value?'yes':'no';
108
+ }
109
 
110
+ /**
111
+ * helper function to take the source key name set in the admin panel
112
+ * and prepend a string to create a unique name for the cookie
113
+ *
114
+ * @return string
115
+ */
116
+ public function getSourceCookieName()
117
+ {
118
+ $key = Mage::helper('eems_affiliate/config')->getSourceKeyName();
119
 
120
+ return self::SOURCE_COOKIE_PREFIX.$key;
121
+ }
122
 
123
+ /**
124
+ * True if the cookie exists and has a value of SOURCE_KEY_VALUE
125
+ * False otherwise
126
+ *
127
+ * @return bool
128
+ */
129
+ public function isValidCookie()
130
+ {
131
+ $cookie = $this->getSourceCookieName();
132
  $value = Mage::getModel('core/cookie')->get($cookie);
133
  return ($value === self::SOURCE_KEY_VALUE);
134
+ }
135
  }
 
app/code/community/EbayEnterprise/Affiliate/Helper/Map.php CHANGED
@@ -36,75 +36,77 @@
36
  */
37
  class EbayEnterprise_Affiliate_Helper_Map
38
  {
39
- /**
40
- * Get the program id using the store passed in params. Pass through to the
41
- * config helper using the store included in the $params array as the store
42
- * context to get the config value from.
43
- * @param array $params
44
- * @return string
45
- */
46
- public function getProgramId($params)
47
- {
48
- return Mage::helper('eems_affiliate/config')->getProgramId($params['store']);
49
- }
50
- /**
51
- * Get data for the key from the item. Expects "item" to be a Varien_Object,
52
- * "key" must be set. Additionally, if "format" is also included, it must
53
- * be a valid string format and will be used to format the data before it is
54
- * returned from this method.
55
- * @param array $params
56
- * @return mixed
57
- * @throws Mage_Core_Exception If the value of the `item` key is not a Varien_Object or the `key` key/value pair is not set.
58
- */
59
- public function getDataValue($params)
60
- {
61
- if (!$params['item'] instanceof Varien_Object) {
62
- throw new Mage_Core_Exception(
63
- sprintf(
64
- 'Item of type %s not compatible with %s',
65
- get_class($params['item']), __METHOD__
66
- )
67
- );
68
- }
69
- if (!isset($params['key'])) {
70
- throw new Mage_Core_Exception(
71
- 'The data "key" must be provided in the configured params for this callback.'
72
- );
73
- }
74
- $helper = Mage::helper('core');
75
- return sprintf(
76
- isset($params['format']) ? $params['format'] : '%s',
77
- preg_replace('/\s\s+/', ' ', $helper->stripTags($params['item']->getDataUsingMethod($params['key'])))
78
- );
79
- }
80
- /**
81
- * Simply return the "value" included in the params.
82
- * @param array $params
83
- * @return string
84
- * @throws Mage_Core_Exception If the `value` key/value pair is not set.
85
- */
86
- public function passStatic($params)
87
- {
88
- if (!isset($params['value'])) {
89
- throw new Mage_Core_Exception(sprintf(
90
- 'No value provided to return from %s', __METHOD__
91
- ));
92
- }
93
- return $params['value'];
94
- }
95
- /**
96
- * check if an attribute has value then return 'yes' otherwise return
97
- * 'no'
98
- * @param array $params
99
- * @return string
100
- */
101
- public function getValueYesNo(array $params)
102
- {
103
- return sprintf(
104
- isset($params['format']) ? $params['format'] : '%s',
105
- Mage::helper('eems_affiliate')->parseBoolToYesNo(
106
- $params['item']->getDataUsingMethod($params['key'])
107
- )
108
- );
109
- }
 
 
110
  }
36
  */
37
  class EbayEnterprise_Affiliate_Helper_Map
38
  {
39
+ /**
40
+ * Get the program id using the store passed in params. Pass through to the
41
+ * config helper using the store included in the $params array as the store
42
+ * context to get the config value from.
43
+ * @param array $params
44
+ * @return string
45
+ */
46
+ public function getProgramId($params)
47
+ {
48
+ return Mage::helper('eems_affiliate/config')->getProgramId($params['store']);
49
+ }
50
+ /**
51
+ * Get data for the key from the item. Expects "item" to be a Varien_Object,
52
+ * "key" must be set. Additionally, if "format" is also included, it must
53
+ * be a valid string format and will be used to format the data before it is
54
+ * returned from this method.
55
+ * @param array $params
56
+ * @return mixed
57
+ * @throws Mage_Core_Exception If the value of the `item` key is not a Varien_Object or the `key` key/value pair is not set.
58
+ */
59
+ public function getDataValue($params)
60
+ {
61
+ if (!$params['item'] instanceof Varien_Object) {
62
+ throw new Mage_Core_Exception(
63
+ sprintf(
64
+ 'Item of type %s not compatible with %s',
65
+ get_class($params['item']),
66
+ __METHOD__
67
+ )
68
+ );
69
+ }
70
+ if (!isset($params['key'])) {
71
+ throw new Mage_Core_Exception(
72
+ 'The data "key" must be provided in the configured params for this callback.'
73
+ );
74
+ }
75
+ $helper = Mage::helper('core');
76
+ return sprintf(
77
+ isset($params['format']) ? $params['format'] : '%s',
78
+ preg_replace('/\s\s+/', ' ', $helper->stripTags($params['item']->getDataUsingMethod($params['key'])))
79
+ );
80
+ }
81
+ /**
82
+ * Simply return the "value" included in the params.
83
+ * @param array $params
84
+ * @return string
85
+ * @throws Mage_Core_Exception If the `value` key/value pair is not set.
86
+ */
87
+ public function passStatic($params)
88
+ {
89
+ if (!isset($params['value'])) {
90
+ throw new Mage_Core_Exception(sprintf(
91
+ 'No value provided to return from %s',
92
+ __METHOD__
93
+ ));
94
+ }
95
+ return $params['value'];
96
+ }
97
+ /**
98
+ * check if an attribute has value then return 'yes' otherwise return
99
+ * 'no'
100
+ * @param array $params
101
+ * @return string
102
+ */
103
+ public function getValueYesNo(array $params)
104
+ {
105
+ return sprintf(
106
+ isset($params['format']) ? $params['format'] : '%s',
107
+ Mage::helper('eems_affiliate')->parseBoolToYesNo(
108
+ $params['item']->getDataUsingMethod($params['key'])
109
+ )
110
+ );
111
+ }
112
  }
app/code/community/EbayEnterprise/Affiliate/Helper/Map/Order.php CHANGED
@@ -22,136 +22,138 @@
22
  */
23
  class EbayEnterprise_Affiliate_Helper_Map_Order
24
  {
25
- /**
26
- * Get the order increment id from the order the item was created for. Expects
27
- * the "item" to be a Mage_Sales_Model_Order_Item and the "format" to be a
28
- * valid string format.
29
- * @param array $params
30
- * @return string
31
- */
32
- public function getItemOrderId($params)
33
- {
34
- $item = $params['item'];
35
- return sprintf(
36
- $params['format'], $item->getOriginalIncrementId() ?: $item->getIncrementId()
37
- );
38
- }
39
- /**
40
- * Get the updated item quantity - original quantity less any refunded
41
- * or canceled. Expects the "item" to be a Mage_Sales_Model_Order_Item.
42
- * @param array $params
43
- * @return int
44
- */
45
- public function getItemQuantity($params)
46
- {
47
- $item = $params['item'];
48
- // field limit doesn't allow this to go above 99
49
- return (int) ($item->getQtyOrdered() - $item->getQtyRefunded() - $item->getQtyCanceled());
50
- }
51
- /**
52
- * Calculate a row total including discounts.
53
- * @param array $params
54
- * @return float
55
- */
56
- private function _calculateDiscountedRowTotal($params)
57
- {
58
- $item = $params['item'];
59
- // tread bundle items as 0.00 total as their total will be represented by
60
- // the total of their children products
61
- if ($item->getProductType() === Mage_Catalog_Model_Product_Type::TYPE_BUNDLE) {
62
- return 0.00;
63
- }
64
- // don't allow negative amounts - could happen if a discounted item was cancelled
65
- return max(
66
- 0,
67
- $item->getBasePrice() * $this->getItemQuantity($params) - ($item->getBaseDiscountAmount() - $item->getbaseDiscountRefunded())
68
- );
69
- }
70
- /**
71
- * Get the corrected total for the row - price * corrected qty. Expects the
72
- * "item" to be a Mage_Sales_Model_Order_Item, "format" to be a valid
73
- * format string and "store" to be a Mage_Core_Model_Store or otherwise viable
74
- * store identifier.
75
- * @param array $params
76
- * @return string
77
- */
78
- public function getRowTotal($params)
79
- {
80
- $config = Mage::helper('eems_affiliate/config');
81
- // transaction type of Lead should always just be "0"
82
- if ($config->getTransactionType($params['store']) === $config::TRANSACTION_TYPE_LEAD) {
83
- return 0;
84
- }
85
- return sprintf(
86
- $params['format'],
87
- $this->_calculateDiscountedRowTotal($params)
88
- );
89
- }
90
- /**
91
- * Get the corrected amount of the order. Expects "item" to be a
92
- * Mage_Sales_Model_Order, "store" to be a Mage_Core_Model_Store or otherwise
93
- * valid store identifier, and "format" to be a valid format string.
94
- * @param array $params
95
- * @return string
96
- */
97
- public function getOrderAmount($params)
98
- {
99
- $config = Mage::helper('eems_affiliate/config');
100
- // transaction type of Lead should always just be "0"
101
- if ($config->getTransactionType($params['store']) === $config::TRANSACTION_TYPE_LEAD) {
102
- return 0;
103
- }
104
- $order = $params['item'];
105
- return sprintf(
106
- $params['format'],
107
- // prevent sub-zero amounts for canceled orders with discounts
108
- max(
109
- 0,
110
- ($order->getBaseSubtotal() + $order->getBaseDiscountAmount()) -
111
- ($order->getBaseSubtotalRefunded() + $order->getBaseDiscountRefunded()) -
112
- ($order->getBaseSubtotalCanceled() + $order->getBaseDiscountCanceled())
113
- )
114
- );
115
- }
116
- /**
117
- * Get the transaction type configured for the store the order was received
118
- * in. Expects "store" to be a Mage_Core_Model_Store or otherwise valid
119
- * store identifier.
120
- * @param array $params
121
- * @return int
122
- */
123
- public function getTransactionType($params)
124
- {
125
- return (int) Mage::helper('eems_affiliate/config')->getTransactionType($params['store']);
126
- }
127
- /**
128
- * Get the order item increment id. For orders that are the result of an edit,
129
- * get the increment id of the original order. Expects "item" to be a
130
- * Mage_Sales_Model_Oorder and "format" to be a valid format string.
131
- * @param array $params
132
- * @return string
133
- */
134
- public function getOrderId($params)
135
- {
136
- $order = $params['item'];
137
- return sprintf(
138
- $params['format'], $order->getOriginalIncrementId() ?: $order->getIncrementId()
139
- );
140
- }
141
- /**
142
- * Get the SKU of the item with any prohibited characters in the SKU removed.
143
- * Expects "format" to be a valid format string. As this method also passes
144
- * through to EbayEnterprise_Affiliate_Helper_Map::getDataValue, `$params`
145
- * must also adhere to the requirements of that method - "item" is a subclass
146
- * of Varien_Object, have a "key" value set.
147
- * @param array $params
148
- * @return string
149
- */
150
- public function getItemId($params)
151
- {
152
- return sprintf(
153
- $params['format'],
154
- preg_replace('/[^a-zA-Z0-9\-_]/', '', Mage::helper('eems_affiliate/map')->getDataValue($params))
155
- );
156
- }
 
 
157
  }
22
  */
23
  class EbayEnterprise_Affiliate_Helper_Map_Order
24
  {
25
+ /**
26
+ * Get the order increment id from the order the item was created for. Expects
27
+ * the "item" to be a Mage_Sales_Model_Order_Item and the "format" to be a
28
+ * valid string format.
29
+ * @param array $params
30
+ * @return string
31
+ */
32
+ public function getItemOrderId($params)
33
+ {
34
+ $item = $params['item'];
35
+ return sprintf(
36
+ $params['format'],
37
+ $item->getOriginalIncrementId() ?: $item->getIncrementId()
38
+ );
39
+ }
40
+ /**
41
+ * Get the updated item quantity - original quantity less any refunded
42
+ * or canceled. Expects the "item" to be a Mage_Sales_Model_Order_Item.
43
+ * @param array $params
44
+ * @return int
45
+ */
46
+ public function getItemQuantity($params)
47
+ {
48
+ $item = $params['item'];
49
+ // field limit doesn't allow this to go above 99
50
+ return (int) ($item->getQtyOrdered() - $item->getQtyRefunded() - $item->getQtyCanceled());
51
+ }
52
+ /**
53
+ * Calculate a row total including discounts.
54
+ * @param array $params
55
+ * @return float
56
+ */
57
+ private function _calculateDiscountedRowTotal($params)
58
+ {
59
+ $item = $params['item'];
60
+ // tread bundle items as 0.00 total as their total will be represented by
61
+ // the total of their children products
62
+ if ($item->getProductType() === Mage_Catalog_Model_Product_Type::TYPE_BUNDLE) {
63
+ return 0.00;
64
+ }
65
+ // don't allow negative amounts - could happen if a discounted item was cancelled
66
+ return max(
67
+ 0,
68
+ $item->getBasePrice() * $this->getItemQuantity($params) - ($item->getBaseDiscountAmount() - $item->getBaseDiscountRefunded())
69
+ );
70
+ }
71
+ /**
72
+ * Get the corrected total for the row - price * corrected qty. Expects the
73
+ * "item" to be a Mage_Sales_Model_Order_Item, "format" to be a valid
74
+ * format string and "store" to be a Mage_Core_Model_Store or otherwise viable
75
+ * store identifier.
76
+ * @param array $params
77
+ * @return string
78
+ */
79
+ public function getRowTotal($params)
80
+ {
81
+ $config = Mage::helper('eems_affiliate/config');
82
+ // transaction type of Lead should always just be "0"
83
+ if ($config->getTransactionType($params['store']) === $config::TRANSACTION_TYPE_LEAD) {
84
+ return 0;
85
+ }
86
+ return sprintf(
87
+ $params['format'],
88
+ $this->_calculateDiscountedRowTotal($params)
89
+ );
90
+ }
91
+ /**
92
+ * Get the corrected amount of the order. Expects "item" to be a
93
+ * Mage_Sales_Model_Order, "store" to be a Mage_Core_Model_Store or otherwise
94
+ * valid store identifier, and "format" to be a valid format string.
95
+ * @param array $params
96
+ * @return string
97
+ */
98
+ public function getOrderAmount($params)
99
+ {
100
+ $config = Mage::helper('eems_affiliate/config');
101
+ // transaction type of Lead should always just be "0"
102
+ if ($config->getTransactionType($params['store']) === $config::TRANSACTION_TYPE_LEAD) {
103
+ return 0;
104
+ }
105
+ $order = $params['item'];
106
+ return sprintf(
107
+ $params['format'],
108
+ // prevent sub-zero amounts for canceled orders with discounts
109
+ max(
110
+ 0,
111
+ ($order->getBaseSubtotal() + $order->getBaseDiscountAmount()) -
112
+ ($order->getBaseSubtotalRefunded() + $order->getBaseDiscountRefunded()) -
113
+ ($order->getBaseSubtotalCanceled() + $order->getBaseDiscountCanceled())
114
+ )
115
+ );
116
+ }
117
+ /**
118
+ * Get the transaction type configured for the store the order was received
119
+ * in. Expects "store" to be a Mage_Core_Model_Store or otherwise valid
120
+ * store identifier.
121
+ * @param array $params
122
+ * @return int
123
+ */
124
+ public function getTransactionType($params)
125
+ {
126
+ return (int) Mage::helper('eems_affiliate/config')->getTransactionType($params['store']);
127
+ }
128
+ /**
129
+ * Get the order item increment id. For orders that are the result of an edit,
130
+ * get the increment id of the original order. Expects "item" to be a
131
+ * Mage_Sales_Model_Oorder and "format" to be a valid format string.
132
+ * @param array $params
133
+ * @return string
134
+ */
135
+ public function getOrderId($params)
136
+ {
137
+ $order = $params['item'];
138
+ return sprintf(
139
+ $params['format'],
140
+ $order->getOriginalIncrementId() ?: $order->getIncrementId()
141
+ );
142
+ }
143
+ /**
144
+ * Get the SKU of the item with any prohibited characters in the SKU removed.
145
+ * Expects "format" to be a valid format string. As this method also passes
146
+ * through to EbayEnterprise_Affiliate_Helper_Map::getDataValue, `$params`
147
+ * must also adhere to the requirements of that method - "item" is a subclass
148
+ * of Varien_Object, have a "key" value set.
149
+ * @param array $params
150
+ * @return string
151
+ */
152
+ public function getItemId($params)
153
+ {
154
+ return sprintf(
155
+ $params['format'],
156
+ preg_replace('/[^a-zA-Z0-9\-_]/', '', Mage::helper('eems_affiliate/map')->getDataValue($params))
157
+ );
158
+ }
159
  }
app/code/community/EbayEnterprise/Affiliate/Helper/Map/Product.php CHANGED
@@ -22,114 +22,114 @@
22
  */
23
  class EbayEnterprise_Affiliate_Helper_Map_Product
24
  {
25
- const MEDIA_PATH = 'catalog/product';
26
- const NO_SELECTION = 'no_selection';
27
- /**
28
- * Get a product first chained categories meaning that a product can be
29
- * long to many chained of categories. Chained of categories here mean that
30
- * a category root to it's inner most leaf child. Expects "item" to be a
31
- * Mage_Catalog_Model_Product. If "format" is included in `$params`, it will
32
- * must be a valid format string and will be used to format the data returned
33
- * from this method.
34
- * @param array $params
35
- * @return string
36
- */
37
- public function getCategory(array $params)
38
- {
39
- $categories = $params['item']->getCategoryCollection();
40
- $category = $categories->getFirstItem();
41
- $format = isset($params['format']) ? $params['format'] : '%s';
42
- return !is_null($category) ?
43
- sprintf($format, $this->_buildCategoryTree($category)) : null;
44
- }
45
- /**
46
- * Take an array of category entity ids return a collection of categories
47
- * in this array of category ids
48
- * @param array $entityIds list of category ids
49
- * @return Mage_Catalog_Model_Resource_Category_Collection
50
- */
51
- protected function _getCategoriesByIds(array $entityIds)
52
- {
53
- return Mage::getResourceModel('catalog/category_collection')
54
- ->addAttributeToSelect(array('name', 'entity_id'))
55
- ->addAttributeToFilter(array(array('attribute' => 'entity_id', 'in' => $entityIds)))
56
- ->load();
57
- }
58
- /**
59
- * Take a Mage_Catalog_Model_Category object and build a category tree from
60
- * the child leaf to the root of the category (root > inner child > inner most child)
61
- * @param Mage_Catalog_Model_Category $category the inner most child
62
- * @return string
63
- */
64
- protected function _buildCategoryTree(Mage_Catalog_Model_Category $category)
65
- {
66
- $collecton = $this->_getCategoriesByIds(explode('/', $category->getPath()));
67
- $categories = array();
68
- foreach ($collecton as $cat) {
69
- $categories[] = $cat->getName();
70
- }
71
- return implode(' > ', array_filter($categories));
72
- }
73
- /**
74
- * get a product image view URL
75
- * Note: calling Mage_Catalog_Model_Product::getImageUrl, or getThumbnailUrl
76
- * will return the wrong URL when running the feed via CRONJOB will return
77
- * to something similar to this:
78
- * (http://<host>/skin/frontend/default/default/images/catalog/product/placeholder/image.jpg)
79
- * so this method will try to extrapolate as best it can the absolute path of
80
- * the image by calling getImage or getThumbnail which will give the
81
- * a relative path to the image in which we passed to a specialize method to try
82
- * to build the absolute URL path to the image
83
- * @param array $params
84
- * @return string
85
- */
86
- public function getImageUrl(array $params)
87
- {
88
- $item = $params['item'];
89
- // calling the getThumbnail or getImage will return a relative path
90
- // to where we think product image will live, see (self::MEDIA_PATH) constant
91
- $image = trim($item->getDataUsingMethod($params['key']));
92
- $format = isset($params['format']) ? $params['format'] : '%s';
93
- return ($image !== '' && $image !== static::NO_SELECTION)?
94
- sprintf($format, $this->_getAbsoluteImagePath($image)) : null;
95
- }
96
- /**
97
- * get the absolute URL product media path
98
- * @param string $image the relative image
99
- * @return string
100
- * @codeCoverageIgnore
101
- */
102
- protected function _getAbsoluteImagePath($image)
103
- {
104
- // concatenating magento absolute path to the media folder, with a class
105
- // constant base on observation of where we assume all product images stay
106
- // and along with the passed in image relative path
107
- return Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) .
108
- static::MEDIA_PATH . $image;
109
- }
110
- /**
111
- * get a product manage stock quantity
112
- * @param array $params
113
- * @return string
114
- */
115
- public function getInStockQty(array $params)
116
- {
117
- return (int) Mage::getModel('cataloginventory/stock_item')
118
- ->loadByProduct($params['item'])
119
- ->getQty();
120
- }
121
- /**
122
- * check if a product is in stock and return 'yes' or 'no' in respect to
123
- * the outcome
124
- * @param array $params
125
- * @return string
126
- */
127
- public function getInStockYesNo(array $params)
128
- {
129
- return Mage::helper('eems_affiliate')->parseBoolToYesNo(
130
- Mage::getModel('cataloginventory/stock_item')
131
- ->loadByProduct($params['item'])
132
- ->getIsInStock()
133
- );
134
- }
135
  }
22
  */
23
  class EbayEnterprise_Affiliate_Helper_Map_Product
24
  {
25
+ const MEDIA_PATH = 'catalog/product';
26
+ const NO_SELECTION = 'no_selection';
27
+ /**
28
+ * Get a product first chained categories meaning that a product can be
29
+ * long to many chained of categories. Chained of categories here mean that
30
+ * a category root to it's inner most leaf child. Expects "item" to be a
31
+ * Mage_Catalog_Model_Product. If "format" is included in `$params`, it will
32
+ * must be a valid format string and will be used to format the data returned
33
+ * from this method.
34
+ * @param array $params
35
+ * @return string
36
+ */
37
+ public function getCategory(array $params)
38
+ {
39
+ $categories = $params['item']->getCategoryCollection();
40
+ $category = $categories->getFirstItem();
41
+ $format = isset($params['format']) ? $params['format'] : '%s';
42
+ return !is_null($category) ?
43
+ sprintf($format, $this->_buildCategoryTree($category)) : null;
44
+ }
45
+ /**
46
+ * Take an array of category entity ids return a collection of categories
47
+ * in this array of category ids
48
+ * @param array $entityIds list of category ids
49
+ * @return Mage_Catalog_Model_Resource_Category_Collection
50
+ */
51
+ protected function _getCategoriesByIds(array $entityIds)
52
+ {
53
+ return Mage::getResourceModel('catalog/category_collection')
54
+ ->addAttributeToSelect(array('name', 'entity_id'))
55
+ ->addAttributeToFilter(array(array('attribute' => 'entity_id', 'in' => $entityIds)))
56
+ ->load();
57
+ }
58
+ /**
59
+ * Take a Mage_Catalog_Model_Category object and build a category tree from
60
+ * the child leaf to the root of the category (root > inner child > inner most child)
61
+ * @param Mage_Catalog_Model_Category $category the inner most child
62
+ * @return string
63
+ */
64
+ protected function _buildCategoryTree(Mage_Catalog_Model_Category $category)
65
+ {
66
+ $collecton = $this->_getCategoriesByIds(explode('/', $category->getPath()));
67
+ $categories = array();
68
+ foreach ($collecton as $cat) {
69
+ $categories[] = $cat->getName();
70
+ }
71
+ return implode(' > ', array_filter($categories));
72
+ }
73
+ /**
74
+ * get a product image view URL
75
+ * Note: calling Mage_Catalog_Model_Product::getImageUrl, or getThumbnailUrl
76
+ * will return the wrong URL when running the feed via CRONJOB will return
77
+ * to something similar to this:
78
+ * (http://<host>/skin/frontend/default/default/images/catalog/product/placeholder/image.jpg)
79
+ * so this method will try to extrapolate as best it can the absolute path of
80
+ * the image by calling getImage or getThumbnail which will give the
81
+ * a relative path to the image in which we passed to a specialize method to try
82
+ * to build the absolute URL path to the image
83
+ * @param array $params
84
+ * @return string
85
+ */
86
+ public function getImageUrl(array $params)
87
+ {
88
+ $item = $params['item'];
89
+ // calling the getThumbnail or getImage will return a relative path
90
+ // to where we think product image will live, see (self::MEDIA_PATH) constant
91
+ $image = trim($item->getDataUsingMethod($params['key']));
92
+ $format = isset($params['format']) ? $params['format'] : '%s';
93
+ return ($image !== '' && $image !== static::NO_SELECTION)?
94
+ sprintf($format, $this->_getAbsoluteImagePath($image)) : null;
95
+ }
96
+ /**
97
+ * get the absolute URL product media path
98
+ * @param string $image the relative image
99
+ * @return string
100
+ * @codeCoverageIgnore
101
+ */
102
+ protected function _getAbsoluteImagePath($image)
103
+ {
104
+ // concatenating magento absolute path to the media folder, with a class
105
+ // constant base on observation of where we assume all product images stay
106
+ // and along with the passed in image relative path
107
+ return Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) .
108
+ static::MEDIA_PATH . $image;
109
+ }
110
+ /**
111
+ * get a product manage stock quantity
112
+ * @param array $params
113
+ * @return string
114
+ */
115
+ public function getInStockQty(array $params)
116
+ {
117
+ return (int) Mage::getModel('cataloginventory/stock_item')
118
+ ->loadByProduct($params['item'])
119
+ ->getQty();
120
+ }
121
+ /**
122
+ * check if a product is in stock and return 'yes' or 'no' in respect to
123
+ * the outcome
124
+ * @param array $params
125
+ * @return string
126
+ */
127
+ public function getInStockYesNo(array $params)
128
+ {
129
+ return Mage::helper('eems_affiliate')->parseBoolToYesNo(
130
+ Mage::getModel('cataloginventory/stock_item')
131
+ ->loadByProduct($params['item'])
132
+ ->getIsInStock()
133
+ );
134
+ }
135
  }
app/code/community/EbayEnterprise/Affiliate/Model/Feed/Abstract.php CHANGED
@@ -18,319 +18,320 @@
18
 
19
  abstract class EbayEnterprise_Affiliate_Model_Feed_Abstract
20
  {
21
- /**
22
- * The store context the feed is generated for. May be set to any viable store
23
- * identified.
24
- * @var Mage_Core_Model_Store
25
- */
26
- protected $_store;
27
- /**
28
- * Get a collection of items to be included in the feed.
29
- * @return Varien_Data_Collection
30
- */
31
- abstract protected function _getItems();
32
- /**
33
- * Get fields to include in the feed. Fields are expected to map to existing
34
- * callbacks defined in the config.xml.
35
- * @see self::_invokeCallback
36
- * @return array
37
- */
38
- abstract protected function _getFeedFields();
39
- /**
40
- * Gets the filename format for the feed from config for this feed.
41
- * @return string
42
- */
43
- abstract protected function _getFileName();
44
- /**
45
- * Get the delimiter to use in the csv file
46
- * @return string
47
- * @codeCoverageIgnore
48
- */
49
- protected function _getDelimiter()
50
- {
51
- return ',';
52
- }
53
- /**
54
- * Get the encolsure to use in the csv file
55
- * @return string
56
- * @codeCoverageIgnore
57
- */
58
- protected function _getEnclosure()
59
- {
60
- return '"';
61
- }
62
- /**
63
- * Set up the store property.
64
- */
65
- public function __construct($args=array())
66
- {
67
- // Set the store context to the given store or null which whill
68
- // result in the "current" store.
69
- $this->setStore(isset($args['store']) ? $args['store'] : null);
70
- }
71
- /**
72
- * Set the store context for the feed, converting whatever viable store
73
- * ID is passed in to an actual store instance.
74
- * @see Mage_Core_Model_App::getStore for how various identifiers may be used to represent a store
75
- * @param null|string|bool|int|Mage_Core_Model_Store
76
- * @codeCoverageIgnore
77
- */
78
- public function setStore($storeId)
79
- {
80
- $this->_store = Mage::app()->getStore($storeId);
81
- return $this;
82
- }
83
- /**
84
- * Get the store instance the feed is being executed within.
85
- * @return Mage_Core_Model_Store
86
- * @codeCoverageIgnore
87
- */
88
- public function getStore()
89
- {
90
- return $this->_store;
91
- }
92
- /**
93
- * Create the feed file and drop it in the configured export directory.
94
- * @return self
95
- */
96
- public function generateFeed()
97
- {
98
- $this->_generateFile($this->_buildFeedData());
99
- return $this;
100
- }
101
- /**
102
- * Create arrays of data that should be included in the feed file. Each array
103
- * should included a value for every field that is expected to be in the feed.
104
- * @return array
105
- */
106
- protected function _buildFeedData()
107
- {
108
- $items = $this->_getItems();
109
- Mage::log(sprintf('building feed for %d items', $items->count()));
110
- // array_map must be on an array - $items is a collection so need to get the
111
- // underlying array to pass to array_map
112
- return array_map(array($this, '_applyMapping'), $items->getItems());
113
- }
114
- /**
115
- * Use the callback mapping to create the data that represents the given item
116
- * in the feed.
117
- * @param mixed $item Likely a Varien_Object but could really be anything.
118
- * @return array
119
- */
120
- protected function _applyMapping($item)
121
- {
122
- $fields = array();
123
- $mappings = Mage::helper('eems_affiliate/config')->getCallbackMappings();
124
- foreach ($this->_getFeedFields() as $feedField) {
125
- // If the mapping doesn't exist, supplying an empty array will eventually
126
- // result in an exception for being an invalid config mapping.
127
- // @see self::_validateCallbackConfig
128
- $callback = isset($mappings[$feedField]) ? $mappings[$feedField] : array();
129
- // exclude any mappings that have a type of "disabled"
130
- if (!isset($callback['type']) || $callback['type'] !== 'disabled') {
131
- $fields[] = $this->_invokeCallback($callback, $item);
132
- }
133
- }
134
- return $fields;
135
- }
136
- /**
137
- * Given a set of callback configuration and an item, invoke the configured
138
- * callback and return the value. The callback configuration must meet the
139
- * following requirements:
140
- * - May contain a "type" key indicating the type of factory to use. May be
141
- * one of:
142
- * - "disabled" - will not be included in the feed
143
- * - "helper" - will use the Mage::helper factory
144
- * - "model" - will use the Mage::getModel factory
145
- * - "singleton" - will use the Mage::getSingleton factory
146
- * - If not included, will default to "singleton"
147
- * - When type is "disabled" no other key/value pairs are required.
148
- * - If type is not "disabled" the following must be included:
149
- * - "class" must be a valid class alias for the configured factory type
150
- * - "method" must be a valid method on the configured class
151
- * - A "params" key may also be included. If included, its value must be
152
- * an array of key/value pairs that will be included in the params array
153
- * passed to the callback method.
154
- * Every callback will be called with an array of params. The array will
155
- * contain any key/value pairs added in the config as well as an "item" key
156
- * which will have the item being mapped as the value and a "store" key which
157
- * will have the store instance representing the store view context the feed
158
- * is being generated for.
159
- *
160
- * Example configuration:
161
- * <code>
162
- * // This callback configuration array:
163
- * $cfg = array(
164
- * 'type' => 'helper',
165
- * 'class' => 'eems_affiliate/map',
166
- * 'column_name' => 'OID',
167
- * 'params' => array(
168
- * 'key' => 'increment_id',
169
- * ),
170
- * );
171
- * // Will result in the following invocation:
172
- * Mage::helper('eems_affiliate/map')->getDataValue(
173
- * array('key' => 'increment_id', 'item' => $item)
174
- * );
175
- * </code>
176
- *
177
- * @see src/app/code/community/EbayEnterprise/Affiliate/etc/config.xml marketing_solutions/eems_affiliate/feeds contains mappings used for the affiliate feeds
178
- * @param array $callbackConfig
179
- * @param mixed $item
180
- * @return mixed
181
- */
182
- protected function _invokeCallback($callbackConfig, $item)
183
- {
184
- $obj = $this->_getCallbackInstance($callbackConfig);
185
- $params = isset($callbackConfig['params']) ? $callbackConfig['params'] : array();
186
- $item->setStoreId($this->getStore()->getId());
187
- $params['item'] = $item;
188
- $params['store'] = $this->getStore();
189
- $method = $callbackConfig['method'];
190
- if (method_exists($obj, $method)) {
191
- return $obj->$method($params);
192
- } else {
193
- throw new EbayEnterprise_Affiliate_Exception_Configuration(
194
- sprintf(
195
- 'Configured callback method %s::%s does not exist',
196
- get_class($obj),$method
197
- )
198
- );
199
- }
200
- }
201
- /**
202
- * Get an instance of the configured callback.
203
- * @param array $callbackConfig
204
- * @return mixed
205
- */
206
- protected function _getCallbackInstance($callbackConfig)
207
- {
208
- $this->_validateCallbackConfig($callbackConfig);
209
- switch ($callbackConfig['type']) {
210
- // 'disabled' type callback mappings shouldn't pass through here under
211
- // "normal" circumstances (filtered out in apply mapping) but if they do,
212
- // do nothing and return null
213
- case 'disabled':
214
- return null;
215
- case 'helper':
216
- return Mage::helper($callbackConfig['class']);
217
- case 'model':
218
- return Mage::getModel($callbackConfig['class']);
219
- case 'singleton':
220
- default:
221
- return Mage::getSingleton($callbackConfig['class']);
222
- }
223
- }
224
- /**
225
- * Make sure the callback configuration is valid. If it isn't throw an
226
- * exception.
227
- * @param array $callbackConfig
228
- * @return self
229
- * @throws EbayEnterprise_Affiliate_Exception_Configuration If callback configuration is not valid
230
- */
231
- protected function _validateCallbackConfig($callbackConfig)
232
- {
233
- if (empty($callbackConfig)) {
234
- throw new EbayEnterprise_Affiliate_Exception_Configuration('Callback configuration is empty or missing.');
235
- }
236
- // When the callback is "disabled" no other configuration is necessary.
237
- if (isset($callbackConfig['type']) && $callbackConfig['type'] === 'disabled') {
238
- return $this;
239
- }
240
- // If not disabled, must have a class and method - separate checks for
241
- // more simply providing more useful error messages.
242
- $missingFields = array_diff(array('class', 'method', 'column_name'), array_keys($callbackConfig));
243
- if ($missingFields) {
244
- throw new EbayEnterprise_Affiliate_Exception_Configuration(
245
- sprintf('Callback missing %s configuration.', implode(', ', $missingFields))
246
- );
247
- }
248
- return $this;
249
- }
250
- /**
251
- * Create the file and drop it in the configured export directory.
252
- * @param array $feedData
253
- * @return self
254
- */
255
- protected function _generateFile($feedData)
256
- {
257
- if (empty($feedData)) {
258
- return $this;
259
- }
260
- $delimiter = $this->_getDelimiter();
261
- $enclosure = $this->_getEnclosure();
 
262
 
263
- $tmpFile = fopen('php://temp', 'r+');
264
- fputcsv($tmpFile, $this->_getHeaders(), $delimiter, $enclosure);
265
- foreach ($feedData as $row) {
266
- fputcsv($tmpFile, $row, $delimiter, $enclosure);
267
- }
268
- rewind($tmpFile);
269
 
270
- $targetPath = $this->_generateFilePath();
271
- $this->_checkAndCreateFolder(dirname($targetPath));
272
 
273
- // send the contents of the temp stream to the actual file
274
- file_put_contents(
275
- $targetPath,
276
- stream_get_contents($tmpFile)
277
- );
278
- return $this;
279
- }
280
- /**
281
- * Generate the full path to the location where the file should be created.
282
- * @return string
283
- */
284
- protected function _generateFilePath()
285
- {
286
- return self::normalPaths(
287
- Mage::getBaseDir(),
288
- Mage::helper('eems_affiliate/config', $this->getStore())->getExportFilePath(),
289
- $this->_getFileName()
290
- );
291
- }
292
- /**
293
- * The CSV file headers should be the keys used in the configured mappings.
294
- * @return array
295
- */
296
- protected function _getHeaders()
297
- {
298
- $mappings = Mage::helper('eems_affiliate/config')->getCallbackMappings();
299
- $headers = array();
300
- foreach ($this->_getFeedFields() as $field) {
301
- $callbackMapping = isset($mappings[$field]) ? $mappings[$field] : array();
302
- if (!isset($callbackMapping['type']) || $callbackMapping['type'] !== 'disabled') {
303
- $this->_validateCallbackConfig($callbackMapping);
304
- $headers[] = $callbackMapping['column_name'];
305
- }
306
- }
307
- return $headers;
308
- }
309
- /**
310
- * Make sure that all necessary directories in the given path exist. Create
311
- * any that do not.
312
- * @param string $dirPath
313
- * @return self
314
- */
315
- protected function _checkAndCreateFolder($dirPath)
316
- {
317
- // Use the model factory to allow for DI via the factory
318
- $fileIo = Mage::getModel('Varien_Io_File');
319
- $fileIo->open(array('path' => Mage::getBaseDir()));
320
- $fileIo->checkAndCreateFolder($dirPath);
321
- return $this;
322
- }
323
- /**
324
- * Given an arbitrary array of arguments, join them to make a valid path.
325
- * @param string $_,... Parts of the path to be joined
326
- * @return string
327
- */
328
- public static function normalPaths()
329
- {
330
- $paths = implode(DS, func_get_args());
331
- // Retain a single leading slash; otherwise remove all leading, trailing
332
- // and duplicate slashes.
333
- return ((substr($paths, 0, 1) === DS) ? DS : '') .
334
- implode(DS, array_filter(explode(DS, $paths)));
335
- }
336
  }
18
 
19
  abstract class EbayEnterprise_Affiliate_Model_Feed_Abstract
20
  {
21
+ /**
22
+ * The store context the feed is generated for. May be set to any viable store
23
+ * identified.
24
+ * @var Mage_Core_Model_Store
25
+ */
26
+ protected $_store;
27
+ /**
28
+ * Get a collection of items to be included in the feed.
29
+ * @return Varien_Data_Collection
30
+ */
31
+ abstract protected function _getItems();
32
+ /**
33
+ * Get fields to include in the feed. Fields are expected to map to existing
34
+ * callbacks defined in the config.xml.
35
+ * @see self::_invokeCallback
36
+ * @return array
37
+ */
38
+ abstract protected function _getFeedFields();
39
+ /**
40
+ * Gets the filename format for the feed from config for this feed.
41
+ * @return string
42
+ */
43
+ abstract protected function _getFileName();
44
+ /**
45
+ * Get the delimiter to use in the csv file
46
+ * @return string
47
+ * @codeCoverageIgnore
48
+ */
49
+ protected function _getDelimiter()
50
+ {
51
+ return ',';
52
+ }
53
+ /**
54
+ * Get the encolsure to use in the csv file
55
+ * @return string
56
+ * @codeCoverageIgnore
57
+ */
58
+ protected function _getEnclosure()
59
+ {
60
+ return '"';
61
+ }
62
+ /**
63
+ * Set up the store property.
64
+ */
65
+ public function __construct($args = array())
66
+ {
67
+ // Set the store context to the given store or null which whill
68
+ // result in the "current" store.
69
+ $this->setStore(isset($args['store']) ? $args['store'] : null);
70
+ }
71
+ /**
72
+ * Set the store context for the feed, converting whatever viable store
73
+ * ID is passed in to an actual store instance.
74
+ * @see Mage_Core_Model_App::getStore for how various identifiers may be used to represent a store
75
+ * @param null|string|bool|int|Mage_Core_Model_Store
76
+ * @codeCoverageIgnore
77
+ */
78
+ public function setStore($storeId)
79
+ {
80
+ $this->_store = Mage::app()->getStore($storeId);
81
+ return $this;
82
+ }
83
+ /**
84
+ * Get the store instance the feed is being executed within.
85
+ * @return Mage_Core_Model_Store
86
+ * @codeCoverageIgnore
87
+ */
88
+ public function getStore()
89
+ {
90
+ return $this->_store;
91
+ }
92
+ /**
93
+ * Create the feed file and drop it in the configured export directory.
94
+ * @return self
95
+ */
96
+ public function generateFeed()
97
+ {
98
+ $this->_generateFile($this->_buildFeedData());
99
+ return $this;
100
+ }
101
+ /**
102
+ * Create arrays of data that should be included in the feed file. Each array
103
+ * should included a value for every field that is expected to be in the feed.
104
+ * @return array
105
+ */
106
+ protected function _buildFeedData()
107
+ {
108
+ $items = $this->_getItems();
109
+ Mage::log(sprintf('building feed for %d items', $items->count()));
110
+ // array_map must be on an array - $items is a collection so need to get the
111
+ // underlying array to pass to array_map
112
+ return array_map(array($this, '_applyMapping'), $items->getItems());
113
+ }
114
+ /**
115
+ * Use the callback mapping to create the data that represents the given item
116
+ * in the feed.
117
+ * @param mixed $item Likely a Varien_Object but could really be anything.
118
+ * @return array
119
+ */
120
+ protected function _applyMapping($item)
121
+ {
122
+ $fields = array();
123
+ $mappings = Mage::helper('eems_affiliate/config')->getCallbackMappings();
124
+ foreach ($this->_getFeedFields() as $feedField) {
125
+ // If the mapping doesn't exist, supplying an empty array will eventually
126
+ // result in an exception for being an invalid config mapping.
127
+ // @see self::_validateCallbackConfig
128
+ $callback = isset($mappings[$feedField]) ? $mappings[$feedField] : array();
129
+ // exclude any mappings that have a type of "disabled"
130
+ if (!isset($callback['type']) || $callback['type'] !== 'disabled') {
131
+ $fields[] = $this->_invokeCallback($callback, $item);
132
+ }
133
+ }
134
+ return $fields;
135
+ }
136
+ /**
137
+ * Given a set of callback configuration and an item, invoke the configured
138
+ * callback and return the value. The callback configuration must meet the
139
+ * following requirements:
140
+ * - May contain a "type" key indicating the type of factory to use. May be
141
+ * one of:
142
+ * - "disabled" - will not be included in the feed
143
+ * - "helper" - will use the Mage::helper factory
144
+ * - "model" - will use the Mage::getModel factory
145
+ * - "singleton" - will use the Mage::getSingleton factory
146
+ * - If not included, will default to "singleton"
147
+ * - When type is "disabled" no other key/value pairs are required.
148
+ * - If type is not "disabled" the following must be included:
149
+ * - "class" must be a valid class alias for the configured factory type
150
+ * - "method" must be a valid method on the configured class
151
+ * - A "params" key may also be included. If included, its value must be
152
+ * an array of key/value pairs that will be included in the params array
153
+ * passed to the callback method.
154
+ * Every callback will be called with an array of params. The array will
155
+ * contain any key/value pairs added in the config as well as an "item" key
156
+ * which will have the item being mapped as the value and a "store" key which
157
+ * will have the store instance representing the store view context the feed
158
+ * is being generated for.
159
+ *
160
+ * Example configuration:
161
+ * <code>
162
+ * // This callback configuration array:
163
+ * $cfg = array(
164
+ * 'type' => 'helper',
165
+ * 'class' => 'eems_affiliate/map',
166
+ * 'column_name' => 'OID',
167
+ * 'params' => array(
168
+ * 'key' => 'increment_id',
169
+ * ),
170
+ * );
171
+ * // Will result in the following invocation:
172
+ * Mage::helper('eems_affiliate/map')->getDataValue(
173
+ * array('key' => 'increment_id', 'item' => $item)
174
+ * );
175
+ * </code>
176
+ *
177
+ * @see src/app/code/community/EbayEnterprise/Affiliate/etc/config.xml marketing_solutions/eems_affiliate/feeds contains mappings used for the affiliate feeds
178
+ * @param array $callbackConfig
179
+ * @param mixed $item
180
+ * @return mixed
181
+ */
182
+ protected function _invokeCallback($callbackConfig, $item)
183
+ {
184
+ $obj = $this->_getCallbackInstance($callbackConfig);
185
+ $params = isset($callbackConfig['params']) ? $callbackConfig['params'] : array();
186
+ $item->setStoreId($this->getStore()->getId());
187
+ $params['item'] = $item;
188
+ $params['store'] = $this->getStore();
189
+ $method = $callbackConfig['method'];
190
+ if (method_exists($obj, $method)) {
191
+ return $obj->$method($params);
192
+ } else {
193
+ throw new EbayEnterprise_Affiliate_Exception_Configuration(
194
+ sprintf(
195
+ 'Configured callback method %s::%s does not exist',
196
+ get_class($obj),
197
+ $method
198
+ )
199
+ );
200
+ }
201
+ }
202
+ /**
203
+ * Get an instance of the configured callback.
204
+ * @param array $callbackConfig
205
+ * @return mixed
206
+ */
207
+ protected function _getCallbackInstance($callbackConfig)
208
+ {
209
+ $this->_validateCallbackConfig($callbackConfig);
210
+ switch ($callbackConfig['type']) {
211
+ // 'disabled' type callback mappings shouldn't pass through here under
212
+ // "normal" circumstances (filtered out in apply mapping) but if they do,
213
+ // do nothing and return null
214
+ case 'disabled':
215
+ return null;
216
+ case 'helper':
217
+ return Mage::helper($callbackConfig['class']);
218
+ case 'model':
219
+ return Mage::getModel($callbackConfig['class']);
220
+ case 'singleton':
221
+ default:
222
+ return Mage::getSingleton($callbackConfig['class']);
223
+ }
224
+ }
225
+ /**
226
+ * Make sure the callback configuration is valid. If it isn't throw an
227
+ * exception.
228
+ * @param array $callbackConfig
229
+ * @return self
230
+ * @throws EbayEnterprise_Affiliate_Exception_Configuration If callback configuration is not valid
231
+ */
232
+ protected function _validateCallbackConfig($callbackConfig)
233
+ {
234
+ if (empty($callbackConfig)) {
235
+ throw new EbayEnterprise_Affiliate_Exception_Configuration('Callback configuration is empty or missing.');
236
+ }
237
+ // When the callback is "disabled" no other configuration is necessary.
238
+ if (isset($callbackConfig['type']) && $callbackConfig['type'] === 'disabled') {
239
+ return $this;
240
+ }
241
+ // If not disabled, must have a class and method - separate checks for
242
+ // more simply providing more useful error messages.
243
+ $missingFields = array_diff(array('class', 'method', 'column_name'), array_keys($callbackConfig));
244
+ if ($missingFields) {
245
+ throw new EbayEnterprise_Affiliate_Exception_Configuration(
246
+ sprintf('Callback missing %s configuration.', implode(', ', $missingFields))
247
+ );
248
+ }
249
+ return $this;
250
+ }
251
+ /**
252
+ * Create the file and drop it in the configured export directory.
253
+ * @param array $feedData
254
+ * @return self
255
+ */
256
+ protected function _generateFile($feedData)
257
+ {
258
+ if (empty($feedData)) {
259
+ return $this;
260
+ }
261
+ $delimiter = $this->_getDelimiter();
262
+ $enclosure = $this->_getEnclosure();
263
 
264
+ $tmpFile = fopen('php://temp', 'r+');
265
+ fputcsv($tmpFile, $this->_getHeaders(), $delimiter, $enclosure);
266
+ foreach ($feedData as $row) {
267
+ fputcsv($tmpFile, $row, $delimiter, $enclosure);
268
+ }
269
+ rewind($tmpFile);
270
 
271
+ $targetPath = $this->_generateFilePath();
272
+ $this->_checkAndCreateFolder(dirname($targetPath));
273
 
274
+ // send the contents of the temp stream to the actual file
275
+ file_put_contents(
276
+ $targetPath,
277
+ stream_get_contents($tmpFile)
278
+ );
279
+ return $this;
280
+ }
281
+ /**
282
+ * Generate the full path to the location where the file should be created.
283
+ * @return string
284
+ */
285
+ protected function _generateFilePath()
286
+ {
287
+ return self::normalPaths(
288
+ Mage::getBaseDir(),
289
+ Mage::helper('eems_affiliate/config', $this->getStore())->getExportFilePath(),
290
+ $this->_getFileName()
291
+ );
292
+ }
293
+ /**
294
+ * The CSV file headers should be the keys used in the configured mappings.
295
+ * @return array
296
+ */
297
+ protected function _getHeaders()
298
+ {
299
+ $mappings = Mage::helper('eems_affiliate/config')->getCallbackMappings();
300
+ $headers = array();
301
+ foreach ($this->_getFeedFields() as $field) {
302
+ $callbackMapping = isset($mappings[$field]) ? $mappings[$field] : array();
303
+ if (!isset($callbackMapping['type']) || $callbackMapping['type'] !== 'disabled') {
304
+ $this->_validateCallbackConfig($callbackMapping);
305
+ $headers[] = $callbackMapping['column_name'];
306
+ }
307
+ }
308
+ return $headers;
309
+ }
310
+ /**
311
+ * Make sure that all necessary directories in the given path exist. Create
312
+ * any that do not.
313
+ * @param string $dirPath
314
+ * @return self
315
+ */
316
+ protected function _checkAndCreateFolder($dirPath)
317
+ {
318
+ // Use the model factory to allow for DI via the factory
319
+ $fileIo = Mage::getModel('Varien_Io_File');
320
+ $fileIo->open(array('path' => Mage::getBaseDir()));
321
+ $fileIo->checkAndCreateFolder($dirPath);
322
+ return $this;
323
+ }
324
+ /**
325
+ * Given an arbitrary array of arguments, join them to make a valid path.
326
+ * @param string $_,... Parts of the path to be joined
327
+ * @return string
328
+ */
329
+ public static function normalPaths()
330
+ {
331
+ $paths = implode(DS, func_get_args());
332
+ // Retain a single leading slash; otherwise remove all leading, trailing
333
+ // and duplicate slashes.
334
+ return ((substr($paths, 0, 1) === DS) ? DS : '') .
335
+ implode(DS, array_filter(explode(DS, $paths)));
336
+ }
337
  }
app/code/community/EbayEnterprise/Affiliate/Model/Feed/Order/Abstract.php CHANGED
@@ -16,56 +16,57 @@
16
  */
17
 
18
 
19
- abstract class EbayEnterprise_Affiliate_Model_Feed_Order_Abstract
20
- extends EbayEnterprise_Affiliate_Model_Feed_Abstract
21
  {
22
- // Time format to use for the SQL statements
23
- const SELECT_TIME_FORMAT = 'Y-m-d H:i:s';
24
- const FILENAME_TIME_FORMAT = 'YmdHis';
25
- /**
26
- * Time stamp considered to be the time at which the feed runs - used for
27
- * generating the file name and the cutoff time for capturing order changes.
28
- * @var int
29
- */
30
- protected $_startTime;
31
- /**
32
- * Allow for the "start" time of the feed to be passed in the constructor
33
- * $args array. If given, this should be the time at which the feed is run.
34
- * @param array $args
35
- */
36
- public function __construct($args=array())
37
- {
38
- parent::__construct($args);
39
- $this->_startTime = isset($args['start_time']) ? $args['start_time'] : time();
40
- }
41
- /**
42
- * Get the ids of all stores that should be included in the feed. Only orders
43
- * placed for these stores will be included in the corrected feed.
44
- * @return array
45
- */
46
- protected function _getStoreIdsToInclude()
47
- {
48
- return array_map(
49
- function ($store) { return $store->getId(); },
50
- Mage::helper('eems_affiliate')->getAllStoresForProgramId(
51
- Mage::helper('eems_affiliate/config')->getProgramId($this->_store)
52
- )
53
- );
54
- }
55
- /**
56
- * @see parent::_getFileName
57
- */
58
- protected function _getFileName()
59
- {
60
- return sprintf(
61
- $this->_getFileNameFormat(),
62
- Mage::helper('eems_affiliate/config')->getProgramId($this->getStore()),
63
- date(static::FILENAME_TIME_FORMAT, $this->_startTime)
64
- );
65
- }
66
- /**
67
- * Get the format string used to build the feed file name.
68
- * @return string
69
- */
70
- abstract protected function _getFileNameFormat();
 
 
71
  }
16
  */
17
 
18
 
19
+ abstract class EbayEnterprise_Affiliate_Model_Feed_Order_Abstract extends EbayEnterprise_Affiliate_Model_Feed_Abstract
 
20
  {
21
+ // Time format to use for the SQL statements
22
+ const SELECT_TIME_FORMAT = 'Y-m-d H:i:s';
23
+ const FILENAME_TIME_FORMAT = 'YmdHis';
24
+ /**
25
+ * Time stamp considered to be the time at which the feed runs - used for
26
+ * generating the file name and the cutoff time for capturing order changes.
27
+ * @var int
28
+ */
29
+ protected $_startTime;
30
+ /**
31
+ * Allow for the "start" time of the feed to be passed in the constructor
32
+ * $args array. If given, this should be the time at which the feed is run.
33
+ * @param array $args
34
+ */
35
+ public function __construct($args = array())
36
+ {
37
+ parent::__construct($args);
38
+ $this->_startTime = isset($args['start_time']) ? $args['start_time'] : time();
39
+ }
40
+ /**
41
+ * Get the ids of all stores that should be included in the feed. Only orders
42
+ * placed for these stores will be included in the corrected feed.
43
+ * @return array
44
+ */
45
+ protected function _getStoreIdsToInclude()
46
+ {
47
+ return array_map(
48
+ function ($store) {
49
+ return $store->getId();
50
+ },
51
+ Mage::helper('eems_affiliate')->getAllStoresForProgramId(
52
+ Mage::helper('eems_affiliate/config')->getProgramId($this->_store)
53
+ )
54
+ );
55
+ }
56
+ /**
57
+ * @see parent::_getFileName
58
+ */
59
+ protected function _getFileName()
60
+ {
61
+ return sprintf(
62
+ $this->_getFileNameFormat(),
63
+ Mage::helper('eems_affiliate/config')->getProgramId($this->getStore()),
64
+ date(static::FILENAME_TIME_FORMAT, $this->_startTime)
65
+ );
66
+ }
67
+ /**
68
+ * Get the format string used to build the feed file name.
69
+ * @return string
70
+ */
71
+ abstract protected function _getFileNameFormat();
72
  }
app/code/community/EbayEnterprise/Affiliate/Model/Feed/Order/Basic.php CHANGED
@@ -16,60 +16,60 @@
16
  */
17
 
18
 
19
- class EbayEnterprise_Affiliate_Model_Feed_Order_Basic
20
- extends EbayEnterprise_Affiliate_Model_Feed_Order_Abstract
21
  {
22
- /**
23
- * @see parent::_getItems
24
- */
25
- protected function _getItems()
26
- {
27
- $lastRunTime = date(static::SELECT_TIME_FORMAT, Mage::helper('eems_affiliate/config')->getOrderLastRunTime() ?: 0);
28
- $startTime = date(static::SELECT_TIME_FORMAT, $this->_startTime);
29
- $storeIds = $this->_getStoreIdsToInclude();
30
 
31
- $collection = Mage::getResourceModel('sales/order_collection');
32
- $select = $collection->getSelect();
33
- $select
34
- ->joinLeft(
35
- array('cmo' => $collection->getTable('sales/creditmemo')),
36
- 'main_table.entity_id = cmo.order_id',
37
- array()
38
- )
39
- // this is far more pure SQL than should be here but I don't see a way to
40
- // get the proper groupings of where clauses without doing this
41
- ->where(
42
- 'main_table.store_id IN (?)', $storeIds
43
- )
44
- ->where(
45
- "(main_table.original_increment_id IS NOT NULL AND main_table.created_at >= :lastRunTime AND main_table.created_at < :startTime) OR" .
46
- "(cmo.created_at IS NOT NULL AND cmo.created_at >= :lastRunTime AND cmo.created_at < :startTime) OR" .
47
- "(main_table.state = 'canceled' AND main_table.updated_at >= :lastRunTime AND main_table.updated_at < :startTime AND main_table.relation_child_id IS NULL)"
48
- );
 
49
 
50
- $collection->addBindParam(':lastRunTime', $lastRunTime)
51
- ->addBindParam(':startTime', $startTime);
52
 
53
- return $collection;
54
- }
55
- /**
56
- * Get an array of callback mappings for the feed. Should result in an array
57
- * with keys for the field in the CSV and a value of an array used to
58
- * represent a mapping callback.
59
- * @see parent::_invokeCallback
60
- */
61
- protected function _getFeedFields()
62
- {
63
- return explode(',', Mage::helper('eems_affiliate/config')->getBasicOrderFeedFields());
64
- }
65
- /**
66
- * Get the file name format from config. Doesn't pass store context as the
67
- * file name format should only ever exist at the global level.
68
- * @see parent::_getFileNameFormat
69
- * @codeCoverageIgnore
70
- */
71
- protected function _getFileNameFormat()
72
- {
73
- return Mage::helper('eems_affiliate/config')->getBasicOrderFeedFileFormat();
74
- }
75
  }
16
  */
17
 
18
 
19
+ class EbayEnterprise_Affiliate_Model_Feed_Order_Basic extends EbayEnterprise_Affiliate_Model_Feed_Order_Abstract
 
20
  {
21
+ /**
22
+ * @see parent::_getItems
23
+ */
24
+ protected function _getItems()
25
+ {
26
+ $lastRunTime = date(static::SELECT_TIME_FORMAT, Mage::helper('eems_affiliate/config')->getOrderLastRunTime() ?: 0);
27
+ $startTime = date(static::SELECT_TIME_FORMAT, $this->_startTime);
28
+ $storeIds = $this->_getStoreIdsToInclude();
29
 
30
+ $collection = Mage::getResourceModel('sales/order_collection');
31
+ $select = $collection->getSelect();
32
+ $select
33
+ ->joinLeft(
34
+ array('cmo' => $collection->getTable('sales/creditmemo')),
35
+ 'main_table.entity_id = cmo.order_id',
36
+ array()
37
+ )
38
+ // this is far more pure SQL than should be here but I don't see a way to
39
+ // get the proper groupings of where clauses without doing this
40
+ ->where(
41
+ 'main_table.store_id IN (?)',
42
+ $storeIds
43
+ )
44
+ ->where(
45
+ "(main_table.original_increment_id IS NOT NULL AND main_table.created_at >= :lastRunTime AND main_table.created_at < :startTime) OR" .
46
+ "(cmo.created_at IS NOT NULL AND cmo.created_at >= :lastRunTime AND cmo.created_at < :startTime) OR" .
47
+ "(main_table.state = 'canceled' AND main_table.updated_at >= :lastRunTime AND main_table.updated_at < :startTime AND main_table.relation_child_id IS NULL)"
48
+ );
49
 
50
+ $collection->addBindParam(':lastRunTime', $lastRunTime)
51
+ ->addBindParam(':startTime', $startTime);
52
 
53
+ return $collection;
54
+ }
55
+ /**
56
+ * Get an array of callback mappings for the feed. Should result in an array
57
+ * with keys for the field in the CSV and a value of an array used to
58
+ * represent a mapping callback.
59
+ * @see parent::_invokeCallback
60
+ */
61
+ protected function _getFeedFields()
62
+ {
63
+ return explode(',', Mage::helper('eems_affiliate/config')->getBasicOrderFeedFields());
64
+ }
65
+ /**
66
+ * Get the file name format from config. Doesn't pass store context as the
67
+ * file name format should only ever exist at the global level.
68
+ * @see parent::_getFileNameFormat
69
+ * @codeCoverageIgnore
70
+ */
71
+ protected function _getFileNameFormat()
72
+ {
73
+ return Mage::helper('eems_affiliate/config')->getBasicOrderFeedFileFormat();
74
+ }
75
  }
app/code/community/EbayEnterprise/Affiliate/Model/Feed/Order/Itemized.php CHANGED
@@ -15,65 +15,67 @@
15
  *
16
  */
17
 
18
-
19
- class EbayEnterprise_Affiliate_Model_Feed_Order_Itemized
20
- extends EbayEnterprise_Affiliate_Model_Feed_Order_Abstract
21
  {
22
- /**
23
- * @see parent::_getItems
24
- */
25
- protected function _getItems()
26
- {
27
- $lastRunTime = date(static::SELECT_TIME_FORMAT, Mage::helper('eems_affiliate/config')->getOrderLastRunTime() ?: 0);
28
- $startTime = date(static::SELECT_TIME_FORMAT, $this->_startTime);
29
- $storeIds = $this->_getStoreIdsToInclude();
30
 
31
- $collection = Mage::getResourceModel('sales/order_item_collection');
32
- $select = $collection->getSelect();
33
- $select
34
- ->joinLeft(
35
- array('o' => $collection->getTable('sales/order')),
36
- 'main_table.order_id = o.entity_id',
37
- array('o.increment_id', 'o.original_increment_id')
38
- )
39
- ->joinLeft(
40
- array('cmo' => $collection->getTable('sales/creditmemo')),
41
- 'main_table.order_id = cmo.order_id',
42
- array()
43
- )
44
- // this is far more pure SQL than should be here but I don't see a way to
45
- // get the proper groupings of where clauses without doing this
46
- ->where(
47
- // get only items within the correct store scope and filter out any
48
- // configurable used simple products
49
- 'main_table.store_id IN (?) AND NOT (main_table.product_type="simple" AND main_table.parent_item_id IS NOT NULL AND main_table.row_total=0)', $storeIds
50
- )
51
- ->where(
52
- "(o.original_increment_id IS NOT NULL AND o.created_at >= :lastRunTime AND o.created_at < :startTime) OR " .
53
- "(cmo.created_at IS NOT NULL AND cmo.created_at >= :lastRunTime AND cmo.created_at < :startTime) OR " .
54
- "(o.state = 'canceled' AND o.updated_at >= :lastRunTime AND o.updated_at < :startTime AND o.relation_child_id IS NULL)"
55
- );
 
 
 
 
56
 
57
- $collection->addBindParam(':lastRunTime', $lastRunTime)
58
- ->addBindParam(':startTime', $startTime);
59
 
60
- return $collection;
61
- }
62
- /**
63
- * @see parent::_getFeedFields
64
- */
65
- protected function _getFeedFields()
66
- {
67
- return explode(',', Mage::helper('eems_affiliate/config')->getItemizedOrderFeedFields());
68
- }
69
- /**
70
- * Get the file name format from config. Doesn't pass store context as the
71
- * file name format should only ever exist at the global level.
72
- * @see parent::_getFileNameFormat
73
- * @codeCoverageIgnore
74
- */
75
- protected function _getFileNameFormat()
76
- {
77
- return Mage::helper('eems_affiliate/config')->getItemizedOrderFeedFileFormat();
78
- }
79
  }
15
  *
16
  */
17
 
18
+ class EbayEnterprise_Affiliate_Model_Feed_Order_Itemized extends EbayEnterprise_Affiliate_Model_Feed_Order_Abstract
 
 
19
  {
20
+ /**
21
+ * @see parent::_getItems
22
+ */
23
+ protected function _getItems()
24
+ {
25
+ $lastRunTime = date(static::SELECT_TIME_FORMAT, Mage::helper('eems_affiliate/config')->getOrderLastRunTime() ?: 0);
26
+ $startTime = date(static::SELECT_TIME_FORMAT, $this->_startTime);
27
+ $storeIds = $this->_getStoreIdsToInclude();
28
 
29
+ $collection = Mage::getResourceModel('sales/order_item_collection');
30
+ $select = $collection->getSelect();
31
+ $select
32
+ ->joinLeft(
33
+ array('o' => $collection->getTable('sales/order')),
34
+ 'main_table.order_id = o.entity_id',
35
+ array('o.increment_id', 'o.original_increment_id')
36
+ )
37
+ ->joinLeft(
38
+ array('cmo' => $collection->getTable('sales/creditmemo')),
39
+ 'main_table.order_id = cmo.order_id',
40
+ array()
41
+ )
42
+ // this is far more pure SQL than should be here but I don't see a way to
43
+ // get the proper groupings of where clauses without doing this
44
+ ->where(
45
+ // get only items within the correct store scope and filter out any
46
+ // configurable used simple products
47
+ 'main_table.store_id IN (?) AND NOT (main_table.product_type="simple" AND main_table.parent_item_id IS NOT NULL AND main_table.row_total=0)',
48
+ $storeIds
49
+ )
50
+ ->where(
51
+ "(o.original_increment_id IS NOT NULL AND o.created_at >= :lastRunTime AND o.created_at < :startTime) OR " .
52
+ "(cmo.created_at IS NOT NULL AND cmo.created_at >= :lastRunTime AND cmo.created_at < :startTime) OR " .
53
+ "(o.state = 'canceled' AND o.updated_at >= :lastRunTime AND o.updated_at < :startTime AND o.relation_child_id IS NULL)"
54
+ )
55
+ // The left joins can leave duplicate item rows
56
+ // But the selected items will be identical, so we don't need them.
57
+ ->distinct();
58
 
59
+ $collection->addBindParam(':lastRunTime', $lastRunTime)
60
+ ->addBindParam(':startTime', $startTime);
61
 
62
+ return $collection;
63
+ }
64
+ /**
65
+ * @see parent::_getFeedFields
66
+ */
67
+ protected function _getFeedFields()
68
+ {
69
+ return explode(',', Mage::helper('eems_affiliate/config')->getItemizedOrderFeedFields());
70
+ }
71
+ /**
72
+ * Get the file name format from config. Doesn't pass store context as the
73
+ * file name format should only ever exist at the global level.
74
+ * @see parent::_getFileNameFormat
75
+ * @codeCoverageIgnore
76
+ */
77
+ protected function _getFileNameFormat()
78
+ {
79
+ return Mage::helper('eems_affiliate/config')->getItemizedOrderFeedFileFormat();
80
+ }
81
  }
app/code/community/EbayEnterprise/Affiliate/Model/Feed/Product.php CHANGED
@@ -16,83 +16,83 @@
16
  */
17
 
18
 
19
- class EbayEnterprise_Affiliate_Model_Feed_Product
20
- extends EbayEnterprise_Affiliate_Model_Feed_Abstract
21
  {
22
- const DELIMITER = "\t";
23
- /**
24
- * @see parent::_getItems
25
- */
26
- protected function _getItems()
27
- {
28
- return Mage::getResourceModel('catalog/product_collection')
29
- ->setStore($this->getStore())
30
- ->addAttributeToSelect(array('*'))
31
- ->addStoreFilter($this->getStore())
32
- ->addFieldToFilter('status', Mage_Catalog_Model_Product_Status::STATUS_ENABLED);
33
- }
34
- /**
35
- * Get an array of callback mappings for the feed. Should result in an array
36
- * with keys for the field in the CSV and a value of an array used to
37
- * represent a mapping callback.
38
- * @see parent::_invokeCallback
39
- */
40
- protected function _getFeedFields()
41
- {
42
- $store = $this->getStore();
43
- $callbackMap = Mage::helper('eems_affiliate/config')->getCallbackMappings($store);
44
- return array_filter(array_map(function($key) use ($callbackMap) {
45
- return isset($callbackMap[$key])? $callbackMap[$key]['column_name'] : null;
46
- } ,
47
- array_keys(Mage::helper('eems_affiliate/config')->getProductFeedFields($store))
48
- ));
49
- }
50
- /**
51
- * @see parent::_applyMapping
52
- * @param mixed $item Likely a Varien_Object but could really be anything.
53
- * @return array
54
- */
55
- protected function _applyMapping($item)
56
- {
57
- $fields = array();
58
- $helper = Mage::helper('eems_affiliate/config');
59
- $store = $this->getStore();
60
- $mappings = $helper->getCallbackMappings($store);
61
- $columns = $helper->getProductFeedFields($store);
62
- foreach ($this->_getFeedFields() as $feedField) {
63
- // If the mapping doesn't exist, supplying an empty array will eventually
64
- // result in an exception for being an invalid config mapping.
65
- // @see self::_validateCallbackConfig
66
- $callback = isset($mappings[$feedField]) ? $mappings[$feedField] : array();
67
- if ($columns[$feedField]) {
68
- $callback['params']['key'] = $columns[$feedField];
69
- }
70
- // exclude any mappings that have a type of "disabled"
71
- if (!isset($callback['type']) || $callback['type'] !== 'disabled') {
72
- $fields[] = $this->_invokeCallback($callback, $item);
73
- }
74
- }
75
- return $fields;
76
- }
77
- /**
78
- * @see parent::_getFileName
79
- */
80
- protected function _getFileName()
81
- {
82
- $config = Mage::helper('eems_affiliate/config');
83
- $store = $this->getStore();
84
- return sprintf(
85
- $config->getProductFeedFilenameFormat($store),
86
- $config->getProgramId($this->getStore($store))
87
- );
88
- }
89
- /**
90
- * @see EbayEnterprise_Affiliate_Model_Feed_Abstract::_getDelimiter
91
- * @return string
92
- * @codeCoverageIgnore
93
- */
94
- protected function _getDelimiter()
95
- {
96
- return static::DELIMITER;
97
- }
98
- }
 
16
  */
17
 
18
 
19
+ class EbayEnterprise_Affiliate_Model_Feed_Product extends EbayEnterprise_Affiliate_Model_Feed_Abstract
 
20
  {
21
+ const DELIMITER = "\t";
22
+ /**
23
+ * @see parent::_getItems
24
+ */
25
+ protected function _getItems()
26
+ {
27
+ return Mage::getResourceModel('catalog/product_collection')
28
+ ->setStore($this->getStore())
29
+ ->addAttributeToSelect(array('*'))
30
+ ->addStoreFilter($this->getStore())
31
+ ->addFieldToFilter('status', Mage_Catalog_Model_Product_Status::STATUS_ENABLED);
32
+ }
33
+ /**
34
+ * Get an array of callback mappings for the feed. Should result in an array
35
+ * with keys for the field in the CSV and a value of an array used to
36
+ * represent a mapping callback.
37
+ * @see parent::_invokeCallback
38
+ */
39
+ protected function _getFeedFields()
40
+ {
41
+ $store = $this->getStore();
42
+ $callbackMap = Mage::helper('eems_affiliate/config')->getCallbackMappings($store);
43
+ return array_filter(array_map(
44
+ function ($key) use ($callbackMap) {
45
+ return isset($callbackMap[$key])? $callbackMap[$key]['column_name'] : null;
46
+ },
47
+ array_keys(Mage::helper('eems_affiliate/config')->getProductFeedFields($store))
48
+ ));
49
+ }
50
+ /**
51
+ * @see parent::_applyMapping
52
+ * @param mixed $item Likely a Varien_Object but could really be anything.
53
+ * @return array
54
+ */
55
+ protected function _applyMapping($item)
56
+ {
57
+ $fields = array();
58
+ $helper = Mage::helper('eems_affiliate/config');
59
+ $store = $this->getStore();
60
+ $mappings = $helper->getCallbackMappings($store);
61
+ $columns = $helper->getProductFeedFields($store);
62
+ foreach ($this->_getFeedFields() as $feedField) {
63
+ // If the mapping doesn't exist, supplying an empty array will eventually
64
+ // result in an exception for being an invalid config mapping.
65
+ // @see self::_validateCallbackConfig
66
+ $callback = isset($mappings[$feedField]) ? $mappings[$feedField] : array();
67
+ if ($columns[$feedField]) {
68
+ $callback['params']['key'] = $columns[$feedField];
69
+ }
70
+ // exclude any mappings that have a type of "disabled"
71
+ if (!isset($callback['type']) || $callback['type'] !== 'disabled') {
72
+ $fields[] = $this->_invokeCallback($callback, $item);
73
+ }
74
+ }
75
+ return $fields;
76
+ }
77
+ /**
78
+ * @see parent::_getFileName
79
+ */
80
+ protected function _getFileName()
81
+ {
82
+ $config = Mage::helper('eems_affiliate/config');
83
+ $store = $this->getStore();
84
+ return sprintf(
85
+ $config->getProductFeedFilenameFormat($store),
86
+ $config->getProgramId($this->getStore($store))
87
+ );
88
+ }
89
+ /**
90
+ * @see EbayEnterprise_Affiliate_Model_Feed_Abstract::_getDelimiter
91
+ * @return string
92
+ * @codeCoverageIgnore
93
+ */
94
+ protected function _getDelimiter()
95
+ {
96
+ return static::DELIMITER;
97
+ }
98
+ }
app/code/community/EbayEnterprise/Affiliate/Model/Observer.php CHANGED
@@ -18,50 +18,50 @@
18
 
19
  class EbayEnterprise_Affiliate_Model_Observer
20
  {
21
- const PRODUCT_LOG_MESSAGE = 'Generating Product feed: program id %s, default store view: %s';
22
- /**
23
- * This observer method is the entry point to generating product feed when
24
- * the CRONJOB 'eems_affiliate_generate_product_feed' run.
25
- * @return void
26
- */
27
- public function createProductFeed()
28
- {
29
- $helper = Mage::helper('eems_affiliate');
30
- foreach ($helper->getAllProgramIds() as $programId) {
31
- $store = $helper->getStoreForProgramId($programId);
32
- Mage::log(
33
- sprintf(static::PRODUCT_LOG_MESSAGE, $programId, $store->getName()),
34
- Zend_Log::INFO
35
- );
36
 
37
- Mage::getModel('eems_affiliate/feed_product', array(
38
- 'store' => $store
39
- ))->generateFeed();
40
- }
41
- }
42
- /**
43
- * Generate the order corrected feed.
44
- * @return self
45
- */
46
- public function createCorrectedOrdersFeed()
47
- {
48
- $startTime = time();
49
 
50
- $feedAlias = Mage::helper('eems_affiliate/config')->isItemizedOrders() ?
51
- 'feed_order_itemized' : 'feed_order_basic';
52
 
53
- Mage::log(sprintf('[%s] Generating %s feed', __CLASS__, $feedAlias), Zend_Log::INFO);
54
 
55
- $helper = Mage::helper('eems_affiliate');
56
- foreach ($helper->getAllProgramIds() as $programId) {
57
- Mage::getModel(
58
- "eems_affiliate/{$feedAlias}",
59
- array('store' => $helper->getStoreForProgramId($programId), 'start_time' => $startTime)
60
- )->generateFeed();
61
- }
62
 
63
- Mage::helper('eems_affiliate/config')->updateOrderLastRunTime($startTime);
64
 
65
- return $this;
66
- }
67
  }
18
 
19
  class EbayEnterprise_Affiliate_Model_Observer
20
  {
21
+ const PRODUCT_LOG_MESSAGE = 'Generating Product feed: program id %s, default store view: %s';
22
+ /**
23
+ * This observer method is the entry point to generating product feed when
24
+ * the CRONJOB 'eems_affiliate_generate_product_feed' run.
25
+ * @return void
26
+ */
27
+ public function createProductFeed()
28
+ {
29
+ $helper = Mage::helper('eems_affiliate');
30
+ foreach ($helper->getAllProgramIds() as $programId) {
31
+ $store = $helper->getStoreForProgramId($programId);
32
+ Mage::log(
33
+ sprintf(static::PRODUCT_LOG_MESSAGE, $programId, $store->getName()),
34
+ Zend_Log::INFO
35
+ );
36
 
37
+ Mage::getModel('eems_affiliate/feed_product', array(
38
+ 'store' => $store
39
+ ))->generateFeed();
40
+ }
41
+ }
42
+ /**
43
+ * Generate the order corrected feed.
44
+ * @return self
45
+ */
46
+ public function createCorrectedOrdersFeed()
47
+ {
48
+ $startTime = time();
49
 
50
+ $feedAlias = Mage::helper('eems_affiliate/config')->isItemizedOrders() ?
51
+ 'feed_order_itemized' : 'feed_order_basic';
52
 
53
+ Mage::log(sprintf('[%s] Generating %s feed', __CLASS__, $feedAlias), Zend_Log::INFO);
54
 
55
+ $helper = Mage::helper('eems_affiliate');
56
+ foreach ($helper->getAllProgramIds() as $programId) {
57
+ Mage::getModel(
58
+ "eems_affiliate/{$feedAlias}",
59
+ array('store' => $helper->getStoreForProgramId($programId), 'start_time' => $startTime)
60
+ )->generateFeed();
61
+ }
62
 
63
+ Mage::helper('eems_affiliate/config')->updateOrderLastRunTime($startTime);
64
 
65
+ return $this;
66
+ }
67
  }
app/code/community/EbayEnterprise/Affiliate/Model/System/Config/Source/Attributes.php CHANGED
@@ -18,59 +18,58 @@
18
 
19
  class EbayEnterprise_Affiliate_Model_System_Config_Source_Attributes
20
  {
21
- const PRODUCT_URL_VALUE = 'product_url';
22
- const PRODUCT_URL_LABEL = 'Product Url';
23
- /**
24
- * Get product attributes
25
- * @return array
26
- */
27
- public function toOptionArray()
28
- {
29
- $helper = Mage::helper('catalog');
30
- $collection = Mage::getSingleton('eav/config')
31
- ->getEntityType(Mage_Catalog_Model_Product::ENTITY)
32
- ->getAttributeCollection();
33
- $attributes = array(array('value' => '', 'label' => ''));
34
- foreach ($collection as $attribute) {
35
- $attributes[] = array(
36
- 'value' => $attribute->getAttributeCode(),
37
- 'label' => $helper->__($attribute->getFrontendLabel() ?
38
- $attribute->getFrontendLabel() :
39
- $this->_convertToTitleCase($attribute->getAttributeCode())
40
- )
41
- );
42
- }
43
- $attributes[] = array(
44
- 'value' => static::PRODUCT_URL_VALUE,
45
- 'label' => $helper->__(static::PRODUCT_URL_LABEL)
46
- );
47
- // sort the attribute options by label
48
- usort($attributes, array($this, '_compareLabels'));
49
- return $attributes;
50
- }
51
- /**
52
- * Convert the attribute code to title case. Replace '_'s with spaces
53
- * and capitalize each word.
54
- * @param string $attributeCode
55
- * @return string
56
- */
57
- protected function _convertToTitleCase($attributeCode)
58
- {
59
- return ucwords(str_replace('_', ' ', $attributeCode));
60
- }
61
- /**
62
- * Comparison method for sorting options by "label" key.
63
- * @param array $a
64
- * @param array $b
65
- * @return int
66
- */
67
- protected function _compareLabels($a, $b)
68
- {
69
- $aLabel = strtolower($a['label']);
70
- $bLabel = strtolower($b['label']);
71
- if ($aLabel === $bLabel) {
72
- return 0;
73
- }
74
- return $aLabel < $bLabel ? -1 : 1;
75
- }
76
  }
18
 
19
  class EbayEnterprise_Affiliate_Model_System_Config_Source_Attributes
20
  {
21
+ const PRODUCT_URL_VALUE = 'product_url';
22
+ const PRODUCT_URL_LABEL = 'Product Url';
23
+ /**
24
+ * Get product attributes
25
+ * @return array
26
+ */
27
+ public function toOptionArray()
28
+ {
29
+ $helper = Mage::helper('catalog');
30
+ $collection = Mage::getSingleton('eav/config')
31
+ ->getEntityType(Mage_Catalog_Model_Product::ENTITY)
32
+ ->getAttributeCollection();
33
+ $attributes = array(array('value' => '', 'label' => ''));
34
+ foreach ($collection as $attribute) {
35
+ $attributes[] = array(
36
+ 'value' => $attribute->getAttributeCode(),
37
+ 'label' => $helper->__($attribute->getFrontendLabel() ?
38
+ $attribute->getFrontendLabel() :
39
+ $this->_convertToTitleCase($attribute->getAttributeCode()))
40
+ );
41
+ }
42
+ $attributes[] = array(
43
+ 'value' => static::PRODUCT_URL_VALUE,
44
+ 'label' => $helper->__(static::PRODUCT_URL_LABEL)
45
+ );
46
+ // sort the attribute options by label
47
+ usort($attributes, array($this, '_compareLabels'));
48
+ return $attributes;
49
+ }
50
+ /**
51
+ * Convert the attribute code to title case. Replace '_'s with spaces
52
+ * and capitalize each word.
53
+ * @param string $attributeCode
54
+ * @return string
55
+ */
56
+ protected function _convertToTitleCase($attributeCode)
57
+ {
58
+ return ucwords(str_replace('_', ' ', $attributeCode));
59
+ }
60
+ /**
61
+ * Comparison method for sorting options by "label" key.
62
+ * @param array $a
63
+ * @param array $b
64
+ * @return int
65
+ */
66
+ protected function _compareLabels($a, $b)
67
+ {
68
+ $aLabel = strtolower($a['label']);
69
+ $bLabel = strtolower($b['label']);
70
+ if ($aLabel === $bLabel) {
71
+ return 0;
72
+ }
73
+ return $aLabel < $bLabel ? -1 : 1;
74
+ }
 
75
  }
app/code/community/EbayEnterprise/Affiliate/Model/System/Config/Source/Categories.php CHANGED
@@ -18,20 +18,20 @@
18
 
19
  class EbayEnterprise_Affiliate_Model_System_Config_Source_Categories
20
  {
21
- const CATEGORY_VALUE = 'category';
22
- const CATEGORY_LABEL = 'Product Categories';
23
- /**
24
- * Get category attributes
25
- * @return array
26
- */
27
- public function toOptionArray()
28
- {
29
- return array(
30
- array('value' => '', 'label' => ''),
31
- array(
32
- 'value' => static::CATEGORY_VALUE,
33
- 'label' => Mage::helper('catalog')->__(static::CATEGORY_LABEL)
34
- )
35
- );
36
- }
37
  }
18
 
19
  class EbayEnterprise_Affiliate_Model_System_Config_Source_Categories
20
  {
21
+ const CATEGORY_VALUE = 'category';
22
+ const CATEGORY_LABEL = 'Product Categories';
23
+ /**
24
+ * Get category attributes
25
+ * @return array
26
+ */
27
+ public function toOptionArray()
28
+ {
29
+ return array(
30
+ array('value' => '', 'label' => ''),
31
+ array(
32
+ 'value' => static::CATEGORY_VALUE,
33
+ 'label' => Mage::helper('catalog')->__(static::CATEGORY_LABEL)
34
+ )
35
+ );
36
+ }
37
  }
app/code/community/EbayEnterprise/Affiliate/Model/System/Config/Source/Stockquantity.php CHANGED
@@ -18,20 +18,20 @@
18
 
19
  class EbayEnterprise_Affiliate_Model_System_Config_Source_Stockquantity
20
  {
21
- const STOCK_QTY_VALUE = 'qty';
22
- const STOCK_QTY_LABEL = 'Quantity';
23
- /**
24
- * Get quantity in stock list
25
- * @return array
26
- */
27
- public function toOptionArray()
28
- {
29
- return array(
30
- array('value' => '', 'label' => ''),
31
- array(
32
- 'value' => static::STOCK_QTY_VALUE,
33
- 'label' => Mage::helper('catalog')->__(static::STOCK_QTY_LABEL)
34
- )
35
- );
36
- }
37
  }
18
 
19
  class EbayEnterprise_Affiliate_Model_System_Config_Source_Stockquantity
20
  {
21
+ const STOCK_QTY_VALUE = 'qty';
22
+ const STOCK_QTY_LABEL = 'Quantity';
23
+ /**
24
+ * Get quantity in stock list
25
+ * @return array
26
+ */
27
+ public function toOptionArray()
28
+ {
29
+ return array(
30
+ array('value' => '', 'label' => ''),
31
+ array(
32
+ 'value' => static::STOCK_QTY_VALUE,
33
+ 'label' => Mage::helper('catalog')->__(static::STOCK_QTY_LABEL)
34
+ )
35
+ );
36
+ }
37
  }
app/code/community/EbayEnterprise/Affiliate/Model/System/Config/Source/Stockyesno.php CHANGED
@@ -18,20 +18,20 @@
18
 
19
  class EbayEnterprise_Affiliate_Model_System_Config_Source_Stockyesno
20
  {
21
- const IN_STOCK_VALUE = 'in_stock';
22
- const IN_STOCK_LABEL = 'Inventory Stock Availability';
23
- /**
24
- * Get in stock list
25
- * @return array
26
- */
27
- public function toOptionArray()
28
- {
29
- return array(
30
- array('value' => '', 'label' => ''),
31
- array(
32
- 'value' => static::IN_STOCK_VALUE,
33
- 'label' => Mage::helper('catalog')->__(static::IN_STOCK_LABEL)
34
- )
35
- );
36
- }
37
  }
18
 
19
  class EbayEnterprise_Affiliate_Model_System_Config_Source_Stockyesno
20
  {
21
+ const IN_STOCK_VALUE = 'in_stock';
22
+ const IN_STOCK_LABEL = 'Inventory Stock Availability';
23
+ /**
24
+ * Get in stock list
25
+ * @return array
26
+ */
27
+ public function toOptionArray()
28
+ {
29
+ return array(
30
+ array('value' => '', 'label' => ''),
31
+ array(
32
+ 'value' => static::IN_STOCK_VALUE,
33
+ 'label' => Mage::helper('catalog')->__(static::IN_STOCK_LABEL)
34
+ )
35
+ );
36
+ }
37
  }
app/code/community/EbayEnterprise/Affiliate/Model/System/Config/Source/Transactiontype.php CHANGED
@@ -18,13 +18,13 @@
18
 
19
  class EbayEnterprise_Affiliate_Model_System_Config_Source_Transactiontype
20
  {
21
- /**
22
- * Get available Transaction Type options
23
- * @return array
24
- */
25
- public function toOptionArray()
26
- {
27
- $helper = Mage::helper('eems_affiliate');
28
- return array('1' => $helper->__('Sale'), '2' => $helper->__('Lead'));
29
- }
30
  }
18
 
19
  class EbayEnterprise_Affiliate_Model_System_Config_Source_Transactiontype
20
  {
21
+ /**
22
+ * Get available Transaction Type options
23
+ * @return array
24
+ */
25
+ public function toOptionArray()
26
+ {
27
+ $helper = Mage::helper('eems_affiliate');
28
+ return array('1' => $helper->__('Sale'), '2' => $helper->__('Lead'));
29
+ }
30
  }
app/code/community/EbayEnterprise/Affiliate/Model/System/Config/Source/Visibilityyesno.php CHANGED
@@ -18,20 +18,20 @@
18
 
19
  class EbayEnterprise_Affiliate_Model_System_Config_Source_Visibilityyesno
20
  {
21
- const VISIBILITY_VALUE = 'visibility';
22
- const VISIBILITY_LABEL = 'Visibility';
23
- /**
24
- * Get product visibility list
25
- * @return array
26
- */
27
- public function toOptionArray()
28
- {
29
- return array(
30
- array('value' => '', 'label' => ''),
31
- array(
32
- 'value' => static::VISIBILITY_VALUE,
33
- 'label' => Mage::helper('catalog')->__(static::VISIBILITY_LABEL)
34
- )
35
- );
36
- }
37
  }
18
 
19
  class EbayEnterprise_Affiliate_Model_System_Config_Source_Visibilityyesno
20
  {
21
+ const VISIBILITY_VALUE = 'visibility';
22
+ const VISIBILITY_LABEL = 'Visibility';
23
+ /**
24
+ * Get product visibility list
25
+ * @return array
26
+ */
27
+ public function toOptionArray()
28
+ {
29
+ return array(
30
+ array('value' => '', 'label' => ''),
31
+ array(
32
+ 'value' => static::VISIBILITY_VALUE,
33
+ 'label' => Mage::helper('catalog')->__(static::VISIBILITY_LABEL)
34
+ )
35
+ );
36
+ }
37
  }
app/code/community/EbayEnterprise/Affiliate/etc/adminhtml.xml CHANGED
@@ -1,38 +1,37 @@
1
  <?xml version="1.0" encoding="utf-8"?>
2
  <!--
3
- Copyright (c) 2014 eBay Enterprise, Inc.
4
 
5
- NOTICE OF LICENSE
6
 
7
- This source file is subject to the eBay Enterprise
8
- Magento Extensions End User License Agreement
9
- that is bundled with this package in the file LICENSE.md.
10
- It is also available through the world-wide-web at this URL:
11
- http://www.ebayenterprise.com/files/pdf/Magento_Connect_Extensions_EULA_050714.pdf
12
-
13
- @copyright Copyright (c) 2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/)
14
- @license http://www.ebayenterprise.com/files/pdf/Magento_Connect_Extensions_EULA_050714.pdf eBay Enterprise Magento Extensions End User License Agreement
15
 
 
 
16
  -->
17
  <config>
18
- <acl>
19
- <resources>
20
- <admin>
21
- <children>
22
- <system>
23
- <children>
24
- <config>
25
- <children>
26
- <marketing_solutions translate="title">
27
- <title>Marketing Solutions</title>
28
- <sort_order>20</sort_order>
29
- </marketing_solutions>
30
- </children>
31
- </config>
32
- </children>
33
- </system>
34
- </children>
35
- </admin>
36
- </resources>
37
- </acl>
38
  </config>
1
  <?xml version="1.0" encoding="utf-8"?>
2
  <!--
3
+ Copyright (c) 2014 eBay Enterprise, Inc.
4
 
5
+ NOTICE OF LICENSE
6
 
7
+ This source file is subject to the eBay Enterprise
8
+ Magento Extensions End User License Agreement
9
+ that is bundled with this package in the file LICENSE.md.
10
+ It is also available through the world-wide-web at this URL:
11
+ http://www.ebayenterprise.com/files/pdf/Magento_Connect_Extensions_EULA_050714.pdf
 
 
 
12
 
13
+ @copyright Copyright (c) 2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/)
14
+ @license http://www.ebayenterprise.com/files/pdf/Magento_Connect_Extensions_EULA_050714.pdf eBay Enterprise Magento Extensions End User License Agreement
15
  -->
16
  <config>
17
+ <acl>
18
+ <resources>
19
+ <admin>
20
+ <children>
21
+ <system>
22
+ <children>
23
+ <config>
24
+ <children>
25
+ <marketing_solutions translate="title">
26
+ <title>Marketing Solutions</title>
27
+ <sort_order>20</sort_order>
28
+ </marketing_solutions>
29
+ </children>
30
+ </config>
31
+ </children>
32
+ </system>
33
+ </children>
34
+ </admin>
35
+ </resources>
36
+ </acl>
37
  </config>
app/code/community/EbayEnterprise/Affiliate/etc/config.xml CHANGED
@@ -1,975 +1,979 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
  <!--
3
- Copyright (c) 2014 eBay Enterprise, Inc.
4
 
5
- NOTICE OF LICENSE
6
 
7
- This source file is subject to the eBay Enterprise
8
- Magento Extensions End User License Agreement
9
- that is bundled with this package in the file LICENSE.md.
10
- It is also available through the world-wide-web at this URL:
11
- http://www.ebayenterprise.com/files/pdf/Magento_Connect_Extensions_EULA_050714.pdf
12
-
13
- @copyright Copyright (c) 2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/)
14
- @license http://www.ebayenterprise.com/files/pdf/Magento_Connect_Extensions_EULA_050714.pdf eBay Enterprise Magento Extensions End User License Agreement
15
 
 
 
16
  -->
17
  <config>
18
- <modules>
19
- <EbayEnterprise_Affiliate>
20
- <version>1.0.0.1</version>
21
- </EbayEnterprise_Affiliate>
22
- </modules>
23
- <global>
24
- <models>
25
- <eems_affiliate>
26
- <class>EbayEnterprise_Affiliate_Model</class>
27
- </eems_affiliate>
28
- </models>
29
- <helpers>
30
- <eems_affiliate>
31
- <class>EbayEnterprise_Affiliate_Helper</class>
32
- </eems_affiliate>
33
- </helpers>
34
- <blocks>
35
- <eems_affiliate>
36
- <class>EbayEnterprise_Affiliate_Block</class>
37
- </eems_affiliate>
38
- </blocks>
39
- <resources>
40
- <eems_affiliate_setup>
41
- <setup>
42
- <module>EbayEnterprise_Affiliate</module>
43
- <class>Mage_Core_Model_Resource_Setup</class>
44
- </setup>
45
- </eems_affiliate_setup>
46
- </resources>
47
- </global>
48
- <crontab>
49
- <jobs>
50
- <eems_affiliate_generate_product_feed>
51
- <schedule><cron_expr>0 */3 * * *</cron_expr></schedule>
52
- <run>
53
- <model>eems_affiliate/observer::createProductFeed</model>
54
- </run>
55
- </eems_affiliate_generate_product_feed>
56
- <eems_affiliate_generate_corrected_order_feed>
57
- <schedule><cron_expr>0 */3 * * *</cron_expr></schedule>
58
- <run>
59
- <model>eems_affiliate/observer::createCorrectedOrdersFeed</model>
60
- </run>
61
- </eems_affiliate_generate_corrected_order_feed>
62
- </jobs>
63
- </crontab>
64
- <default>
65
- <marketing_solutions>
66
- <eems_affiliate>
67
- <active>0</active>
68
- <js_files>eems_affiliate/cookie.js</js_files> <!-- use comma to add more js files-->
69
- <beacon_url>https://t.pepperjamnetwork.com/track</beacon_url>
70
- <export_path>var/export/eems_affiliate/</export_path>
71
- <int>ITEMIZED</int>
72
- <itemized_orders>1</itemized_orders>
73
- <program_id></program_id>
74
- <transaction_type>1</transaction_type>
 
 
 
 
 
75
  <conditional_pixel_enabled>0</conditional_pixel_enabled>
76
  <source_key_name>eean</source_key_name>
77
- <feeds>
78
- <callback_mappings>
79
- <program_id>
80
- <class>eems_affiliate/map</class>
81
- <method>getProgramId</method>
82
- <type>helper</type>
83
- <column_name>PID</column_name>
84
- </program_id>
85
- <order_id>
86
- <class>eems_affiliate/map_order</class>
87
- <method>getOrderId</method>
88
- <type>helper</type>
89
- <column_name>OID</column_name>
90
- <params>
91
- <format>%.50s</format>
92
- </params>
93
- </order_id>
94
- <item_order_id>
95
- <class>eems_affiliate/map_order</class>
96
- <method>getItemOrderId</method>
97
- <type>helper</type>
98
- <column_name>OID</column_name>
99
- <params>
100
- <format>%.50s</format>
101
- </params>
102
- </item_order_id>
103
- <item_id>
104
- <class>eems_affiliate/map_order</class>
105
- <method>getItemId</method>
106
- <type>helper</type>
107
- <column_name>ITEMID</column_name>
108
- <params>
109
- <format>%.50s</format>
110
- <key>sku</key>
111
- </params>
112
- </item_id>
113
- <row_total>
114
- <class>eems_affiliate/map_order</class>
115
- <method>getRowTotal</method>
116
- <type>helper</type>
117
- <column_name>TOTALAMOUNT</column_name>
118
- <params>
119
- <format>%.2f</format>
120
- </params>
121
- </row_total>
122
- <item_quantity>
123
- <class>eems_affiliate/map_order</class>
124
- <method>getItemQuantity</method>
125
- <type>helper</type>
126
- <column_name>QUANTITY</column_name>
127
- </item_quantity>
128
- <order_amount>
129
- <class>eems_affiliate/map_order</class>
130
- <method>getOrderAmount</method>
131
- <type>helper</type>
132
- <column_name>AMOUNT</column_name>
133
- <params>
134
- <format>%.2f</format>
135
- </params>
136
- </order_amount>
137
- <reason>
138
- <class>eems_affiliate/map</class>
139
- <method>passStatic</method>
140
- <type>helper</type>
141
- <column_name>REASON</column_name>
142
- <params>
143
- <value>8</value>
144
- </params>
145
- </reason>
146
- <transaction_type>
147
- <class>eems_affiliate/map_order</class>
148
- <method>getTransactionType</method>
149
- <type>helper</type>
150
- <column_name>TYPE</column_name>
151
- </transaction_type>
152
- <age_range>
153
- <class>eems_affiliate/map</class>
154
- <method>getDataValue</method>
155
- <type>helper</type>
156
- <column_name>age_range</column_name>
157
- <params>
158
- <format>%.32s</format>
159
- </params>
160
- </age_range>
161
- <artist>
162
- <class>eems_affiliate/map</class>
163
- <method>getDataValue</method>
164
- <type>helper</type>
165
- <column_name>artist</column_name>
166
- <params>
167
- <format>%.128s</format>
168
- </params>
169
- </artist>
170
- <aspect_ratio>
171
- <class>eems_affiliate/map</class>
172
- <method>getDataValue</method>
173
- <type>helper</type>
174
- <column_name>aspect_ratio</column_name>
175
- <params>
176
- <format>%.16s</format>
177
- </params>
178
- </aspect_ratio>
179
- <author>
180
- <class>eems_affiliate/map</class>
181
- <method>getDataValue</method>
182
- <type>helper</type>
183
- <column_name>author</column_name>
184
- <params>
185
- <format>%.128s</format>
186
- </params>
187
- </author>
188
- <battery_life>
189
- <class>eems_affiliate/map</class>
190
- <method>getDataValue</method>
191
- <type>helper</type>
192
- <column_name>battery_life</column_name>
193
- <params>
194
- <format>%.32s</format>
195
- </params>
196
- </battery_life>
197
- <binding>
198
- <class>eems_affiliate/map</class>
199
- <method>getDataValue</method>
200
- <type>helper</type>
201
- <column_name>binding</column_name>
202
- <params>
203
- <format>%.32s</format>
204
- </params>
205
- </binding>
206
- <buy_url>
207
- <class>eems_affiliate/map</class>
208
- <method>getDataValue</method>
209
- <type>helper</type>
210
- <column_name>buy_url</column_name>
211
- <params>
212
- <key>product_url</key>
213
- <format>%.2000s</format>
214
- </params>
215
- </buy_url>
216
- <category_network>
217
- <class>eems_affiliate/map_product</class>
218
- <method>getCategory</method>
219
- <type>helper</type>
220
- <column_name>category_network</column_name>
221
- <params>
222
- <format>%.256s</format>
223
- </params>
224
- </category_network>
225
- <category_program>
226
- <class>eems_affiliate/map_product</class>
227
- <method>getCategory</method>
228
- <type>helper</type>
229
- <column_name>category_program</column_name>
230
- <params>
231
- <format>%.256s</format>
232
- </params>
233
- </category_program>
234
- <color>
235
- <class>eems_affiliate/map</class>
236
- <method>getDataValue</method>
237
- <type>helper</type>
238
- <column_name>color</column_name>
239
- <params>
240
- <format>%.32s</format>
241
- </params>
242
- </color>
243
- <color_output>
244
- <class>eems_affiliate/map</class>
245
- <method>getValueYesNo</method>
246
- <type>helper</type>
247
- <column_name>color_output</column_name>
248
- <params>
249
- <format>%s</format>
250
- </params>
251
- </color_output>
252
- <condition>
253
- <class>eems_affiliate/map</class>
254
- <method>getDataValue</method>
255
- <type>helper</type>
256
- <column_name>condition</column_name>
257
- <params>
258
- <format>%.64s</format>
259
- </params>
260
- </condition>
261
- <description_long>
262
- <class>eems_affiliate/map</class>
263
- <method>getDataValue</method>
264
- <type>helper</type>
265
- <column_name>description_long</column_name>
266
- <params>
267
- <format>%.2000s</format>
268
- </params>
269
- </description_long>
270
- <description_short>
271
- <class>eems_affiliate/map</class>
272
- <method>getDataValue</method>
273
- <type>helper</type>
274
- <column_name>description_short</column_name>
275
- <params>
276
- <format>%.512s</format>
277
- </params>
278
- </description_short>
279
- <director>
280
- <class>eems_affiliate/map</class>
281
- <method>getDataValue</method>
282
- <type>helper</type>
283
- <column_name>director</column_name>
284
- <params>
285
- <format>%.128s</format>
286
- </params>
287
- </director>
288
- <discontinued>
289
- <class>eems_affiliate/map</class>
290
- <method>getValueYesNo</method>
291
- <type>helper</type>
292
- <column_name>discontinued</column_name>
293
- <params>
294
- <format>%s</format>
295
- </params>
296
- </discontinued>
297
- <display_type>
298
- <class>eems_affiliate/map</class>
299
- <method>getDataValue</method>
300
- <type>helper</type>
301
- <column_name>display_type</column_name>
302
- <params>
303
- <format>%.32s</format>
304
- </params>
305
- </display_type>
306
- <edition>
307
- <class>eems_affiliate/map</class>
308
- <method>getDataValue</method>
309
- <type>helper</type>
310
- <column_name>edition</column_name>
311
- <params>
312
- <format>%.32s</format>
313
- </params>
314
- </edition>
315
- <expiration_date>
316
- <class>eems_affiliate/map</class>
317
- <method>getDateValue</method>
318
- <type>helper</type>
319
- <column_name>expiration_date</column_name>
320
- <params>
321
- <format>Y-m-d</format>
322
- </params>
323
- </expiration_date>
324
- <features>
325
- <class>eems_affiliate/map</class>
326
- <method>getDataValue</method>
327
- <type>helper</type>
328
- <column_name>features</column_name>
329
- <params>
330
- <format>%.128s</format>
331
- </params>
332
- </features>
333
- <focus_type>
334
- <class>eems_affiliate/map</class>
335
- <method>getDataValue</method>
336
- <type>helper</type>
337
- <column_name>focus_type</column_name>
338
- <params>
339
- <format>%.128s</format>
340
- </params>
341
- </focus_type>
342
- <format>
343
- <class>eems_affiliate/map</class>
344
- <method>getDataValue</method>
345
- <type>helper</type>
346
- <column_name>format</column_name>
347
- <params>
348
- <format>%.64s</format>
349
- </params>
350
- </format>
351
- <functions>
352
- <class>eems_affiliate/map</class>
353
- <method>getDataValue</method>
354
- <type>helper</type>
355
- <column_name>functions</column_name>
356
- <params>
357
- <format>%.64s</format>
358
- </params>
359
- </functions>
360
- <genre>
361
- <class>eems_affiliate/map</class>
362
- <method>getDataValue</method>
363
- <type>helper</type>
364
- <column_name>genre</column_name>
365
- <params>
366
- <format>%.64s</format>
367
- </params>
368
- </genre>
369
- <heel_height>
370
- <class>eems_affiliate/map</class>
371
- <method>getDataValue</method>
372
- <type>helper</type>
373
- <column_name>heel_height</column_name>
374
- <params>
375
- <format>%.32s</format>
376
- </params>
377
- </heel_height>
378
- <height>
379
- <class>eems_affiliate/map</class>
380
- <method>getDataValue</method>
381
- <type>helper</type>
382
- <column_name>height</column_name>
383
- <params>
384
- <format>%.32s</format>
385
- </params>
386
- </height>
387
- <image_thumb_url>
388
- <class>eems_affiliate/map_product</class>
389
- <method>getImageUrl</method>
390
- <type>helper</type>
391
- <column_name>image_thumb_url</column_name>
392
- <params>
393
- <format>%.2000s</format>
394
- </params>
395
- </image_thumb_url>
396
- <image_url>
397
- <class>eems_affiliate/map_product</class>
398
- <method>getImageUrl</method>
399
- <type>helper</type>
400
- <column_name>image_url</column_name>
401
- <params>
402
- <format>%.2000s</format>
403
- </params>
404
- </image_url>
405
- <installation>
406
- <class>eems_affiliate/map</class>
407
- <method>getDataValue</method>
408
- <type>helper</type>
409
- <column_name>installation</column_name>
410
- <params>
411
- <format>%.64s</format>
412
- </params>
413
- </installation>
414
- <in_stock>
415
- <class>eems_affiliate/map_product</class>
416
- <method>getInStockYesNo</method>
417
- <type>helper</type>
418
- <column_name>in_stock</column_name>
419
- <params>
420
- <format>%s</format>
421
- </params>
422
- </in_stock>
423
- <isbn>
424
- <class>eems_affiliate/map</class>
425
- <method>getDataValue</method>
426
- <type>helper</type>
427
- <column_name>isbn</column_name>
428
- <params>
429
- <format>%.64s</format>
430
- </params>
431
- </isbn>
432
- <keywords>
433
- <class>eems_affiliate/map</class>
434
- <method>getDataValue</method>
435
- <type>helper</type>
436
- <column_name>keywords</column_name>
437
- <params>
438
- <format>%.256s</format>
439
- </params>
440
- </keywords>
441
- <length>
442
- <class>eems_affiliate/map</class>
443
- <method>getDataValue</method>
444
- <type>helper</type>
445
- <column_name>length</column_name>
446
- <params>
447
- <format>%.32s</format>
448
- </params>
449
- </length>
450
- <load_type>
451
- <class>eems_affiliate/map</class>
452
- <method>getDataValue</method>
453
- <type>helper</type>
454
- <column_name>load_type</column_name>
455
- <params>
456
- <format>%.32s</format>
457
- </params>
458
- </load_type>
459
- <location>
460
- <class>eems_affiliate/map</class>
461
- <method>getDataValue</method>
462
- <type>helper</type>
463
- <column_name>location</column_name>
464
- <params>
465
- <format>%.64s</format>
466
- </params>
467
- </location>
468
- <made_in>
469
- <class>eems_affiliate/map</class>
470
- <method>getDataValue</method>
471
- <type>helper</type>
472
- <column_name>made_in</column_name>
473
- <params>
474
- <format>%.64s</format>
475
- </params>
476
- </made_in>
477
- <manufacturer>
478
- <class>eems_affiliate/map</class>
479
- <method>getDataValue</method>
480
- <type>helper</type>
481
- <column_name>manufacturer</column_name>
482
- <params>
483
- <format>%.128s</format>
484
- </params>
485
- </manufacturer>
486
- <material>
487
- <class>eems_affiliate/map</class>
488
- <method>getDataValue</method>
489
- <type>helper</type>
490
- <column_name>material</column_name>
491
- <params>
492
- <format>%.128s</format>
493
- </params>
494
- </material>
495
- <megapixels>
496
- <class>eems_affiliate/map</class>
497
- <method>getDataValue</method>
498
- <type>helper</type>
499
- <column_name>megapixels</column_name>
500
- <params>
501
- <format>%01.2f</format>
502
- </params>
503
- </megapixels>
504
- <memory_capacity>
505
- <class>eems_affiliate/map</class>
506
- <method>getDataValue</method>
507
- <type>helper</type>
508
- <column_name>memory_capacity</column_name>
509
- <params>
510
- <format>%.64s</format>
511
- </params>
512
- </memory_capacity>
513
- <memory_card_slot>
514
- <class>eems_affiliate/map</class>
515
- <method>getDataValue</method>
516
- <type>helper</type>
517
- <column_name>memory_card_slot</column_name>
518
- <params>
519
- <format>%.32s</format>
520
- </params>
521
- </memory_card_slot>
522
- <memory_type>
523
- <class>eems_affiliate/map</class>
524
- <method>getDataValue</method>
525
- <type>helper</type>
526
- <column_name>memory_type</column_name>
527
- <params>
528
- <format>%.64s</format>
529
- </params>
530
- </memory_type>
531
- <model_number>
532
- <class>eems_affiliate/map</class>
533
- <method>getDataValue</method>
534
- <type>helper</type>
535
- <column_name>model_number</column_name>
536
- <params>
537
- <format>%.128s</format>
538
- </params>
539
- </model_number>
540
- <mpn>
541
- <class>eems_affiliate/map</class>
542
- <method>getDataValue</method>
543
- <type>helper</type>
544
- <column_name>mpn</column_name>
545
- <params>
546
- <format>%.128s</format>
547
- </params>
548
- </mpn>
549
- <name>
550
- <class>eems_affiliate/map</class>
551
- <method>getDataValue</method>
552
- <type>helper</type>
553
- <column_name>name</column_name>
554
- <params>
555
- <format>%.128s</format>
556
- </params>
557
- </name>
558
- <occasion>
559
- <class>eems_affiliate/map</class>
560
- <method>getDataValue</method>
561
- <type>helper</type>
562
- <column_name>occasion</column_name>
563
- <params>
564
- <format>%.128s</format>
565
- </params>
566
- </occasion>
567
- <operating_system>
568
- <class>eems_affiliate/map</class>
569
- <method>getDataValue</method>
570
- <type>helper</type>
571
- <column_name>operating_system</column_name>
572
- <params>
573
- <format>%.128s</format>
574
- </params>
575
- </operating_system>
576
- <optical_drive>
577
- <class>eems_affiliate/map</class>
578
- <method>getDataValue</method>
579
- <type>helper</type>
580
- <column_name>optical_drive</column_name>
581
- <params>
582
- <format>%.64s</format>
583
- </params>
584
- </optical_drive>
585
- <pages>
586
- <class>eems_affiliate/map</class>
587
- <method>getDataValue</method>
588
- <type>helper</type>
589
- <column_name>pages</column_name>
590
- <params>
591
- <format>%.11d</format>
592
- </params>
593
- </pages>
594
- <payment_accepted>
595
- <class>eems_affiliate/map</class>
596
- <method>getDataValue</method>
597
- <type>helper</type>
598
- <column_name>payment_accepted</column_name>
599
- <params>
600
- <format>%.128s</format>
601
- </params>
602
- </payment_accepted>
603
- <payment_notes>
604
- <class>eems_affiliate/map</class>
605
- <method>getDataValue</method>
606
- <type>helper</type>
607
- <column_name>payment_notes</column_name>
608
- <params>
609
- <format>%.256s</format>
610
- </params>
611
- </payment_notes>
612
- <platform>
613
- <class>eems_affiliate/map</class>
614
- <method>getDataValue</method>
615
- <type>helper</type>
616
- <column_name>platform</column_name>
617
- <params>
618
- <format>%.64s</format>
619
- </params>
620
- </platform>
621
- <price>
622
- <class>eems_affiliate/map</class>
623
- <method>getDataValue</method>
624
- <type>helper</type>
625
- <column_name>price</column_name>
626
- <params>
627
- <format>%01.2f</format>
628
- </params>
629
- </price>
630
- <price_retail>
631
- <class>eems_affiliate/map</class>
632
- <method>getDataValue</method>
633
- <type>helper</type>
634
- <column_name>price_retail</column_name>
635
- <params>
636
- <format>%01.2f</format>
637
- </params>
638
- </price_retail>
639
- <price_sale>
640
- <class>eems_affiliate/map</class>
641
- <method>getDataValue</method>
642
- <type>helper</type>
643
- <column_name>price_sale</column_name>
644
- <params>
645
- <format>%01.2f</format>
646
- </params>
647
- </price_sale>
648
- <price_shipping>
649
- <class>eems_affiliate/map</class>
650
- <method>getDataValue</method>
651
- <type>helper</type>
652
- <column_name>price_shipping</column_name>
653
- <params>
654
- <format>%01.2f</format>
655
- </params>
656
- </price_shipping>
657
- <processor>
658
- <class>eems_affiliate/map</class>
659
- <method>getDataValue</method>
660
- <type>helper</type>
661
- <column_name>processor</column_name>
662
- <params>
663
- <format>%.64s</format>
664
- </params>
665
- </processor>
666
- <publisher>
667
- <class>eems_affiliate/map</class>
668
- <method>getDataValue</method>
669
- <type>helper</type>
670
- <column_name>publisher</column_name>
671
- <params>
672
- <format>%.128s</format>
673
- </params>
674
- </publisher>
675
- <quantity_in_stock>
676
- <class>eems_affiliate/map_product</class>
677
- <method>getInStockQty</method>
678
- <type>helper</type>
679
- <column_name>quantity_in_stock</column_name>
680
- <params>
681
- <format>%.11d</format>
682
- </params>
683
- </quantity_in_stock>
684
- <rating>
685
- <class>eems_affiliate/map</class>
686
- <method>getDataValue</method>
687
- <type>helper</type>
688
- <column_name>rating</column_name>
689
- <params>
690
- <format>%.32s</format>
691
- </params>
692
- </rating>
693
- <recommended_usage>
694
- <class>eems_affiliate/map</class>
695
- <method>getDataValue</method>
696
- <type>helper</type>
697
- <column_name>recommended_usage</column_name>
698
- <params>
699
- <format>%.128s</format>
700
- </params>
701
- </recommended_usage>
702
- <resolution>
703
- <class>eems_affiliate/map</class>
704
- <method>getDataValue</method>
705
- <type>helper</type>
706
- <column_name>resolution</column_name>
707
- <params>
708
- <format>%.64s</format>
709
- </params>
710
- </resolution>
711
- <screen_size>
712
- <class>eems_affiliate/map</class>
713
- <method>getDataValue</method>
714
- <type>helper</type>
715
- <column_name>screen_size</column_name>
716
- <params>
717
- <format>%.32s</format>
718
- </params>
719
- </screen_size>
720
- <shipping_method>
721
- <class>eems_affiliate/map</class>
722
- <method>getDataValue</method>
723
- <type>helper</type>
724
- <column_name>shipping_method</column_name>
725
- <params>
726
- <format>%.64s</format>
727
- </params>
728
- </shipping_method>
729
- <shoe_size>
730
- <class>eems_affiliate/map</class>
731
- <method>getDataValue</method>
732
- <type>helper</type>
733
- <column_name>shoe_size</column_name>
734
- <params>
735
- <format>%.32s</format>
736
- </params>
737
- </shoe_size>
738
- <shoe_width>
739
- <class>eems_affiliate/map</class>
740
- <method>getDataValue</method>
741
- <type>helper</type>
742
- <column_name>shoe_width</column_name>
743
- <params>
744
- <format>%.32s</format>
745
- </params>
746
- </shoe_width>
747
- <size>
748
- <class>eems_affiliate/map</class>
749
- <method>getDataValue</method>
750
- <type>helper</type>
751
- <column_name>size</column_name>
752
- <params>
753
- <format>%.32s</format>
754
- </params>
755
- </size>
756
- <sku>
757
- <class>eems_affiliate/map</class>
758
- <method>getDataValue</method>
759
- <type>helper</type>
760
- <column_name>sku</column_name>
761
- <params>
762
- <format>%.128s</format>
763
- </params>
764
- </sku>
765
- <staring>
766
- <class>eems_affiliate/map</class>
767
- <method>getDataValue</method>
768
- <type>helper</type>
769
- <column_name>staring</column_name>
770
- <params>
771
- <format>%.128s</format>
772
- </params>
773
- </staring>
774
- <style>
775
- <class>eems_affiliate/map</class>
776
- <method>getDataValue</method>
777
- <type>helper</type>
778
- <column_name>style</column_name>
779
- <params>
780
- <format>%.64s</format>
781
- </params>
782
- </style>
783
- <tech_spec_url>
784
- <class>eems_affiliate/map</class>
785
- <method>getDataValue</method>
786
- <type>helper</type>
787
- <column_name>tech_spec_url</column_name>
788
- <params>
789
- <format>%.2000s</format>
790
- </params>
791
- </tech_spec_url>
792
- <tracks>
793
- <class>eems_affiliate/map</class>
794
- <method>getDataValue</method>
795
- <type>helper</type>
796
- <column_name>tracks</column_name>
797
- <params>
798
- <format>%.11d</format>
799
- </params>
800
- </tracks>
801
- <upc>
802
- <class>eems_affiliate/map</class>
803
- <method>getDataValue</method>
804
- <type>helper</type>
805
- <column_name>upc</column_name>
806
- <params>
807
- <format>%.128s</format>
808
- </params>
809
- </upc>
810
- <weight>
811
- <class>eems_affiliate/map</class>
812
- <method>getDataValue</method>
813
- <type>helper</type>
814
- <column_name>weight</column_name>
815
- <params>
816
- <format>%.32s</format>
817
- </params>
818
- </weight>
819
- <width>
820
- <class>eems_affiliate/map</class>
821
- <method>getDataValue</method>
822
- <type>helper</type>
823
- <column_name>width</column_name>
824
- <params>
825
- <format>%.32s</format>
826
- </params>
827
- </width>
828
- <wireless_interface>
829
- <class>eems_affiliate/map</class>
830
- <method>getDataValue</method>
831
- <type>helper</type>
832
- <column_name>wireless_interface</column_name>
833
- <params>
834
- <format>%.32s</format>
835
- </params>
836
- </wireless_interface>
837
- <year>
838
- <class>eems_affiliate/map</class>
839
- <method>getYearValue</method>
840
- <type>helper</type>
841
- <column_name>year</column_name>
842
- <params>
843
- <format>%.dd</format>
844
- </params>
845
- </year>
846
- <zoom>
847
- <class>eems_affiliate/map</class>
848
- <method>getDataValue</method>
849
- <type>helper</type>
850
- <column_name>zoom</column_name>
851
- <params>
852
- <format>%.32s</format>
853
- </params>
854
- </zoom>
855
- </callback_mappings>
856
- <order_itemized>
857
- <fields>program_id,item_order_id,item_id,row_total,item_quantity,reason</fields>
858
- <file_name_format>%s_transactions_corrected_%s.csv</file_name_format>
859
- </order_itemized>
860
- <order_basic>
861
- <fields>program_id,order_amount,order_id,reason,transaction_type</fields>
862
- <file_name_format>%s_transactions_corrected_%s.csv</file_name_format>
863
- </order_basic>
864
- <product>
865
- <file_name_format>%s_product_feed.csv</file_name_format>
866
- </product>
867
- </feeds>
868
- </eems_affiliate>
869
- <eems_affiliate_product_attribute_map>
870
- <!--
871
- The purpose of this mapping is enabled the coexistence of both
872
- pre-configured product attributes mapping and configured attributes
873
- mapping for the affiliate product feed. This means that when this
874
- module is installed and no other attribute is configured for the
875
- product feed the required pre-mapped attributes will be sufficient
876
- enough to generate a valid product feed.
877
- -->
878
- <age_range/>
879
- <artist/>
880
- <aspect_ratio/>
881
- <author/>
882
- <battery_life/>
883
- <binding/>
884
- <buy_url>product_url</buy_url>
885
- <category_network/>
886
- <category_program>category</category_program>
887
- <color/>
888
- <color_output/>
889
- <condition/>
890
- <description_long>description</description_long>
891
- <description_short>short_description</description_short>
892
- <director/>
893
- <discontinued/>
894
- <display_type/>
895
- <edition/>
896
- <expiration_date/>
897
- <features/>
898
- <focus_type/>
899
- <format/>
900
- <functions/>
901
- <genre/>
902
- <heel_height/>
903
- <height/>
904
- <image_thumb_url>thumbnail</image_thumb_url>
905
- <image_url>image</image_url>
906
- <installation/>
907
- <in_stock/>
908
- <isbn/>
909
- <keywords>meta_keyword</keywords>
910
- <length/>
911
- <load_type/>
912
- <location/>
913
- <made_in/>
914
- <manufacturer>manufacturer</manufacturer>
915
- <material/>
916
- <megapixels/>
917
- <memory_capacity/>
918
- <memory_card_slot/>
919
- <memory_type/>
920
- <model_number/>
921
- <mpn/>
922
- <name>name</name>
923
- <occasion/>
924
- <operating_system/>
925
- <optical_drive/>
926
- <pages/>
927
- <payment_accepted/>
928
- <payment_notes/>
929
- <platform/>
930
- <price>price</price>
931
- <price_retail>msrp</price_retail>
932
- <price_sale>special_price</price_sale>
933
- <price_shipping/>
934
- <processor/>
935
- <publisher/>
936
- <quantity_in_stock>qty</quantity_in_stock>
937
- <rating/>
938
- <recommended_usage/>
939
- <resolution/>
940
- <screen_size/>
941
- <shipping_method/>
942
- <shoe_size/>
943
- <shoe_width/>
944
- <size/>
945
- <sku>sku</sku>
946
- <staring/>
947
- <style/>
948
- <tech_spec_url/>
949
- <tracks/>
950
- <upc/>
951
- <weight/>
952
- <width/>
953
- <wireless_interface/>
954
- <year/>
955
- <zoom/>
956
- </eems_affiliate_product_attribute_map>
957
- </marketing_solutions>
958
- </default>
959
- <frontend>
960
- <layout>
961
- <updates>
962
- <eems_affiliate>
963
- <file>eems_affiliate.xml</file>
964
- </eems_affiliate>
965
- </updates>
966
- </layout>
967
- </frontend>
968
- <phpunit>
969
- <suite>
970
- <modules>
971
- <EbayEnterprise_Affiliate/>
972
- </modules>
973
- </suite>
974
- </phpunit>
975
  </config>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
  <!--
3
+ Copyright (c) 2014 eBay Enterprise, Inc.
4
 
5
+ NOTICE OF LICENSE
6
 
7
+ This source file is subject to the eBay Enterprise
8
+ Magento Extensions End User License Agreement
9
+ that is bundled with this package in the file LICENSE.md.
10
+ It is also available through the world-wide-web at this URL:
11
+ http://www.ebayenterprise.com/files/pdf/Magento_Connect_Extensions_EULA_050714.pdf
 
 
 
12
 
13
+ @copyright Copyright (c) 2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/)
14
+ @license http://www.ebayenterprise.com/files/pdf/Magento_Connect_Extensions_EULA_050714.pdf eBay Enterprise Magento Extensions End User License Agreement
15
  -->
16
  <config>
17
+ <modules>
18
+ <EbayEnterprise_Affiliate>
19
+ <version>1.0.0.1</version>
20
+ </EbayEnterprise_Affiliate>
21
+ </modules>
22
+ <global>
23
+ <models>
24
+ <eems_affiliate>
25
+ <class>EbayEnterprise_Affiliate_Model</class>
26
+ </eems_affiliate>
27
+ </models>
28
+ <helpers>
29
+ <eems_affiliate>
30
+ <class>EbayEnterprise_Affiliate_Helper</class>
31
+ </eems_affiliate>
32
+ </helpers>
33
+ <blocks>
34
+ <eems_affiliate>
35
+ <class>EbayEnterprise_Affiliate_Block</class>
36
+ </eems_affiliate>
37
+ </blocks>
38
+ <resources>
39
+ <eems_affiliate_setup>
40
+ <setup>
41
+ <module>EbayEnterprise_Affiliate</module>
42
+ <class>Mage_Core_Model_Resource_Setup</class>
43
+ </setup>
44
+ </eems_affiliate_setup>
45
+ </resources>
46
+ </global>
47
+ <crontab>
48
+ <jobs>
49
+ <eems_affiliate_generate_product_feed>
50
+ <schedule>
51
+ <cron_expr>0 */3 * * *</cron_expr>
52
+ </schedule>
53
+ <run>
54
+ <model>eems_affiliate/observer::createProductFeed</model>
55
+ </run>
56
+ </eems_affiliate_generate_product_feed>
57
+ <eems_affiliate_generate_corrected_order_feed>
58
+ <schedule>
59
+ <cron_expr>0 */3 * * *</cron_expr>
60
+ </schedule>
61
+ <run>
62
+ <model>eems_affiliate/observer::createCorrectedOrdersFeed</model>
63
+ </run>
64
+ </eems_affiliate_generate_corrected_order_feed>
65
+ </jobs>
66
+ </crontab>
67
+ <default>
68
+ <marketing_solutions>
69
+ <eems_affiliate>
70
+ <active>0</active>
71
+ <js_files>eems_affiliate/cookie.js</js_files>
72
+ <!-- use comma to add more js files-->
73
+ <beacon_url>https://t.pepperjamnetwork.com/track</beacon_url>
74
+ <export_path>var/export/eems_affiliate/</export_path>
75
+ <int>ITEMIZED</int>
76
+ <itemized_orders>1</itemized_orders>
77
+ <program_id/>
78
+ <transaction_type>1</transaction_type>
79
  <conditional_pixel_enabled>0</conditional_pixel_enabled>
80
  <source_key_name>eean</source_key_name>
81
+ <feeds>
82
+ <callback_mappings>
83
+ <program_id>
84
+ <class>eems_affiliate/map</class>
85
+ <method>getProgramId</method>
86
+ <type>helper</type>
87
+ <column_name>PID</column_name>
88
+ </program_id>
89
+ <order_id>
90
+ <class>eems_affiliate/map_order</class>
91
+ <method>getOrderId</method>
92
+ <type>helper</type>
93
+ <column_name>OID</column_name>
94
+ <params>
95
+ <format>%.50s</format>
96
+ </params>
97
+ </order_id>
98
+ <item_order_id>
99
+ <class>eems_affiliate/map_order</class>
100
+ <method>getItemOrderId</method>
101
+ <type>helper</type>
102
+ <column_name>OID</column_name>
103
+ <params>
104
+ <format>%.50s</format>
105
+ </params>
106
+ </item_order_id>
107
+ <item_id>
108
+ <class>eems_affiliate/map_order</class>
109
+ <method>getItemId</method>
110
+ <type>helper</type>
111
+ <column_name>ITEMID</column_name>
112
+ <params>
113
+ <format>%.50s</format>
114
+ <key>sku</key>
115
+ </params>
116
+ </item_id>
117
+ <row_total>
118
+ <class>eems_affiliate/map_order</class>
119
+ <method>getRowTotal</method>
120
+ <type>helper</type>
121
+ <column_name>TOTALAMOUNT</column_name>
122
+ <params>
123
+ <format>%.2f</format>
124
+ </params>
125
+ </row_total>
126
+ <item_quantity>
127
+ <class>eems_affiliate/map_order</class>
128
+ <method>getItemQuantity</method>
129
+ <type>helper</type>
130
+ <column_name>QUANTITY</column_name>
131
+ </item_quantity>
132
+ <order_amount>
133
+ <class>eems_affiliate/map_order</class>
134
+ <method>getOrderAmount</method>
135
+ <type>helper</type>
136
+ <column_name>AMOUNT</column_name>
137
+ <params>
138
+ <format>%.2f</format>
139
+ </params>
140
+ </order_amount>
141
+ <reason>
142
+ <class>eems_affiliate/map</class>
143
+ <method>passStatic</method>
144
+ <type>helper</type>
145
+ <column_name>REASON</column_name>
146
+ <params>
147
+ <value>8</value>
148
+ </params>
149
+ </reason>
150
+ <transaction_type>
151
+ <class>eems_affiliate/map_order</class>
152
+ <method>getTransactionType</method>
153
+ <type>helper</type>
154
+ <column_name>TYPE</column_name>
155
+ </transaction_type>
156
+ <age_range>
157
+ <class>eems_affiliate/map</class>
158
+ <method>getDataValue</method>
159
+ <type>helper</type>
160
+ <column_name>age_range</column_name>
161
+ <params>
162
+ <format>%.32s</format>
163
+ </params>
164
+ </age_range>
165
+ <artist>
166
+ <class>eems_affiliate/map</class>
167
+ <method>getDataValue</method>
168
+ <type>helper</type>
169
+ <column_name>artist</column_name>
170
+ <params>
171
+ <format>%.128s</format>
172
+ </params>
173
+ </artist>
174
+ <aspect_ratio>
175
+ <class>eems_affiliate/map</class>
176
+ <method>getDataValue</method>
177
+ <type>helper</type>
178
+ <column_name>aspect_ratio</column_name>
179
+ <params>
180
+ <format>%.16s</format>
181
+ </params>
182
+ </aspect_ratio>
183
+ <author>
184
+ <class>eems_affiliate/map</class>
185
+ <method>getDataValue</method>
186
+ <type>helper</type>
187
+ <column_name>author</column_name>
188
+ <params>
189
+ <format>%.128s</format>
190
+ </params>
191
+ </author>
192
+ <battery_life>
193
+ <class>eems_affiliate/map</class>
194
+ <method>getDataValue</method>
195
+ <type>helper</type>
196
+ <column_name>battery_life</column_name>
197
+ <params>
198
+ <format>%.32s</format>
199
+ </params>
200
+ </battery_life>
201
+ <binding>
202
+ <class>eems_affiliate/map</class>
203
+ <method>getDataValue</method>
204
+ <type>helper</type>
205
+ <column_name>binding</column_name>
206
+ <params>
207
+ <format>%.32s</format>
208
+ </params>
209
+ </binding>
210
+ <buy_url>
211
+ <class>eems_affiliate/map</class>
212
+ <method>getDataValue</method>
213
+ <type>helper</type>
214
+ <column_name>buy_url</column_name>
215
+ <params>
216
+ <key>product_url</key>
217
+ <format>%.2000s</format>
218
+ </params>
219
+ </buy_url>
220
+ <category_network>
221
+ <class>eems_affiliate/map_product</class>
222
+ <method>getCategory</method>
223
+ <type>helper</type>
224
+ <column_name>category_network</column_name>
225
+ <params>
226
+ <format>%.256s</format>
227
+ </params>
228
+ </category_network>
229
+ <category_program>
230
+ <class>eems_affiliate/map_product</class>
231
+ <method>getCategory</method>
232
+ <type>helper</type>
233
+ <column_name>category_program</column_name>
234
+ <params>
235
+ <format>%.256s</format>
236
+ </params>
237
+ </category_program>
238
+ <color>
239
+ <class>eems_affiliate/map</class>
240
+ <method>getDataValue</method>
241
+ <type>helper</type>
242
+ <column_name>color</column_name>
243
+ <params>
244
+ <format>%.32s</format>
245
+ </params>
246
+ </color>
247
+ <color_output>
248
+ <class>eems_affiliate/map</class>
249
+ <method>getValueYesNo</method>
250
+ <type>helper</type>
251
+ <column_name>color_output</column_name>
252
+ <params>
253
+ <format>%s</format>
254
+ </params>
255
+ </color_output>
256
+ <condition>
257
+ <class>eems_affiliate/map</class>
258
+ <method>getDataValue</method>
259
+ <type>helper</type>
260
+ <column_name>condition</column_name>
261
+ <params>
262
+ <format>%.64s</format>
263
+ </params>
264
+ </condition>
265
+ <description_long>
266
+ <class>eems_affiliate/map</class>
267
+ <method>getDataValue</method>
268
+ <type>helper</type>
269
+ <column_name>description_long</column_name>
270
+ <params>
271
+ <format>%.2000s</format>
272
+ </params>
273
+ </description_long>
274
+ <description_short>
275
+ <class>eems_affiliate/map</class>
276
+ <method>getDataValue</method>
277
+ <type>helper</type>
278
+ <column_name>description_short</column_name>
279
+ <params>
280
+ <format>%.512s</format>
281
+ </params>
282
+ </description_short>
283
+ <director>
284
+ <class>eems_affiliate/map</class>
285
+ <method>getDataValue</method>
286
+ <type>helper</type>
287
+ <column_name>director</column_name>
288
+ <params>
289
+ <format>%.128s</format>
290
+ </params>
291
+ </director>
292
+ <discontinued>
293
+ <class>eems_affiliate/map</class>
294
+ <method>getValueYesNo</method>
295
+ <type>helper</type>
296
+ <column_name>discontinued</column_name>
297
+ <params>
298
+ <format>%s</format>
299
+ </params>
300
+ </discontinued>
301
+ <display_type>
302
+ <class>eems_affiliate/map</class>
303
+ <method>getDataValue</method>
304
+ <type>helper</type>
305
+ <column_name>display_type</column_name>
306
+ <params>
307
+ <format>%.32s</format>
308
+ </params>
309
+ </display_type>
310
+ <edition>
311
+ <class>eems_affiliate/map</class>
312
+ <method>getDataValue</method>
313
+ <type>helper</type>
314
+ <column_name>edition</column_name>
315
+ <params>
316
+ <format>%.32s</format>
317
+ </params>
318
+ </edition>
319
+ <expiration_date>
320
+ <class>eems_affiliate/map</class>
321
+ <method>getDateValue</method>
322
+ <type>helper</type>
323
+ <column_name>expiration_date</column_name>
324
+ <params>
325
+ <format>Y-m-d</format>
326
+ </params>
327
+ </expiration_date>
328
+ <features>
329
+ <class>eems_affiliate/map</class>
330
+ <method>getDataValue</method>
331
+ <type>helper</type>
332
+ <column_name>features</column_name>
333
+ <params>
334
+ <format>%.128s</format>
335
+ </params>
336
+ </features>
337
+ <focus_type>
338
+ <class>eems_affiliate/map</class>
339
+ <method>getDataValue</method>
340
+ <type>helper</type>
341
+ <column_name>focus_type</column_name>
342
+ <params>
343
+ <format>%.128s</format>
344
+ </params>
345
+ </focus_type>
346
+ <format>
347
+ <class>eems_affiliate/map</class>
348
+ <method>getDataValue</method>
349
+ <type>helper</type>
350
+ <column_name>format</column_name>
351
+ <params>
352
+ <format>%.64s</format>
353
+ </params>
354
+ </format>
355
+ <functions>
356
+ <class>eems_affiliate/map</class>
357
+ <method>getDataValue</method>
358
+ <type>helper</type>
359
+ <column_name>functions</column_name>
360
+ <params>
361
+ <format>%.64s</format>
362
+ </params>
363
+ </functions>
364
+ <genre>
365
+ <class>eems_affiliate/map</class>
366
+ <method>getDataValue</method>
367
+ <type>helper</type>
368
+ <column_name>genre</column_name>
369
+ <params>
370
+ <format>%.64s</format>
371
+ </params>
372
+ </genre>
373
+ <heel_height>
374
+ <class>eems_affiliate/map</class>
375
+ <method>getDataValue</method>
376
+ <type>helper</type>
377
+ <column_name>heel_height</column_name>
378
+ <params>
379
+ <format>%.32s</format>
380
+ </params>
381
+ </heel_height>
382
+ <height>
383
+ <class>eems_affiliate/map</class>
384
+ <method>getDataValue</method>
385
+ <type>helper</type>
386
+ <column_name>height</column_name>
387
+ <params>
388
+ <format>%.32s</format>
389
+ </params>
390
+ </height>
391
+ <image_thumb_url>
392
+ <class>eems_affiliate/map_product</class>
393
+ <method>getImageUrl</method>
394
+ <type>helper</type>
395
+ <column_name>image_thumb_url</column_name>
396
+ <params>
397
+ <format>%.2000s</format>
398
+ </params>
399
+ </image_thumb_url>
400
+ <image_url>
401
+ <class>eems_affiliate/map_product</class>
402
+ <method>getImageUrl</method>
403
+ <type>helper</type>
404
+ <column_name>image_url</column_name>
405
+ <params>
406
+ <format>%.2000s</format>
407
+ </params>
408
+ </image_url>
409
+ <installation>
410
+ <class>eems_affiliate/map</class>
411
+ <method>getDataValue</method>
412
+ <type>helper</type>
413
+ <column_name>installation</column_name>
414
+ <params>
415
+ <format>%.64s</format>
416
+ </params>
417
+ </installation>
418
+ <in_stock>
419
+ <class>eems_affiliate/map_product</class>
420
+ <method>getInStockYesNo</method>
421
+ <type>helper</type>
422
+ <column_name>in_stock</column_name>
423
+ <params>
424
+ <format>%s</format>
425
+ </params>
426
+ </in_stock>
427
+ <isbn>
428
+ <class>eems_affiliate/map</class>
429
+ <method>getDataValue</method>
430
+ <type>helper</type>
431
+ <column_name>isbn</column_name>
432
+ <params>
433
+ <format>%.64s</format>
434
+ </params>
435
+ </isbn>
436
+ <keywords>
437
+ <class>eems_affiliate/map</class>
438
+ <method>getDataValue</method>
439
+ <type>helper</type>
440
+ <column_name>keywords</column_name>
441
+ <params>
442
+ <format>%.256s</format>
443
+ </params>
444
+ </keywords>
445
+ <length>
446
+ <class>eems_affiliate/map</class>
447
+ <method>getDataValue</method>
448
+ <type>helper</type>
449
+ <column_name>length</column_name>
450
+ <params>
451
+ <format>%.32s</format>
452
+ </params>
453
+ </length>
454
+ <load_type>
455
+ <class>eems_affiliate/map</class>
456
+ <method>getDataValue</method>
457
+ <type>helper</type>
458
+ <column_name>load_type</column_name>
459
+ <params>
460
+ <format>%.32s</format>
461
+ </params>
462
+ </load_type>
463
+ <location>
464
+ <class>eems_affiliate/map</class>
465
+ <method>getDataValue</method>
466
+ <type>helper</type>
467
+ <column_name>location</column_name>
468
+ <params>
469
+ <format>%.64s</format>
470
+ </params>
471
+ </location>
472
+ <made_in>
473
+ <class>eems_affiliate/map</class>
474
+ <method>getDataValue</method>
475
+ <type>helper</type>
476
+ <column_name>made_in</column_name>
477
+ <params>
478
+ <format>%.64s</format>
479
+ </params>
480
+ </made_in>
481
+ <manufacturer>
482
+ <class>eems_affiliate/map</class>
483
+ <method>getDataValue</method>
484
+ <type>helper</type>
485
+ <column_name>manufacturer</column_name>
486
+ <params>
487
+ <format>%.128s</format>
488
+ </params>
489
+ </manufacturer>
490
+ <material>
491
+ <class>eems_affiliate/map</class>
492
+ <method>getDataValue</method>
493
+ <type>helper</type>
494
+ <column_name>material</column_name>
495
+ <params>
496
+ <format>%.128s</format>
497
+ </params>
498
+ </material>
499
+ <megapixels>
500
+ <class>eems_affiliate/map</class>
501
+ <method>getDataValue</method>
502
+ <type>helper</type>
503
+ <column_name>megapixels</column_name>
504
+ <params>
505
+ <format>%01.2f</format>
506
+ </params>
507
+ </megapixels>
508
+ <memory_capacity>
509
+ <class>eems_affiliate/map</class>
510
+ <method>getDataValue</method>
511
+ <type>helper</type>
512
+ <column_name>memory_capacity</column_name>
513
+ <params>
514
+ <format>%.64s</format>
515
+ </params>
516
+ </memory_capacity>
517
+ <memory_card_slot>
518
+ <class>eems_affiliate/map</class>
519
+ <method>getDataValue</method>
520
+ <type>helper</type>
521
+ <column_name>memory_card_slot</column_name>
522
+ <params>
523
+ <format>%.32s</format>
524
+ </params>
525
+ </memory_card_slot>
526
+ <memory_type>
527
+ <class>eems_affiliate/map</class>
528
+ <method>getDataValue</method>
529
+ <type>helper</type>
530
+ <column_name>memory_type</column_name>
531
+ <params>
532
+ <format>%.64s</format>
533
+ </params>
534
+ </memory_type>
535
+ <model_number>
536
+ <class>eems_affiliate/map</class>
537
+ <method>getDataValue</method>
538
+ <type>helper</type>
539
+ <column_name>model_number</column_name>
540
+ <params>
541
+ <format>%.128s</format>
542
+ </params>
543
+ </model_number>
544
+ <mpn>
545
+ <class>eems_affiliate/map</class>
546
+ <method>getDataValue</method>
547
+ <type>helper</type>
548
+ <column_name>mpn</column_name>
549
+ <params>
550
+ <format>%.128s</format>
551
+ </params>
552
+ </mpn>
553
+ <name>
554
+ <class>eems_affiliate/map</class>
555
+ <method>getDataValue</method>
556
+ <type>helper</type>
557
+ <column_name>name</column_name>
558
+ <params>
559
+ <format>%.128s</format>
560
+ </params>
561
+ </name>
562
+ <occasion>
563
+ <class>eems_affiliate/map</class>
564
+ <method>getDataValue</method>
565
+ <type>helper</type>
566
+ <column_name>occasion</column_name>
567
+ <params>
568
+ <format>%.128s</format>
569
+ </params>
570
+ </occasion>
571
+ <operating_system>
572
+ <class>eems_affiliate/map</class>
573
+ <method>getDataValue</method>
574
+ <type>helper</type>
575
+ <column_name>operating_system</column_name>
576
+ <params>
577
+ <format>%.128s</format>
578
+ </params>
579
+ </operating_system>
580
+ <optical_drive>
581
+ <class>eems_affiliate/map</class>
582
+ <method>getDataValue</method>
583
+ <type>helper</type>
584
+ <column_name>optical_drive</column_name>
585
+ <params>
586
+ <format>%.64s</format>
587
+ </params>
588
+ </optical_drive>
589
+ <pages>
590
+ <class>eems_affiliate/map</class>
591
+ <method>getDataValue</method>
592
+ <type>helper</type>
593
+ <column_name>pages</column_name>
594
+ <params>
595
+ <format>%.11d</format>
596
+ </params>
597
+ </pages>
598
+ <payment_accepted>
599
+ <class>eems_affiliate/map</class>
600
+ <method>getDataValue</method>
601
+ <type>helper</type>
602
+ <column_name>payment_accepted</column_name>
603
+ <params>
604
+ <format>%.128s</format>
605
+ </params>
606
+ </payment_accepted>
607
+ <payment_notes>
608
+ <class>eems_affiliate/map</class>
609
+ <method>getDataValue</method>
610
+ <type>helper</type>
611
+ <column_name>payment_notes</column_name>
612
+ <params>
613
+ <format>%.256s</format>
614
+ </params>
615
+ </payment_notes>
616
+ <platform>
617
+ <class>eems_affiliate/map</class>
618
+ <method>getDataValue</method>
619
+ <type>helper</type>
620
+ <column_name>platform</column_name>
621
+ <params>
622
+ <format>%.64s</format>
623
+ </params>
624
+ </platform>
625
+ <price>
626
+ <class>eems_affiliate/map</class>
627
+ <method>getDataValue</method>
628
+ <type>helper</type>
629
+ <column_name>price</column_name>
630
+ <params>
631
+ <format>%01.2f</format>
632
+ </params>
633
+ </price>
634
+ <price_retail>
635
+ <class>eems_affiliate/map</class>
636
+ <method>getDataValue</method>
637
+ <type>helper</type>
638
+ <column_name>price_retail</column_name>
639
+ <params>
640
+ <format>%01.2f</format>
641
+ </params>
642
+ </price_retail>
643
+ <price_sale>
644
+ <class>eems_affiliate/map</class>
645
+ <method>getDataValue</method>
646
+ <type>helper</type>
647
+ <column_name>price_sale</column_name>
648
+ <params>
649
+ <format>%01.2f</format>
650
+ </params>
651
+ </price_sale>
652
+ <price_shipping>
653
+ <class>eems_affiliate/map</class>
654
+ <method>getDataValue</method>
655
+ <type>helper</type>
656
+ <column_name>price_shipping</column_name>
657
+ <params>
658
+ <format>%01.2f</format>
659
+ </params>
660
+ </price_shipping>
661
+ <processor>
662
+ <class>eems_affiliate/map</class>
663
+ <method>getDataValue</method>
664
+ <type>helper</type>
665
+ <column_name>processor</column_name>
666
+ <params>
667
+ <format>%.64s</format>
668
+ </params>
669
+ </processor>
670
+ <publisher>
671
+ <class>eems_affiliate/map</class>
672
+ <method>getDataValue</method>
673
+ <type>helper</type>
674
+ <column_name>publisher</column_name>
675
+ <params>
676
+ <format>%.128s</format>
677
+ </params>
678
+ </publisher>
679
+ <quantity_in_stock>
680
+ <class>eems_affiliate/map_product</class>
681
+ <method>getInStockQty</method>
682
+ <type>helper</type>
683
+ <column_name>quantity_in_stock</column_name>
684
+ <params>
685
+ <format>%.11d</format>
686
+ </params>
687
+ </quantity_in_stock>
688
+ <rating>
689
+ <class>eems_affiliate/map</class>
690
+ <method>getDataValue</method>
691
+ <type>helper</type>
692
+ <column_name>rating</column_name>
693
+ <params>
694
+ <format>%.32s</format>
695
+ </params>
696
+ </rating>
697
+ <recommended_usage>
698
+ <class>eems_affiliate/map</class>
699
+ <method>getDataValue</method>
700
+ <type>helper</type>
701
+ <column_name>recommended_usage</column_name>
702
+ <params>
703
+ <format>%.128s</format>
704
+ </params>
705
+ </recommended_usage>
706
+ <resolution>
707
+ <class>eems_affiliate/map</class>
708
+ <method>getDataValue</method>
709
+ <type>helper</type>
710
+ <column_name>resolution</column_name>
711
+ <params>
712
+ <format>%.64s</format>
713
+ </params>
714
+ </resolution>
715
+ <screen_size>
716
+ <class>eems_affiliate/map</class>
717
+ <method>getDataValue</method>
718
+ <type>helper</type>
719
+ <column_name>screen_size</column_name>
720
+ <params>
721
+ <format>%.32s</format>
722
+ </params>
723
+ </screen_size>
724
+ <shipping_method>
725
+ <class>eems_affiliate/map</class>
726
+ <method>getDataValue</method>
727
+ <type>helper</type>
728
+ <column_name>shipping_method</column_name>
729
+ <params>
730
+ <format>%.64s</format>
731
+ </params>
732
+ </shipping_method>
733
+ <shoe_size>
734
+ <class>eems_affiliate/map</class>
735
+ <method>getDataValue</method>
736
+ <type>helper</type>
737
+ <column_name>shoe_size</column_name>
738
+ <params>
739
+ <format>%.32s</format>
740
+ </params>
741
+ </shoe_size>
742
+ <shoe_width>
743
+ <class>eems_affiliate/map</class>
744
+ <method>getDataValue</method>
745
+ <type>helper</type>
746
+ <column_name>shoe_width</column_name>
747
+ <params>
748
+ <format>%.32s</format>
749
+ </params>
750
+ </shoe_width>
751
+ <size>
752
+ <class>eems_affiliate/map</class>
753
+ <method>getDataValue</method>
754
+ <type>helper</type>
755
+ <column_name>size</column_name>
756
+ <params>
757
+ <format>%.32s</format>
758
+ </params>
759
+ </size>
760
+ <sku>
761
+ <class>eems_affiliate/map</class>
762
+ <method>getDataValue</method>
763
+ <type>helper</type>
764
+ <column_name>sku</column_name>
765
+ <params>
766
+ <format>%.128s</format>
767
+ </params>
768
+ </sku>
769
+ <staring>
770
+ <class>eems_affiliate/map</class>
771
+ <method>getDataValue</method>
772
+ <type>helper</type>
773
+ <column_name>staring</column_name>
774
+ <params>
775
+ <format>%.128s</format>
776
+ </params>
777
+ </staring>
778
+ <style>
779
+ <class>eems_affiliate/map</class>
780
+ <method>getDataValue</method>
781
+ <type>helper</type>
782
+ <column_name>style</column_name>
783
+ <params>
784
+ <format>%.64s</format>
785
+ </params>
786
+ </style>
787
+ <tech_spec_url>
788
+ <class>eems_affiliate/map</class>
789
+ <method>getDataValue</method>
790
+ <type>helper</type>
791
+ <column_name>tech_spec_url</column_name>
792
+ <params>
793
+ <format>%.2000s</format>
794
+ </params>
795
+ </tech_spec_url>
796
+ <tracks>
797
+ <class>eems_affiliate/map</class>
798
+ <method>getDataValue</method>
799
+ <type>helper</type>
800
+ <column_name>tracks</column_name>
801
+ <params>
802
+ <format>%.11d</format>
803
+ </params>
804
+ </tracks>
805
+ <upc>
806
+ <class>eems_affiliate/map</class>
807
+ <method>getDataValue</method>
808
+ <type>helper</type>
809
+ <column_name>upc</column_name>
810
+ <params>
811
+ <format>%.128s</format>
812
+ </params>
813
+ </upc>
814
+ <weight>
815
+ <class>eems_affiliate/map</class>
816
+ <method>getDataValue</method>
817
+ <type>helper</type>
818
+ <column_name>weight</column_name>
819
+ <params>
820
+ <format>%.32s</format>
821
+ </params>
822
+ </weight>
823
+ <width>
824
+ <class>eems_affiliate/map</class>
825
+ <method>getDataValue</method>
826
+ <type>helper</type>
827
+ <column_name>width</column_name>
828
+ <params>
829
+ <format>%.32s</format>
830
+ </params>
831
+ </width>
832
+ <wireless_interface>
833
+ <class>eems_affiliate/map</class>
834
+ <method>getDataValue</method>
835
+ <type>helper</type>
836
+ <column_name>wireless_interface</column_name>
837
+ <params>
838
+ <format>%.32s</format>
839
+ </params>
840
+ </wireless_interface>
841
+ <year>
842
+ <class>eems_affiliate/map</class>
843
+ <method>getYearValue</method>
844
+ <type>helper</type>
845
+ <column_name>year</column_name>
846
+ <params>
847
+ <format>%.dd</format>
848
+ </params>
849
+ </year>
850
+ <zoom>
851
+ <class>eems_affiliate/map</class>
852
+ <method>getDataValue</method>
853
+ <type>helper</type>
854
+ <column_name>zoom</column_name>
855
+ <params>
856
+ <format>%.32s</format>
857
+ </params>
858
+ </zoom>
859
+ </callback_mappings>
860
+ <order_itemized>
861
+ <fields>program_id,item_order_id,item_id,row_total,item_quantity,reason</fields>
862
+ <file_name_format>%s_transactions_corrected_%s.csv</file_name_format>
863
+ </order_itemized>
864
+ <order_basic>
865
+ <fields>program_id,order_amount,order_id,reason,transaction_type</fields>
866
+ <file_name_format>%s_transactions_corrected_%s.csv</file_name_format>
867
+ </order_basic>
868
+ <product>
869
+ <file_name_format>%s_product_feed.csv</file_name_format>
870
+ </product>
871
+ </feeds>
872
+ </eems_affiliate>
873
+ <eems_affiliate_product_attribute_map>
874
+ <!--
875
+ The purpose of this mapping is enabled the coexistence of both
876
+ pre-configured product attributes mapping and configured attributes
877
+ mapping for the affiliate product feed. This means that when this
878
+ module is installed and no other attribute is configured for the
879
+ product feed the required pre-mapped attributes will be sufficient
880
+ enough to generate a valid product feed.
881
+ -->
882
+ <age_range/>
883
+ <artist/>
884
+ <aspect_ratio/>
885
+ <author/>
886
+ <battery_life/>
887
+ <binding/>
888
+ <buy_url>product_url</buy_url>
889
+ <category_network/>
890
+ <category_program>category</category_program>
891
+ <color/>
892
+ <color_output/>
893
+ <condition/>
894
+ <description_long>description</description_long>
895
+ <description_short>short_description</description_short>
896
+ <director/>
897
+ <discontinued/>
898
+ <display_type/>
899
+ <edition/>
900
+ <expiration_date/>
901
+ <features/>
902
+ <focus_type/>
903
+ <format/>
904
+ <functions/>
905
+ <genre/>
906
+ <heel_height/>
907
+ <height/>
908
+ <image_thumb_url>thumbnail</image_thumb_url>
909
+ <image_url>image</image_url>
910
+ <installation/>
911
+ <in_stock/>
912
+ <isbn/>
913
+ <keywords>meta_keyword</keywords>
914
+ <length/>
915
+ <load_type/>
916
+ <location/>
917
+ <made_in/>
918
+ <manufacturer>manufacturer</manufacturer>
919
+ <material/>
920
+ <megapixels/>
921
+ <memory_capacity/>
922
+ <memory_card_slot/>
923
+ <memory_type/>
924
+ <model_number/>
925
+ <mpn/>
926
+ <name>name</name>
927
+ <occasion/>
928
+ <operating_system/>
929
+ <optical_drive/>
930
+ <pages/>
931
+ <payment_accepted/>
932
+ <payment_notes/>
933
+ <platform/>
934
+ <price>price</price>
935
+ <price_retail>msrp</price_retail>
936
+ <price_sale>special_price</price_sale>
937
+ <price_shipping/>
938
+ <processor/>
939
+ <publisher/>
940
+ <quantity_in_stock>qty</quantity_in_stock>
941
+ <rating/>
942
+ <recommended_usage/>
943
+ <resolution/>
944
+ <screen_size/>
945
+ <shipping_method/>
946
+ <shoe_size/>
947
+ <shoe_width/>
948
+ <size/>
949
+ <sku>sku</sku>
950
+ <staring/>
951
+ <style/>
952
+ <tech_spec_url/>
953
+ <tracks/>
954
+ <upc/>
955
+ <weight/>
956
+ <width/>
957
+ <wireless_interface/>
958
+ <year/>
959
+ <zoom/>
960
+ </eems_affiliate_product_attribute_map>
961
+ </marketing_solutions>
962
+ </default>
963
+ <frontend>
964
+ <layout>
965
+ <updates>
966
+ <eems_affiliate>
967
+ <file>eems_affiliate.xml</file>
968
+ </eems_affiliate>
969
+ </updates>
970
+ </layout>
971
+ </frontend>
972
+ <phpunit>
973
+ <suite>
974
+ <modules>
975
+ <EbayEnterprise_Affiliate/>
976
+ </modules>
977
+ </suite>
978
+ </phpunit>
979
  </config>
app/code/community/EbayEnterprise/Affiliate/etc/system.xml CHANGED
@@ -1,93 +1,94 @@
1
  <?xml version="1.0" encoding="utf-8"?>
2
  <!--
3
- Copyright (c) 2014 eBay Enterprise, Inc.
4
 
5
- NOTICE OF LICENSE
6
 
7
- This source file is subject to the eBay Enterprise
8
- Magento Extensions End User License Agreement
9
- that is bundled with this package in the file LICENSE.md.
10
- It is also available through the world-wide-web at this URL:
11
- http://www.ebayenterprise.com/files/pdf/Magento_Connect_Extensions_EULA_050714.pdf
12
-
13
- @copyright Copyright (c) 2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/)
14
- @license http://www.ebayenterprise.com/files/pdf/Magento_Connect_Extensions_EULA_050714.pdf eBay Enterprise Magento Extensions End User License Agreement
15
 
 
 
16
  -->
17
  <config>
18
- <tabs>
19
- <ebayenterprise translate="label" module="eems_affiliate">
20
- <label>eBay Enterprise</label>
21
- <sort_order>550</sort_order>
22
- </ebayenterprise>
23
- </tabs>
24
- <sections>
25
- <marketing_solutions translate="label" module="eems_affiliate">
26
- <class>separator-top</class>
27
- <label>Marketing Solutions</label>
28
- <tab>ebayenterprise</tab>
29
- <frontend_type>text</frontend_type>
30
- <sort_order>550</sort_order>
31
- <show_in_default>1</show_in_default>
32
- <show_in_website>1</show_in_website>
33
- <show_in_store>1</show_in_store>
34
- <groups>
35
- <eems_affiliate translate="label comment">
36
- <label>Affiliate</label>
37
- <comment><![CDATA[Your program ID and other information can be found within your EEAN advertiser account. Don’t have an account yet? <a href='https://www.pepperjamnetwork.com/register/basic' target='_pjregister'>Register</a> for one today!]]></comment>
38
- <frontend_type>text</frontend_type>
39
- <sort_order>100</sort_order>
40
- <show_in_default>1</show_in_default>
41
- <show_in_website>1</show_in_website>
42
- <show_in_store>1</show_in_store>
43
- <fields>
44
- <active translate="label">
45
- <label>Enable Affiliate Tracking</label>
46
- <frontend_type>select</frontend_type>
47
- <source_model>adminhtml/system_config_source_yesno</source_model>
48
- <sort_order>1</sort_order>
49
- <show_in_default>1</show_in_default>
50
- <show_in_website>0</show_in_website>
51
- <show_in_store>0</show_in_store>
52
- </active>
53
- <program_id translate="label comment">
54
- <label>Program Id</label>
55
- <comment>Your Program Id will be provided to you by eBay Enterprise Affiliate</comment>
56
- <frontend_type>text</frontend_type>
57
- <sort_order>10</sort_order>
58
- <show_in_default>1</show_in_default>
59
- <show_in_website>1</show_in_website>
60
- <show_in_store>0</show_in_store>
61
- </program_id>
62
- <itemized_orders translate="label">
63
- <label>Itemized Orders</label>
64
- <frontend_type>select</frontend_type>
65
- <source_model>adminhtml/system_config_source_yesno</source_model>
66
- <sort_order>20</sort_order>
67
- <show_in_default>1</show_in_default>
68
- <show_in_website>0</show_in_website>
69
- <show_in_store>0</show_in_store>
70
- </itemized_orders>
71
- <transaction_type translate="label comment">
72
- <label>Transaction Type</label>
73
- <comment>Sale transactions pay publishers a percentage of the sale, lead transactions pay publishes a flat amount for an action.</comment>
74
- <frontend_type>select</frontend_type>
75
- <source_model>eems_affiliate/system_config_source_transactiontype</source_model>
76
- <depends><itemized_orders>0</itemized_orders></depends>
77
- <sort_order>30</sort_order>
78
- <show_in_default>1</show_in_default>
79
- <show_in_website>0</show_in_website>
80
- <show_in_store>0</show_in_store>
81
- </transaction_type>
82
- <export_path translate="label comment">
83
- <label>Export Path</label>
84
- <comment>Default local path to export feeds to. These feeds will need to be made available to eBay Enterprise Affiliate via FTP.</comment>
85
- <frontend_type>text</frontend_type>
86
- <sort_order>50</sort_order>
87
- <show_in_default>1</show_in_default>
88
- <show_in_website>0</show_in_website>
89
- <show_in_store>0</show_in_store>
90
- </export_path>
 
 
91
  <conditional_pixel_enabled translate="label">
92
  <label>Conditional Pixel</label>
93
  <frontend_type>select</frontend_type>
@@ -101,810 +102,812 @@
101
  <label>Query String Key Name</label>
102
  <comment>Only apply the pixel if the query string includes this key.</comment>
103
  <frontend_type>text</frontend_type>
104
- <depends><conditional_pixel_enabled>1</conditional_pixel_enabled></depends>
 
 
105
  <sort_order>70</sort_order>
106
  <show_in_default>1</show_in_default>
107
  <show_in_website>0</show_in_website>
108
  <show_in_store>0</show_in_store>
109
  </source_key_name>
110
- </fields>
111
- </eems_affiliate>
112
- <eems_affiliate_product_attribute_map translate="label comment">
113
- <label>Affiliate Product Feed Map</label>
114
- <frontend_type>text</frontend_type>
115
- <sort_order>101</sort_order>
116
- <show_in_default>1</show_in_default>
117
- <show_in_website>1</show_in_website>
118
- <show_in_store>0</show_in_store>
119
- <fields>
120
- <age_range translate="label">
121
- <label>age_range</label>
122
- <comment>Suggested age range</comment>
123
- <frontend_type>select</frontend_type>
124
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
125
- <sort_order>1</sort_order>
126
- <show_in_default>1</show_in_default>
127
- <show_in_website>0</show_in_website>
128
- <show_in_store>0</show_in_store>
129
- </age_range>
130
- <artist translate="label">
131
- <label>artist</label>
132
- <comment>Media artist</comment>
133
- <frontend_type>select</frontend_type>
134
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
135
- <sort_order>2</sort_order>
136
- <show_in_default>1</show_in_default>
137
- <show_in_website>0</show_in_website>
138
- <show_in_store>0</show_in_store>
139
- </artist>
140
- <aspect_ratio translate="label">
141
- <label>aspect_ratio</label>
142
- <comment>Screen aspect ratio</comment>
143
- <frontend_type>select</frontend_type>
144
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
145
- <sort_order>3</sort_order>
146
- <show_in_default>1</show_in_default>
147
- <show_in_website>0</show_in_website>
148
- <show_in_store>0</show_in_store>
149
- </aspect_ratio>
150
- <author translate="label">
151
- <label>author</label>
152
- <comment>Media author</comment>
153
- <frontend_type>select</frontend_type>
154
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
155
- <sort_order>4</sort_order>
156
- <show_in_default>1</show_in_default>
157
- <show_in_website>0</show_in_website>
158
- <show_in_store>0</show_in_store>
159
- </author>
160
- <battery_life translate="label">
161
- <label>battery_life</label>
162
- <comment>Battery life</comment>
163
- <frontend_type>select</frontend_type>
164
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
165
- <sort_order>5</sort_order>
166
- <show_in_default>1</show_in_default>
167
- <show_in_website>0</show_in_website>
168
- <show_in_store>0</show_in_store>
169
- </battery_life>
170
- <binding translate="label">
171
- <label>binding</label>
172
- <comment>Book binding</comment>
173
- <frontend_type>select</frontend_type>
174
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
175
- <sort_order>6</sort_order>
176
- <show_in_default>1</show_in_default>
177
- <show_in_website>0</show_in_website>
178
- <show_in_store>0</show_in_store>
179
- </binding>
180
- <buy_url translate="label">
181
- <label>buy_url</label>
182
- <comment>Destination URL (Required)</comment>
183
- <frontend_type>select</frontend_type>
184
- <validate>required-entry</validate>
185
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
186
- <sort_order>7</sort_order>
187
- <show_in_default>1</show_in_default>
188
- <show_in_website>0</show_in_website>
189
- <show_in_store>0</show_in_store>
190
- </buy_url>
191
- <category_network translate="label">
192
- <label>category_network</label>
193
- <comment>eBay Enterprise Affiliate Network specific category (sub categories optionally delimited by '>')</comment>
194
- <frontend_type>select</frontend_type>
195
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
196
- <sort_order>8</sort_order>
197
- <show_in_default>1</show_in_default>
198
- <show_in_website>0</show_in_website>
199
- <show_in_store>0</show_in_store>
200
- </category_network>
201
- <category_program translate="label">
202
- <label>category_program</label>
203
- <comment>Merchant specific category (sub categories optionally delimited by '>') (Recommended)</comment>
204
- <frontend_type>select</frontend_type>
205
- <source_model>eems_affiliate/system_config_source_categories</source_model>
206
- <sort_order>9</sort_order>
207
- <show_in_default>1</show_in_default>
208
- <show_in_website>0</show_in_website>
209
- <show_in_store>0</show_in_store>
210
- </category_program>
211
- <color translate="label">
212
- <label>color</label>
213
- <comment>Color of item</comment>
214
- <frontend_type>select</frontend_type>
215
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
216
- <sort_order>10</sort_order>
217
- <show_in_default>1</show_in_default>
218
- <show_in_website>0</show_in_website>
219
- <show_in_store>0</show_in_store>
220
- </color>
221
- <color_output translate="label">
222
- <label>color_output</label>
223
- <comment>Whether output is color or not</comment>
224
- <frontend_type>select</frontend_type>
225
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
226
- <sort_order>11</sort_order>
227
- <show_in_default>1</show_in_default>
228
- <show_in_website>0</show_in_website>
229
- <show_in_store>0</show_in_store>
230
- </color_output>
231
- <condition translate="label">
232
- <label>condition</label>
233
- <comment>Condition (Recommended)</comment>
234
- <frontend_type>select</frontend_type>
235
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
236
- <sort_order>12</sort_order>
237
- <show_in_default>1</show_in_default>
238
- <show_in_website>0</show_in_website>
239
- <show_in_store>0</show_in_store>
240
- </condition>
241
- <description_long translate="label">
242
- <label>description_long</label>
243
- <comment>Long description (Required)</comment>
244
- <frontend_type>select</frontend_type>
245
- <validate>required-entry</validate>
246
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
247
- <sort_order>13</sort_order>
248
- <show_in_default>1</show_in_default>
249
- <show_in_website>0</show_in_website>
250
- <show_in_store>0</show_in_store>
251
- </description_long>
252
- <description_short translate="label">
253
- <label>description_short</label>
254
- <comment>Short description</comment>
255
- <frontend_type>select</frontend_type>
256
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
257
- <sort_order>14</sort_order>
258
- <show_in_default>1</show_in_default>
259
- <show_in_website>0</show_in_website>
260
- <show_in_store>0</show_in_store>
261
- </description_short>
262
- <director translate="label">
263
- <label>director</label>
264
- <comment>Movie director</comment>
265
- <frontend_type>select</frontend_type>
266
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
267
- <sort_order>15</sort_order>
268
- <show_in_default>1</show_in_default>
269
- <show_in_website>0</show_in_website>
270
- <show_in_store>0</show_in_store>
271
- </director>
272
- <discontinued translate="label">
273
- <label>discontinued</label>
274
- <comment>Whether product is discontinued or not</comment>
275
- <frontend_type>select</frontend_type>
276
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
277
- <sort_order>16</sort_order>
278
- <show_in_default>1</show_in_default>
279
- <show_in_website>0</show_in_website>
280
- <show_in_store>0</show_in_store>
281
- </discontinued>
282
- <display_type translate="label">
283
- <label>display_type</label>
284
- <comment>Display type</comment>
285
- <frontend_type>select</frontend_type>
286
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
287
- <sort_order>17</sort_order>
288
- <show_in_default>1</show_in_default>
289
- <show_in_website>0</show_in_website>
290
- <show_in_store>0</show_in_store>
291
- </display_type>
292
- <edition translate="label">
293
- <label>edition</label>
294
- <comment>Media edition</comment>
295
- <frontend_type>select</frontend_type>
296
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
297
- <sort_order>18</sort_order>
298
- <show_in_default>1</show_in_default>
299
- <show_in_website>0</show_in_website>
300
- <show_in_store>0</show_in_store>
301
- </edition>
302
- <expiration_date translate="label">
303
- <label>expiration_date</label>
304
- <comment>Expiration date</comment>
305
- <frontend_type>select</frontend_type>
306
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
307
- <sort_order>19</sort_order>
308
- <show_in_default>1</show_in_default>
309
- <show_in_website>0</show_in_website>
310
- <show_in_store>0</show_in_store>
311
- </expiration_date>
312
- <features translate="label">
313
- <label>features</label>
314
- <comment>Special features</comment>
315
- <frontend_type>select</frontend_type>
316
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
317
- <sort_order>20</sort_order>
318
- <show_in_default>1</show_in_default>
319
- <show_in_website>0</show_in_website>
320
- <show_in_store>0</show_in_store>
321
- </features>
322
- <focus_type translate="label">
323
- <label>focus_type</label>
324
- <comment>Focus type</comment>
325
- <frontend_type>select</frontend_type>
326
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
327
- <sort_order>21</sort_order>
328
- <show_in_default>1</show_in_default>
329
- <show_in_website>0</show_in_website>
330
- <show_in_store>0</show_in_store>
331
- </focus_type>
332
- <format translate="label">
333
- <label>format</label>
334
- <comment>Format</comment>
335
- <frontend_type>select</frontend_type>
336
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
337
- <sort_order>22</sort_order>
338
- <show_in_default>1</show_in_default>
339
- <show_in_website>0</show_in_website>
340
- <show_in_store>0</show_in_store>
341
- </format>
342
- <functions translate="label">
343
- <label>functions</label>
344
- <comment>Functions</comment>
345
- <frontend_type>select</frontend_type>
346
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
347
- <sort_order>23</sort_order>
348
- <show_in_default>1</show_in_default>
349
- <show_in_website>0</show_in_website>
350
- <show_in_store>0</show_in_store>
351
- </functions>
352
- <genre translate="label">
353
- <label>genre</label>
354
- <comment>Genre</comment>
355
- <frontend_type>select</frontend_type>
356
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
357
- <sort_order>24</sort_order>
358
- <show_in_default>1</show_in_default>
359
- <show_in_website>0</show_in_website>
360
- <show_in_store>0</show_in_store>
361
- </genre>
362
- <heel_height translate="label">
363
- <label>heel_height</label>
364
- <comment>Heel height</comment>
365
- <frontend_type>select</frontend_type>
366
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
367
- <sort_order>25</sort_order>
368
- <show_in_default>1</show_in_default>
369
- <show_in_website>0</show_in_website>
370
- <show_in_store>0</show_in_store>
371
- </heel_height>
372
- <height translate="label">
373
- <label>height</label>
374
- <comment>Height</comment>
375
- <frontend_type>select</frontend_type>
376
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
377
- <sort_order>26</sort_order>
378
- <show_in_default>1</show_in_default>
379
- <show_in_website>0</show_in_website>
380
- <show_in_store>0</show_in_store>
381
- </height>
382
- <image_thumb_url translate="label">
383
- <label>image_thumb_url</label>
384
- <comment>Thumbnail image URL (Recommended)</comment>
385
- <frontend_type>select</frontend_type>
386
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
387
- <sort_order>27</sort_order>
388
- <show_in_default>1</show_in_default>
389
- <show_in_website>0</show_in_website>
390
- <show_in_store>0</show_in_store>
391
- </image_thumb_url>
392
- <image_url translate="label">
393
- <label>image_url</label>
394
- <comment>Standard image URL (Required)</comment>
395
- <frontend_type>select</frontend_type>
396
- <validate>required-entry</validate>
397
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
398
- <sort_order>28</sort_order>
399
- <show_in_default>1</show_in_default>
400
- <show_in_website>0</show_in_website>
401
- <show_in_store>0</show_in_store>
402
- </image_url>
403
- <installation translate="label">
404
- <label>installation</label>
405
- <comment>Installation type</comment>
406
- <frontend_type>select</frontend_type>
407
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
408
- <sort_order>29</sort_order>
409
- <show_in_default>1</show_in_default>
410
- <show_in_website>0</show_in_website>
411
- <show_in_store>0</show_in_store>
412
- </installation>
413
- <in_stock translate="label">
414
- <label>in_stock</label>
415
- <comment>Whether product is in stock or not</comment>
416
- <frontend_type>select</frontend_type>
417
- <source_model>eems_affiliate/system_config_source_stockyesno</source_model>
418
- <sort_order>30</sort_order>
419
- <show_in_default>1</show_in_default>
420
- <show_in_website>0</show_in_website>
421
- <show_in_store>0</show_in_store>
422
- </in_stock>
423
- <isbn translate="label">
424
- <label>isbn</label>
425
- <comment>Book ISBN</comment>
426
- <frontend_type>select</frontend_type>
427
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
428
- <sort_order>31</sort_order>
429
- <show_in_default>1</show_in_default>
430
- <show_in_website>0</show_in_website>
431
- <show_in_store>0</show_in_store>
432
- </isbn>
433
- <keywords translate="label">
434
- <label>keywords</label>
435
- <comment>Space separated list of keywords (Recommended)</comment>
436
- <frontend_type>select</frontend_type>
437
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
438
- <sort_order>32</sort_order>
439
- <show_in_default>1</show_in_default>
440
- <show_in_website>0</show_in_website>
441
- <show_in_store>0</show_in_store>
442
- </keywords>
443
- <length translate="label">
444
- <label>length</label>
445
- <comment>Length</comment>
446
- <frontend_type>select</frontend_type>
447
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
448
- <sort_order>33</sort_order>
449
- <show_in_default>1</show_in_default>
450
- <show_in_website>0</show_in_website>
451
- <show_in_store>0</show_in_store>
452
- </length>
453
- <load_type translate="label">
454
- <label>load_type</label>
455
- <comment>Load type</comment>
456
- <frontend_type>select</frontend_type>
457
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
458
- <sort_order>34</sort_order>
459
- <show_in_default>1</show_in_default>
460
- <show_in_website>0</show_in_website>
461
- <show_in_store>0</show_in_store>
462
- </load_type>
463
- <location translate="label">
464
- <label>location</label>
465
- <comment>Shipping location</comment>
466
- <frontend_type>select</frontend_type>
467
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
468
- <sort_order>35</sort_order>
469
- <show_in_default>1</show_in_default>
470
- <show_in_website>0</show_in_website>
471
- <show_in_store>0</show_in_store>
472
- </location>
473
- <made_in translate="label">
474
- <label>made_in</label>
475
- <comment>Manufacturing country</comment>
476
- <frontend_type>select</frontend_type>
477
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
478
- <sort_order>36</sort_order>
479
- <show_in_default>1</show_in_default>
480
- <show_in_website>0</show_in_website>
481
- <show_in_store>0</show_in_store>
482
- </made_in>
483
- <manufacturer translate="label">
484
- <label>manufacturer</label>
485
- <comment>Manufacturer or brand (Recommended)</comment>
486
- <frontend_type>select</frontend_type>
487
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
488
- <sort_order>37</sort_order>
489
- <show_in_default>1</show_in_default>
490
- <show_in_website>0</show_in_website>
491
- <show_in_store>0</show_in_store>
492
- </manufacturer>
493
- <material translate="label">
494
- <label>material</label>
495
- <comment>Construction material</comment>
496
- <frontend_type>select</frontend_type>
497
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
498
- <sort_order>38</sort_order>
499
- <show_in_default>1</show_in_default>
500
- <show_in_website>0</show_in_website>
501
- <show_in_store>0</show_in_store>
502
- </material>
503
- <megapixels translate="label">
504
- <label>megapixels</label>
505
- <comment>Megapixels</comment>
506
- <frontend_type>select</frontend_type>
507
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
508
- <sort_order>39</sort_order>
509
- <show_in_default>1</show_in_default>
510
- <show_in_website>0</show_in_website>
511
- <show_in_store>0</show_in_store>
512
- </megapixels>
513
- <memory_capacity translate="label">
514
- <label>memory_capacity</label>
515
- <comment>Memory capacity</comment>
516
- <frontend_type>select</frontend_type>
517
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
518
- <sort_order>40</sort_order>
519
- <show_in_default>1</show_in_default>
520
- <show_in_website>0</show_in_website>
521
- <show_in_store>0</show_in_store>
522
- </memory_capacity>
523
- <memory_card_slot translate="label">
524
- <label>memory_card_slot</label>
525
- <comment>Memory card slot type</comment>
526
- <frontend_type>select</frontend_type>
527
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
528
- <sort_order>41</sort_order>
529
- <show_in_default>1</show_in_default>
530
- <show_in_website>0</show_in_website>
531
- <show_in_store>0</show_in_store>
532
- </memory_card_slot>
533
- <memory_type translate="label">
534
- <label>memory_type</label>
535
- <comment>Memory type</comment>
536
- <frontend_type>select</frontend_type>
537
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
538
- <sort_order>42</sort_order>
539
- <show_in_default>1</show_in_default>
540
- <show_in_website>0</show_in_website>
541
- <show_in_store>0</show_in_store>
542
- </memory_type>
543
- <model_number translate="label">
544
- <label>model_number</label>
545
- <comment>Model number</comment>
546
- <frontend_type>select</frontend_type>
547
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
548
- <sort_order>43</sort_order>
549
- <show_in_default>1</show_in_default>
550
- <show_in_website>0</show_in_website>
551
- <show_in_store>0</show_in_store>
552
- </model_number>
553
- <mpn translate="label">
554
- <label>mpn</label>
555
- <comment>Manufacturer part number</comment>
556
- <frontend_type>select</frontend_type>
557
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
558
- <sort_order>44</sort_order>
559
- <show_in_default>1</show_in_default>
560
- <show_in_website>0</show_in_website>
561
- <show_in_store>0</show_in_store>
562
- </mpn>
563
- <name translate="label">
564
- <label>name</label>
565
- <comment>Name or title (Required)</comment>
566
- <frontend_type>select</frontend_type>
567
- <validate>required-entry</validate>
568
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
569
- <sort_order>45</sort_order>
570
- <show_in_default>1</show_in_default>
571
- <show_in_website>0</show_in_website>
572
- <show_in_store>0</show_in_store>
573
- </name>
574
- <occasion translate="label">
575
- <label>occasion</label>
576
- <comment>Recommended usage occasion</comment>
577
- <frontend_type>select</frontend_type>
578
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
579
- <sort_order>46</sort_order>
580
- <show_in_default>1</show_in_default>
581
- <show_in_website>0</show_in_website>
582
- <show_in_store>0</show_in_store>
583
- </occasion>
584
- <operating_system translate="label">
585
- <label>operating_system</label>
586
- <comment>Operating system</comment>
587
- <frontend_type>select</frontend_type>
588
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
589
- <sort_order>47</sort_order>
590
- <show_in_default>1</show_in_default>
591
- <show_in_website>0</show_in_website>
592
- <show_in_store>0</show_in_store>
593
- </operating_system>
594
- <optical_drive translate="label">
595
- <label>optical_drive</label>
596
- <comment>Optical drive type</comment>
597
- <frontend_type>select</frontend_type>
598
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
599
- <sort_order>48</sort_order>
600
- <show_in_default>1</show_in_default>
601
- <show_in_website>0</show_in_website>
602
- <show_in_store>0</show_in_store>
603
- </optical_drive>
604
- <pages translate="label">
605
- <label>pages</label>
606
- <comment>Number of pages</comment>
607
- <frontend_type>select</frontend_type>
608
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
609
- <sort_order>49</sort_order>
610
- <show_in_default>1</show_in_default>
611
- <show_in_website>0</show_in_website>
612
- <show_in_store>0</show_in_store>
613
- </pages>
614
- <payment_accepted translate="label">
615
- <label>payment_accepted</label>
616
- <comment>Accepted payment methods</comment>
617
- <frontend_type>select</frontend_type>
618
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
619
- <sort_order>50</sort_order>
620
- <show_in_default>1</show_in_default>
621
- <show_in_website>0</show_in_website>
622
- <show_in_store>0</show_in_store>
623
- </payment_accepted>
624
- <payment_notes translate="label">
625
- <label>payment_notes</label>
626
- <comment>Additional payment notes</comment>
627
- <frontend_type>select</frontend_type>
628
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
629
- <sort_order>51</sort_order>
630
- <show_in_default>1</show_in_default>
631
- <show_in_website>0</show_in_website>
632
- <show_in_store>0</show_in_store>
633
- </payment_notes>
634
- <platform translate="label">
635
- <label>platform</label>
636
- <comment>Platform</comment>
637
- <frontend_type>select</frontend_type>
638
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
639
- <sort_order>52</sort_order>
640
- <show_in_default>1</show_in_default>
641
- <show_in_website>0</show_in_website>
642
- <show_in_store>0</show_in_store>
643
- </platform>
644
- <price translate="label">
645
- <label>price</label>
646
- <comment>Selling price (Required)</comment>
647
- <frontend_type>select</frontend_type>
648
- <validate>required-entry</validate>
649
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
650
- <sort_order>53</sort_order>
651
- <show_in_default>1</show_in_default>
652
- <show_in_website>0</show_in_website>
653
- <show_in_store>0</show_in_store>
654
- </price>
655
- <price_retail translate="label">
656
- <label>price_retail</label>
657
- <comment>Manufacturer suggested retail price</comment>
658
- <frontend_type>select</frontend_type>
659
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
660
- <sort_order>54</sort_order>
661
- <show_in_default>1</show_in_default>
662
- <show_in_website>0</show_in_website>
663
- <show_in_store>0</show_in_store>
664
- </price_retail>
665
- <price_sale translate="label">
666
- <label>price_sale</label>
667
- <comment>Discount price</comment>
668
- <frontend_type>select</frontend_type>
669
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
670
- <sort_order>55</sort_order>
671
- <show_in_default>1</show_in_default>
672
- <show_in_website>0</show_in_website>
673
- <show_in_store>0</show_in_store>
674
- </price_sale>
675
- <price_shipping translate="label">
676
- <label>price_shipping</label>
677
- <comment>Shipping price</comment>
678
- <frontend_type>select</frontend_type>
679
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
680
- <sort_order>56</sort_order>
681
- <show_in_default>1</show_in_default>
682
- <show_in_website>0</show_in_website>
683
- <show_in_store>0</show_in_store>
684
- </price_shipping>
685
- <processor translate="label">
686
- <label>processor</label>
687
- <comment>Processor type</comment>
688
- <frontend_type>select</frontend_type>
689
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
690
- <sort_order>57</sort_order>
691
- <show_in_default>1</show_in_default>
692
- <show_in_website>0</show_in_website>
693
- <show_in_store>0</show_in_store>
694
- </processor>
695
- <publisher translate="label">
696
- <label>publisher</label>
697
- <comment>Publisher</comment>
698
- <frontend_type>select</frontend_type>
699
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
700
- <sort_order>58</sort_order>
701
- <show_in_default>1</show_in_default>
702
- <show_in_website>0</show_in_website>
703
- <show_in_store>0</show_in_store>
704
- </publisher>
705
- <quantity_in_stock translate="label">
706
- <label>quantity_in_stock</label>
707
- <comment>Number of items in stock</comment>
708
- <frontend_type>select</frontend_type>
709
- <source_model>eems_affiliate/system_config_source_stockquantity</source_model>
710
- <sort_order>59</sort_order>
711
- <show_in_default>1</show_in_default>
712
- <show_in_website>0</show_in_website>
713
- <show_in_store>0</show_in_store>
714
- </quantity_in_stock>
715
- <rating translate="label">
716
- <label>rating</label>
717
- <comment>Rating</comment>
718
- <frontend_type>select</frontend_type>
719
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
720
- <sort_order>60</sort_order>
721
- <show_in_default>1</show_in_default>
722
- <show_in_website>0</show_in_website>
723
- <show_in_store>0</show_in_store>
724
- </rating>
725
- <recommended_usage translate="label">
726
- <label>recommended_usage</label>
727
- <comment>Recommended usage</comment>
728
- <frontend_type>select</frontend_type>
729
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
730
- <sort_order>61</sort_order>
731
- <show_in_default>1</show_in_default>
732
- <show_in_website>0</show_in_website>
733
- <show_in_store>0</show_in_store>
734
- </recommended_usage>
735
- <resolution translate="label">
736
- <label>resolution</label>
737
- <comment>Screen resolution</comment>
738
- <frontend_type>select</frontend_type>
739
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
740
- <sort_order>62</sort_order>
741
- <show_in_default>1</show_in_default>
742
- <show_in_website>0</show_in_website>
743
- <show_in_store>0</show_in_store>
744
- </resolution>
745
- <screen_size translate="label">
746
- <label>screen_size</label>
747
- <comment>Screen size</comment>
748
- <frontend_type>select</frontend_type>
749
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
750
- <sort_order>63</sort_order>
751
- <show_in_default>1</show_in_default>
752
- <show_in_website>0</show_in_website>
753
- <show_in_store>0</show_in_store>
754
- </screen_size>
755
- <shipping_method translate="label">
756
- <label>shipping_method</label>
757
- <comment>Shipping methods</comment>
758
- <frontend_type>select</frontend_type>
759
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
760
- <sort_order>64</sort_order>
761
- <show_in_default>1</show_in_default>
762
- <show_in_website>0</show_in_website>
763
- <show_in_store>0</show_in_store>
764
- </shipping_method>
765
- <shoe_size translate="label">
766
- <label>shoe_size</label>
767
- <comment>Shoe size</comment>
768
- <frontend_type>select</frontend_type>
769
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
770
- <sort_order>65</sort_order>
771
- <show_in_default>1</show_in_default>
772
- <show_in_website>0</show_in_website>
773
- <show_in_store>0</show_in_store>
774
- </shoe_size>
775
- <shoe_width translate="label">
776
- <label>shoe_width</label>
777
- <comment>Shoe width</comment>
778
- <frontend_type>select</frontend_type>
779
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
780
- <sort_order>66</sort_order>
781
- <show_in_default>1</show_in_default>
782
- <show_in_website>0</show_in_website>
783
- <show_in_store>0</show_in_store>
784
- </shoe_width>
785
- <size translate="label">
786
- <label>size</label>
787
- <comment>Size</comment>
788
- <frontend_type>select</frontend_type>
789
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
790
- <sort_order>67</sort_order>
791
- <show_in_default>1</show_in_default>
792
- <show_in_website>0</show_in_website>
793
- <show_in_store>0</show_in_store>
794
- </size>
795
- <sku translate="label">
796
- <label>sku</label>
797
- <comment>Stock keeping unit (Recommended)</comment>
798
- <frontend_type>select</frontend_type>
799
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
800
- <sort_order>68</sort_order>
801
- <show_in_default>1</show_in_default>
802
- <show_in_website>0</show_in_website>
803
- <show_in_store>0</show_in_store>
804
- </sku>
805
- <staring translate="label">
806
- <label>staring</label>
807
- <comment>Staring actors</comment>
808
- <frontend_type>select</frontend_type>
809
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
810
- <sort_order>69</sort_order>
811
- <show_in_default>1</show_in_default>
812
- <show_in_website>0</show_in_website>
813
- <show_in_store>0</show_in_store>
814
- </staring>
815
- <style translate="label">
816
- <label>style</label>
817
- <comment>Style</comment>
818
- <frontend_type>select</frontend_type>
819
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
820
- <sort_order>70</sort_order>
821
- <show_in_default>1</show_in_default>
822
- <show_in_website>0</show_in_website>
823
- <show_in_store>0</show_in_store>
824
- </style>
825
- <tech_spec_url translate="label">
826
- <label>tech_spec_url</label>
827
- <comment>Technical specifications URL</comment>
828
- <frontend_type>select</frontend_type>
829
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
830
- <sort_order>71</sort_order>
831
- <show_in_default>1</show_in_default>
832
- <show_in_website>0</show_in_website>
833
- <show_in_store>0</show_in_store>
834
- </tech_spec_url>
835
- <tracks translate="label">
836
- <label>tracks</label>
837
- <comment>Total number of tracks</comment>
838
- <frontend_type>select</frontend_type>
839
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
840
- <sort_order>72</sort_order>
841
- <show_in_default>1</show_in_default>
842
- <show_in_website>0</show_in_website>
843
- <show_in_store>0</show_in_store>
844
- </tracks>
845
- <upc translate="label">
846
- <label>upc</label>
847
- <comment>Universal product code (Recommended)</comment>
848
- <frontend_type>select</frontend_type>
849
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
850
- <sort_order>73</sort_order>
851
- <show_in_default>1</show_in_default>
852
- <show_in_website>0</show_in_website>
853
- <show_in_store>0</show_in_store>
854
- </upc>
855
- <weight translate="label">
856
- <label>weight</label>
857
- <comment>Weight</comment>
858
- <frontend_type>select</frontend_type>
859
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
860
- <sort_order>74</sort_order>
861
- <show_in_default>1</show_in_default>
862
- <show_in_website>0</show_in_website>
863
- <show_in_store>0</show_in_store>
864
- </weight>
865
- <width translate="label">
866
- <label>width</label>
867
- <comment>Width</comment>
868
- <frontend_type>select</frontend_type>
869
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
870
- <sort_order>75</sort_order>
871
- <show_in_default>1</show_in_default>
872
- <show_in_website>0</show_in_website>
873
- <show_in_store>0</show_in_store>
874
- </width>
875
- <wireless_interface translate="label">
876
- <label>wireless_interface</label>
877
- <comment>Wireless interface</comment>
878
- <frontend_type>select</frontend_type>
879
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
880
- <sort_order>76</sort_order>
881
- <show_in_default>1</show_in_default>
882
- <show_in_website>0</show_in_website>
883
- <show_in_store>0</show_in_store>
884
- </wireless_interface>
885
- <year translate="label">
886
- <label>year</label>
887
- <comment>Year of manufacture - YYYY</comment>
888
- <frontend_type>select</frontend_type>
889
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
890
- <sort_order>77</sort_order>
891
- <show_in_default>1</show_in_default>
892
- <show_in_website>0</show_in_website>
893
- <show_in_store>0</show_in_store>
894
- </year>
895
- <zoom translate="label">
896
- <label>zoom</label>
897
- <comment>Maximum zoom</comment>
898
- <frontend_type>select</frontend_type>
899
- <source_model>eems_affiliate/system_config_source_attributes</source_model>
900
- <sort_order>78</sort_order>
901
- <show_in_default>1</show_in_default>
902
- <show_in_website>0</show_in_website>
903
- <show_in_store>0</show_in_store>
904
- </zoom>
905
- </fields>
906
- </eems_affiliate_product_attribute_map>
907
- </groups>
908
- </marketing_solutions>
909
- </sections>
910
  </config>
1
  <?xml version="1.0" encoding="utf-8"?>
2
  <!--
3
+ Copyright (c) 2014 eBay Enterprise, Inc.
4
 
5
+ NOTICE OF LICENSE
6
 
7
+ This source file is subject to the eBay Enterprise
8
+ Magento Extensions End User License Agreement
9
+ that is bundled with this package in the file LICENSE.md.
10
+ It is also available through the world-wide-web at this URL:
11
+ http://www.ebayenterprise.com/files/pdf/Magento_Connect_Extensions_EULA_050714.pdf
 
 
 
12
 
13
+ @copyright Copyright (c) 2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/)
14
+ @license http://www.ebayenterprise.com/files/pdf/Magento_Connect_Extensions_EULA_050714.pdf eBay Enterprise Magento Extensions End User License Agreement
15
  -->
16
  <config>
17
+ <tabs>
18
+ <ebayenterprise translate="label" module="eems_affiliate">
19
+ <label>eBay Enterprise</label>
20
+ <sort_order>550</sort_order>
21
+ </ebayenterprise>
22
+ </tabs>
23
+ <sections>
24
+ <marketing_solutions translate="label" module="eems_affiliate">
25
+ <class>separator-top</class>
26
+ <label>Marketing Solutions</label>
27
+ <tab>ebayenterprise</tab>
28
+ <frontend_type>text</frontend_type>
29
+ <sort_order>550</sort_order>
30
+ <show_in_default>1</show_in_default>
31
+ <show_in_website>1</show_in_website>
32
+ <show_in_store>1</show_in_store>
33
+ <groups>
34
+ <eems_affiliate translate="label comment">
35
+ <label>Affiliate</label>
36
+ <comment><![CDATA[Your program ID and other information can be found within your EEAN advertiser account. Don’t have an account yet? <a href='https://www.pepperjamnetwork.com/register/basic' target='_pjregister'>Register</a> for one today!]]></comment>
37
+ <frontend_type>text</frontend_type>
38
+ <sort_order>100</sort_order>
39
+ <show_in_default>1</show_in_default>
40
+ <show_in_website>1</show_in_website>
41
+ <show_in_store>1</show_in_store>
42
+ <fields>
43
+ <active translate="label">
44
+ <label>Enable Affiliate Tracking</label>
45
+ <frontend_type>select</frontend_type>
46
+ <source_model>adminhtml/system_config_source_yesno</source_model>
47
+ <sort_order>1</sort_order>
48
+ <show_in_default>1</show_in_default>
49
+ <show_in_website>0</show_in_website>
50
+ <show_in_store>0</show_in_store>
51
+ </active>
52
+ <program_id translate="label comment">
53
+ <label>Program Id</label>
54
+ <comment>Your Program Id will be provided to you by eBay Enterprise Affiliate</comment>
55
+ <frontend_type>text</frontend_type>
56
+ <sort_order>10</sort_order>
57
+ <show_in_default>1</show_in_default>
58
+ <show_in_website>1</show_in_website>
59
+ <show_in_store>0</show_in_store>
60
+ </program_id>
61
+ <itemized_orders translate="label">
62
+ <label>Itemized Orders</label>
63
+ <frontend_type>select</frontend_type>
64
+ <source_model>adminhtml/system_config_source_yesno</source_model>
65
+ <sort_order>20</sort_order>
66
+ <show_in_default>1</show_in_default>
67
+ <show_in_website>0</show_in_website>
68
+ <show_in_store>0</show_in_store>
69
+ </itemized_orders>
70
+ <transaction_type translate="label comment">
71
+ <label>Transaction Type</label>
72
+ <comment>Sale transactions pay publishers a percentage of the sale, lead transactions pay publishes a flat amount for an action.</comment>
73
+ <frontend_type>select</frontend_type>
74
+ <source_model>eems_affiliate/system_config_source_transactiontype</source_model>
75
+ <depends>
76
+ <itemized_orders>0</itemized_orders>
77
+ </depends>
78
+ <sort_order>30</sort_order>
79
+ <show_in_default>1</show_in_default>
80
+ <show_in_website>0</show_in_website>
81
+ <show_in_store>0</show_in_store>
82
+ </transaction_type>
83
+ <export_path translate="label comment">
84
+ <label>Export Path</label>
85
+ <comment>Default local path to export feeds to. These feeds will need to be made available to eBay Enterprise Affiliate via FTP.</comment>
86
+ <frontend_type>text</frontend_type>
87
+ <sort_order>50</sort_order>
88
+ <show_in_default>1</show_in_default>
89
+ <show_in_website>0</show_in_website>
90
+ <show_in_store>0</show_in_store>
91
+ </export_path>
92
  <conditional_pixel_enabled translate="label">
93
  <label>Conditional Pixel</label>
94
  <frontend_type>select</frontend_type>
102
  <label>Query String Key Name</label>
103
  <comment>Only apply the pixel if the query string includes this key.</comment>
104
  <frontend_type>text</frontend_type>
105
+ <depends>
106
+ <conditional_pixel_enabled>1</conditional_pixel_enabled>
107
+ </depends>
108
  <sort_order>70</sort_order>
109
  <show_in_default>1</show_in_default>
110
  <show_in_website>0</show_in_website>
111
  <show_in_store>0</show_in_store>
112
  </source_key_name>
113
+ </fields>
114
+ </eems_affiliate>
115
+ <eems_affiliate_product_attribute_map translate="label comment">
116
+ <label>Affiliate Product Feed Map</label>
117
+ <frontend_type>text</frontend_type>
118
+ <sort_order>101</sort_order>
119
+ <show_in_default>1</show_in_default>
120
+ <show_in_website>1</show_in_website>
121
+ <show_in_store>0</show_in_store>
122
+ <fields>
123
+ <age_range translate="label">
124
+ <label>age_range</label>
125
+ <comment>Suggested age range</comment>
126
+ <frontend_type>select</frontend_type>
127
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
128
+ <sort_order>1</sort_order>
129
+ <show_in_default>1</show_in_default>
130
+ <show_in_website>0</show_in_website>
131
+ <show_in_store>0</show_in_store>
132
+ </age_range>
133
+ <artist translate="label">
134
+ <label>artist</label>
135
+ <comment>Media artist</comment>
136
+ <frontend_type>select</frontend_type>
137
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
138
+ <sort_order>2</sort_order>
139
+ <show_in_default>1</show_in_default>
140
+ <show_in_website>0</show_in_website>
141
+ <show_in_store>0</show_in_store>
142
+ </artist>
143
+ <aspect_ratio translate="label">
144
+ <label>aspect_ratio</label>
145
+ <comment>Screen aspect ratio</comment>
146
+ <frontend_type>select</frontend_type>
147
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
148
+ <sort_order>3</sort_order>
149
+ <show_in_default>1</show_in_default>
150
+ <show_in_website>0</show_in_website>
151
+ <show_in_store>0</show_in_store>
152
+ </aspect_ratio>
153
+ <author translate="label">
154
+ <label>author</label>
155
+ <comment>Media author</comment>
156
+ <frontend_type>select</frontend_type>
157
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
158
+ <sort_order>4</sort_order>
159
+ <show_in_default>1</show_in_default>
160
+ <show_in_website>0</show_in_website>
161
+ <show_in_store>0</show_in_store>
162
+ </author>
163
+ <battery_life translate="label">
164
+ <label>battery_life</label>
165
+ <comment>Battery life</comment>
166
+ <frontend_type>select</frontend_type>
167
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
168
+ <sort_order>5</sort_order>
169
+ <show_in_default>1</show_in_default>
170
+ <show_in_website>0</show_in_website>
171
+ <show_in_store>0</show_in_store>
172
+ </battery_life>
173
+ <binding translate="label">
174
+ <label>binding</label>
175
+ <comment>Book binding</comment>
176
+ <frontend_type>select</frontend_type>
177
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
178
+ <sort_order>6</sort_order>
179
+ <show_in_default>1</show_in_default>
180
+ <show_in_website>0</show_in_website>
181
+ <show_in_store>0</show_in_store>
182
+ </binding>
183
+ <buy_url translate="label">
184
+ <label>buy_url</label>
185
+ <comment>Destination URL (Required)</comment>
186
+ <frontend_type>select</frontend_type>
187
+ <validate>required-entry</validate>
188
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
189
+ <sort_order>7</sort_order>
190
+ <show_in_default>1</show_in_default>
191
+ <show_in_website>0</show_in_website>
192
+ <show_in_store>0</show_in_store>
193
+ </buy_url>
194
+ <category_network translate="label">
195
+ <label>category_network</label>
196
+ <comment>eBay Enterprise Affiliate Network specific category (sub categories optionally delimited by '&gt;')</comment>
197
+ <frontend_type>select</frontend_type>
198
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
199
+ <sort_order>8</sort_order>
200
+ <show_in_default>1</show_in_default>
201
+ <show_in_website>0</show_in_website>
202
+ <show_in_store>0</show_in_store>
203
+ </category_network>
204
+ <category_program translate="label">
205
+ <label>category_program</label>
206
+ <comment>Merchant specific category (sub categories optionally delimited by '&gt;') (Recommended)</comment>
207
+ <frontend_type>select</frontend_type>
208
+ <source_model>eems_affiliate/system_config_source_categories</source_model>
209
+ <sort_order>9</sort_order>
210
+ <show_in_default>1</show_in_default>
211
+ <show_in_website>0</show_in_website>
212
+ <show_in_store>0</show_in_store>
213
+ </category_program>
214
+ <color translate="label">
215
+ <label>color</label>
216
+ <comment>Color of item</comment>
217
+ <frontend_type>select</frontend_type>
218
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
219
+ <sort_order>10</sort_order>
220
+ <show_in_default>1</show_in_default>
221
+ <show_in_website>0</show_in_website>
222
+ <show_in_store>0</show_in_store>
223
+ </color>
224
+ <color_output translate="label">
225
+ <label>color_output</label>
226
+ <comment>Whether output is color or not</comment>
227
+ <frontend_type>select</frontend_type>
228
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
229
+ <sort_order>11</sort_order>
230
+ <show_in_default>1</show_in_default>
231
+ <show_in_website>0</show_in_website>
232
+ <show_in_store>0</show_in_store>
233
+ </color_output>
234
+ <condition translate="label">
235
+ <label>condition</label>
236
+ <comment>Condition (Recommended)</comment>
237
+ <frontend_type>select</frontend_type>
238
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
239
+ <sort_order>12</sort_order>
240
+ <show_in_default>1</show_in_default>
241
+ <show_in_website>0</show_in_website>
242
+ <show_in_store>0</show_in_store>
243
+ </condition>
244
+ <description_long translate="label">
245
+ <label>description_long</label>
246
+ <comment>Long description (Required)</comment>
247
+ <frontend_type>select</frontend_type>
248
+ <validate>required-entry</validate>
249
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
250
+ <sort_order>13</sort_order>
251
+ <show_in_default>1</show_in_default>
252
+ <show_in_website>0</show_in_website>
253
+ <show_in_store>0</show_in_store>
254
+ </description_long>
255
+ <description_short translate="label">
256
+ <label>description_short</label>
257
+ <comment>Short description</comment>
258
+ <frontend_type>select</frontend_type>
259
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
260
+ <sort_order>14</sort_order>
261
+ <show_in_default>1</show_in_default>
262
+ <show_in_website>0</show_in_website>
263
+ <show_in_store>0</show_in_store>
264
+ </description_short>
265
+ <director translate="label">
266
+ <label>director</label>
267
+ <comment>Movie director</comment>
268
+ <frontend_type>select</frontend_type>
269
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
270
+ <sort_order>15</sort_order>
271
+ <show_in_default>1</show_in_default>
272
+ <show_in_website>0</show_in_website>
273
+ <show_in_store>0</show_in_store>
274
+ </director>
275
+ <discontinued translate="label">
276
+ <label>discontinued</label>
277
+ <comment>Whether product is discontinued or not</comment>
278
+ <frontend_type>select</frontend_type>
279
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
280
+ <sort_order>16</sort_order>
281
+ <show_in_default>1</show_in_default>
282
+ <show_in_website>0</show_in_website>
283
+ <show_in_store>0</show_in_store>
284
+ </discontinued>
285
+ <display_type translate="label">
286
+ <label>display_type</label>
287
+ <comment>Display type</comment>
288
+ <frontend_type>select</frontend_type>
289
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
290
+ <sort_order>17</sort_order>
291
+ <show_in_default>1</show_in_default>
292
+ <show_in_website>0</show_in_website>
293
+ <show_in_store>0</show_in_store>
294
+ </display_type>
295
+ <edition translate="label">
296
+ <label>edition</label>
297
+ <comment>Media edition</comment>
298
+ <frontend_type>select</frontend_type>
299
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
300
+ <sort_order>18</sort_order>
301
+ <show_in_default>1</show_in_default>
302
+ <show_in_website>0</show_in_website>
303
+ <show_in_store>0</show_in_store>
304
+ </edition>
305
+ <expiration_date translate="label">
306
+ <label>expiration_date</label>
307
+ <comment>Expiration date</comment>
308
+ <frontend_type>select</frontend_type>
309
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
310
+ <sort_order>19</sort_order>
311
+ <show_in_default>1</show_in_default>
312
+ <show_in_website>0</show_in_website>
313
+ <show_in_store>0</show_in_store>
314
+ </expiration_date>
315
+ <features translate="label">
316
+ <label>features</label>
317
+ <comment>Special features</comment>
318
+ <frontend_type>select</frontend_type>
319
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
320
+ <sort_order>20</sort_order>
321
+ <show_in_default>1</show_in_default>
322
+ <show_in_website>0</show_in_website>
323
+ <show_in_store>0</show_in_store>
324
+ </features>
325
+ <focus_type translate="label">
326
+ <label>focus_type</label>
327
+ <comment>Focus type</comment>
328
+ <frontend_type>select</frontend_type>
329
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
330
+ <sort_order>21</sort_order>
331
+ <show_in_default>1</show_in_default>
332
+ <show_in_website>0</show_in_website>
333
+ <show_in_store>0</show_in_store>
334
+ </focus_type>
335
+ <format translate="label">
336
+ <label>format</label>
337
+ <comment>Format</comment>
338
+ <frontend_type>select</frontend_type>
339
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
340
+ <sort_order>22</sort_order>
341
+ <show_in_default>1</show_in_default>
342
+ <show_in_website>0</show_in_website>
343
+ <show_in_store>0</show_in_store>
344
+ </format>
345
+ <functions translate="label">
346
+ <label>functions</label>
347
+ <comment>Functions</comment>
348
+ <frontend_type>select</frontend_type>
349
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
350
+ <sort_order>23</sort_order>
351
+ <show_in_default>1</show_in_default>
352
+ <show_in_website>0</show_in_website>
353
+ <show_in_store>0</show_in_store>
354
+ </functions>
355
+ <genre translate="label">
356
+ <label>genre</label>
357
+ <comment>Genre</comment>
358
+ <frontend_type>select</frontend_type>
359
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
360
+ <sort_order>24</sort_order>
361
+ <show_in_default>1</show_in_default>
362
+ <show_in_website>0</show_in_website>
363
+ <show_in_store>0</show_in_store>
364
+ </genre>
365
+ <heel_height translate="label">
366
+ <label>heel_height</label>
367
+ <comment>Heel height</comment>
368
+ <frontend_type>select</frontend_type>
369
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
370
+ <sort_order>25</sort_order>
371
+ <show_in_default>1</show_in_default>
372
+ <show_in_website>0</show_in_website>
373
+ <show_in_store>0</show_in_store>
374
+ </heel_height>
375
+ <height translate="label">
376
+ <label>height</label>
377
+ <comment>Height</comment>
378
+ <frontend_type>select</frontend_type>
379
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
380
+ <sort_order>26</sort_order>
381
+ <show_in_default>1</show_in_default>
382
+ <show_in_website>0</show_in_website>
383
+ <show_in_store>0</show_in_store>
384
+ </height>
385
+ <image_thumb_url translate="label">
386
+ <label>image_thumb_url</label>
387
+ <comment>Thumbnail image URL (Recommended)</comment>
388
+ <frontend_type>select</frontend_type>
389
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
390
+ <sort_order>27</sort_order>
391
+ <show_in_default>1</show_in_default>
392
+ <show_in_website>0</show_in_website>
393
+ <show_in_store>0</show_in_store>
394
+ </image_thumb_url>
395
+ <image_url translate="label">
396
+ <label>image_url</label>
397
+ <comment>Standard image URL (Required)</comment>
398
+ <frontend_type>select</frontend_type>
399
+ <validate>required-entry</validate>
400
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
401
+ <sort_order>28</sort_order>
402
+ <show_in_default>1</show_in_default>
403
+ <show_in_website>0</show_in_website>
404
+ <show_in_store>0</show_in_store>
405
+ </image_url>
406
+ <installation translate="label">
407
+ <label>installation</label>
408
+ <comment>Installation type</comment>
409
+ <frontend_type>select</frontend_type>
410
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
411
+ <sort_order>29</sort_order>
412
+ <show_in_default>1</show_in_default>
413
+ <show_in_website>0</show_in_website>
414
+ <show_in_store>0</show_in_store>
415
+ </installation>
416
+ <in_stock translate="label">
417
+ <label>in_stock</label>
418
+ <comment>Whether product is in stock or not</comment>
419
+ <frontend_type>select</frontend_type>
420
+ <source_model>eems_affiliate/system_config_source_stockyesno</source_model>
421
+ <sort_order>30</sort_order>
422
+ <show_in_default>1</show_in_default>
423
+ <show_in_website>0</show_in_website>
424
+ <show_in_store>0</show_in_store>
425
+ </in_stock>
426
+ <isbn translate="label">
427
+ <label>isbn</label>
428
+ <comment>Book ISBN</comment>
429
+ <frontend_type>select</frontend_type>
430
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
431
+ <sort_order>31</sort_order>
432
+ <show_in_default>1</show_in_default>
433
+ <show_in_website>0</show_in_website>
434
+ <show_in_store>0</show_in_store>
435
+ </isbn>
436
+ <keywords translate="label">
437
+ <label>keywords</label>
438
+ <comment>Space separated list of keywords (Recommended)</comment>
439
+ <frontend_type>select</frontend_type>
440
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
441
+ <sort_order>32</sort_order>
442
+ <show_in_default>1</show_in_default>
443
+ <show_in_website>0</show_in_website>
444
+ <show_in_store>0</show_in_store>
445
+ </keywords>
446
+ <length translate="label">
447
+ <label>length</label>
448
+ <comment>Length</comment>
449
+ <frontend_type>select</frontend_type>
450
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
451
+ <sort_order>33</sort_order>
452
+ <show_in_default>1</show_in_default>
453
+ <show_in_website>0</show_in_website>
454
+ <show_in_store>0</show_in_store>
455
+ </length>
456
+ <load_type translate="label">
457
+ <label>load_type</label>
458
+ <comment>Load type</comment>
459
+ <frontend_type>select</frontend_type>
460
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
461
+ <sort_order>34</sort_order>
462
+ <show_in_default>1</show_in_default>
463
+ <show_in_website>0</show_in_website>
464
+ <show_in_store>0</show_in_store>
465
+ </load_type>
466
+ <location translate="label">
467
+ <label>location</label>
468
+ <comment>Shipping location</comment>
469
+ <frontend_type>select</frontend_type>
470
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
471
+ <sort_order>35</sort_order>
472
+ <show_in_default>1</show_in_default>
473
+ <show_in_website>0</show_in_website>
474
+ <show_in_store>0</show_in_store>
475
+ </location>
476
+ <made_in translate="label">
477
+ <label>made_in</label>
478
+ <comment>Manufacturing country</comment>
479
+ <frontend_type>select</frontend_type>
480
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
481
+ <sort_order>36</sort_order>
482
+ <show_in_default>1</show_in_default>
483
+ <show_in_website>0</show_in_website>
484
+ <show_in_store>0</show_in_store>
485
+ </made_in>
486
+ <manufacturer translate="label">
487
+ <label>manufacturer</label>
488
+ <comment>Manufacturer or brand (Recommended)</comment>
489
+ <frontend_type>select</frontend_type>
490
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
491
+ <sort_order>37</sort_order>
492
+ <show_in_default>1</show_in_default>
493
+ <show_in_website>0</show_in_website>
494
+ <show_in_store>0</show_in_store>
495
+ </manufacturer>
496
+ <material translate="label">
497
+ <label>material</label>
498
+ <comment>Construction material</comment>
499
+ <frontend_type>select</frontend_type>
500
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
501
+ <sort_order>38</sort_order>
502
+ <show_in_default>1</show_in_default>
503
+ <show_in_website>0</show_in_website>
504
+ <show_in_store>0</show_in_store>
505
+ </material>
506
+ <megapixels translate="label">
507
+ <label>megapixels</label>
508
+ <comment>Megapixels</comment>
509
+ <frontend_type>select</frontend_type>
510
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
511
+ <sort_order>39</sort_order>
512
+ <show_in_default>1</show_in_default>
513
+ <show_in_website>0</show_in_website>
514
+ <show_in_store>0</show_in_store>
515
+ </megapixels>
516
+ <memory_capacity translate="label">
517
+ <label>memory_capacity</label>
518
+ <comment>Memory capacity</comment>
519
+ <frontend_type>select</frontend_type>
520
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
521
+ <sort_order>40</sort_order>
522
+ <show_in_default>1</show_in_default>
523
+ <show_in_website>0</show_in_website>
524
+ <show_in_store>0</show_in_store>
525
+ </memory_capacity>
526
+ <memory_card_slot translate="label">
527
+ <label>memory_card_slot</label>
528
+ <comment>Memory card slot type</comment>
529
+ <frontend_type>select</frontend_type>
530
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
531
+ <sort_order>41</sort_order>
532
+ <show_in_default>1</show_in_default>
533
+ <show_in_website>0</show_in_website>
534
+ <show_in_store>0</show_in_store>
535
+ </memory_card_slot>
536
+ <memory_type translate="label">
537
+ <label>memory_type</label>
538
+ <comment>Memory type</comment>
539
+ <frontend_type>select</frontend_type>
540
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
541
+ <sort_order>42</sort_order>
542
+ <show_in_default>1</show_in_default>
543
+ <show_in_website>0</show_in_website>
544
+ <show_in_store>0</show_in_store>
545
+ </memory_type>
546
+ <model_number translate="label">
547
+ <label>model_number</label>
548
+ <comment>Model number</comment>
549
+ <frontend_type>select</frontend_type>
550
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
551
+ <sort_order>43</sort_order>
552
+ <show_in_default>1</show_in_default>
553
+ <show_in_website>0</show_in_website>
554
+ <show_in_store>0</show_in_store>
555
+ </model_number>
556
+ <mpn translate="label">
557
+ <label>mpn</label>
558
+ <comment>Manufacturer part number</comment>
559
+ <frontend_type>select</frontend_type>
560
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
561
+ <sort_order>44</sort_order>
562
+ <show_in_default>1</show_in_default>
563
+ <show_in_website>0</show_in_website>
564
+ <show_in_store>0</show_in_store>
565
+ </mpn>
566
+ <name translate="label">
567
+ <label>name</label>
568
+ <comment>Name or title (Required)</comment>
569
+ <frontend_type>select</frontend_type>
570
+ <validate>required-entry</validate>
571
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
572
+ <sort_order>45</sort_order>
573
+ <show_in_default>1</show_in_default>
574
+ <show_in_website>0</show_in_website>
575
+ <show_in_store>0</show_in_store>
576
+ </name>
577
+ <occasion translate="label">
578
+ <label>occasion</label>
579
+ <comment>Recommended usage occasion</comment>
580
+ <frontend_type>select</frontend_type>
581
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
582
+ <sort_order>46</sort_order>
583
+ <show_in_default>1</show_in_default>
584
+ <show_in_website>0</show_in_website>
585
+ <show_in_store>0</show_in_store>
586
+ </occasion>
587
+ <operating_system translate="label">
588
+ <label>operating_system</label>
589
+ <comment>Operating system</comment>
590
+ <frontend_type>select</frontend_type>
591
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
592
+ <sort_order>47</sort_order>
593
+ <show_in_default>1</show_in_default>
594
+ <show_in_website>0</show_in_website>
595
+ <show_in_store>0</show_in_store>
596
+ </operating_system>
597
+ <optical_drive translate="label">
598
+ <label>optical_drive</label>
599
+ <comment>Optical drive type</comment>
600
+ <frontend_type>select</frontend_type>
601
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
602
+ <sort_order>48</sort_order>
603
+ <show_in_default>1</show_in_default>
604
+ <show_in_website>0</show_in_website>
605
+ <show_in_store>0</show_in_store>
606
+ </optical_drive>
607
+ <pages translate="label">
608
+ <label>pages</label>
609
+ <comment>Number of pages</comment>
610
+ <frontend_type>select</frontend_type>
611
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
612
+ <sort_order>49</sort_order>
613
+ <show_in_default>1</show_in_default>
614
+ <show_in_website>0</show_in_website>
615
+ <show_in_store>0</show_in_store>
616
+ </pages>
617
+ <payment_accepted translate="label">
618
+ <label>payment_accepted</label>
619
+ <comment>Accepted payment methods</comment>
620
+ <frontend_type>select</frontend_type>
621
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
622
+ <sort_order>50</sort_order>
623
+ <show_in_default>1</show_in_default>
624
+ <show_in_website>0</show_in_website>
625
+ <show_in_store>0</show_in_store>
626
+ </payment_accepted>
627
+ <payment_notes translate="label">
628
+ <label>payment_notes</label>
629
+ <comment>Additional payment notes</comment>
630
+ <frontend_type>select</frontend_type>
631
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
632
+ <sort_order>51</sort_order>
633
+ <show_in_default>1</show_in_default>
634
+ <show_in_website>0</show_in_website>
635
+ <show_in_store>0</show_in_store>
636
+ </payment_notes>
637
+ <platform translate="label">
638
+ <label>platform</label>
639
+ <comment>Platform</comment>
640
+ <frontend_type>select</frontend_type>
641
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
642
+ <sort_order>52</sort_order>
643
+ <show_in_default>1</show_in_default>
644
+ <show_in_website>0</show_in_website>
645
+ <show_in_store>0</show_in_store>
646
+ </platform>
647
+ <price translate="label">
648
+ <label>price</label>
649
+ <comment>Selling price (Required)</comment>
650
+ <frontend_type>select</frontend_type>
651
+ <validate>required-entry</validate>
652
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
653
+ <sort_order>53</sort_order>
654
+ <show_in_default>1</show_in_default>
655
+ <show_in_website>0</show_in_website>
656
+ <show_in_store>0</show_in_store>
657
+ </price>
658
+ <price_retail translate="label">
659
+ <label>price_retail</label>
660
+ <comment>Manufacturer suggested retail price</comment>
661
+ <frontend_type>select</frontend_type>
662
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
663
+ <sort_order>54</sort_order>
664
+ <show_in_default>1</show_in_default>
665
+ <show_in_website>0</show_in_website>
666
+ <show_in_store>0</show_in_store>
667
+ </price_retail>
668
+ <price_sale translate="label">
669
+ <label>price_sale</label>
670
+ <comment>Discount price</comment>
671
+ <frontend_type>select</frontend_type>
672
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
673
+ <sort_order>55</sort_order>
674
+ <show_in_default>1</show_in_default>
675
+ <show_in_website>0</show_in_website>
676
+ <show_in_store>0</show_in_store>
677
+ </price_sale>
678
+ <price_shipping translate="label">
679
+ <label>price_shipping</label>
680
+ <comment>Shipping price</comment>
681
+ <frontend_type>select</frontend_type>
682
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
683
+ <sort_order>56</sort_order>
684
+ <show_in_default>1</show_in_default>
685
+ <show_in_website>0</show_in_website>
686
+ <show_in_store>0</show_in_store>
687
+ </price_shipping>
688
+ <processor translate="label">
689
+ <label>processor</label>
690
+ <comment>Processor type</comment>
691
+ <frontend_type>select</frontend_type>
692
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
693
+ <sort_order>57</sort_order>
694
+ <show_in_default>1</show_in_default>
695
+ <show_in_website>0</show_in_website>
696
+ <show_in_store>0</show_in_store>
697
+ </processor>
698
+ <publisher translate="label">
699
+ <label>publisher</label>
700
+ <comment>Publisher</comment>
701
+ <frontend_type>select</frontend_type>
702
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
703
+ <sort_order>58</sort_order>
704
+ <show_in_default>1</show_in_default>
705
+ <show_in_website>0</show_in_website>
706
+ <show_in_store>0</show_in_store>
707
+ </publisher>
708
+ <quantity_in_stock translate="label">
709
+ <label>quantity_in_stock</label>
710
+ <comment>Number of items in stock</comment>
711
+ <frontend_type>select</frontend_type>
712
+ <source_model>eems_affiliate/system_config_source_stockquantity</source_model>
713
+ <sort_order>59</sort_order>
714
+ <show_in_default>1</show_in_default>
715
+ <show_in_website>0</show_in_website>
716
+ <show_in_store>0</show_in_store>
717
+ </quantity_in_stock>
718
+ <rating translate="label">
719
+ <label>rating</label>
720
+ <comment>Rating</comment>
721
+ <frontend_type>select</frontend_type>
722
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
723
+ <sort_order>60</sort_order>
724
+ <show_in_default>1</show_in_default>
725
+ <show_in_website>0</show_in_website>
726
+ <show_in_store>0</show_in_store>
727
+ </rating>
728
+ <recommended_usage translate="label">
729
+ <label>recommended_usage</label>
730
+ <comment>Recommended usage</comment>
731
+ <frontend_type>select</frontend_type>
732
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
733
+ <sort_order>61</sort_order>
734
+ <show_in_default>1</show_in_default>
735
+ <show_in_website>0</show_in_website>
736
+ <show_in_store>0</show_in_store>
737
+ </recommended_usage>
738
+ <resolution translate="label">
739
+ <label>resolution</label>
740
+ <comment>Screen resolution</comment>
741
+ <frontend_type>select</frontend_type>
742
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
743
+ <sort_order>62</sort_order>
744
+ <show_in_default>1</show_in_default>
745
+ <show_in_website>0</show_in_website>
746
+ <show_in_store>0</show_in_store>
747
+ </resolution>
748
+ <screen_size translate="label">
749
+ <label>screen_size</label>
750
+ <comment>Screen size</comment>
751
+ <frontend_type>select</frontend_type>
752
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
753
+ <sort_order>63</sort_order>
754
+ <show_in_default>1</show_in_default>
755
+ <show_in_website>0</show_in_website>
756
+ <show_in_store>0</show_in_store>
757
+ </screen_size>
758
+ <shipping_method translate="label">
759
+ <label>shipping_method</label>
760
+ <comment>Shipping methods</comment>
761
+ <frontend_type>select</frontend_type>
762
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
763
+ <sort_order>64</sort_order>
764
+ <show_in_default>1</show_in_default>
765
+ <show_in_website>0</show_in_website>
766
+ <show_in_store>0</show_in_store>
767
+ </shipping_method>
768
+ <shoe_size translate="label">
769
+ <label>shoe_size</label>
770
+ <comment>Shoe size</comment>
771
+ <frontend_type>select</frontend_type>
772
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
773
+ <sort_order>65</sort_order>
774
+ <show_in_default>1</show_in_default>
775
+ <show_in_website>0</show_in_website>
776
+ <show_in_store>0</show_in_store>
777
+ </shoe_size>
778
+ <shoe_width translate="label">
779
+ <label>shoe_width</label>
780
+ <comment>Shoe width</comment>
781
+ <frontend_type>select</frontend_type>
782
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
783
+ <sort_order>66</sort_order>
784
+ <show_in_default>1</show_in_default>
785
+ <show_in_website>0</show_in_website>
786
+ <show_in_store>0</show_in_store>
787
+ </shoe_width>
788
+ <size translate="label">
789
+ <label>size</label>
790
+ <comment>Size</comment>
791
+ <frontend_type>select</frontend_type>
792
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
793
+ <sort_order>67</sort_order>
794
+ <show_in_default>1</show_in_default>
795
+ <show_in_website>0</show_in_website>
796
+ <show_in_store>0</show_in_store>
797
+ </size>
798
+ <sku translate="label">
799
+ <label>sku</label>
800
+ <comment>Stock keeping unit (Recommended)</comment>
801
+ <frontend_type>select</frontend_type>
802
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
803
+ <sort_order>68</sort_order>
804
+ <show_in_default>1</show_in_default>
805
+ <show_in_website>0</show_in_website>
806
+ <show_in_store>0</show_in_store>
807
+ </sku>
808
+ <staring translate="label">
809
+ <label>staring</label>
810
+ <comment>Staring actors</comment>
811
+ <frontend_type>select</frontend_type>
812
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
813
+ <sort_order>69</sort_order>
814
+ <show_in_default>1</show_in_default>
815
+ <show_in_website>0</show_in_website>
816
+ <show_in_store>0</show_in_store>
817
+ </staring>
818
+ <style translate="label">
819
+ <label>style</label>
820
+ <comment>Style</comment>
821
+ <frontend_type>select</frontend_type>
822
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
823
+ <sort_order>70</sort_order>
824
+ <show_in_default>1</show_in_default>
825
+ <show_in_website>0</show_in_website>
826
+ <show_in_store>0</show_in_store>
827
+ </style>
828
+ <tech_spec_url translate="label">
829
+ <label>tech_spec_url</label>
830
+ <comment>Technical specifications URL</comment>
831
+ <frontend_type>select</frontend_type>
832
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
833
+ <sort_order>71</sort_order>
834
+ <show_in_default>1</show_in_default>
835
+ <show_in_website>0</show_in_website>
836
+ <show_in_store>0</show_in_store>
837
+ </tech_spec_url>
838
+ <tracks translate="label">
839
+ <label>tracks</label>
840
+ <comment>Total number of tracks</comment>
841
+ <frontend_type>select</frontend_type>
842
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
843
+ <sort_order>72</sort_order>
844
+ <show_in_default>1</show_in_default>
845
+ <show_in_website>0</show_in_website>
846
+ <show_in_store>0</show_in_store>
847
+ </tracks>
848
+ <upc translate="label">
849
+ <label>upc</label>
850
+ <comment>Universal product code (Recommended)</comment>
851
+ <frontend_type>select</frontend_type>
852
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
853
+ <sort_order>73</sort_order>
854
+ <show_in_default>1</show_in_default>
855
+ <show_in_website>0</show_in_website>
856
+ <show_in_store>0</show_in_store>
857
+ </upc>
858
+ <weight translate="label">
859
+ <label>weight</label>
860
+ <comment>Weight</comment>
861
+ <frontend_type>select</frontend_type>
862
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
863
+ <sort_order>74</sort_order>
864
+ <show_in_default>1</show_in_default>
865
+ <show_in_website>0</show_in_website>
866
+ <show_in_store>0</show_in_store>
867
+ </weight>
868
+ <width translate="label">
869
+ <label>width</label>
870
+ <comment>Width</comment>
871
+ <frontend_type>select</frontend_type>
872
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
873
+ <sort_order>75</sort_order>
874
+ <show_in_default>1</show_in_default>
875
+ <show_in_website>0</show_in_website>
876
+ <show_in_store>0</show_in_store>
877
+ </width>
878
+ <wireless_interface translate="label">
879
+ <label>wireless_interface</label>
880
+ <comment>Wireless interface</comment>
881
+ <frontend_type>select</frontend_type>
882
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
883
+ <sort_order>76</sort_order>
884
+ <show_in_default>1</show_in_default>
885
+ <show_in_website>0</show_in_website>
886
+ <show_in_store>0</show_in_store>
887
+ </wireless_interface>
888
+ <year translate="label">
889
+ <label>year</label>
890
+ <comment>Year of manufacture - YYYY</comment>
891
+ <frontend_type>select</frontend_type>
892
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
893
+ <sort_order>77</sort_order>
894
+ <show_in_default>1</show_in_default>
895
+ <show_in_website>0</show_in_website>
896
+ <show_in_store>0</show_in_store>
897
+ </year>
898
+ <zoom translate="label">
899
+ <label>zoom</label>
900
+ <comment>Maximum zoom</comment>
901
+ <frontend_type>select</frontend_type>
902
+ <source_model>eems_affiliate/system_config_source_attributes</source_model>
903
+ <sort_order>78</sort_order>
904
+ <show_in_default>1</show_in_default>
905
+ <show_in_website>0</show_in_website>
906
+ <show_in_store>0</show_in_store>
907
+ </zoom>
908
+ </fields>
909
+ </eems_affiliate_product_attribute_map>
910
+ </groups>
911
+ </marketing_solutions>
912
+ </sections>
913
  </config>
app/design/frontend/base/default/layout/eems_affiliate.xml CHANGED
@@ -1,18 +1,17 @@
1
- <?xml version="1.0"?>
2
  <!--
3
- Copyright (c) 2014 eBay Enterprise, Inc.
4
 
5
- NOTICE OF LICENSE
6
 
7
- This source file is subject to the eBay Enterprise
8
- Magento Extensions End User License Agreement
9
- that is bundled with this package in the file LICENSE.md.
10
- It is also available through the world-wide-web at this URL:
11
- http://www.ebayenterprise.com/files/pdf/Magento_Connect_Extensions_EULA_050714.pdf
12
-
13
- @copyright Copyright (c) 2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/)
14
- @license http://www.ebayenterprise.com/files/pdf/Magento_Connect_Extensions_EULA_050714.pdf eBay Enterprise Magento Extensions End User License Agreement
15
 
 
 
16
  -->
17
  <layout version="0.1.0">
18
  <default>
@@ -20,19 +19,17 @@
20
  <block type="eems_affiliate/tracking" name="eems_affiliate.tracking" template="eems_affiliate/tracking.phtml"/>
21
  </reference>
22
  </default>
23
- <checkout_affiliate_success translate="label">
24
- <reference name="before_body_end">
25
- <block type="eems_affiliate/beacon" name="eems_affiliate.beacon" template="eems_affiliate/beacon.phtml"/>
26
- </reference>
27
- </checkout_affiliate_success>
28
-
29
- <checkout_multishipping_success translate="label">
30
- <label>Multishipping Checkout Success</label>
31
- <update handle="checkout_affiliate_success"/>
32
- </checkout_multishipping_success>
33
-
34
- <checkout_onepage_success translate="label">
35
- <label>Onepage Checkout Success</label>
36
- <update handle="checkout_affiliate_success"/>
37
- </checkout_onepage_success>
38
- </layout>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
  <!--
3
+ Copyright (c) 2014 eBay Enterprise, Inc.
4
 
5
+ NOTICE OF LICENSE
6
 
7
+ This source file is subject to the eBay Enterprise
8
+ Magento Extensions End User License Agreement
9
+ that is bundled with this package in the file LICENSE.md.
10
+ It is also available through the world-wide-web at this URL:
11
+ http://www.ebayenterprise.com/files/pdf/Magento_Connect_Extensions_EULA_050714.pdf
 
 
 
12
 
13
+ @copyright Copyright (c) 2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/)
14
+ @license http://www.ebayenterprise.com/files/pdf/Magento_Connect_Extensions_EULA_050714.pdf eBay Enterprise Magento Extensions End User License Agreement
15
  -->
16
  <layout version="0.1.0">
17
  <default>
19
  <block type="eems_affiliate/tracking" name="eems_affiliate.tracking" template="eems_affiliate/tracking.phtml"/>
20
  </reference>
21
  </default>
22
+ <checkout_affiliate_success translate="label">
23
+ <reference name="before_body_end">
24
+ <block type="eems_affiliate/beacon" name="eems_affiliate.beacon" template="eems_affiliate/beacon.phtml"/>
25
+ </reference>
26
+ </checkout_affiliate_success>
27
+ <checkout_multishipping_success translate="label">
28
+ <label>Multishipping Checkout Success</label>
29
+ <update handle="checkout_affiliate_success"/>
30
+ </checkout_multishipping_success>
31
+ <checkout_onepage_success translate="label">
32
+ <label>Onepage Checkout Success</label>
33
+ <update handle="checkout_affiliate_success"/>
34
+ </checkout_onepage_success>
35
+ </layout>
 
 
app/design/frontend/base/default/template/eems_affiliate/beacon.phtml CHANGED
@@ -16,18 +16,20 @@
16
  */
17
  ?>
18
 
19
- <?php if ($this->showBeacon()):?>
20
- <?php $beaconUrl = $this->getBeaconUrl(); ?>
21
- <script>
22
- (function (d,i) {
23
- i=d.createElement('iframe');
24
- i.width=i.height=1;
25
- i.frameBorder=0;
26
- i.src="<?php echo $beaconUrl; ?>";
27
- d.body.appendChild(i);
28
- }(document));
29
- </script>
30
- <noscript>
31
- <iframe width="1" height="1" frameBorder="0" src="<?php echo $beaconUrl; ?>"></iframe>
32
- </noscript>
33
- <?php endif;
 
 
16
  */
17
  ?>
18
 
19
+ <?php if ($this->showBeacon()) :
20
+ ?>
21
+ <?php $beaconUrl = $this->getBeaconUrl(); ?>
22
+ <script>
23
+ (function (d,i) {
24
+ i=d.createElement('iframe');
25
+ i.width=i.height=1;
26
+ i.frameBorder=0;
27
+ i.src="<?php echo $beaconUrl; ?>";
28
+ d.body.appendChild(i);
29
+ }(document));
30
+ </script>
31
+ <noscript>
32
+ <iframe width="1" height="1" frameBorder="0" src="<?php echo $beaconUrl; ?>"></iframe>
33
+ </noscript>
34
+ <?php
35
+ endif;
app/design/frontend/base/default/template/eems_affiliate/tracking.phtml CHANGED
@@ -14,7 +14,8 @@
14
  */
15
  ?>
16
 
17
- <?php if ($this->injectJavaScript()): ?>
 
18
  <?php $keyName = $this->getQueryStringKeyName(); ?>
19
  <?php $cookieName = $this->getCookieName(); ?>
20
  <script type="text/javascript">
@@ -92,4 +93,5 @@
92
  }(window, document, 45, "<?php echo $keyName ?>", "<?php echo $cookieName ?>"));
93
  //]]>
94
  </script>
95
- <?php endif;
 
14
  */
15
  ?>
16
 
17
+ <?php if ($this->injectJavaScript()) :
18
+ ?>
19
  <?php $keyName = $this->getQueryStringKeyName(); ?>
20
  <?php $cookieName = $this->getCookieName(); ?>
21
  <script type="text/javascript">
93
  }(window, document, 45, "<?php echo $keyName ?>", "<?php echo $cookieName ?>"));
94
  //]]>
95
  </script>
96
+ <?php
97
+ endif;
app/etc/modules/EbayEnterprise_Affiliate.xml CHANGED
@@ -1,24 +1,23 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
  <!--
3
- Copyright (c) 2014 eBay Enterprise, Inc.
4
 
5
- NOTICE OF LICENSE
6
 
7
- This source file is subject to the eBay Enterprise
8
- Magento Extensions End User License Agreement
9
- that is bundled with this package in the file LICENSE.md.
10
- It is also available through the world-wide-web at this URL:
11
- http://www.ebayenterprise.com/files/pdf/Magento_Connect_Extensions_EULA_050714.pdf
12
-
13
- @copyright Copyright (c) 2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/)
14
- @license http://www.ebayenterprise.com/files/pdf/Magento_Connect_Extensions_EULA_050714.pdf eBay Enterprise Magento Extensions End User License Agreement
15
 
 
 
16
  -->
17
  <config>
18
- <modules>
19
- <EbayEnterprise_Affiliate>
20
- <active>true</active>
21
- <codePool>community</codePool>
22
- </EbayEnterprise_Affiliate>
23
- </modules>
24
  </config>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
  <!--
3
+ Copyright (c) 2014 eBay Enterprise, Inc.
4
 
5
+ NOTICE OF LICENSE
6
 
7
+ This source file is subject to the eBay Enterprise
8
+ Magento Extensions End User License Agreement
9
+ that is bundled with this package in the file LICENSE.md.
10
+ It is also available through the world-wide-web at this URL:
11
+ http://www.ebayenterprise.com/files/pdf/Magento_Connect_Extensions_EULA_050714.pdf
 
 
 
12
 
13
+ @copyright Copyright (c) 2014 eBay Enterprise, Inc. (http://www.ebayenterprise.com/)
14
+ @license http://www.ebayenterprise.com/files/pdf/Magento_Connect_Extensions_EULA_050714.pdf eBay Enterprise Magento Extensions End User License Agreement
15
  -->
16
  <config>
17
+ <modules>
18
+ <EbayEnterprise_Affiliate>
19
+ <active>true</active>
20
+ <codePool>community</codePool>
21
+ </EbayEnterprise_Affiliate>
22
+ </modules>
23
  </config>
package.xml CHANGED
@@ -1,4 +1,7 @@
1
  <?xml version="1.0"?>
2
- <package><name>eBay_Enterprise_Affiliate_Extension</name><version>1.1.2</version><stability>stable</stability><license>EULA</license><channel>community</channel><extends></extends><summary>eBay Enterprise Affiliate Extension.</summary><description>eBay Enterprise Affiliate Extension.</description><notes>Add Back Necessary Change Log
3
- Remove Unecessary Change Log
4
- DE4938 Reset Config Cache After Save</notes><authors><author><name>Michael A. Smith</name><user>msmith3</user><email>msmith3@ebay.com</email></author></authors><date>2015-03-17</date><time>8:44:32</time><compatible></compatible><dependencies><required><php><min>5.3.0</min><max>5.6.99</max></php></required></dependencies><contents><target name="mage"><dir name="app"><dir name="code"><dir name="community"><dir name="EbayEnterprise"><dir name="Affiliate"><dir name="sql"><dir name="eems_affiliate_setup"><file name="install-1.0.0.1.php" hash="f98e9282dcb282d9c29731c513344770"/><file name="mysql4-install-1.0.0.1.php" hash="f98e9282dcb282d9c29731c513344770"/></dir></dir><dir name="Helper"><file name="Config.php" hash="5f08ef84f23a7798013bcea56288b8e4"/><file name="Data.php" hash="7f6c4c7bece8fc8e95cb52da78800621"/><file name="Map.php" hash="baa4d775c2328e0e45d2e8bc00dd8083"/><dir name="Map"><file name="Order.php" hash="27fee01d500d662be4796aa01c1270ef"/><file name="Product.php" hash="f037e9df9f5c9ef87df01a022d7706e0"/></dir></dir><dir name="Block"><file name="Beacon.php" hash="07790d8d8e1a0919f3ec1d4297cd64e1"/><file name="Tracking.php" hash="e9d6eaf93beb55e8fe94330ea8dd32f5"/></dir><dir name="Exception"><file name="Configuration.php" hash="329e9296f4662b6cbf60fe1daef1acd7"/></dir><dir name="etc"><file name="adminhtml.xml" hash="c68a5314867507e9215b2cf3b4b87562"/><file name="config.xml" hash="7ddcedb646a3622670a26dc7f72862ef"/><file name="system.xml" hash="8f1d3775d926300d32c4a610f4f6417f"/></dir><dir name="Model"><file name="Observer.php" hash="ee3dba8505e43f175ee54dea3c7813cb"/><dir name="Feed"><file name="Abstract.php" hash="c34c8b875a7d6da6ab056fa12110d706"/><file name="Product.php" hash="c99bb4b79bb2483270dc2a9615ce8a0e"/><dir name="Order"><file name="Abstract.php" hash="053a2f0f719566a41903f89366f997ea"/><file name="Basic.php" hash="c9e8ce48928c68af62907b62ac692a52"/><file name="Itemized.php" hash="cf8f2f3f51e0d1f912d8e81e0338f6f7"/></dir></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Attributes.php" hash="3930134c53203f03ad872a6c647679b0"/><file name="Categories.php" hash="4166f8b40f0e0451cd3fce5fd3f7b23f"/><file name="Stockquantity.php" hash="cfa82a3115cf37bb4d8e76b5a627835a"/><file name="Stockyesno.php" hash="236c4532b0935e4e9f25cf99468071a5"/><file name="Transactiontype.php" hash="f929f51e0ec30364607e823cd34d0469"/><file name="Visibilityyesno.php" hash="0262dfcfd0741d217753d39db37d565e"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="design"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="eems_affiliate"><file name="beacon.phtml" hash="05341e8074f0d575eb796cc46d537a51"/><file name="tracking.phtml" hash="edd58299b79215d7dd11afa589048623"/></dir></dir><dir name="layout"><file name="eems_affiliate.xml" hash="333920eb2a0bdf92505b1031affb577e"/></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="EbayEnterprise_Affiliate.xml" hash="2c8823653d3f9c19634df8630c70628b"/></dir></dir></dir></target></contents></package>
 
 
 
1
  <?xml version="1.0"?>
2
+ <package><name>eBay_Enterprise_Affiliate_Extension</name><version>1.1.3</version><stability>stable</stability><license>EULA</license><channel>community</channel><extends></extends><summary>eBay Enterprise Affiliate Extension.</summary><description>eBay Enterprise Affiliate Extension.</description><notes>Changelog for 1.1.3
3
+ DE5743 Fix Duplicate Rows in Itemized Feed
4
+ Tabs to Spaces for Support Files
5
+ PSR2 Formatting for PHP Files
6
+ XML Tabs to Spaces and Formatting
7
+ Refactor Docker Scripts</notes><authors><author><name>Michael A. Smith</name><user>msmith3</user><email>msmith3@ebay.com</email></author></authors><date>2015-06-19</date><time>11:39:43</time><compatible></compatible><dependencies><required><php><min>5.3.0</min><max>5.6.99</max></php></required></dependencies><contents><target name="mage"><dir name="app"><dir name="code"><dir name="community"><dir name="EbayEnterprise"><dir name="Affiliate"><dir name="Block"><file name="Beacon.php" hash="bfe23a86b590c6edb1c966713d24a2a7"/><file name="Tracking.php" hash="e9d6eaf93beb55e8fe94330ea8dd32f5"/></dir><dir name="etc"><file name="adminhtml.xml" hash="381ec621ea61e0880c7b137d097f879f"/><file name="config.xml" hash="05b3fb929a25f6587815b7af811b889b"/><file name="system.xml" hash="f8ca3a98dce3bcf68f4aaa9ef0a768e5"/></dir><dir name="Exception"><file name="Configuration.php" hash="8d36de47ddbbbc2748b26d0bb572b23d"/></dir><dir name="Helper"><file name="Config.php" hash="652249c3751df2ccd18c7d8340b6cbed"/><file name="Data.php" hash="050153fe905f5c2914fb17fa48cd3633"/><file name="Map.php" hash="0bec79c51fe3be0556289e083a12418c"/><dir name="Map"><file name="Order.php" hash="6e9dd2dc91a0509ba0231c71c8ac0d16"/><file name="Product.php" hash="777c9aa86b7c90dc5e1e2ca32b1050e4"/></dir></dir><dir name="Model"><file name="Observer.php" hash="5c61cd1f0c5769b8abd14f20fe1029d8"/><dir name="Feed"><file name="Abstract.php" hash="735f23ef1963c066fa654cbedcf206d5"/><file name="Product.php" hash="eecf6dd12d4739d4497e87ee447e1964"/><dir name="Order"><file name="Abstract.php" hash="c8d99f43441777379360e3ef8372e620"/><file name="Basic.php" hash="e790d9af4e74c9ab0ab880e4a41e0221"/><file name="Itemized.php" hash="d6ea137e59a3bf13a6622eae2a418039"/></dir></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Attributes.php" hash="ed651780a471391e30d08811e10e7fe9"/><file name="Categories.php" hash="370906fa2ceb4c9b9ca581f89f135242"/><file name="Stockquantity.php" hash="b10584a5c6138baab0411c767920e82e"/><file name="Stockyesno.php" hash="43d33662c41f0f87f6870e1599f243c7"/><file name="Transactiontype.php" hash="1a49a75e2c92a68783d1509863de27f5"/><file name="Visibilityyesno.php" hash="1acf5b88eb0ef6d96302ab77325a89b7"/></dir></dir></dir></dir><dir name="sql"><dir name="eems_affiliate_setup"><file name="install-1.0.0.1.php" hash="f98e9282dcb282d9c29731c513344770"/><file name="mysql4-install-1.0.0.1.php" hash="f98e9282dcb282d9c29731c513344770"/></dir></dir></dir></dir></dir></dir><dir name="design"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="eems_affiliate.xml" hash="e96799839e29ae63b38963fc84377c85"/></dir><dir name="template"><dir name="eems_affiliate"><file name="beacon.phtml" hash="aa060dc4dbe6c7fcdee2893fed634c59"/><file name="tracking.phtml" hash="ce4a45f81e1ab97b945e1cfe4fb61be0"/></dir></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="EbayEnterprise_Affiliate.xml" hash="2e042a1fa299f755a00bc041363eae18"/></dir></dir></dir></target></contents></package>