Version Notes
Magento Connect compatibility issues fixed.
Download this release
Release Info
Developer | creativestyle GmbH |
Extension | Creativestyle_Sare |
Version | 1.0.4 |
Comparing to | |
See all releases |
Code changes from version 1.0.3 to 1.0.4
- app/code/community/Creativestyle/Sare/Helper/Data.php +5 -0
- app/code/community/Creativestyle/Sare/Model/Customer.php +6 -1
- app/code/community/Creativestyle/Sare/Model/Observer.php +10 -4
- app/code/community/Creativestyle/Sare/controllers/Adminhtml/IndexController.php +1 -1
- app/code/community/Creativestyle/Sare/controllers/IndexController.php +3 -0
- app/code/community/Creativestyle/Sare/etc/config.xml +1 -1
- app/etc/modules/Creativestyle_Sare.xml +12 -0
- package.xml +5 -5
app/code/community/Creativestyle/Sare/Helper/Data.php
CHANGED
@@ -17,6 +17,11 @@ class Creativestyle_Sare_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
17 |
*/
|
18 |
|
19 |
public function sendProblemNotification($title, $description, $modelData, $apiUrl){
|
|
|
|
|
|
|
|
|
|
|
20 |
Mage::getDesign()->setArea('frontend');
|
21 |
$dynamicContent = array(
|
22 |
'%TITLE%'=> Mage::helper('sare')->__($title),
|
17 |
*/
|
18 |
|
19 |
public function sendProblemNotification($title, $description, $modelData, $apiUrl){
|
20 |
+
|
21 |
+
if(!Mage::getStoreConfig('sare/settings/send_problem_mails')){
|
22 |
+
return false;
|
23 |
+
}
|
24 |
+
|
25 |
Mage::getDesign()->setArea('frontend');
|
26 |
$dynamicContent = array(
|
27 |
'%TITLE%'=> Mage::helper('sare')->__($title),
|
app/code/community/Creativestyle/Sare/Model/Customer.php
CHANGED
@@ -237,7 +237,12 @@ class Creativestyle_Sare_Model_Customer extends Mage_Core_Model_Abstract{
|
|
237 |
* @return mixed
|
238 |
*/
|
239 |
static function registered_on($customer){
|
240 |
-
|
|
|
|
|
|
|
|
|
|
|
241 |
->getLocale()
|
242 |
->date(strtotime($customer->getCreatedAt()), null, null, false)
|
243 |
->toString('YYYY-MM-dd H:m:s');
|
237 |
* @return mixed
|
238 |
*/
|
239 |
static function registered_on($customer){
|
240 |
+
if(!$customer->getCreatedAt()){
|
241 |
+
return "";
|
242 |
+
}
|
243 |
+
|
244 |
+
|
245 |
+
$sTime = Mage::app()
|
246 |
->getLocale()
|
247 |
->date(strtotime($customer->getCreatedAt()), null, null, false)
|
248 |
->toString('YYYY-MM-dd H:m:s');
|
app/code/community/Creativestyle/Sare/Model/Observer.php
CHANGED
@@ -48,6 +48,9 @@ class Creativestyle_Sare_Model_Observer{
|
|
48 |
}
|
49 |
|
50 |
public function test($event){
|
|
|
|
|
|
|
51 |
$customerId = $event->getCustomerAddress()->getCustomerId();
|
52 |
$customer = Mage::getModel('customer/customer')->load($customerId);
|
53 |
$this->updateCustomerData($event, $customer);
|
@@ -60,8 +63,9 @@ class Creativestyle_Sare_Model_Observer{
|
|
60 |
}
|
61 |
|
62 |
public function updateCustomerDataAfterOrder($observer){
|
63 |
-
|
64 |
-
|
|
|
65 |
}
|
66 |
|
67 |
$order = $observer->getOrder();
|
@@ -79,6 +83,8 @@ class Creativestyle_Sare_Model_Observer{
|
|
79 |
if(is_object($sareSubscriberModel)&&$sareSubscriberModel->getMkey()!=''){
|
80 |
Mage::getModel('creativestyle_sare/sare')->updateCustomerData($customer, $customerData, $sareSubscriberModel->getMkey());
|
81 |
}
|
|
|
|
|
82 |
}
|
83 |
|
84 |
public function updateCustomerData($observer, $customer = null){
|
@@ -122,7 +128,7 @@ class Creativestyle_Sare_Model_Observer{
|
|
122 |
if(!Mage::getStoreConfig('sare/settings/enabled')){
|
123 |
return $this;
|
124 |
}
|
125 |
-
if (Mage::app()->getFrontController()->getAction()->getFullActionName() === 'adminhtml_dashboard_index')
|
126 |
{
|
127 |
$block = $observer->getBlock();
|
128 |
if ($block->getNameInLayout() === 'dashboard')
|
@@ -140,7 +146,7 @@ class Creativestyle_Sare_Model_Observer{
|
|
140 |
return $this;
|
141 |
}
|
142 |
|
143 |
-
if (Mage::app()->getFrontController()->getAction()->getFullActionName() === 'adminhtml_dashboard_index')
|
144 |
{
|
145 |
if ($observer->getBlock()->getUseAsDashboardHook())
|
146 |
{
|
48 |
}
|
49 |
|
50 |
public function test($event){
|
51 |
+
if(!Mage::getStoreConfig('sare/settings/enabled')||!Mage::getStoreConfig('sare/settings/enabled_addresschange')){
|
52 |
+
return $event;
|
53 |
+
}
|
54 |
$customerId = $event->getCustomerAddress()->getCustomerId();
|
55 |
$customer = Mage::getModel('customer/customer')->load($customerId);
|
56 |
$this->updateCustomerData($event, $customer);
|
63 |
}
|
64 |
|
65 |
public function updateCustomerDataAfterOrder($observer){
|
66 |
+
|
67 |
+
if(!Mage::getStoreConfig('sare/settings/enabled')||!Mage::getStoreConfig('sare/settings/enabled_afterorder')){
|
68 |
+
return $observer;
|
69 |
}
|
70 |
|
71 |
$order = $observer->getOrder();
|
83 |
if(is_object($sareSubscriberModel)&&$sareSubscriberModel->getMkey()!=''){
|
84 |
Mage::getModel('creativestyle_sare/sare')->updateCustomerData($customer, $customerData, $sareSubscriberModel->getMkey());
|
85 |
}
|
86 |
+
|
87 |
+
return $observer;
|
88 |
}
|
89 |
|
90 |
public function updateCustomerData($observer, $customer = null){
|
128 |
if(!Mage::getStoreConfig('sare/settings/enabled')){
|
129 |
return $this;
|
130 |
}
|
131 |
+
if (is_object(Mage::app()->getFrontController()->getAction())&&Mage::app()->getFrontController()->getAction()->getFullActionName() === 'adminhtml_dashboard_index')
|
132 |
{
|
133 |
$block = $observer->getBlock();
|
134 |
if ($block->getNameInLayout() === 'dashboard')
|
146 |
return $this;
|
147 |
}
|
148 |
|
149 |
+
if (is_object(Mage::app()->getFrontController()->getAction())&&Mage::app()->getFrontController()->getAction()->getFullActionName() === 'adminhtml_dashboard_index')
|
150 |
{
|
151 |
if ($observer->getBlock()->getUseAsDashboardHook())
|
152 |
{
|
app/code/community/Creativestyle/Sare/controllers/Adminhtml/IndexController.php
CHANGED
@@ -80,7 +80,7 @@ class Creativestyle_Sare_Adminhtml_IndexController
|
|
80 |
// Should be subscriber
|
81 |
$responseArr['messages'][] = array('text'=>$this->__('<b>%s</b> should be subscribed...', $currentSubscriber->getSubscriberEmail()), 'class'=>'info');
|
82 |
$sare = Mage::getModel('creativestyle_sare/sare');
|
83 |
-
$mkey = $sare->subscribe($currentSubscriber->getEmail(), $currentSubscriber->getCustomerId());
|
84 |
if($mkey){
|
85 |
$responseArr['messages'][] = array('text'=> $this->__('Subscribed with mkey = %s', $mkey), 'class'=>'success');
|
86 |
if($currentSubscriber->getCustomerId()>0){
|
80 |
// Should be subscriber
|
81 |
$responseArr['messages'][] = array('text'=>$this->__('<b>%s</b> should be subscribed...', $currentSubscriber->getSubscriberEmail()), 'class'=>'info');
|
82 |
$sare = Mage::getModel('creativestyle_sare/sare');
|
83 |
+
$mkey = $sare->subscribe($currentSubscriber->getEmail(), $currentSubscriber->getCustomerId(), $currentSubscriber->getUnsubscriptionLink());
|
84 |
if($mkey){
|
85 |
$responseArr['messages'][] = array('text'=> $this->__('Subscribed with mkey = %s', $mkey), 'class'=>'success');
|
86 |
if($currentSubscriber->getCustomerId()>0){
|
app/code/community/Creativestyle/Sare/controllers/IndexController.php
CHANGED
@@ -2,6 +2,9 @@
|
|
2 |
class Creativestyle_Sare_IndexController extends Mage_Core_Controller_Front_Action
|
3 |
{
|
4 |
public function abandonedcartsAction(){
|
|
|
|
|
|
|
5 |
$key = $this->getRequest()->getParam('key');
|
6 |
if($key!=Mage::getStoreConfig('sare/settings/key')){
|
7 |
die('Wrong key!');
|
2 |
class Creativestyle_Sare_IndexController extends Mage_Core_Controller_Front_Action
|
3 |
{
|
4 |
public function abandonedcartsAction(){
|
5 |
+
|
6 |
+
die('Disabled in this version.');
|
7 |
+
|
8 |
$key = $this->getRequest()->getParam('key');
|
9 |
if($key!=Mage::getStoreConfig('sare/settings/key')){
|
10 |
die('Wrong key!');
|
app/code/community/Creativestyle/Sare/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Creativestyle_Sare>
|
5 |
-
<version>1.0.
|
6 |
</Creativestyle_Sare>
|
7 |
</modules>
|
8 |
<global>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Creativestyle_Sare>
|
5 |
+
<version>1.0.4</version>
|
6 |
</Creativestyle_Sare>
|
7 |
</modules>
|
8 |
<global>
|
app/etc/modules/Creativestyle_Sare.xml
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Creativestyle_Sare>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>community</codePool>
|
7 |
+
<depends>
|
8 |
+
<Mage_Newsletter></Mage_Newsletter>
|
9 |
+
</depends>
|
10 |
+
</Creativestyle_Sare>
|
11 |
+
</modules>
|
12 |
+
</config>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Creativestyle_Sare</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license>GPL</license>
|
7 |
<channel>community</channel>
|
@@ -16,11 +16,11 @@ Quick integration
|
|
16 |

|
17 |
All you need to do is input your UID and integration key to get you going. If you don't have SARE account yet, you can request free test account here.
|
18 |
</description>
|
19 |
-
<notes>
|
20 |
<authors><author><name>creativestyle</name><user>creativestyle</user><email>j.fojcik@creativestyle.de</email></author></authors>
|
21 |
-
<date>2014-
|
22 |
-
<time>
|
23 |
-
<contents><target name="magecommunity"><dir name="Creativestyle"><dir name="Sare"><dir name="Block"><file name="Abandonedcartitems.php" hash="83487729dcf5c7a0b7494ffc292f2d2f"/><dir name="Adminhtml"><file name="Abandonedcarts.php" hash="0bf7dda7546d406e29641d9f5ce9e6bb"/><dir name="Dashboard"><dir name="Grids"><file name="Subscribers.php" hash="e42658f87a3717ae78614a243c753840"/></dir><file name="Grids.php" hash="78b4e891c7e5318da8c121fe2f2621ab"/></dir><file name="Dashboard.php" hash="c355901f132e1bc4d431dddf3fb99f40"/><file name="Infoblock.php" hash="4cd3f11b74fc15a264ce0e8786407407"/><file name="Targetinginfoblock.php" hash="633015040b14dd676a698e24b3203a60"/></dir></dir><dir name="Helper"><file name="Data.php" hash="
|
24 |
<compatible/>
|
25 |
<dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
|
26 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Creativestyle_Sare</name>
|
4 |
+
<version>1.0.4</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>GPL</license>
|
7 |
<channel>community</channel>
|
16 |

|
17 |
All you need to do is input your UID and integration key to get you going. If you don't have SARE account yet, you can request free test account here.
|
18 |
</description>
|
19 |
+
<notes>Magento Connect compatibility issues fixed.</notes>
|
20 |
<authors><author><name>creativestyle</name><user>creativestyle</user><email>j.fojcik@creativestyle.de</email></author></authors>
|
21 |
+
<date>2014-05-09</date>
|
22 |
+
<time>10:49:17</time>
|
23 |
+
<contents><target name="magecommunity"><dir name="Creativestyle"><dir name="Sare"><dir name="Block"><file name="Abandonedcartitems.php" hash="83487729dcf5c7a0b7494ffc292f2d2f"/><dir name="Adminhtml"><file name="Abandonedcarts.php" hash="0bf7dda7546d406e29641d9f5ce9e6bb"/><dir name="Dashboard"><dir name="Grids"><file name="Subscribers.php" hash="e42658f87a3717ae78614a243c753840"/></dir><file name="Grids.php" hash="78b4e891c7e5318da8c121fe2f2621ab"/></dir><file name="Dashboard.php" hash="c355901f132e1bc4d431dddf3fb99f40"/><file name="Infoblock.php" hash="4cd3f11b74fc15a264ce0e8786407407"/><file name="Targetinginfoblock.php" hash="633015040b14dd676a698e24b3203a60"/></dir></dir><dir name="Helper"><file name="Data.php" hash="4ed5c76ffef1d560d02d8126d6cdcf72"/></dir><dir name="Model"><dir name="AdminNotification"><file name="Feed.php" hash="9423fdeab9dcc1c3705247b171fd8b1e"/></dir><file name="Customer.php" hash="20df1e4bfd19cd43413815fc72d2ccfc"/><file name="Email.php" hash="e41ea542e84dcc7a716d3c181b232de4"/><dir name="Mysql4"><dir name="Email"><file name="Collection.php" hash="12055539f8a029a3687542d2d64634a3"/></dir><file name="Email.php" hash="e4dd51f3c7ae1995df0881aadcf90bbe"/></dir><file name="Observer.php" hash="3bb7389436bcaffe123ff6c20ac9920a"/><file name="Response.php" hash="385c859dd7b6e7a0a10ce06bfdf7cbc1"/><file name="Sare.php" hash="2e3a87eb0b01fbb4e596c35baed873e0"/><file name="Status.php" hash="d3682a21418ae267e0ae8a36120d0887"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="IndexController.php" hash="9e78391cd194d9066456fea318cb4df3"/></dir><file name="IndexController.php" hash="131d12a2b82b27e1ab47b995cd3a02b2"/></dir><dir name="etc"><file name="adminhtml.xml" hash="adbe7e50c1bf01d10047faf3e345de6c"/><file name="config.xml" hash="0dea066e73b9d8dfe8de94720618f8f9"/><dir name="sarescripts"><file name="fetchAbandonedCartsUsers.txt" hash="7a2029e493483f9f6e70bb3cbc605e09"/></dir><file name="system.xml" hash="aa4ed6a653ed6390a1b0c04b3f03bb39"/></dir><dir name="sql"><dir name="creativestyle_sare_setup"><file name="mysql4-install-0.1.0.php" hash="dc814e259cb60b8072f3baa1cc227469"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="2000893748f23030478fd3bd098ad0e6"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="pl_PL"><file name="sare.csv" hash="5f959f4a1867e48f74a9d944e749c5e3"/></dir></target><target name="mage"><dir name="js"><dir name="sare"><file name="jquery-1.10.2.min.js" hash="6ac17d34088a77cc8ddd528f7ac21fa3"/><file name="synchro.js" hash="14f1fabe5837876e5ff332fd959abdfa"/></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="css"><file name="sare.css" hash="311b016a99ba725c90b94fbfdc5a0bc9"/></dir></dir></dir><dir name="default"><dir name="default"><dir name="images"><dir name="sare"><file name="icon_add.png" hash="cdd116fa6d274e27810134c878b4bc55"/><file name="icon_info.png" hash="43bfbec584cffa85e0406f2308dad69b"/><file name="icon_remove.png" hash="7d7f814263c715b2ee3751e2c6d371f0"/><file name="icon_success.png" hash="74f7903b97f4dd3c86095b773fdef881"/><file name="icon_user.png" hash="889b240dc8b07e9e472de32af8edd590"/><file name="sare-baner.jpg" hash="22df2d8d0643f1c373719af8c9017aa8"/><file name="sare.png" hash="2aa48c65176945f07081286e29fb59ea"/><file name="transfer.png" hash="79d7f2feb92e7e328ba3a9327ad53008"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Creativestyle_Sare.xml" hash="dae4e0ec266fbfa1e47bfb8f0e8f979e"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="sare.xml" hash="5e1897f07cb0d9feb8289484a73084a4"/></dir><dir name="template"><dir name="sare"><file name="abandonedcarts.phtml" hash="3e9c27bc4a6ad18dd00e6e7855bb63a0"/><file name="dashboard.phtml" hash="87d6116adf51619e0a2983ffe0753794"/><file name="infoblock.phtml" hash="77718956aa3a0810461f87d0f1e45aff"/><file name="targeting.phtml" hash="8c198eab64740d4da769c18f8153bfcb"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="sare"><file name="abandonedcarts.phtml" hash="3ea4700e6f348507ae1d2adfb84fa527"/><file name="problemnotification.phtml" hash="63e1a698ccc4644fae4a80e4a0b91ac2"/></dir></dir></dir></dir></dir></target></contents>
|
24 |
<compatible/>
|
25 |
<dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
|
26 |
</package>
|