eBay_Enterprise_Display_Extension - Version 1.0.1

Version Notes

Merge pull request #12 from micwest/DE1388_fix_inconsistent_const_references
DE1388 Fix Inconsistent Const References
US11653 Rename Extension Package Name

Download this release

Release Info

Developer Michael A. Smith
Extension eBay_Enterprise_Display_Extension
Version 1.0.1
Comparing to
See all releases


Code changes from version 1.0.0 to 1.0.1

app/code/community/EbayEnterprise/Display/Block/Beacon.php DELETED
@@ -1,172 +0,0 @@
1
- <?php
2
- class EbayEnterprise_Display_Block_Beacon extends Mage_Core_Block_Template
3
- {
4
- protected $_order; // The order
5
-
6
- /**
7
- * Get the last order.
8
- * @return Mage_Sales_Model_Order
9
- */
10
- protected function _getOrder()
11
- {
12
- if (!($this->_order instanceof Mage_Sales_Model_Order)) {
13
- $orderId = Mage::getSingleton('checkout/session')->getLastOrderId();
14
- if ($orderId) {
15
- $this->_order = Mage::getModel('sales/order')->load($orderId);
16
- }
17
- }
18
- return $this->_order;
19
- }
20
- /**
21
- * Get the current customer quote
22
- * @return Mage_Sales_Model_Quote
23
- */
24
- protected function _getQuote()
25
- {
26
- if (!($this->_quote instanceof Mage_Sales_Model_Quote)) {
27
- $this->_quote = Mage::getSingleton('checkout/session')->getQuote();
28
- }
29
- return $this->_quote;
30
- }
31
- /**
32
- * Load a Quote object from an Order object
33
- * @param Mage_Sales_Model_Order $order
34
- * @return Mage_Sales_Model_Quote
35
- */
36
- protected function _getQuoteFromOrder($order)
37
- {
38
- if (!($this->_quote instanceof Mage_Sales_Model_Quote)) {
39
- $this->_quote = Mage::getModel('sales/quote')->load($order->getQuoteId());
40
- }
41
- return $this->_quote;
42
- }
43
- /**
44
- * Get the current request scheme
45
- * @return string
46
- */
47
- protected function _getRequestScheme()
48
- {
49
- return Mage::app()->getRequest()->getScheme();
50
- }
51
- /**
52
- * Determine which type of page the user is on
53
- * default, home, product, checkout thanks
54
- *
55
- * @return string
56
- */
57
- public function getPageType()
58
- {
59
- if ($this->hasData('page_type')) {
60
- return $this->getData('page_type');
61
- } else {
62
- return 'default';
63
- }
64
- }
65
- /**
66
- * Get Fetchback beacon params based on the page type
67
- */
68
- protected function _getParamsByPageType()
69
- {
70
- $pageType = $this->getPageType();
71
- switch ($pageType) {
72
- case 'product':
73
- return $this->_getProductParams();
74
- case 'cart':
75
- return $this->_getCartParams();
76
- case 'checkout_success':
77
- return $this->_getCheckoutSuccessParams();
78
- default:
79
- return $this->_getDefaultParams();
80
- }
81
- }
82
- /**
83
- * Default params for beacon on all pages
84
- */
85
- protected function _getDefaultParams()
86
- {
87
- return array(
88
- 'cat' => '',
89
- 'sid' => $this->helper('eems_display/config')->getSiteId(Mage::app()->getStore()->getId()),
90
- 'name' => 'landing',
91
- );
92
- }
93
- /**
94
- * Get the params for product page
95
- * @return array
96
- */
97
- protected function _getProductParams()
98
- {
99
- $currentProductId = (int) $this->getRequest()->getParam('id');
100
- $mageProduct = Mage::getModel('catalog/product')->load($currentProductId);
101
- return array_merge($this->_getDefaultParams(), array(
102
- 'name' => 'landing',
103
- 'browse_products' => $mageProduct->getSku(),
104
- ));
105
- }
106
- /**
107
- * Get the params for cart page
108
- * @return array
109
- */
110
- protected function _getCartParams()
111
- {
112
- $quote = $this->_getQuote();
113
- $params = $this->_getDefaultParams();
114
- if ($quote instanceof Mage_Sales_Model_Quote) {
115
- $cartedProducts = array_reduce($quote->getAllVisibleItems(), array($this, '_pidListFromCollection'));
116
- $params = array_merge($params, array(
117
- 'abandon_products' => $cartedProducts,
118
- ));
119
- }
120
- return $params;
121
- }
122
- /**
123
- * Get the params for checkout thanks page
124
- * @return array
125
- */
126
- protected function _getCheckoutSuccessParams()
127
- {
128
- $params = $this->_getDefaultParams();
129
- $order = $this->_getOrder();
130
- if ($order instanceof Mage_Sales_Model_Order) {
131
- $quote = $this->_getQuoteFromOrder($order);
132
- $orderTotal = $quote->getSubtotalWithDiscount();
133
- $purchasedProducts = array_reduce($order->getAllVisibleItems(), array($this, '_pidListFromCollection'));
134
- $params = array_merge($params, array(
135
- 'name' => 'success',
136
- 'purchase_products' => $purchasedProducts,
137
- 'crv' => $orderTotal,
138
- 'oid' => $order->getIncrementId(),
139
- ));
140
- }
141
- return $params;
142
- }
143
- /**
144
- * array_reduce callback to get comma separated list of product ids
145
- * @param string $result
146
- * @param Mage_Sales_Model_Quote_Item|Mage_Sales_Model_Order_Item $item
147
- * @return string
148
- */
149
- protected function _pidListFromCollection($result, $item)
150
- {
151
- $productId = $item->getSku();
152
- $result .= (empty($result) ? '' : ',') . $productId;
153
- return $result;
154
- }
155
- /**
156
- * Get the beacon url.
157
- * @return String
158
- */
159
- public function getBeaconUrl()
160
- {
161
- $params = $this->_getParamsByPageType();
162
- $url = $this->_getRequestScheme() . '://pixel.fetchback.com/serve/fb/pdj?' . http_build_query($params);
163
- return $url;
164
- }
165
- /**
166
- * Whether or not to display the beacon.
167
- */
168
- public function showBeacon()
169
- {
170
- return Mage::helper('eems_display/config')->getIsEnabled(Mage::app()->getStore()->getId());
171
- }
172
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/EbayEnterprise/Display/Model/Adminhtml/System/Config/Backend/Siteidchecksum.php CHANGED
@@ -32,7 +32,7 @@ class EbayEnterprise_Display_Model_Adminhtml_System_Config_Backend_Siteidchecksu
32
  if (empty($newChecksum) && empty($oldHash)) {
33
  // If both old and new checksums are still empty, prompt with some help info.
34
  $this->_dataSaveAllowed = false;
35
- Mage::getSingleton($this::SESSION_KEY)
36
  ->addWarning('Please note that tracking is not enabled. Site Id Checksum is empty. ' . self::CONTACT_INFO);
37
  return $this;
38
  }
@@ -55,7 +55,7 @@ class EbayEnterprise_Display_Model_Adminhtml_System_Config_Backend_Siteidchecksu
55
  parent::_beforeSave();
56
  } else {
57
  $this->setValue(self::FIELD_SEP);
58
- Mage::getSingleton($this::SESSION_KEY)
59
  ->addError('Failed to validate the Site Id. ' . self::CONTACT_INFO);
60
  }
61
  return $this;
32
  if (empty($newChecksum) && empty($oldHash)) {
33
  // If both old and new checksums are still empty, prompt with some help info.
34
  $this->_dataSaveAllowed = false;
35
+ Mage::getSingleton(self::SESSION_KEY)
36
  ->addWarning('Please note that tracking is not enabled. Site Id Checksum is empty. ' . self::CONTACT_INFO);
37
  return $this;
38
  }
55
  parent::_beforeSave();
56
  } else {
57
  $this->setValue(self::FIELD_SEP);
58
+ Mage::getSingleton(self::SESSION_KEY)
59
  ->addError('Failed to validate the Site Id. ' . self::CONTACT_INFO);
60
  }
61
  return $this;
package.xml CHANGED
@@ -1,43 +1,20 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>eBay_Enterprise_Display_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>Implements tracking on your site &amp; creates product feed for eBay Enterprise Display &amp; Product Retargeting ads.</summary>
10
- <description>&lt;p&gt;The eBay Enterprise Display Extension gives you access to the eBay Enterprise Display team, enabling you to run highly-targeted display and retargeting ad campaigns with significantly decreased implementation time.&lt;/p&gt;&#xD;
11
- &lt;p&gt;First, simply download the extension and contact the eBay Enterprise Display team to receive your unique Site Id. The Id enables the extension, which automatically deploys a full pixel suite across your website. These pixels help track conversions, impressions, page views, and much more. Your Id will also automatically submit your product data feed to eBay Enterprise, so we can begin targeting users with dynamic product ads.&lt;/p&gt;&#xD;
12
- &lt;h3&gt;Why eBay Enterprise Display?&lt;/h3&gt;&#xD;
13
- &lt;p&gt;As a marketer, you know the importance of accurately tracking website activity to increase conversions and awareness&#x2014;not to mention leveraging consumer behavior to deliver the right products to the right prospects. At times this can seem like a bit of a juggling act, but eBay Enterprise Display provides a multitude of ways to drive qualified buyers to your website, where you can convert those visits into sales transactions. Simply put, with this Extension, we make it easier for you to vastly improve your website marketing initiatives.&lt;/p&gt;&#xD;
14
- &lt;ul&gt;&#xD;
15
- &lt;li&gt;&lt;strong&gt;Social Media Targeting Ready&lt;/strong&gt;- Targeted display ads on Facebook to reach website and shopping cart abandoners.&lt;/li&gt;&#xD;
16
- &lt;li&gt;&lt;strong&gt;Mobile/Tablet Targeting Ready&lt;/strong&gt;&#x2014;Targeted display ads on any tablet, mobile, or iOS device to reach website and shopping cart abandoners.&lt;/li&gt;&#xD;
17
- &lt;li&gt;&lt;strong&gt;Desktop/Laptop Targeting Ready&lt;/strong&gt;&#x2014;Targeted ads on desktops and laptops targeting shopping cart and website abandoners.&lt;/li&gt;&#xD;
18
- &lt;li&gt;&lt;strong&gt;Intelligent Ad Creatives&lt;/strong&gt;&#x2014;Automated product feeds enable us to customize ads to a website-abandoner&#x2019;s last-viewed item or by items left in shopping cart.&lt;/li&gt;&#xD;
19
- &lt;li&gt;&lt;strong&gt;New Customer Acquisition&lt;/strong&gt;&#x2014;With your permission, we can implement our proprietary eBay Inc. look-alike targeting technology to identify potential buyers of your products or services.&lt;/li&gt;&#xD;
20
- &lt;/ul&gt;&#xD;
21
- &lt;p&gt;The eBay Enterprise Display dashboard makes it easy for you to generate reports, view display advertising activity, and analyze the pixel-generated data collected from your site.&lt;/p&gt;&#xD;
22
- &lt;p&gt;Have questions? Contact our eBay Enterprise Display representatives. They&#x2019;ll help you optimize your media buys&#x2014;and ensure that your campaign reaches as many qualified prospects as possible.&lt;/p&gt;&#xD;
23
- &#xD;
24
- &lt;h3&gt;Get Started:&lt;/h3&gt;&#xD;
25
- &lt;ol&gt;&#xD;
26
- &lt;li&gt;Download the extension onto your Magento dashboard.&lt;/li&gt;&#xD;
27
- &lt;li&gt;Contact eBay Enterprise Display to get your unique Site Id.&lt;/li&gt;&#xD;
28
- &lt;li&gt;Return to the Magento extension configuration page to input your Site Id and security token.&lt;/li&gt;&#xD;
29
- &lt;li&gt;Select &#x201C;enable extension.&#x201D;&lt;/li&gt;&#xD;
30
- &lt;li&gt;Finalize campaign strategy with a qualified eBay Enterprise account executive.&lt;/li&gt;&#xD;
31
- &lt;li&gt;Go live, and start reaping the benefits.&lt;/li&gt;&#xD;
32
- &lt;/ol&gt;&#xD;
33
- &lt;h3&gt;Contact Us:&lt;/h3&gt;&#xD;
34
- &lt;strong&gt;Email&lt;/strong&gt;&#x2013;&lt;a href="mailto:DL-eBayEnt-displaysupport@ebay.com"&gt;DL-eBayEnt-displaysupport@ebay.com&lt;/a&gt;&lt;br /&gt;&#xD;
35
- Phone&#x2013;888.343.6411 (option 4 for eBay Enterprise Display support)</description>
36
- <notes>Initial Release</notes>
37
- <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>
38
- <date>2014-05-09</date>
39
- <time>19:05:47</time>
40
- <contents><target name="magecommunity"><dir name="EbayEnterprise"><dir name="Display"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Feedurl.php" hash="82241e7e509b9c27dc734c8728e501f5"/></dir></dir></dir></dir></dir><file name="Beacon.php" hash="b272092167ffa1f7f08be5b3715b7968"/></dir><dir name="Helper"><file name="Config.php" hash="f831ae412417e253a57f37d6d3423e50"/><file name="Data.php" hash="3a5312fe107714d34267c72ce2910f40"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Backend"><file name="Feedurl.php" hash="aa1810a7c67e0b35e732ff5155f81a6b"/><file name="Siteidchecksum.php" hash="76635b1309e542d23d213466a2f7bed0"/></dir></dir></dir></dir><file name="Email.php" hash="2252c80035c9515650cd49e2c52e3645"/><dir name="Error"><file name="Exception.php" hash="65df9f687c4746431f9316baca3b5495"/></dir><file name="Products.php" hash="63129b2a0bd7f790ffbd96473c7d2c31"/></dir><dir name="controllers"><file name="IndexController.php" hash="197cb073d339eb76e6dbcf2167107a93"/></dir><dir name="etc"><file name="adminhtml.xml" hash="e1208b50586829c2e6c6536dd062ef0c"/><file name="config.xml" hash="5c8237485eb9c7c77fea466e26f41bd9"/><file name="system.xml" hash="55731b868ba01e966120cd53235b4407"/></dir><dir name="sql"><dir name="eemsdisplay_setup"><file name="install-1.0.0.0.php" hash="a9c02c7e94cdad9965ffa62571276ba2"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="eems_display"><file name="beacon.phtml" hash="4937e1a21b75f436b6a013fdcea59be9"/></dir></dir><dir name="layout"><file name="eems_display.xml" hash="7f823afa4c46cc316e198d5ff80eaa6b"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><file name="eemsdisplay_installed.html" hash="609fa6fc13a7a3f444bd0c256e207e7f"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="EbayEnterprise_Display.xml" hash="ae74ae5088d96d6300c544a031d4c0c6"/></dir></target></contents>
41
  <compatible/>
42
  <dependencies><required><php><min>5.3.0</min><max>5.3.99</max></php></required></dependencies>
43
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>eBay_Enterprise_Display_Extension</name>
4
+ <version>1.0.1</version>
5
  <stability>stable</stability>
6
+ <license>OSL</license>
7
  <channel>community</channel>
8
  <extends/>
9
+ <summary>eBay Enterprise Display Extension.</summary>
10
+ <description>eBay Enterprise Display Extension.</description>
11
+ <notes>Merge pull request #12 from micwest/DE1388_fix_inconsistent_const_references&#xD;
12
+ DE1388 Fix Inconsistent Const References&#xD;
13
+ US11653 Rename Extension Package Name</notes>
14
+ <authors><author><name>Michael A. Smith</name><user>msmith3</user><email>msmith3@ebay.com</email></author><author><name>Michael Phang</name><user>mphang</user><email>mphang@ebay.com</email></author><author><name>Scott van Brug</name><user>svanbrug</user><email>svanbrug@ebay.com</email></author><author><name>Mike West</name><user>micwest</user><email>micwest@ebay.com</email></author><author><name>Reginald Gabriel</name><user>rgabriel</user><email>rgabriel@ebay.com</email></author></authors>
15
+ <date>2014-05-23</date>
16
+ <time>20:32:19</time>
17
+ <contents><target name="magecommunity"><dir name="EbayEnterprise"><dir name="Display"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Feedurl.php" hash="82241e7e509b9c27dc734c8728e501f5"/></dir></dir></dir></dir></dir></dir><dir name="controllers"><file name="IndexController.php" hash="197cb073d339eb76e6dbcf2167107a93"/></dir><dir name="etc"><file name="adminhtml.xml" hash="e1208b50586829c2e6c6536dd062ef0c"/><file name="config.xml" hash="5c8237485eb9c7c77fea466e26f41bd9"/><file name="system.xml" hash="55731b868ba01e966120cd53235b4407"/></dir><dir name="Helper"><file name="Config.php" hash="f831ae412417e253a57f37d6d3423e50"/><file name="Data.php" hash="3a5312fe107714d34267c72ce2910f40"/></dir><dir name="Model"><file name="Email.php" hash="2252c80035c9515650cd49e2c52e3645"/><file name="Products.php" hash="63129b2a0bd7f790ffbd96473c7d2c31"/><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Backend"><file name="Feedurl.php" hash="aa1810a7c67e0b35e732ff5155f81a6b"/><file name="Siteidchecksum.php" hash="f72b7dc6d0294faafcfc51e8ec46a222"/></dir></dir></dir></dir><dir name="Error"><file name="Exception.php" hash="65df9f687c4746431f9316baca3b5495"/></dir></dir><dir name="sql"><dir name="eemsdisplay_setup"><file name="install-1.0.0.0.php" hash="a9c02c7e94cdad9965ffa62571276ba2"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="eems_display.xml" hash="7f823afa4c46cc316e198d5ff80eaa6b"/></dir><dir name="template"><dir name="eems_display"><file name="beacon.phtml" hash="4937e1a21b75f436b6a013fdcea59be9"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="EbayEnterprise_Display.xml" hash="ae74ae5088d96d6300c544a031d4c0c6"/></dir></target><target name="magelocale"><dir name="en_US"><dir name="template"><dir name="email"><file name="eemsdisplay_installed.html" hash="609fa6fc13a7a3f444bd0c256e207e7f"/></dir></dir></dir></target></contents>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  <compatible/>
19
  <dependencies><required><php><min>5.3.0</min><max>5.3.99</max></php></required></dependencies>
20
  </package>