Version Notes
Bug fixing release
Download this release
Release Info
Developer | Futurenext |
Extension | Futurenext_Zakeke |
Version | 1.1.1.0 |
Comparing to | |
See all releases |
Code changes from version 1.1.0.0 to 1.1.1.0
- app/code/community/Futurenext/Zakeke/Block/Customize.php +2 -38
- app/code/community/Futurenext/Zakeke/etc/config.xml +1 -1
- app/design/frontend/base/default/layout/zakeke.xml +2 -0
- app/design/frontend/base/default/template/zakeke/customize.phtml +1 -1
- app/design/frontend/base/default/template/zakeke/customizeButton.phtml +3 -3
- js/zakeke/customize.js +6 -2
- package.xml +4 -4
app/code/community/Futurenext/Zakeke/Block/Customize.php
CHANGED
@@ -17,42 +17,6 @@
|
|
17 |
*/
|
18 |
class Futurenext_Zakeke_Block_Customize extends Futurenext_Zakeke_Block_View
|
19 |
{
|
20 |
-
const WIDTH_BREAKPOINT = 768;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Check the customer device property.
|
24 |
-
*
|
25 |
-
* @return bool
|
26 |
-
*/
|
27 |
-
private function isLarge()
|
28 |
-
{
|
29 |
-
$resolution = Mage::app()->getRequest()->getParam('resolution');
|
30 |
-
if ($resolution === null) {
|
31 |
-
return true;
|
32 |
-
}
|
33 |
-
|
34 |
-
$parts = explode('x', $resolution);
|
35 |
-
$width = (int)$parts[0];
|
36 |
-
return $width >= self::WIDTH_BREAKPOINT;
|
37 |
-
}
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Get the Zakeke iframe.
|
41 |
-
*
|
42 |
-
* @return string
|
43 |
-
*/
|
44 |
-
public function iframeHtml()
|
45 |
-
{
|
46 |
-
if ($this->isLarge()) {
|
47 |
-
$html = '<iframe id="zakeke-frame" src="' . $this->getLargeUrl() . '" style="min-height: 719px; width: 100%" frameBorder="0"></iframe>';
|
48 |
-
} else {
|
49 |
-
$html = '<iframe id="zakeke-frame" src="' . $this->getMobileUrl() .'" style="position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 999999999; height: 100%; width: 100%;" frameBorder="0"></iframe>'
|
50 |
-
. '<style>body { overflow: hidden }</style>';
|
51 |
-
}
|
52 |
-
|
53 |
-
return $html . '<script> document.getElementById("zakeke-frame").scrollIntoView({block: "start", behavior: "smooth"}); </script>';
|
54 |
-
}
|
55 |
-
|
56 |
/**
|
57 |
* Zakeke authentication token.
|
58 |
*
|
@@ -193,8 +157,8 @@ class Futurenext_Zakeke_Block_Customize extends Futurenext_Zakeke_Block_View
|
|
193 |
|
194 |
$data = array(
|
195 |
'zakekeUrl' => Futurenext_Zakeke_Helper_Data::ZAKEKE_BASE_URL,
|
196 |
-
'
|
197 |
-
'
|
198 |
'params' => Mage::app()->getRequest()->getParams(),
|
199 |
'colorAttributeId' => $this->getColorAttributeId(),
|
200 |
'checkoutUrl' => $this->getAddtocartFormTarget(),
|
17 |
*/
|
18 |
class Futurenext_Zakeke_Block_Customize extends Futurenext_Zakeke_Block_View
|
19 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
/**
|
21 |
* Zakeke authentication token.
|
22 |
*
|
157 |
|
158 |
$data = array(
|
159 |
'zakekeUrl' => Futurenext_Zakeke_Helper_Data::ZAKEKE_BASE_URL,
|
160 |
+
'customizerLargeUrl' => $this->getLargeUrl(),
|
161 |
+
'customizerSmallUrl' => $this->getMobileUrl(),
|
162 |
'params' => Mage::app()->getRequest()->getParams(),
|
163 |
'colorAttributeId' => $this->getColorAttributeId(),
|
164 |
'checkoutUrl' => $this->getAddtocartFormTarget(),
|
app/code/community/Futurenext/Zakeke/etc/config.xml
CHANGED
@@ -12,7 +12,7 @@
|
|
12 |
<config>
|
13 |
<modules>
|
14 |
<Futurenext_Zakeke>
|
15 |
-
<version>1.1.
|
16 |
</Futurenext_Zakeke>
|
17 |
</modules>
|
18 |
|
12 |
<config>
|
13 |
<modules>
|
14 |
<Futurenext_Zakeke>
|
15 |
+
<version>1.1.1.0</version>
|
16 |
</Futurenext_Zakeke>
|
17 |
</modules>
|
18 |
|
app/design/frontend/base/default/layout/zakeke.xml
CHANGED
@@ -59,6 +59,7 @@
|
|
59 |
<reference name="head">
|
60 |
<action method="addJs"><script>zakeke/jquery.js</script></action>
|
61 |
<action method="addJs"><script>zakeke/customize.js</script></action>
|
|
|
62 |
</reference>
|
63 |
<reference name="content">
|
64 |
<block type="futurenext_zakeke/customize_add"
|
@@ -74,6 +75,7 @@
|
|
74 |
<reference name="head">
|
75 |
<action method="addJs"><script>zakeke/jquery.js</script></action>
|
76 |
<action method="addJs"><script>zakeke/customize.js</script></action>
|
|
|
77 |
</reference>
|
78 |
<reference name="content">
|
79 |
<block type="futurenext_zakeke/customize_configure"
|
59 |
<reference name="head">
|
60 |
<action method="addJs"><script>zakeke/jquery.js</script></action>
|
61 |
<action method="addJs"><script>zakeke/customize.js</script></action>
|
62 |
+
<action method="addCss"><stylesheet>css/zakeke/zakeke.css</stylesheet></action>
|
63 |
</reference>
|
64 |
<reference name="content">
|
65 |
<block type="futurenext_zakeke/customize_add"
|
75 |
<reference name="head">
|
76 |
<action method="addJs"><script>zakeke/jquery.js</script></action>
|
77 |
<action method="addJs"><script>zakeke/customize.js</script></action>
|
78 |
+
<action method="addCss"><stylesheet>css/zakeke/zakeke.css</stylesheet></action>
|
79 |
</reference>
|
80 |
<reference name="content">
|
81 |
<block type="futurenext_zakeke/customize_configure"
|
app/design/frontend/base/default/template/zakeke/customize.phtml
CHANGED
@@ -13,7 +13,7 @@
|
|
13 |
|
14 |
<?php if ($this->isProductCustomizable()): ?>
|
15 |
<div id="zakeke-container">
|
16 |
-
|
17 |
</div>
|
18 |
|
19 |
<form id="zakeke-addtocart" style="display: none">
|
13 |
|
14 |
<?php if ($this->isProductCustomizable()): ?>
|
15 |
<div id="zakeke-container">
|
16 |
+
<iframe id="zakeke-frame" frameBorder="0"></iframe>
|
17 |
</div>
|
18 |
|
19 |
<form id="zakeke-addtocart" style="display: none">
|
app/design/frontend/base/default/template/zakeke/customizeButton.phtml
CHANGED
@@ -20,8 +20,8 @@
|
|
20 |
(function (config) {
|
21 |
'use strict';
|
22 |
|
23 |
-
var zakekeButton =
|
24 |
-
addtoCartForm =
|
25 |
observer = new MutationObserver(function() {
|
26 |
zakekeButton.removeAttribute('onclick');
|
27 |
});
|
@@ -43,7 +43,7 @@
|
|
43 |
|
44 |
zakekeButton.disabled = true;
|
45 |
|
46 |
-
var resolutionInput =
|
47 |
resolutionInput.type = 'hidden';
|
48 |
resolutionInput.name = 'resolution';
|
49 |
resolutionInput.value = window.screen.width + 'x' + window.screen.height;
|
20 |
(function (config) {
|
21 |
'use strict';
|
22 |
|
23 |
+
var zakekeButton = document.getElementById('zakeke-customize-button'),
|
24 |
+
addtoCartForm = document.getElementById('product_addtocart_form'),
|
25 |
observer = new MutationObserver(function() {
|
26 |
zakekeButton.removeAttribute('onclick');
|
27 |
});
|
43 |
|
44 |
zakekeButton.disabled = true;
|
45 |
|
46 |
+
var resolutionInput = document.createElement('INPUT');
|
47 |
resolutionInput.type = 'hidden';
|
48 |
resolutionInput.name = 'resolution';
|
49 |
resolutionInput.value = window.screen.width + 'x' + window.screen.height;
|
js/zakeke/customize.js
CHANGED
@@ -135,10 +135,14 @@ function zakekeCustomizationAdd(config) {
|
|
135 |
}
|
136 |
}, false);
|
137 |
|
138 |
-
if (
|
|
|
|
|
|
|
|
|
139 |
window.addEventListener('resize', function () {
|
140 |
iframe.style.minHeight = window.innerHeight + 'px';
|
141 |
-
|
142 |
});
|
143 |
}
|
144 |
}
|
135 |
}
|
136 |
}, false);
|
137 |
|
138 |
+
if (window.matchMedia('(min-width: 768px)').matches) {
|
139 |
+
iframe.src = config.customizerLargeUrl;
|
140 |
+
iframe.scrollIntoView({block: 'start', behavior: 'smooth'});
|
141 |
+
} else {
|
142 |
+
iframe.src = config.customizerSmallUrl;
|
143 |
window.addEventListener('resize', function () {
|
144 |
iframe.style.minHeight = window.innerHeight + 'px';
|
145 |
+
document.body.style.overflow = 'hidden';
|
146 |
});
|
147 |
}
|
148 |
}
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Futurenext_Zakeke</name>
|
4 |
-
<version>1.1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="https://www.zakeke.com/Contracts/GeneralConditions">Zakeke license</license>
|
7 |
<channel>community</channel>
|
@@ -10,9 +10,9 @@
|
|
10 |
<description>Zakeke is an innovative cloud platform that allows any Magento store to integrate into the system a 2D and 3D complete customizer of products, giving the possibility to customize "live" products for sale to the end customer.</description>
|
11 |
<notes>Bug fixing release</notes>
|
12 |
<authors><author><name>Futurenext</name><user>futurenext</user><email>info@zakeke.com</email></author></authors>
|
13 |
-
<date>2017-05-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="Futurenext"><dir name="Zakeke"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Items"><dir name="Column"><dir name="Zakeke"><file name="Name.php" hash="44ee4fa109c9fbf1283cf2a4a4370cab"/></dir></dir></dir></dir></dir><file name="CartItemRenderer.php" hash="7b97013da50098c9c2360fd96aa9c5b6"/><file name="CheckoutItemRenderer.php" hash="02d4244d1274ac023c7fe997fcedf833"/><dir name="Customize"><file name="Add.php" hash="6d206e080ed91ed1ffbdd7528d89be2f"/><file name="Configure.php" hash="e815ed877af5727bd20289429122107b"/></dir><file name="Customize.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php><extension><name>curl</name><min/><max/></extension></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Futurenext_Zakeke</name>
|
4 |
+
<version>1.1.1.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="https://www.zakeke.com/Contracts/GeneralConditions">Zakeke license</license>
|
7 |
<channel>community</channel>
|
10 |
<description>Zakeke is an innovative cloud platform that allows any Magento store to integrate into the system a 2D and 3D complete customizer of products, giving the possibility to customize "live" products for sale to the end customer.</description>
|
11 |
<notes>Bug fixing release</notes>
|
12 |
<authors><author><name>Futurenext</name><user>futurenext</user><email>info@zakeke.com</email></author></authors>
|
13 |
+
<date>2017-05-25</date>
|
14 |
+
<time>07:21:18</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Futurenext"><dir name="Zakeke"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Items"><dir name="Column"><dir name="Zakeke"><file name="Name.php" hash="44ee4fa109c9fbf1283cf2a4a4370cab"/></dir></dir></dir></dir></dir><file name="CartItemRenderer.php" hash="7b97013da50098c9c2360fd96aa9c5b6"/><file name="CheckoutItemRenderer.php" hash="02d4244d1274ac023c7fe997fcedf833"/><dir name="Customize"><file name="Add.php" hash="6d206e080ed91ed1ffbdd7528d89be2f"/><file name="Configure.php" hash="e815ed877af5727bd20289429122107b"/></dir><file name="Customize.php" hash="56a223ea2c753b63ff1460c7356b90e1"/><file name="CustomizeButton.php" hash="6dddb69fa8c3b5e9a397e2b9bb328301"/><file name="ModuleChecker.php" hash="8df2615bc87c4e656584ee80a51a9b31"/><file name="SalesItemRenderer.php" hash="2b470077ecef18ec49eab960409914ef"/><file name="View.php" hash="0c5a7231813b3737e069ad1ca3ccf809"/></dir><dir name="Helper"><file name="Data.php" hash="fcee50ae4edadc2df205299f598bee6f"/><file name="ZakekeApi.php" hash="9556204f7e6fad0d5917e9dd19819d30"/></dir><dir name="Model"><dir name="Api2"><dir name="Colors"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="0b1ad3d9656fd5b729d1f7a626359e19"/></dir></dir></dir><file name="Colors.php" hash="f9f004c13ef5357bb3d5e798208e7902"/><dir name="ProductAttribute"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="40a6a5def798a5d0e8bcee1ac8c8a4d8"/></dir></dir></dir><file name="ProductAttribute.php" hash="97ea0f12646d9f1f1ab6916ed41f04dc"/><dir name="ProductOptions"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="6c6dd2079f58a654b60c465cc1fbc357"/></dir></dir></dir><file name="ProductOptions.php" hash="5e1234a158723dc5a8e2c3ccf6e152cf"/><dir name="Settings"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="e982e900acb2a4ac267cdda95c87cd35"/></dir></dir></dir><file name="Settings.php" hash="2f7fa711c00e75d3c4afabb007145c49"/><dir name="ZakekeEnabled"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="b107fafe0fa69827bebadfd66c6274d9"/></dir></dir></dir><file name="ZakekeEnabled.php" hash="0f5c210fa296b30283aa41f500c3e3b9"/></dir><file name="ModuleList.php" hash="929479d45eb4252daaff6e4a40733b09"/><file name="Observer.php" hash="071af0e4a3a5b40a10b71aa55df3c6d6"/><dir name="Resource"><file name="Setup.php" hash="42a7681d56fcd5ad06f75a223ef420f1"/><dir name="ZakekeEnabled"><file name="Collection.php" hash="fdadf3c788c4b5e175e4a20501116027"/></dir><file name="ZakekeEnabled.php" hash="f32fb4b25f1f78287a38c3bd170bdbaa"/></dir><file name="ZakekeEnabled.php" hash="9b31e4606dcf8622092f638ca9f3920c"/></dir><dir name="controllers"><file name="CustomizeController.php" hash="10671c9bfc00cd41c6d983d938fac06a"/><dir name="Zakeke"><file name="ModuleCheckerController.php" hash="b92d1f5b155479a85f358f1356ccdd29"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="22cdf40e6e83327b58f9e97fa17e8f68"/><file name="api2.xml" hash="9af2352582ae62a261d07f58e64d5e77"/><file name="config.xml" hash="3b4a19b45cc6545477bba95501a958a1"/><file name="system.xml" hash="eccf09b5aed08b88495340b03058edc2"/></dir><dir name="sql"><dir name="zakeke_setup"><file name="install-1.0.0.0.php" hash="64a3954b20b3142886446ac432a04b21"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Futurenext_Zakeke.xml" hash="f309795ee4b758943868cb1f7459fb9c"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="zakeke.xml" hash="d296777d398f6af473adfb8a15477b47"/></dir><dir name="template"><dir name="zakeke"><file name="modulechecker.phtml" hash="b3101729cc5030c645770af6a814cd26"/><dir name="sales"><dir name="items"><dir name="column"><dir name="zakeke"><file name="name.phtml" hash="723ecc1f6c0ad17495389b8e012d72e3"/></dir></dir></dir><dir name="order"><dir name="creditmemo"><dir name="create"><dir name="items"><dir name="renderer"><file name="zakeke.phtml" hash="6294158a08ad56639c3a57a4d88c2f81"/></dir></dir></dir><dir name="view"><dir name="items"><dir name="renderer"><file name="zakeke.phtml" hash="4421194ecc884d934f099a256062cfcb"/></dir></dir></dir></dir><dir name="invoice"><dir name="create"><dir name="items"><dir name="renderer"><file name="zakeke.phtml" hash="0da287c2ae4a87e0e768fdad0d0adfd3"/></dir></dir></dir><dir name="view"><dir name="items"><dir name="renderer"><file name="zakeke.phtml" hash="42f0631dd2ce37d9d7289b6d2785b222"/></dir></dir></dir></dir><dir name="view"><dir name="items"><dir name="renderer"><file name="zakeke.phtml" hash="867a37a7072be0cba7dc9f7c03cec0d4"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="zakeke.xml" hash="885fbe6e53a1c454f8af1303e9f328ad"/></dir><dir name="template"><dir name="zakeke"><dir name="cart"><dir name="item"><file name="default.phtml" hash="bfb6e4a50c69ccfdfe66ad8c8711afdd"/></dir><file name="minicart.phtml" hash="1e7398e848e024bbeae11ed1550de3c8"/></dir><dir name="customization"><file name="add.phtml" hash="c647328e435fbe6dbe61e325e7a90f89"/></dir><file name="customize.phtml" hash="c090c24b405b302b81672107737cac9f"/><file name="customizeButton.phtml" hash="3330f773ff0c3deb194dfb19b9877ebb"/></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="zakeke"><file name="customize.js" hash="7a09f117777aca47212df3ad6617aef9"/><file name="jquery.js" hash="105112a8a757f683234e01dec3799022"/><file name="preview.js" hash="a22a32209982d2dda7561cff723b49bb"/></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="zakeke"><file name="modulechecker.css" hash="e7fd6efc953f7e2aae234607a0a379a8"/></dir></dir></dir></dir></target><target name="magelocale"><dir name="it_IT"><file name="Futurenext_Zakeke.csv" hash="0d374552863dc52633b9a77526cf5ac9"/></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php><extension><name>curl</name><min/><max/></extension></required></dependencies>
|
18 |
</package>
|