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