Official_Netfeedback_Extension - Version 0.2.0

Version Notes

Second Stable Version

Download this release

Release Info

Developer Magento Core Team
Extension Official_Netfeedback_Extension
Version 0.2.0
Comparing to
See all releases


Code changes from version 0.1.0 to 0.2.0

app/code/local/Official/Netfeedback/Model/Observer.php CHANGED
@@ -7,6 +7,30 @@ class Official_Netfeedback_Model_Observer
7
  $order = $shipment->getOrder();
8
  $code = $order->getStoreId();
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  $enable = (int) Mage::getStoreConfig('feedbacksection/settings/enabled', $code);
11
  $mode = Mage::getStoreConfig('feedbacksection/settings/mode', $code);
12
  if($enable == 1 && $mode == 'shipping')
@@ -17,8 +41,8 @@ class Official_Netfeedback_Model_Observer
17
  $orderDate = urlencode($order->getCreatedAt());
18
  $apikey = urlencode(Mage::getStoreConfig('feedbacksection/settings/apikey', $code));
19
 
20
- $new_url = "http://www.netfeedback.com/p/?a=" . $apikey . "&d=" . $orderDate . "&e=" . $customerEmail . "&n=" . $name . "&o=" . $orderNumber;
21
-
22
  $new_curl = curl_init($new_url);
23
  curl_setopt($new_curl, CURLOPT_VERBOSE, 1);
24
  curl_setopt($new_curl, CURLOPT_FAILONERROR, false);
@@ -39,6 +63,29 @@ class Official_Netfeedback_Model_Observer
39
  $order = Mage::getModel('sales/order')->load($orderId);
40
  $code = $order->getStoreId();
41
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  $enable = (int) Mage::getStoreConfig('feedbacksection/settings/enabled', $code);
43
  $mode = Mage::getStoreConfig('feedbacksection/settings/mode', $code);
44
  if($enable == 1 && $mode == 'success')
@@ -49,7 +96,7 @@ class Official_Netfeedback_Model_Observer
49
  $orderDate = urlencode($order->getCreatedAt());
50
  $apikey = urlencode(Mage::getStoreConfig('feedbacksection/settings/apikey', $code));
51
 
52
- $new_url = "http://www.netfeedback.com/p/?a=" . $apikey . "&d=" . $orderDate . "&e=" . $customerEmail . "&n=" . $name . "&o=" . $orderNumber;
53
 
54
  $new_curl = curl_init($new_url);
55
  curl_setopt($new_curl, CURLOPT_VERBOSE, 1);
7
  $order = $shipment->getOrder();
8
  $code = $order->getStoreId();
9
 
10
+
11
+ $ordered_items = $order->getAllVisibleItems();
12
+ $i = 1;
13
+ foreach($ordered_items as $item)
14
+ {
15
+ $product = Mage::getModel('catalog/product')->load($item->getProductId());
16
+ $sku = urlencode($item->getSku());
17
+ $name = urlencode($item->getName());
18
+ $product_string .= "&sku_".$i."=".$sku."&name_".$i."=".$name;
19
+
20
+ if($product->getEan())
21
+ {
22
+ $ean = urlencode($product->getEan());
23
+ $product_string .= "&ean_".$i."=".$ean;
24
+ }
25
+ if($product->getManufacturerCode())
26
+ {
27
+ $manufacturercode = urlencode($product->getManufacturerCode());
28
+ $product_string .= "&mancode_".$i."=".$manufacturercode;
29
+ }
30
+ $i++;
31
+ }
32
+
33
+
34
  $enable = (int) Mage::getStoreConfig('feedbacksection/settings/enabled', $code);
35
  $mode = Mage::getStoreConfig('feedbacksection/settings/mode', $code);
36
  if($enable == 1 && $mode == 'shipping')
41
  $orderDate = urlencode($order->getCreatedAt());
42
  $apikey = urlencode(Mage::getStoreConfig('feedbacksection/settings/apikey', $code));
43
 
44
+ $new_url = "http://www.netfeedback.com/p/?a=" . $apikey . "&d=" . $orderDate . "&e=" . $customerEmail . "&n=" . $name . "&o=" . $orderNumber . $product_string;
45
+
46
  $new_curl = curl_init($new_url);
47
  curl_setopt($new_curl, CURLOPT_VERBOSE, 1);
48
  curl_setopt($new_curl, CURLOPT_FAILONERROR, false);
63
  $order = Mage::getModel('sales/order')->load($orderId);
64
  $code = $order->getStoreId();
65
 
66
+
67
+ $ordered_items = $order->getAllVisibleItems();
68
+ $i = 1;
69
+ foreach($ordered_items as $item)
70
+ {
71
+ $product = Mage::getModel('catalog/product')->load($item->getProductId());
72
+ $sku = urlencode($item->getSku());
73
+ $name = urlencode($item->getName());
74
+ $product_string .= "&sku_".$i."=".$sku."&name_".$i."=".$name;
75
+
76
+ if($product->getEan())
77
+ {
78
+ $ean = urlencode($product->getEan());
79
+ $product_string .= "&ean_".$i."=".$ean;
80
+ }
81
+ if($product->getManufacturerCode())
82
+ {
83
+ $manufacturercode = urlencode($product->getManufacturerCode());
84
+ $product_string .= "&mancode_".$i."=".$manufacturercode;
85
+ }
86
+ $i++;
87
+ }
88
+
89
  $enable = (int) Mage::getStoreConfig('feedbacksection/settings/enabled', $code);
90
  $mode = Mage::getStoreConfig('feedbacksection/settings/mode', $code);
91
  if($enable == 1 && $mode == 'success')
96
  $orderDate = urlencode($order->getCreatedAt());
97
  $apikey = urlencode(Mage::getStoreConfig('feedbacksection/settings/apikey', $code));
98
 
99
+ $new_url = "http://www.netfeedback.com/p/?a=" . $apikey . "&d=" . $orderDate . "&e=" . $customerEmail . "&n=" . $name . "&o=" . $orderNumber . $product_string;
100
 
101
  $new_curl = curl_init($new_url);
102
  curl_setopt($new_curl, CURLOPT_VERBOSE, 1);
app/etc/modules/Official_Netfeedback.xml DELETED
@@ -1,10 +0,0 @@
1
- <?xml version="1.0"?>
2
- <config>
3
- <modules>
4
- <Official_Netfeedback>
5
- <active>true</active>
6
- <codePool>local</codePool>
7
- <version>0.1.0</version>
8
- </Official_Netfeedback>
9
- </modules>
10
- </config>
 
 
 
 
 
 
 
 
 
 
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Official_Netfeedback_Extension</name>
4
- <version>0.1.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>This extension uses the Netfeedback service to collect customer feedback from your customer post-purchase or post-shipping.</summary>
10
  <description>This extension integrates with the Netfeedback service which allows Magento store owners to get customer feedback from their customers either after purchase or shipping. Register at www.netfeedback.com/magento to get your unique free API key which is required to use the Netfeedback service.</description>
11
- <notes>First Stable Version</notes>
12
  <authors><author><name>Mark Reid</name><user>auto-converted</user><email>mark.reid@netfeedback.com</email></author></authors>
13
- <date>2014-06-24</date>
14
- <time>18:17:31</time>
15
- <contents><target name="magelocal"><dir name="Official"><dir name="Netfeedback"><dir name="Helper"><file name="Data.php" hash="24dd0517cbe55c7131e9ba944ad42330"/></dir><dir name="Model"><file name="Mode.php" hash="bd4b347ac4363147baa981a4ffbd91c2"/><file name="Observer.php" hash="9f5cd7e588e9dd8f480984fae6544654"/></dir><dir name="etc"><file name="adminhtml.xml" hash="de2fc04d52efc349e664db8e251b182b"/><file name="config.xml" hash="3f63d76f0cf4c7bdbce3ef84fdc1a08d"/><file name="system.xml" hash="7afb772bb765df63c30303ec3e1f4bab"/></dir><dir name="sql"><dir name="netfeedback_setup"><file name="mysql4-install-0.1.0.php" hash="9e21d80daf5ed4673f15c8e28cbcf86f"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Official_Netfeedback.xml" hash="dd7a5c8457c79833a1eeffd39e504da4"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Official_Netfeedback_Extension</name>
4
+ <version>0.2.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>This extension uses the Netfeedback service to collect customer feedback from your customer post-purchase or post-shipping.</summary>
10
  <description>This extension integrates with the Netfeedback service which allows Magento store owners to get customer feedback from their customers either after purchase or shipping. Register at www.netfeedback.com/magento to get your unique free API key which is required to use the Netfeedback service.</description>
11
+ <notes>Second Stable Version</notes>
12
  <authors><author><name>Mark Reid</name><user>auto-converted</user><email>mark.reid@netfeedback.com</email></author></authors>
13
+ <date>2015-04-02</date>
14
+ <time>16:43:06</time>
15
+ <contents><target name="magelocal"><dir name="Official"><dir name="Netfeedback"><dir name="Helper"><file name="Data.php" hash="24dd0517cbe55c7131e9ba944ad42330"/></dir><dir name="Model"><file name="Mode.php" hash="bd4b347ac4363147baa981a4ffbd91c2"/><file name="Observer.php" hash="e63d0a31af68a89918f3792c6968bfea"/></dir><dir name="etc"><file name="adminhtml.xml" hash="de2fc04d52efc349e664db8e251b182b"/><file name="config.xml" hash="3f63d76f0cf4c7bdbce3ef84fdc1a08d"/><file name="system.xml" hash="7afb772bb765df63c30303ec3e1f4bab"/></dir><dir name="sql"><dir name="netfeedback_setup"><file name="mysql4-install-0.1.0.php" hash="9e21d80daf5ed4673f15c8e28cbcf86f"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Official_Netfeedback.xml" hash=""/></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>