Version Notes
- compability to enterprise version
- bugifxes
Download this release
Release Info
Developer | Newsletter2Go |
Extension | NL2go_Sync |
Version | 3.1.04 |
Comparing to | |
See all releases |
Code changes from version 3.0.03 to 3.1.04
- app/code/community/Newsletter2go/Apiextension/Model/Api2/Subscriber/Item/Rest/Admin/V1.php +10 -2
- app/code/community/Newsletter2go/Apiextension/Model/Api2/Subscriber/Rest/Admin/V1.php +1 -2
- app/code/community/Newsletter2go/Apiextension/Model/Api2/Subscriber/Version/Rest/Admin/V1.php +1 -1
- package.xml +6 -5
app/code/community/Newsletter2go/Apiextension/Model/Api2/Subscriber/Item/Rest/Admin/V1.php
CHANGED
@@ -31,11 +31,13 @@ class Newsletter2go_Apiextension_Model_Api2_Subscriber_Item_Rest_Admin_V1 extend
|
|
31 |
$id = $this->getRequest()->getParam('id');
|
32 |
$storeCode = $this->getRequest()->getParam('store');
|
33 |
|
|
|
34 |
$model = Mage::getModel('catalog/product'); //getting product model
|
35 |
if ($storeCode != null) {
|
36 |
|
37 |
$storeId = Mage::getModel('core/store')->load($storeCode, 'code')->getId();
|
38 |
$model->setStoreId($storeId);
|
|
|
39 |
} else {
|
40 |
$storeId = Mage::app()
|
41 |
->getWebsite()
|
@@ -51,13 +53,13 @@ class Newsletter2go_Apiextension_Model_Api2_Subscriber_Item_Rest_Admin_V1 extend
|
|
51 |
$_product = $model->load($id); //getting product object for particular product id
|
52 |
}
|
53 |
|
54 |
-
if (!$_product || !isset($_product->getData()['sku'])) {
|
55 |
$_product = $model->loadByAttribute('sku', $id);
|
56 |
// return array('error' => 'int-0-600', 'message' => serialize($_product->getData()));
|
57 |
|
58 |
}
|
59 |
|
60 |
-
if (!$_product || !isset($_product->getData()['sku'])) {
|
61 |
|
62 |
return array('error' => 'int-0-600', 'message' => 'product not found');
|
63 |
}
|
@@ -67,7 +69,13 @@ class Newsletter2go_Apiextension_Model_Api2_Subscriber_Item_Rest_Admin_V1 extend
|
|
67 |
$this->getAdditionalData($_product, $p);
|
68 |
|
69 |
$p['product_url_1'] = $_product->getUrlPath();
|
|
|
|
|
|
|
|
|
|
|
70 |
$p['product_url_2'] = $_product->getProductUrl();
|
|
|
71 |
$p['product_url_3'] = $_product->getUrlInStore();
|
72 |
|
73 |
if (isset($p['price']))
|
31 |
$id = $this->getRequest()->getParam('id');
|
32 |
$storeCode = $this->getRequest()->getParam('store');
|
33 |
|
34 |
+
$add_store = '';
|
35 |
$model = Mage::getModel('catalog/product'); //getting product model
|
36 |
if ($storeCode != null) {
|
37 |
|
38 |
$storeId = Mage::getModel('core/store')->load($storeCode, 'code')->getId();
|
39 |
$model->setStoreId($storeId);
|
40 |
+
$add_store = '?___store='.$storeCode;
|
41 |
} else {
|
42 |
$storeId = Mage::app()
|
43 |
->getWebsite()
|
53 |
$_product = $model->load($id); //getting product object for particular product id
|
54 |
}
|
55 |
|
56 |
+
if (!$_product || !$_product->getId()){// !isset($_product->getData()['sku'])) {
|
57 |
$_product = $model->loadByAttribute('sku', $id);
|
58 |
// return array('error' => 'int-0-600', 'message' => serialize($_product->getData()));
|
59 |
|
60 |
}
|
61 |
|
62 |
+
if (!$_product || !$_product->getId()){// !isset($_product->getData()['sku'])) {
|
63 |
|
64 |
return array('error' => 'int-0-600', 'message' => 'product not found');
|
65 |
}
|
69 |
$this->getAdditionalData($_product, $p);
|
70 |
|
71 |
$p['product_url_1'] = $_product->getUrlPath();
|
72 |
+
if(strlen($add_store) > 0){
|
73 |
+
if(strpos( $p['product_url_1'] , $add_store) === false){
|
74 |
+
$p['product_url_1'] = $p['product_url_1'] .$add_store;
|
75 |
+
}
|
76 |
+
}
|
77 |
$p['product_url_2'] = $_product->getProductUrl();
|
78 |
+
|
79 |
$p['product_url_3'] = $_product->getUrlInStore();
|
80 |
|
81 |
if (isset($p['price']))
|
app/code/community/Newsletter2go/Apiextension/Model/Api2/Subscriber/Rest/Admin/V1.php
CHANGED
@@ -106,9 +106,8 @@ class Newsletter2go_Apiextension_Model_Api2_Subscriber_Rest_Admin_V1 extends New
|
|
106 |
protected function _update($someArray)
|
107 |
{
|
108 |
$subs = Mage::getModel('newsletter/subscriber')->loadByEmail($this->getRequest()->getParam('email'));
|
109 |
-
$data = $subs->getData();
|
110 |
try {
|
111 |
-
if (
|
112 |
$subs->setStatus(Mage_Newsletter_Model_Subscriber::STATUS_UNSUBSCRIBED);
|
113 |
$subs->save();
|
114 |
}
|
106 |
protected function _update($someArray)
|
107 |
{
|
108 |
$subs = Mage::getModel('newsletter/subscriber')->loadByEmail($this->getRequest()->getParam('email'));
|
|
|
109 |
try {
|
110 |
+
if ($subs !== false && $subs->getData() != null) {
|
111 |
$subs->setStatus(Mage_Newsletter_Model_Subscriber::STATUS_UNSUBSCRIBED);
|
112 |
$subs->save();
|
113 |
}
|
app/code/community/Newsletter2go/Apiextension/Model/Api2/Subscriber/Version/Rest/Admin/V1.php
CHANGED
@@ -9,6 +9,6 @@ class Newsletter2go_Apiextension_Model_Api2_Subscriber_Version_Rest_Admin_V1 ext
|
|
9 |
*/
|
10 |
protected function _retrieveCollection()
|
11 |
{
|
12 |
-
return array('version' =>
|
13 |
}
|
14 |
}
|
9 |
*/
|
10 |
protected function _retrieveCollection()
|
11 |
{
|
12 |
+
return array(array('version' =>3104));
|
13 |
}
|
14 |
}
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>NL2go_Sync</name>
|
4 |
-
<version>3.
|
5 |
<stability>stable</stability>
|
6 |
<license>GPL</license>
|
7 |
<channel>community</channel>
|
@@ -10,11 +10,12 @@
|
|
10 |
<description>The Newsletter2Go email marketing software Extension for Magento automatically synchronizes all newsletter subscribers, including basic data like name and gender as well as the total amount of sales and average sale.&#xD;
|
11 |
Additionally, you can easily retrieve all item data including description, price info, product images and product link just by inputting the item id in the Newsletter2Go software.</description>
|
12 |
<notes>new features for magento-integration in Newsletter2Go-system</description>
|
13 |
-
<notes
|
|
|
14 |
<authors><author><name>Newsletter2Go</name><user>Newsletter2Go</user><email>info@newsletter2go.de</email></author></authors>
|
15 |
-
<date>2015-
|
16 |
-
<time>
|
17 |
-
<contents><target name="magecommunity"><dir name="Newsletter2go"><dir name="Apiextension"><dir name="Model"><dir name="Api2"><dir name="Subscriber"><dir name="Fields"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="82f9a23f674b0cf49907e36962a95e22"/></dir></dir></dir><file name="Fields.php" hash="13050c3aebf6e555d3d7b3abfb89e1ca"/><dir name="Group"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="3e193c7f5dfdc41ad1fbc7685598894e"/></dir></dir></dir><file name="Group.php" hash="d974f58986cf34c6dbc78240a8806187"/><dir name="Item"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="
|
18 |
<compatible/>
|
19 |
<dependencies><required><php><min>5.4.00</min><max>6.0.00</max></php></required></dependencies>
|
20 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>NL2go_Sync</name>
|
4 |
+
<version>3.1.04</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>GPL</license>
|
7 |
<channel>community</channel>
|
10 |
<description>The Newsletter2Go email marketing software Extension for Magento automatically synchronizes all newsletter subscribers, including basic data like name and gender as well as the total amount of sales and average sale.&#xD;
|
11 |
Additionally, you can easily retrieve all item data including description, price info, product images and product link just by inputting the item id in the Newsletter2Go software.</description>
|
12 |
<notes>new features for magento-integration in Newsletter2Go-system</description>
|
13 |
+
<notes>- compability to enterprise version
|
14 |
+
- bugifxes</notes>
|
15 |
<authors><author><name>Newsletter2Go</name><user>Newsletter2Go</user><email>info@newsletter2go.de</email></author></authors>
|
16 |
+
<date>2015-09-01</date>
|
17 |
+
<time>13:28:26</time>
|
18 |
+
<contents><target name="magecommunity"><dir name="Newsletter2go"><dir name="Apiextension"><dir name="Model"><dir name="Api2"><dir name="Subscriber"><dir name="Fields"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="82f9a23f674b0cf49907e36962a95e22"/></dir></dir></dir><file name="Fields.php" hash="13050c3aebf6e555d3d7b3abfb89e1ca"/><dir name="Group"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="3e193c7f5dfdc41ad1fbc7685598894e"/></dir></dir></dir><file name="Group.php" hash="d974f58986cf34c6dbc78240a8806187"/><dir name="Item"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="24d460f494dd7c8bb560178d09e60872"/></dir></dir></dir><file name="Item.php" hash="2511179aaf3bb819d905ea25842e4f7a"/><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="b92fc116b731ae54104e29bea321e247"/></dir></dir><dir name="Store"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="280c881d20d84db8842b644740122bc7"/></dir></dir></dir><file name="Store.php" hash="a98c4f907188f0debc8c560926d7e3b2"/><dir name="Version"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="107e7425338eca6c95a4980556cf08b0"/></dir></dir></dir><file name="Version.php" hash="28480d5fe6b8ff8ddb3512340d922c44"/></dir><file name="Subscriber.php" hash="fa4e32b55be186db846f21b59a03e0c2"/></dir></dir><dir name="etc"><file name="api2.xml" hash="e817575cad28cb1b240ec598a0e51d17"/><file name="config.xml" hash="44da06f11a3c22784b81e38884c87153"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Newsletter2go_Apiextension.xml" hash="712b9170d5970e2d7c9f46b8c1cd6569"/></dir></target></contents>
|
19 |
<compatible/>
|
20 |
<dependencies><required><php><min>5.4.00</min><max>6.0.00</max></php></required></dependencies>
|
21 |
</package>
|