Version Notes
Bugfixes
Download this release
Release Info
Developer | EasySize IVS |
Extension | easysize |
Version | 1.3.6 |
Comparing to | |
See all releases |
Code changes from version 1.3.4 to 1.3.6
- app/code/community/EasySize/SizeGuide/Model/Observer.php +10 -2
- app/code/community/EasySize/SizeGuide/etc/config.xml +1 -1
- app/code/community/EasySize/SizeGuide/sql/sizeguide_setup/{install-1.3.4.php → install-1.3.6.php} +9 -4
- app/design/frontend/base/default/template/sizeguide/easysize.phtml +3 -3
- app/design/frontend/base/default/template/sizeguide/sizefilter.phtml +7 -15
- package.xml +5 -5
app/code/community/EasySize/SizeGuide/Model/Observer.php
CHANGED
@@ -67,9 +67,15 @@ class EasySize_SizeGuide_Model_Observer {
|
|
67 |
$shop_configuration = Mage::getStoreConfig('sizeguide/sizeguide');
|
68 |
$gender_attribute_name = $shop_configuration['sizeguide_gender_attribute'];
|
69 |
$easysize_shop_id = $shop_configuration['sizeguide_shopid'];
|
70 |
-
$easysize_user_id = $_COOKIE['esui'];
|
71 |
|
72 |
-
if(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
Mage::register('easysize_sizefilter_applied', true);
|
74 |
return;
|
75 |
}
|
@@ -128,6 +134,8 @@ class EasySize_SizeGuide_Model_Observer {
|
|
128 |
if(sizeof($filtered_product_ids) > 0) {
|
129 |
$_REQUEST['easysize_sizefilter_has_products'] = true;
|
130 |
|
|
|
|
|
131 |
if (
|
132 |
isset($_POST['easysize_sizefilter']) && $_POST['easysize_sizefilter'] == "enable"
|
133 |
|| isset($_SESSION['easysize_sizefilter']) && $_SESSION['easysize_sizefilter'] == 1 && $_POST['easysize_sizefilter'] != "disable") {
|
67 |
$shop_configuration = Mage::getStoreConfig('sizeguide/sizeguide');
|
68 |
$gender_attribute_name = $shop_configuration['sizeguide_gender_attribute'];
|
69 |
$easysize_shop_id = $shop_configuration['sizeguide_shopid'];
|
|
|
70 |
|
71 |
+
if(isset($_COOKIE['esui'])) {
|
72 |
+
$easysize_user_id = $_COOKIE['esui'];
|
73 |
+
|
74 |
+
if(!is_numeric($easysize_user_id) || is_numeric($easysize_user_id) && $easysize_user_id < 0) {
|
75 |
+
Mage::register('easysize_sizefilter_applied', true);
|
76 |
+
return;
|
77 |
+
}
|
78 |
+
} else {
|
79 |
Mage::register('easysize_sizefilter_applied', true);
|
80 |
return;
|
81 |
}
|
134 |
if(sizeof($filtered_product_ids) > 0) {
|
135 |
$_REQUEST['easysize_sizefilter_has_products'] = true;
|
136 |
|
137 |
+
if(!isset($_POST['easysize_sizefilter'])) { $_POST['easysize_sizefilter'] = ''; }
|
138 |
+
|
139 |
if (
|
140 |
isset($_POST['easysize_sizefilter']) && $_POST['easysize_sizefilter'] == "enable"
|
141 |
|| isset($_SESSION['easysize_sizefilter']) && $_SESSION['easysize_sizefilter'] == 1 && $_POST['easysize_sizefilter'] != "disable") {
|
app/code/community/EasySize/SizeGuide/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<EasySize_SizeGuide>
|
5 |
-
<version>1.3.
|
6 |
</EasySize_SizeGuide>
|
7 |
</modules>
|
8 |
|
2 |
<config>
|
3 |
<modules>
|
4 |
<EasySize_SizeGuide>
|
5 |
+
<version>1.3.6</version>
|
6 |
</EasySize_SizeGuide>
|
7 |
</modules>
|
8 |
|
app/code/community/EasySize/SizeGuide/sql/sizeguide_setup/{install-1.3.4.php → install-1.3.6.php}
RENAMED
@@ -4,9 +4,15 @@
|
|
4 |
$install = $this;
|
5 |
$install->startSetup();
|
6 |
|
7 |
-
|
8 |
-
$
|
9 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
|
11 |
$curl = curl_init();
|
12 |
|
@@ -27,5 +33,4 @@ $response = curl_exec($curl);
|
|
27 |
|
28 |
curl_close($curl);
|
29 |
|
30 |
-
|
31 |
$install->endSetup();
|
4 |
$install = $this;
|
5 |
$install->startSetup();
|
6 |
|
7 |
+
if(Mage::getSingleton('admin/session')->isLoggedIn()) {
|
8 |
+
$user = Mage::getSingleton('admin/session');
|
9 |
+
$user_email = urlencode($user->getUser()->getEmail());
|
10 |
+
$shop_doman = urlencode(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB));
|
11 |
+
} else {
|
12 |
+
$user = 'not_logged_in';
|
13 |
+
$user_email = urlencode('no@email.com');
|
14 |
+
$shop_doman = urlencode(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB));
|
15 |
+
}
|
16 |
|
17 |
$curl = curl_init();
|
18 |
|
33 |
|
34 |
curl_close($curl);
|
35 |
|
|
|
36 |
$install->endSetup();
|
app/design/frontend/base/default/template/sizeguide/easysize.phtml
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
<?php
|
2 |
$easysize_attributes = $this->getRequiredAttributes();
|
3 |
-
|
|
|
4 |
<script type="text/javascript" src="https://webapp.easysize.me/web_app_v1.0/js/easysize.js"></script>
|
5 |
<script>
|
6 |
-
var EasySize = new EasySize(<?php echo $easysize_attributes; ?>);
|
7 |
-
|
8 |
try {
|
|
|
9 |
EasySize.start();
|
10 |
} catch(e) {
|
11 |
console.log(e);
|
1 |
<?php
|
2 |
$easysize_attributes = $this->getRequiredAttributes();
|
3 |
+
$easysize_attributes_decoded = json_decode($easysize_attributes);
|
4 |
+
if(isset($easysize_attributes_decoded) && isset($easysize_attributes_decoded->product_id)): ?>
|
5 |
<script type="text/javascript" src="https://webapp.easysize.me/web_app_v1.0/js/easysize.js"></script>
|
6 |
<script>
|
|
|
|
|
7 |
try {
|
8 |
+
var EasySize = new EasySize(<?php echo $easysize_attributes; ?>);
|
9 |
EasySize.start();
|
10 |
} catch(e) {
|
11 |
console.log(e);
|
app/design/frontend/base/default/template/sizeguide/sizefilter.phtml
CHANGED
@@ -1,21 +1,13 @@
|
|
1 |
<?php if(isset($_REQUEST['easysize_sizefilter_has_products']) && $_REQUEST['easysize_sizefilter_has_products'] == true): ?>
|
2 |
<form class="easysize-sizefilter easysize-sizefilter-custom" method="POST">
|
3 |
-
<?php if(isset($_POST['easysize_sizefilter'])
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
<input type="hidden" name="easysize_sizefilter" value="disable"/>
|
9 |
-
<input class="easysize-sizefilter-turn-off" type="submit" value="Turn off 'shop by size'"/>
|
10 |
-
<?php endif; ?>
|
11 |
<?php else: ?>
|
12 |
-
|
13 |
-
|
14 |
-
<input type="submit" value="Shop by size"/>
|
15 |
-
<?php else: ?>
|
16 |
-
<input type="hidden" name="easysize_sizefilter" value="disable"/>
|
17 |
-
<input class="easysize-sizefilter-turn-off" type="submit" value="Turn off 'shop by size'"/>
|
18 |
-
<?php endif; ?>
|
19 |
<?php endif; ?>
|
20 |
</form>
|
21 |
<?php endif; ?>
|
1 |
<?php if(isset($_REQUEST['easysize_sizefilter_has_products']) && $_REQUEST['easysize_sizefilter_has_products'] == true): ?>
|
2 |
<form class="easysize-sizefilter easysize-sizefilter-custom" method="POST">
|
3 |
+
<?php if(isset($_POST['easysize_sizefilter']) && $_POST['easysize_sizefilter'] == 'disable' ||
|
4 |
+
isset($_SESSION['easysize_sizefilter']) && $_SESSION['easysize_sizefilter'] != 1 ||
|
5 |
+
!isset($_POST['easysize_sizefilter']) && !isset($_SESSION['easysize_sizefilter'])): ?>
|
6 |
+
<input type="hidden" name="easysize_sizefilter" value="enable"/>
|
7 |
+
<input type="submit" value="Shop by size"/>
|
|
|
|
|
|
|
8 |
<?php else: ?>
|
9 |
+
<input type="hidden" name="easysize_sizefilter" value="disable"/>
|
10 |
+
<input class="easysize-sizefilter-turn-off" type="submit" value="Show all"/>
|
|
|
|
|
|
|
|
|
|
|
11 |
<?php endif; ?>
|
12 |
</form>
|
13 |
<?php endif; ?>
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>easysize</name>
|
4 |
-
<version>1.3.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="https://www.easysize.me/terms-of-use/">EasySize</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>EasySize sizing solution</summary>
|
10 |
<description>EasySize was founded in October 2014 by Gulnaz Khusainova and is currently based in Copenhagen, Denmark. EasySize’s aim is to improve the online shopping experience for customers and empower retailers to grow their online businesses by using smart technology to accurately understand what a customer’s ideal fit is. To date, EasySize has helped over 400,000 unique users find their ideal fit all over the world. Please visit easysize.me for more information.</description>
|
11 |
-
<notes>Bugfixes
|
12 |
<authors><author><name>EasySize IVS</name><user>EasySize</user><email>gk@easysize.me</email></author></authors>
|
13 |
-
<date>2016-08-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="EasySize"><dir name="SizeGuide"><dir name="Block"><file name="Data.php" hash="f0db0b5c6ddb7942a7d8ad4df847fe2f"/></dir><dir name="Helper"><file name="Data.php" hash="e1f1c548146a5eedc58222620232a758"/></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></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>easysize</name>
|
4 |
+
<version>1.3.6</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="https://www.easysize.me/terms-of-use/">EasySize</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>EasySize sizing solution</summary>
|
10 |
<description>EasySize was founded in October 2014 by Gulnaz Khusainova and is currently based in Copenhagen, Denmark. EasySize’s aim is to improve the online shopping experience for customers and empower retailers to grow their online businesses by using smart technology to accurately understand what a customer’s ideal fit is. To date, EasySize has helped over 400,000 unique users find their ideal fit all over the world. Please visit easysize.me for more information.</description>
|
11 |
+
<notes>Bugfixes</notes>
|
12 |
<authors><author><name>EasySize IVS</name><user>EasySize</user><email>gk@easysize.me</email></author></authors>
|
13 |
+
<date>2016-08-15</date>
|
14 |
+
<time>14:36:45</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="EasySize"><dir name="SizeGuide"><dir name="Block"><file name="Data.php" hash="f0db0b5c6ddb7942a7d8ad4df847fe2f"/></dir><dir name="Helper"><file name="Data.php" hash="e1f1c548146a5eedc58222620232a758"/></dir><dir name="Model"><file name="Observer.php" hash="d01554bad6594a5a1b62009e2374c0a4"/><dir name="Resource"><file name="Setup.php" hash="db68d16089806da3849ab919e4e35a01"/></dir><file name="ShopAttributes.php" hash="f53c64e27f9a3c7f2b2a11ea74afe01e"/></dir><dir name="etc"><file name="config.xml" hash="b4c0ef767f41dd02603f807261336ff5"/><file name="system.xml" hash="3b9d574c828581df0c306608eb0aeae1"/></dir><dir name="sql"><dir name="sizeguide_setup"><file name="install-1.3.6.php" hash="f105323c8b2ab85bcf002fa382b0ad00"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="sizeguide"><file name="easysize.phtml" hash="ca46dec861bb42e6bb931dfc146b9e35"/><file name="sizefilter.phtml" hash="1fa6522b7f6482c9bdf42c4360b9b801"/></dir></dir><dir name="layout"><file name="sizeguide.xml" hash="abb47cb6331cc1271de76dd485bc374f"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="EasySize_SizeGuide.xml" hash="2397289fc71f8ddb23dec37aefdf4779"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="easysize"><dir name="css"><file name="easysize.sizefilter.css" hash="939a9901108e5daa86252cd98d8b9824"/></dir></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|