Version Notes
First official relase
Download this release
Release Info
Developer | Feedaty |
Extension | feedaty |
Version | 1.1.15 |
Comparing to | |
See all releases |
Code changes from version 1.1.13 to 1.1.15
app/code/community/Feedaty/Badge/Model/Generate.php
CHANGED
@@ -15,9 +15,9 @@ class Feedaty_Badge_Model_Generate {
|
|
15 |
$product = $product->getId();
|
16 |
if (!is_null($product)) {
|
17 |
$data = Feedaty_Badge_Model_WebService::_get_FeedatyData();
|
18 |
-
|
19 |
-
$html =
|
20 |
-
$transport->setHtml($html
|
21 |
}
|
22 |
}
|
23 |
}
|
@@ -64,7 +64,7 @@ class Feedaty_Badge_Model_Generate {
|
|
64 |
$data = Feedaty_Badge_Model_WebService::_get_FeedatyData();
|
65 |
|
66 |
$ver = json_decode(json_encode(Mage::getConfig()->getNode()->modules->Feedaty_Badge->version),true);
|
67 |
-
$html = '<!--
|
68 |
$transport->setHtml($html);
|
69 |
}
|
70 |
}
|
15 |
$product = $product->getId();
|
16 |
if (!is_null($product)) {
|
17 |
$data = Feedaty_Badge_Model_WebService::_get_FeedatyData();
|
18 |
+
$ver = json_decode(json_encode(Mage::getConfig()->getNode()->modules->Feedaty_Badge->version),true);
|
19 |
+
$html = '<!-- PlPMa '.$ver[0].' -->'.str_replace("__insert_ID__",$product,$data[Mage::getStoreConfig('feedaty_badge_options/widget_products/badge_style')]['html_embed']).$transport->getHtml();
|
20 |
+
$transport->setHtml($html);
|
21 |
}
|
22 |
}
|
23 |
}
|
64 |
$data = Feedaty_Badge_Model_WebService::_get_FeedatyData();
|
65 |
|
66 |
$ver = json_decode(json_encode(Mage::getConfig()->getNode()->modules->Feedaty_Badge->version),true);
|
67 |
+
$html = '<!-- PlSMa '.$ver[0].' -->'.$data[Mage::getStoreConfig('feedaty_badge_options/widget_store/badge_style')]['html_embed'].$transport->getHtml();
|
68 |
$transport->setHtml($html);
|
69 |
}
|
70 |
}
|
app/code/community/Feedaty/Badge/Model/Observe.php
CHANGED
@@ -4,7 +4,9 @@ class Feedaty_Badge_Model_Observe
|
|
4 |
public function intercept_order(& $observer){
|
5 |
|
6 |
$order = $observer->getEvent()->getOrder();
|
7 |
-
|
|
|
|
|
8 |
foreach ($order->getAllStatusHistory() as $orderComment){
|
9 |
$verify[$orderComment->getStatus()]++;
|
10 |
}
|
@@ -18,18 +20,25 @@ class Feedaty_Badge_Model_Observe
|
|
18 |
|
19 |
foreach ($objproducts as $itemId => $item) {
|
20 |
unset($tmp);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
//$tmp['sku'] = $item->getSku();
|
|
|
22 |
$tmp['Name'] = $item->getName();
|
23 |
$tmp['Brand'] = $item->getBrand();
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
$tmp['Url'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).$fd_oProduct->getUrlPath()
|
28 |
-
);
|
29 |
-
if ($fd_oProduct->getImage() != "no_selection")
|
30 |
-
$tmp['ImageUrl'] = Mage::getModel('catalog/product_media_config')->getMediaUrl( $fd_oProduct->getImage() );
|
31 |
-
else
|
32 |
-
$tmp['ImageUrl'] = "";
|
33 |
//$tmp['Price'] = $item->getPrice();
|
34 |
|
35 |
$fd_products[] = $tmp;
|
@@ -40,14 +49,13 @@ class Feedaty_Badge_Model_Observe
|
|
40 |
// Formatting the array to be sent
|
41 |
$tmp_order['OrderId'] = $order->getId();
|
42 |
$tmp_order['OrderDate'] = date("Y-m-d H:i:s");
|
43 |
-
$tmp_order['CustomerEmail'] = $order->
|
44 |
-
$tmp_order['CustomerId'] = $order->
|
45 |
-
//$order['name'] = $order->getBillingAddress()->getName();
|
46 |
$tmp_order['Platform'] = "Magento ".MAGE::getVersion();
|
47 |
$tmp_order['Products'] = $fd_products;
|
48 |
-
|
49 |
-
$fd_data['orders'][] = $tmp_order;
|
50 |
$fd_data['merchantCode'] = Mage::getStoreConfig('feedaty_global/feedaty_preferences/feedaty_code');
|
|
|
51 |
|
52 |
// *******************************
|
53 |
|
4 |
public function intercept_order(& $observer){
|
5 |
|
6 |
$order = $observer->getEvent()->getOrder();
|
7 |
+
|
8 |
+
$verify = array();
|
9 |
+
|
10 |
foreach ($order->getAllStatusHistory() as $orderComment){
|
11 |
$verify[$orderComment->getStatus()]++;
|
12 |
}
|
20 |
|
21 |
foreach ($objproducts as $itemId => $item) {
|
22 |
unset($tmp);
|
23 |
+
$fd_oProduct = Mage::getModel('catalog/product')->load((int) $item->getProductId());
|
24 |
+
|
25 |
+
$tmp['Id'] = $item->getProductId();
|
26 |
+
|
27 |
+
|
28 |
+
Mage::getModel('core/url_rewrite')->loadByRequestPath(
|
29 |
+
$tmp['Url'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).$fd_oProduct->getUrlPath()
|
30 |
+
);
|
31 |
+
if ($fd_oProduct->getImage() != "no_selection")
|
32 |
+
$tmp['ImageUrl'] = Mage::getModel('catalog/product_media_config')->getMediaUrl( $fd_oProduct->getImage() );
|
33 |
+
else
|
34 |
+
$tmp['ImageUrl'] = "";
|
35 |
//$tmp['sku'] = $item->getSku();
|
36 |
+
|
37 |
$tmp['Name'] = $item->getName();
|
38 |
$tmp['Brand'] = $item->getBrand();
|
39 |
+
if (is_null($tmp['Brand'])) $tmp['Brand'] = "";
|
40 |
+
|
41 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
//$tmp['Price'] = $item->getPrice();
|
43 |
|
44 |
$fd_products[] = $tmp;
|
49 |
// Formatting the array to be sent
|
50 |
$tmp_order['OrderId'] = $order->getId();
|
51 |
$tmp_order['OrderDate'] = date("Y-m-d H:i:s");
|
52 |
+
$tmp_order['CustomerEmail'] = $order->getCustomerEmail();
|
53 |
+
$tmp_order['CustomerId'] = $order->getCustomerEmail();
|
|
|
54 |
$tmp_order['Platform'] = "Magento ".MAGE::getVersion();
|
55 |
$tmp_order['Products'] = $fd_products;
|
56 |
+
|
|
|
57 |
$fd_data['merchantCode'] = Mage::getStoreConfig('feedaty_global/feedaty_preferences/feedaty_code');
|
58 |
+
$fd_data['orders'][] = $tmp_order;
|
59 |
|
60 |
// *******************************
|
61 |
|
app/code/community/Feedaty/Badge/Model/WebService.php
CHANGED
@@ -13,10 +13,7 @@ class Feedaty_Badge_Model_WebService {
|
|
13 |
$feedaty_code = Mage::getStoreConfig('feedaty_global/feedaty_preferences/feedaty_code');
|
14 |
|
15 |
$ch = curl_init();
|
16 |
-
|
17 |
-
$url = 'http://widget.stage.zoorate.com/go.php?function=feed&action=ws&task=product&merchant_code='.$feedaty_code.'&ProductID='.$id.'&language='.Mage::app()->getLocale()->getLocaleCode();
|
18 |
-
else
|
19 |
-
$url = 'http://widget.zoorate.com/go.php?function=feed&action=ws&task=product&merchant_code='.$feedaty_code.'&ProductID='.$id.'&language='.Mage::app()->getLocale()->getLocaleCode();
|
20 |
|
21 |
curl_setopt($ch, CURLOPT_URL, $url);
|
22 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
@@ -42,10 +39,7 @@ class Feedaty_Badge_Model_WebService {
|
|
42 |
$feedaty_code = Mage::getStoreConfig('feedaty_global/feedaty_preferences/feedaty_code');
|
43 |
$ch = curl_init();
|
44 |
// Recensioni in ordine dalla più recente alla meno
|
45 |
-
|
46 |
-
$url = 'http://widget.stage.zoorate.com/go.php?function=feed&action=ws&task=merchant&merchant_code='.$feedaty_code;
|
47 |
-
else
|
48 |
-
$url = 'http://widget.zoorate.com/go.php?function=feed&action=ws&task=merchant&merchant_code='.$feedaty_code;
|
49 |
curl_setopt($ch, CURLOPT_URL, $url);
|
50 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
51 |
curl_setopt($ch, CURLOPT_TIMEOUT, '3');
|
@@ -64,10 +58,8 @@ class Feedaty_Badge_Model_WebService {
|
|
64 |
|
65 |
public function send_order($data) {
|
66 |
$ch = curl_init();
|
67 |
-
|
68 |
-
|
69 |
-
else
|
70 |
-
$url = 'http://www.zoorate.com/ws/feedatyapi.svc/SubmitOrders';
|
71 |
curl_setopt($ch, CURLOPT_URL, $url);
|
72 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
73 |
curl_setopt($ch, CURLOPT_TIMEOUT, '60');
|
@@ -85,16 +77,17 @@ class Feedaty_Badge_Model_WebService {
|
|
85 |
|
86 |
$content = $cache->load("feedaty_store");
|
87 |
|
|
|
|
|
88 |
$feedaty_code = Mage::getStoreConfig('feedaty_global/feedaty_preferences/feedaty_code');
|
89 |
|
90 |
-
$
|
|
|
91 |
|
92 |
if (!$content || strlen($content) == 0) {
|
93 |
$ch = curl_init();
|
94 |
-
|
95 |
-
|
96 |
-
else
|
97 |
-
$url = 'http://widget.zoorate.com/go.php?function=feed_be&action=widget_list&merchant_code='.$feedaty_code.'&language='.Mage::app()->getLocale()->getLocaleCode();
|
98 |
curl_setopt($ch, CURLOPT_URL, $url);
|
99 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
100 |
curl_setopt($ch, CURLOPT_TIMEOUT, '60');
|
@@ -135,10 +128,8 @@ class Feedaty_Badge_Model_WebService {
|
|
135 |
|
136 |
$ch = curl_init();
|
137 |
|
138 |
-
|
139 |
-
|
140 |
-
else
|
141 |
-
$url = 'http://www.zoorate.com/ws/feedatyapi.svc/SetKeyValue';
|
142 |
curl_setopt($ch, CURLOPT_URL, $url);
|
143 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
144 |
curl_setopt($ch, CURLOPT_TIMEOUT, '60');
|
13 |
$feedaty_code = Mage::getStoreConfig('feedaty_global/feedaty_preferences/feedaty_code');
|
14 |
|
15 |
$ch = curl_init();
|
16 |
+
$url = 'http://widget.zoorate.com/go.php?function=feed&action=ws&task=product&merchant_code='.$feedaty_code.'&ProductID='.$id.'&language='.Mage::app()->getLocale()->getLocaleCode();
|
|
|
|
|
|
|
17 |
|
18 |
curl_setopt($ch, CURLOPT_URL, $url);
|
19 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
39 |
$feedaty_code = Mage::getStoreConfig('feedaty_global/feedaty_preferences/feedaty_code');
|
40 |
$ch = curl_init();
|
41 |
// Recensioni in ordine dalla più recente alla meno
|
42 |
+
$url = 'http://widget.zoorate.com/go.php?function=feed&action=ws&task=merchant&merchant_code='.$feedaty_code;
|
|
|
|
|
|
|
43 |
curl_setopt($ch, CURLOPT_URL, $url);
|
44 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
45 |
curl_setopt($ch, CURLOPT_TIMEOUT, '3');
|
58 |
|
59 |
public function send_order($data) {
|
60 |
$ch = curl_init();
|
61 |
+
$url = 'http://www.zoorate.com/ws/feedatyapi.svc/SubmitOrders';
|
62 |
+
|
|
|
|
|
63 |
curl_setopt($ch, CURLOPT_URL, $url);
|
64 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
65 |
curl_setopt($ch, CURLOPT_TIMEOUT, '60');
|
77 |
|
78 |
$content = $cache->load("feedaty_store");
|
79 |
|
80 |
+
Feedaty_Badge_Model_WebService::send_notification();
|
81 |
+
|
82 |
$feedaty_code = Mage::getStoreConfig('feedaty_global/feedaty_preferences/feedaty_code');
|
83 |
|
84 |
+
$string = "FeedatyData".$feedaty_code.Mage::app()->getLocale()->getLocaleCode().(int) FEEDATY_DEBUG;
|
85 |
+
$content =$cache->load($string);
|
86 |
|
87 |
if (!$content || strlen($content) == 0) {
|
88 |
$ch = curl_init();
|
89 |
+
$url = 'http://widget.zoorate.com/go.php?function=feed_be&action=widget_list&merchant_code='.$feedaty_code.'&language='.Mage::app()->getLocale()->getLocaleCode();
|
90 |
+
|
|
|
|
|
91 |
curl_setopt($ch, CURLOPT_URL, $url);
|
92 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
93 |
curl_setopt($ch, CURLOPT_TIMEOUT, '60');
|
128 |
|
129 |
$ch = curl_init();
|
130 |
|
131 |
+
$url = 'http://www.zoorate.com/ws/feedatyapi.svc/SetKeyValue';
|
132 |
+
|
|
|
|
|
133 |
curl_setopt($ch, CURLOPT_URL, $url);
|
134 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
135 |
curl_setopt($ch, CURLOPT_TIMEOUT, '60');
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>feedaty</name>
|
4 |
-
<version>1.1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/gpl-license.php">GPL</license>
|
7 |
<channel>community</channel>
|
@@ -10,9 +10,9 @@
|
|
10 |
<description>Feedaty is a social commerce site dedicated to online stores for the professional management of customer feedback. The service is provided through a platform Saas (Software as a Service) and may be activated quickly and easily through a short integration process.</description>
|
11 |
<notes>First official relase</notes>
|
12 |
<authors><author><name>Feedaty</name><user>feedtest</user><email>info@feedaty.com</email></author></authors>
|
13 |
-
<date>2013-
|
14 |
-
<time>15:
|
15 |
-
<contents><target name="magecommunity"><dir name="Feedaty"><dir name="Badge"><dir name="Block"><file name="LinkCsv.php" hash="92bf7932d32914adcc1b9547b59c7d49"/><file name="Product.php" hash="d896175131b871bf7f309e57ef5099dd"/></dir><dir name="Helper"><file name="Data.php" hash="51386589a569b1e52baa7f30f07a946b"/></dir><dir name="Model"><file name="Generate.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>4.3.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>feedaty</name>
|
4 |
+
<version>1.1.15</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://www.opensource.org/licenses/gpl-license.php">GPL</license>
|
7 |
<channel>community</channel>
|
10 |
<description>Feedaty is a social commerce site dedicated to online stores for the professional management of customer feedback. The service is provided through a platform Saas (Software as a Service) and may be activated quickly and easily through a short integration process.</description>
|
11 |
<notes>First official relase</notes>
|
12 |
<authors><author><name>Feedaty</name><user>feedtest</user><email>info@feedaty.com</email></author></authors>
|
13 |
+
<date>2013-07-08</date>
|
14 |
+
<time>15:24:34</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Feedaty"><dir name="Badge"><dir name="Block"><file name="LinkCsv.php" hash="92bf7932d32914adcc1b9547b59c7d49"/><file name="Product.php" hash="d896175131b871bf7f309e57ef5099dd"/></dir><dir name="Helper"><file name="Data.php" hash="51386589a569b1e52baa7f30f07a946b"/></dir><dir name="Model"><file name="Generate.php" hash="764bba52f5964740236c58b905c6d02c"/><file name="Observe.php" hash="4a3c98eca7f1e06cbf0a16a4936dffd5"/><file name="Order.php" hash="ad5588401fb34ee4e081c7e27bc2b694"/><file name="OrderStatuses.php" hash="c122ad1e6360bd53bc3598c4c3046a02"/><file name="PositionProduct.php" hash="5ed4224b515770f1b2f794a039f6d6c5"/><file name="PositionStore.php" hash="9f3b948fd1046a2b428d51fe51f72778"/><file name="StyleProduct.php" hash="e306b9889e6f5d15bd3db729bf158eda"/><file name="StyleStore.php" hash="612898c7f347753f21a761c2addd7cd0"/><file name="WebService.php" hash="ed774a33ab292578a30fb1acf910744d"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="Badge.php" hash="5b9815ddacd49bdac7f4f3450621759b"/></dir><file name="IndexController.php" hash="3331c66c765ea34e2b2f341e06ea4622"/></dir><dir name="etc"><file name="adminhtml.xml" hash="dfb3514a624955eb430780b923f10fb0"/><file name="config.xml" hash="37832ca12efdd22638277d45f76c4e2b"/><file name="system.xml" hash="ecf35eb131cba17fb4bcff37497efa3c"/><file name="widget.xml" hash="f2b00c74bc9a0e7690be5cbe474efb47"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="Feedaty.xml" hash="eff88446ec32cc43a30a6c54a6f4937a"/></dir><dir name="template"><dir name="feedaty"><file name="base.phtml" hash="0009ab0914e8cb8ab1f3461ff2d6822b"/><file name="product_reviews.phtml" hash="f0978d0158078ab72ab1bad86b1a3933"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="it_IT"><file name="Feedaty.csv" hash="4d219cae9bc37e462c9604c475833adf"/></dir></target><target name="mageetc"><dir name="modules"><file name="Feedaty_Badge.xml" hash="e4e47863d6724079e09a6d4d53152275"/></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>4.3.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|