Eyemagine_HubSpot - Version 1.1.2

Version Notes

v.1.1.2: Nov 20, 2015:
- Fixed wishlist syncing.
- Fixed newsletter syncing.

Download this release

Release Info

Developer EYEMAGINE
Extension Eyemagine_HubSpot
Version 1.1.2
Comparing to
See all releases


Code changes from version 1.1.1 to 1.1.2

app/code/community/Eyemagine/HubSpot/Helper/Data.php CHANGED
@@ -296,20 +296,15 @@ class Eyemagine_HubSpot_Helper_Data extends Mage_Core_Helper_Abstract
296
 
297
  if ($customerId) {
298
  try {
299
- $model = Mage::getModel('wishlist/wishlist')
300
- ->loadByCustomer($customerId);
301
-
302
- $collection = $model->getProductCollection()
303
- ->addAttributeToSelect('name')
304
- ->addAttributeToSelect('sku')
305
- ->addAttributeToSelect('price')
306
- ->addAttributeToSelect('image')
307
- ->addAttributeToSelect('url_path')
308
- ->addAttributeToSelect('status');
309
-
310
- foreach ($collection as $wishlist) {
311
- $returnData[] = $this->convertAttributeData($wishlist);
312
  }
 
313
  } catch (Exception $e) {
314
  $returnData['error'] = self::ERROR_CODE_UNSUPPORTED_FEATURE;
315
  }
296
 
297
  if ($customerId) {
298
  try {
299
+ $model = Mage::getModel('wishlist/wishlist')->loadByCustomer($customerId, true);
300
+ $wishlist = Mage::getModel('wishlist/wishlist')->loadByCustomer($customerId, true);
301
+ $wishListItemCollection = $wishlist->getItemCollection();
302
+
303
+ foreach ($wishListItemCollection as $item)
304
+ {
305
+ $returnData[]['name']= $item->getName(); // Get Product Name
 
 
 
 
 
 
306
  }
307
+
308
  } catch (Exception $e) {
309
  $returnData['error'] = self::ERROR_CODE_UNSUPPORTED_FEATURE;
310
  }
app/code/community/Eyemagine/HubSpot/controllers/SyncController.php CHANGED
@@ -204,7 +204,7 @@ class Eyemagine_HubSpot_SyncController extends Mage_Core_Controller_Front_Action
204
  $request = $this->getRequest();
205
  $maxperpage = $request->getParam('maxperpage', self::MAX_SUBSCRIBER_PERPAGE);
206
  $lastSubscriberId = $request->getParam('id', '0');
207
- $start = $request->getParam('start')?date('Y-m-d H:i:s', $request->getParam('start')):'0000-00-00 00:00:00';
208
  $end = date('Y-m-d H:i:s', time() - 300);
209
  $websiteId = Mage::app()->getWebsite()->getId();
210
  $store = Mage::app()->getStore();
@@ -213,21 +213,21 @@ class Eyemagine_HubSpot_SyncController extends Mage_Core_Controller_Front_Action
213
  $subscriberData = array();
214
 
215
  //setup the query and page size
 
 
 
 
 
 
 
216
 
217
- $collection->addFieldToFilter(
218
-
219
- 'change_status_at', array(
220
- array('from' => $start,
221
- 'to' => $end,
222
- 'date' => true),
223
- array('null' => true)
224
-
225
- ))
226
- ->addFieldToFilter('subscriber_email', array('like' => '%@%'))
227
  ->addFieldToFilter('subscriber_id', array('gt' => $lastSubscriberId))
228
  ->setOrder('change_status_at', Varien_Data_Collection::SORT_ORDER_ASC)
229
  ->setOrder('subscriber_id', Varien_Data_Collection::SORT_ORDER_ASC)
230
  ->setPageSize($maxperpage);
 
231
 
232
  // only add the filter if store id > 0
233
  if ($storeId) {
204
  $request = $this->getRequest();
205
  $maxperpage = $request->getParam('maxperpage', self::MAX_SUBSCRIBER_PERPAGE);
206
  $lastSubscriberId = $request->getParam('id', '0');
207
+ $start = $request->getParam('start')?date('Y-m-d H:i:s', $request->getParam('start')):'0';
208
  $end = date('Y-m-d H:i:s', time() - 300);
209
  $websiteId = Mage::app()->getWebsite()->getId();
210
  $store = Mage::app()->getStore();
213
  $subscriberData = array();
214
 
215
  //setup the query and page size
216
+ if($start){
217
+ $collection->addFieldToFilter('change_status_at', array(
218
+ array('from' => $start,
219
+ 'to' => $end,
220
+ 'date' => true)
221
+ ));
222
+ }
223
 
224
+ $collection->addFieldToFilter('subscriber_email', array('like' => '%@%'))
225
+
 
 
 
 
 
 
 
 
226
  ->addFieldToFilter('subscriber_id', array('gt' => $lastSubscriberId))
227
  ->setOrder('change_status_at', Varien_Data_Collection::SORT_ORDER_ASC)
228
  ->setOrder('subscriber_id', Varien_Data_Collection::SORT_ORDER_ASC)
229
  ->setPageSize($maxperpage);
230
+
231
 
232
  // only add the filter if store id > 0
233
  if ($storeId) {
app/code/community/Eyemagine/HubSpot/etc/config.xml CHANGED
@@ -15,7 +15,7 @@
15
  <config>
16
  <modules>
17
  <Eyemagine_HubSpot>
18
- <version>1.1.1</version>
19
  </Eyemagine_HubSpot>
20
  </modules>
21
  <global>
15
  <config>
16
  <modules>
17
  <Eyemagine_HubSpot>
18
+ <version>1.1.2</version>
19
  </Eyemagine_HubSpot>
20
  </modules>
21
  <global>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Eyemagine_HubSpot</name>
4
- <version>1.1.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.eyemaginetech.com/license.txt">Custom</license>
7
  <channel>community</channel>
@@ -49,14 +49,15 @@ HubSpot's Social Inbox and Smart Content tools help you break out of the inbox a
49
  Attribute revenue generated to specific marketing channels and campaigns.&#xD;
50
  &#xD;
51
  HubSpot's suite of analytics and reporting tools allows you to quickly and easily see which traffic sources or marketing actions turned into revenue for you during any given time period. Generate a report in seconds and email it to anyone in the company--you can even set up recurring reports so everyone can keep track of the company's progress.</description>
52
- <notes>v.1.1.1: Oct 05, 2015:&#xD;
53
- - Fixed 404 error message.&#xD;
 
54
  &#xD;
55
  </notes>
56
  <authors><author><name>EYEMAGINE</name><user>eyemagine</user><email>andy@eyemaginetech.com</email></author></authors>
57
- <date>2015-10-05</date>
58
- <time>20:42:25</time>
59
- <contents><target name="magecommunity"><dir name="Eyemagine"><dir name="HubSpot"><dir name="Block"><dir name="Adminhtml"><dir name="Frontend"><dir name="Button"><file name="Regen.php" hash="f5fc4b12027a1dcbe99426418746d290"/><file name="._Regen.php" hash="03ec92c7aa4a80b83dab35ae888c547b"/></dir><dir name="Eyemagine"><file name="Info.php" hash="2c68e9745ecbff8a1c79167f8425e89a"/><file name="Support.php" hash="981aa21844749dfff6978219f0eef31c"/><file name="Version.php" hash="a5238f93904df9a82afdcda97bf6741a"/><file name="._Info.php" hash="ce0cf7ed20da8016624555bbb5968191"/><file name="._Support.php" hash="d7af6eacee8bbc688f3be8c5b681b7bb"/><file name="._Version.php" hash="aa0f9e438f113f370a375ec75e45dfdc"/></dir><file name="Utk.php" hash="c49d488bba2d7ea8e92d99916c5f4d91"/><file name="._Utk.php" hash="a4c1f2bab0767a83af323589a3181513"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="fe91a413ea78d1865a2140a4edc9fdc1"/><file name="._Data.php" hash="9c68a0caf545ef711c3e211076d31607"/></dir><dir name="Model"><file name="Observer.php" hash="362a1c5acfc1c17f709daa6434884902"/><file name="._Observer.php" hash="9f900637bde9683431d89da9174b57fb"/></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Hubspot"><file name="IndexController.php" hash="461def66f19d13afd0031e4352c9b96a"/><file name="._IndexController.php" hash="14ef1a094333b6261a631537df4a98b8"/></dir><file name=".DS_Store" hash="99afa5d6f042ec44f5661080a02ed4ab"/></dir><file name="LinkController.php" hash="d2878b1947446e4c94375e156920a948"/><file name="SyncController.php" hash="f464fc92eb190bc95fd85714b15b9f85"/><file name="._SyncController.php" hash="29711776eb99fdc6b890d04af2bc8a3a"/></dir><dir name="etc"><file name="adminhtml.xml" hash="6f68eef42170f9d8c3111e8604003b81"/><file name="config.xml" hash="4a8118377189d89490e3b793fd82415d"/><file name="system.xml" hash="bea0bf7f7021791f3baf73851955ec66"/><file name="._config.xml" hash="e10af298d19d562bc2d7bcbe4fa8ea24"/></dir><file name="readme.txt" hash="af6d3a3bede08430a60430404f17443d"/><dir name="sql"><dir name="eyehubspot_setup"><file name="mysql4-install-1.0.0.php" hash="6543b2c391f275ad179815c25ea862d0"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Eyemagine_HubSpot.xml" hash="eb6b2939bc2cd45128e4543bdb5e7ad2"/></dir></target></contents>
60
  <compatible/>
61
  <dependencies><required><php><min>5.3.0</min><max>7.0.0</max></php></required></dependencies>
62
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Eyemagine_HubSpot</name>
4
+ <version>1.1.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.eyemaginetech.com/license.txt">Custom</license>
7
  <channel>community</channel>
49
  Attribute revenue generated to specific marketing channels and campaigns.&#xD;
50
  &#xD;
51
  HubSpot's suite of analytics and reporting tools allows you to quickly and easily see which traffic sources or marketing actions turned into revenue for you during any given time period. Generate a report in seconds and email it to anyone in the company--you can even set up recurring reports so everyone can keep track of the company's progress.</description>
52
+ <notes>v.1.1.2: Nov 20, 2015:&#xD;
53
+ - Fixed wishlist syncing.&#xD;
54
+ - Fixed newsletter syncing.&#xD;
55
  &#xD;
56
  </notes>
57
  <authors><author><name>EYEMAGINE</name><user>eyemagine</user><email>andy@eyemaginetech.com</email></author></authors>
58
+ <date>2015-11-21</date>
59
+ <time>00:14:07</time>
60
+ <contents><target name="magecommunity"><dir name="Eyemagine"><dir name="HubSpot"><dir name="Block"><dir name="Adminhtml"><dir name="Frontend"><dir name="Button"><file name="Regen.php" hash="f5fc4b12027a1dcbe99426418746d290"/><file name="._Regen.php" hash="03ec92c7aa4a80b83dab35ae888c547b"/></dir><dir name="Eyemagine"><file name="Info.php" hash="2c68e9745ecbff8a1c79167f8425e89a"/><file name="Support.php" hash="981aa21844749dfff6978219f0eef31c"/><file name="Version.php" hash="a5238f93904df9a82afdcda97bf6741a"/><file name="._Info.php" hash="ce0cf7ed20da8016624555bbb5968191"/><file name="._Support.php" hash="d7af6eacee8bbc688f3be8c5b681b7bb"/><file name="._Version.php" hash="aa0f9e438f113f370a375ec75e45dfdc"/></dir><file name="Utk.php" hash="c49d488bba2d7ea8e92d99916c5f4d91"/><file name="._Utk.php" hash="a4c1f2bab0767a83af323589a3181513"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="229ae8362127a91398fd4ac80c667c3f"/><file name="._Data.php" hash="9c68a0caf545ef711c3e211076d31607"/></dir><dir name="Model"><file name="Observer.php" hash="362a1c5acfc1c17f709daa6434884902"/><file name="._Observer.php" hash="9f900637bde9683431d89da9174b57fb"/></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Hubspot"><file name="IndexController.php" hash="461def66f19d13afd0031e4352c9b96a"/><file name="._IndexController.php" hash="14ef1a094333b6261a631537df4a98b8"/></dir><file name=".DS_Store" hash="99afa5d6f042ec44f5661080a02ed4ab"/></dir><file name="LinkController.php" hash="d2878b1947446e4c94375e156920a948"/><file name="SyncController.php" hash="e380f2b5127319ba90135605b200f975"/><file name="._SyncController.php" hash="29711776eb99fdc6b890d04af2bc8a3a"/></dir><dir name="etc"><file name="adminhtml.xml" hash="6f68eef42170f9d8c3111e8604003b81"/><file name="config.xml" hash="abf3d3e322884d2f8619b8f31fe68981"/><file name="system.xml" hash="bea0bf7f7021791f3baf73851955ec66"/><file name="._config.xml" hash="e10af298d19d562bc2d7bcbe4fa8ea24"/></dir><file name="readme.txt" hash="af6d3a3bede08430a60430404f17443d"/><dir name="sql"><dir name="eyehubspot_setup"><file name="mysql4-install-1.0.0.php" hash="6543b2c391f275ad179815c25ea862d0"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Eyemagine_HubSpot.xml" hash="eb6b2939bc2cd45128e4543bdb5e7ad2"/></dir></target></contents>
61
  <compatible/>
62
  <dependencies><required><php><min>5.3.0</min><max>7.0.0</max></php></required></dependencies>
63
  </package>