Version Notes
Improve handling of non-UTF8 charsets in later PHP versions.
Enhance configuration page with links to Cart Defender Portal and registration page
Download this release
Release Info
Developer | Radoslaw Gliniecki |
Extension | cartdefender_actions |
Version | 1.1.1 |
Comparing to | |
See all releases |
Code changes from version 1.1.0 to 1.1.1
app/code/community/CartDefender/Actions/Model/Observer.php
CHANGED
@@ -209,6 +209,32 @@ class CartDefender_Actions_Model_Observer extends Varien_Event_Observer {
|
|
209 |
return $full_orders;
|
210 |
}
|
211 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
212 |
private function prepareBizEventData($event_name, $observer_data, $async_sender_api, $event_no) {
|
213 |
$website = Mage::app()->getWebsite(); // Gets the current website details
|
214 |
$store = Mage::app()->getStore(); // Gets the current store's details
|
@@ -250,7 +276,8 @@ class CartDefender_Actions_Model_Observer extends Varien_Event_Observer {
|
|
250 |
'customerData' => $customerData,
|
251 |
'previousBizEventLatency' => $this->MISSING_VALUE
|
252 |
);
|
253 |
-
|
|
|
254 |
}
|
255 |
|
256 |
private function shouldSendSessionState() {
|
209 |
return $full_orders;
|
210 |
}
|
211 |
|
212 |
+
private function utf8ize($mixed, &$objects_done) {
|
213 |
+
if (!in_array($mixed, $objects_done, true)) {
|
214 |
+
if (is_array($mixed)) {
|
215 |
+
$objects_done[] = $mixed;
|
216 |
+
foreach ($mixed as $key => $value) {
|
217 |
+
$mixed[$key] = $this->utf8ize($value, $objects_done);
|
218 |
+
}
|
219 |
+
} else if (is_string($mixed)) {
|
220 |
+
if (!mb_detect_encoding($mixed, 'utf-8', true)) {
|
221 |
+
$mixed = utf8_encode($mixed);
|
222 |
+
return $mixed;
|
223 |
+
} else {
|
224 |
+
return $mixed;
|
225 |
+
}
|
226 |
+
} else if (is_object($mixed)) {
|
227 |
+
$objects_done[] = $mixed;
|
228 |
+
foreach ($mixed as $key => $value) {
|
229 |
+
$mixed->$key = $this->utf8ize($value, $objects_done);
|
230 |
+
}
|
231 |
+
}
|
232 |
+
return $mixed;
|
233 |
+
} else {
|
234 |
+
return $mixed;
|
235 |
+
}
|
236 |
+
}
|
237 |
+
|
238 |
private function prepareBizEventData($event_name, $observer_data, $async_sender_api, $event_no) {
|
239 |
$website = Mage::app()->getWebsite(); // Gets the current website details
|
240 |
$store = Mage::app()->getStore(); // Gets the current store's details
|
276 |
'customerData' => $customerData,
|
277 |
'previousBizEventLatency' => $this->MISSING_VALUE
|
278 |
);
|
279 |
+
$objects_done = array();
|
280 |
+
return Zend_Json::encode($this->utf8ize($event, $objects_done), true);
|
281 |
}
|
282 |
|
283 |
private function shouldSendSessionState() {
|
app/code/community/CartDefender/Actions/etc/system.xml
CHANGED
@@ -27,6 +27,15 @@
|
|
27 |
<show_in_default>1</show_in_default>
|
28 |
<show_in_website>1</show_in_website>
|
29 |
<show_in_store>1</show_in_store>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
<fields>
|
31 |
<enabled translate="label">
|
32 |
<label>Enabled</label>
|
27 |
<show_in_default>1</show_in_default>
|
28 |
<show_in_website>1</show_in_website>
|
29 |
<show_in_store>1</show_in_store>
|
30 |
+
<comment><![CDATA[ <p>You can configure the Cart Defender's Magento Extension settings
|
31 |
+
in this section. </p>
|
32 |
+
<p>To register for Cart Defender's service and enable the Bot on your website
|
33 |
+
<a href="https://portal.cartdefender.com/#!register"
|
34 |
+
target="_blank">go to the registration page</a>.</p>
|
35 |
+
<p> To configure your Bot's messages <a href="https://portal.cartdefender.com"
|
36 |
+
target="_blank">go to the Cart Defender Portal</a>.</p>
|
37 |
+
]]>
|
38 |
+
</comment>
|
39 |
<fields>
|
40 |
<enabled translate="label">
|
41 |
<label>Enabled</label>
|
package.xml
CHANGED
@@ -1,18 +1,20 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>cartdefender_actions</name>
|
4 |
-
<version>1.1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Increase sales with smart targeted popups and offers delivered to your visitors in real time.</summary>
|
10 |
<description>You can instantly use messages and offers which convert your visitors into customers. You focus on your business needs without A/B tests, as Cart Defender learns which popups covert the best and adjusts itself automatically.</description>
|
11 |
-
<notes>
|
|
|
|
|
12 |
<authors><author><name>Radoslaw Gliniecki</name><user>Cart_Defender</user><email>radek@cartdefender.com</email></author><author><name>Jan Zankowski</name><user>janzankowski</user><email>jan@cartdefender.com</email></author><author><name>Przemyslaw Gliniecki</name><user>psgliniecki</user><email>psg@cartdefender.com</email></author></authors>
|
13 |
-
<date>2016-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="CartDefender"><dir name="Actions"><dir name="Block"><file name="Script.php" hash="6879aeda8fa9d464124915992a761d00"/></dir><dir name="Helper"><file name="Data.php" hash="3b85a232191fa48f1487687c95c371fc"/></dir><dir name="Model"><file name="Observer.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.7.0.2</min><max>1.9.2.4</max></package><extension><name>openssl</name><min>0.9.6</min><max>1.0.1</max></extension></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>cartdefender_actions</name>
|
4 |
+
<version>1.1.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Increase sales with smart targeted popups and offers delivered to your visitors in real time.</summary>
|
10 |
<description>You can instantly use messages and offers which convert your visitors into customers. You focus on your business needs without A/B tests, as Cart Defender learns which popups covert the best and adjusts itself automatically.</description>
|
11 |
+
<notes>Improve handling of non-UTF8 charsets in later PHP versions.
|
12 |
+
Enhance configuration page with links to Cart Defender Portal and registration page
|
13 |
+
</notes>
|
14 |
<authors><author><name>Radoslaw Gliniecki</name><user>Cart_Defender</user><email>radek@cartdefender.com</email></author><author><name>Jan Zankowski</name><user>janzankowski</user><email>jan@cartdefender.com</email></author><author><name>Przemyslaw Gliniecki</name><user>psgliniecki</user><email>psg@cartdefender.com</email></author></authors>
|
15 |
+
<date>2016-07-29</date>
|
16 |
+
<time>11:56:23</time>
|
17 |
+
<contents><target name="magecommunity"><dir name="CartDefender"><dir name="Actions"><dir name="Block"><file name="Script.php" hash="6879aeda8fa9d464124915992a761d00"/></dir><dir name="Helper"><file name="Data.php" hash="3b85a232191fa48f1487687c95c371fc"/></dir><dir name="Model"><file name="Observer.php" hash="f05d5a34beef7ec1f743ba4053321caf"/></dir><dir name="controllers"><file name="CartDefenderSenderController.php" hash="aef1db479967b4cc35623dc34e3979b7"/></dir><dir name="etc"><file name="config.xml" hash="220f0ff171665eb589b24b389fd2787a"/><file name="system.xml" hash="19f9087cbe9e92edde8372abe20f1354"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="CartDefender_Actions.xml" hash="e0458c6a3a4e1ae4210d523e8fcdd6fb"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="actions"><file name="script.phtml" hash="c25ad0d5fcdec392e8a69dc489667a91"/></dir></dir><dir name="layout"><file name="actions.xml" hash="ec83d87d66ef40a87b00bd0851be610f"/></dir></dir></dir></dir></target></contents>
|
18 |
<compatible/>
|
19 |
<dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.7.0.2</min><max>1.9.2.4</max></package><extension><name>openssl</name><min>0.9.6</min><max>1.0.1</max></extension></required></dependencies>
|
20 |
</package>
|