Version Notes
Created 15th March, 2017 Compatibility: 1.9.2.4 - BaseUrl with store code
Download this release
Release Info
Developer | ROI Hunter |
Extension | roihunter_easy |
Version | 1.0.5 |
Comparing to | |
See all releases |
Code changes from version 1.0.3 to 1.0.5
- app/code/community/Businessfactory/Roihuntereasy/Block/Adminhtml/Admin.php +5 -1
- app/code/community/Businessfactory/Roihuntereasy/controllers/StoredetailsController.php +2 -0
- app/code/community/Businessfactory/Roihuntereasy/etc/config.xml +1 -1
- app/design/adminhtml/default/default/template/businessfactory_roihuntereasy/admin.phtml +54 -72
- package.xml +6 -6
app/code/community/Businessfactory/Roihuntereasy/Block/Adminhtml/Admin.php
CHANGED
@@ -15,7 +15,11 @@ class Businessfactory_Roihuntereasy_Block_Adminhtml_Admin extends Mage_Adminhtml
|
|
15 |
|
16 |
public function getStoreBaseUrl()
|
17 |
{
|
18 |
-
|
|
|
|
|
|
|
|
|
19 |
}
|
20 |
|
21 |
public function getStoreName()
|
15 |
|
16 |
public function getStoreBaseUrl()
|
17 |
{
|
18 |
+
$storeId = Mage::app()
|
19 |
+
->getWebsite(true)
|
20 |
+
->getDefaultGroup()
|
21 |
+
->getDefaultStoreId();
|
22 |
+
return Mage::app()->getStore($storeId)->getBaseUrl();
|
23 |
}
|
24 |
|
25 |
public function getStoreName()
|
app/code/community/Businessfactory/Roihuntereasy/controllers/StoredetailsController.php
CHANGED
@@ -75,6 +75,8 @@ class Businessfactory_Roihuntereasy_StoredetailsController extends Mage_Core_Con
|
|
75 |
$resultData = $_SERVER;
|
76 |
$resultData['Magento_Mode'] = Mage::getIsDeveloperMode() ? "developer" : "production";;
|
77 |
$resultData['Php_Version'] = phpversion();
|
|
|
|
|
78 |
|
79 |
$response->setBody(json_encode($resultData));
|
80 |
} catch (Exception $exception) {
|
75 |
$resultData = $_SERVER;
|
76 |
$resultData['Magento_Mode'] = Mage::getIsDeveloperMode() ? "developer" : "production";;
|
77 |
$resultData['Php_Version'] = phpversion();
|
78 |
+
$resultData['Magento_Version'] = Mage::getVersion();
|
79 |
+
$resultData['ROI_Hunter_Easy_Version'] = (string) Mage::getConfig()->getNode()->modules->Businessfactory_Roihuntereasy->version;
|
80 |
|
81 |
$response->setBody(json_encode($resultData));
|
82 |
} catch (Exception $exception) {
|
app/code/community/Businessfactory/Roihuntereasy/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Businessfactory_Roihuntereasy>
|
5 |
-
<version>1.0.
|
6 |
</Businessfactory_Roihuntereasy>
|
7 |
</modules>
|
8 |
<admin>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Businessfactory_Roihuntereasy>
|
5 |
+
<version>1.0.5</version>
|
6 |
</Businessfactory_Roihuntereasy>
|
7 |
</modules>
|
8 |
<admin>
|
app/design/adminhtml/default/default/template/businessfactory_roihuntereasy/admin.phtml
CHANGED
@@ -1,78 +1,48 @@
|
|
1 |
-
<!--"http://localhost:3000" "http://magento.roihunter.com/" -->
|
2 |
-
<iframe src="//magento.roihunter.com/"
|
3 |
-
scrolling="yes"
|
4 |
-
frameBorder="0"
|
5 |
-
allowfullscreen
|
6 |
-
align="center"
|
7 |
-
style="width: 100%"
|
8 |
-
id="RoihuntereasyIFrame">
|
9 |
-
<p>Your browser does not support iFrames.</p>
|
10 |
-
</iframe>
|
11 |
-
|
12 |
-
<!--
|
13 |
-
<p>MainItem data: ?php echo($this->getMainItemEntry() ? $this->getMainItemEntry()->toString() : "Empty"); ?></p>
|
14 |
-
<p>AccessToken data: ?php echo($this->getMainItemEntry() ? $this->getMainItemEntry()->getAccessToken() : "No token"); ?></p>
|
15 |
-
<p>Creation status: ?php echo($this->getMainItemEntry() ? $this->getMainItemEntry()->getCreationState() : "No status"); ?></p>
|
16 |
-
<p>Store currency: ?php echo $this->getStoreCurrency()?></p>
|
17 |
-
<p>Store language: ?php echo $this->getStoreLanguage()?></p>
|
18 |
-
<p>Store url: ?php echo $this->getStoreBaseUrl()?></p>
|
19 |
-
-->
|
20 |
-
|
21 |
-
<div id="loadingMessage">Loading...</div>
|
22 |
-
|
23 |
<script>
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
var customerId = "<?php echo($this->getMainItemEntry() ? $this->getMainItemEntry()->getCustomerId() : null); ?>";
|
31 |
-
var accessToken = "<?php echo($this->getMainItemEntry() ? $this->getMainItemEntry()->getAccessToken() : null); ?>";
|
32 |
-
var clientToken = "<?php echo($this->getMainItemEntry() ? $this->getMainItemEntry()->getClientToken() : null); ?>";
|
33 |
-
var managedMerchants = "<?php echo($this->getMainItemEntry() ? $this->getMainItemEntry()->getManagedMerchants() : null); ?>";
|
34 |
-
var adultOriented = "<?php echo($this->getMainItemEntry() ? $this->getMainItemEntry()->getAdultOriented() : null); ?>";
|
35 |
-
var status = "<?php echo($this->getMainItemEntry() ? $this->getMainItemEntry()->getStatus() : null); ?>";
|
36 |
-
var errors = "<?php echo($this->getMainItemEntry() ? $this->getMainItemEntry()->getErrors() : null); ?>";
|
37 |
-
var creationState = "<?php echo($this->getMainItemEntry() ? $this->getMainItemEntry()->getCreationState() : null); ?>";
|
38 |
-
var magentoMode = "<?php echo $this->getDevelopmentMode(); ?>";
|
39 |
-
|
40 |
-
console.log("mode" + magentoMode)
|
41 |
|
42 |
-
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
-
|
46 |
-
|
47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
|
|
|
|
58 |
|
59 |
-
|
60 |
-
"customerId": customerId,
|
61 |
-
"accessToken": accessToken,
|
62 |
-
"clientToken": clientToken,
|
63 |
-
"managedMerchants": managedMerchants,
|
64 |
-
"adultOriented": adultOriented,
|
65 |
-
"status": status,
|
66 |
-
"errors": errors,
|
67 |
-
"creationState": creationState
|
68 |
-
}, '*'
|
69 |
-
);
|
70 |
-
}, 1000);
|
71 |
-
});
|
72 |
-
</script>
|
73 |
-
|
74 |
-
<script>
|
75 |
-
// Create IE + others compatible event handler
|
76 |
var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
|
77 |
var eventer = window[eventMethod];
|
78 |
var messageEvent = eventMethod == "attachEvent" ? "onmessage" : "message";
|
@@ -82,10 +52,22 @@
|
|
82 |
if (e.data.type === "roihunter_magento_plugin_height") {
|
83 |
// Change size of iFrame to correspond new height of content
|
84 |
// console.log("new height: " + e.data.height);
|
85 |
-
document.getElementById('
|
86 |
} else {
|
87 |
// console.log("Unknown message event", e);
|
88 |
}
|
89 |
}, false);
|
90 |
-
|
91 |
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<script>
|
2 |
+
function iFrameLoad() {
|
3 |
+
var storeUrl = "<?php echo $this->getStoreBaseUrl(); ?>";
|
4 |
+
var storeName = "<?php echo $this->getStoreName(); ?>";
|
5 |
+
var storeCurrency = "<?php echo $this->getStoreCurrency(); ?>";
|
6 |
+
var storeLanguage = "<?php echo $this->getStoreLanguage(); ?>";
|
7 |
+
var storeCountry = "<?php echo $this->getStoreCountry(); ?>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
+
var customerId = "<?php echo($this->getMainItemEntry() ? $this->getMainItemEntry()->getCustomerId() : null); ?>";
|
10 |
+
var accessToken = "<?php echo($this->getMainItemEntry() ? $this->getMainItemEntry()->getAccessToken() : null); ?>";
|
11 |
+
var clientToken = "<?php echo($this->getMainItemEntry() ? $this->getMainItemEntry()->getClientToken() : null); ?>";
|
12 |
+
var managedMerchants = "<?php echo($this->getMainItemEntry() ? $this->getMainItemEntry()->getManagedMerchants() : null); ?>";
|
13 |
+
var adultOriented = "<?php echo($this->getMainItemEntry() ? $this->getMainItemEntry()->getAdultOriented() : null); ?>";
|
14 |
+
var status = "<?php echo($this->getMainItemEntry() ? $this->getMainItemEntry()->getStatus() : null); ?>";
|
15 |
+
var errors = "<?php echo($this->getMainItemEntry() ? $this->getMainItemEntry()->getErrors() : null); ?>";
|
16 |
+
var creationState = "<?php echo($this->getMainItemEntry() ? $this->getMainItemEntry()->getCreationState() : null); ?>";
|
17 |
+
var magentoMode = "<?php echo $this->getDevelopmentMode(); ?>";
|
18 |
+
|
19 |
+
console.log("mode: " + magentoMode);
|
20 |
+
console.log("baseUrl: " + storeUrl);
|
21 |
|
22 |
+
// pass base url to React iframe fro future API calls to this site
|
23 |
+
var iFrame = document.getElementById('RoiHunterEasyIFrame');
|
24 |
+
iFrame.contentWindow.postMessage({
|
25 |
+
"type": "roihunter_magento_plugin",
|
26 |
+
"storeUrl": storeUrl,
|
27 |
+
"storeName": storeName,
|
28 |
+
"storeCurrency": storeCurrency,
|
29 |
+
"storeLanguage": storeLanguage,
|
30 |
+
"storeCountry": storeCountry,
|
31 |
+
"magentoMode": magentoMode,
|
32 |
|
33 |
+
// Database part
|
34 |
+
"customerId": customerId,
|
35 |
+
"accessToken": accessToken,
|
36 |
+
"clientToken": clientToken,
|
37 |
+
"managedMerchants": managedMerchants,
|
38 |
+
"adultOriented": adultOriented,
|
39 |
+
"status": status,
|
40 |
+
"errors": errors,
|
41 |
+
"creationState": creationState
|
42 |
+
}, '*'
|
43 |
+
);
|
44 |
|
45 |
+
// Create IE + others compatible event handler
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
|
47 |
var eventer = window[eventMethod];
|
48 |
var messageEvent = eventMethod == "attachEvent" ? "onmessage" : "message";
|
52 |
if (e.data.type === "roihunter_magento_plugin_height") {
|
53 |
// Change size of iFrame to correspond new height of content
|
54 |
// console.log("new height: " + e.data.height);
|
55 |
+
document.getElementById('RoiHunterEasyIFrame').style.height = e.data.height + 'px';
|
56 |
} else {
|
57 |
// console.log("Unknown message event", e);
|
58 |
}
|
59 |
}, false);
|
60 |
+
}
|
61 |
</script>
|
62 |
+
|
63 |
+
<!--"http://localhost:3000" "http://magento.roihunter.com/" -->
|
64 |
+
<iframe src="//magento.roihunter.com/"
|
65 |
+
id="RoiHunterEasyIFrame"
|
66 |
+
scrolling="yes"
|
67 |
+
frameBorder="0"
|
68 |
+
allowfullscreen
|
69 |
+
align="center"
|
70 |
+
onload="iFrameLoad()"
|
71 |
+
style="width: 100%; min-height: 500px">
|
72 |
+
<p>Your browser does not support iFrames.</p>
|
73 |
+
</iframe>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>roihunter_easy</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license>AFL 3.0</license>
|
7 |
<channel>community</channel>
|
@@ -40,11 +40,11 @@ Extension update: 0.00 &#x20AC;&#xD;
|
|
40 |
No support fee&#xD;
|
41 |
No contract duration&#xD;
|
42 |
* Extension do not cover your Google Adwords Ad Spend. </description>
|
43 |
-
<notes>Created
|
44 |
<authors><author><name>ROI Hunter</name><user>MAG003490427</user><email>petr.skornok@b.cz</email></author></authors>
|
45 |
-
<date>2017-03-
|
46 |
-
<time>
|
47 |
-
<contents><target name="magecommunity"><dir name="Businessfactory"><dir name="Roihuntereasy"><dir name="Block"><file name="AddedToCartAnalytics.php" hash="eeb701f487b06ed82e0754aefb192fab"/><dir name="Adminhtml"><file name="Admin.php" hash="
|
48 |
<compatible/>
|
49 |
-
<dependencies><required><php><min>5.
|
50 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>roihunter_easy</name>
|
4 |
+
<version>1.0.5</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>AFL 3.0</license>
|
7 |
<channel>community</channel>
|
40 |
No support fee&#xD;
|
41 |
No contract duration&#xD;
|
42 |
* Extension do not cover your Google Adwords Ad Spend. </description>
|
43 |
+
<notes>Created 15th March, 2017 Compatibility: 1.9.2.4 - BaseUrl with store code</notes>
|
44 |
<authors><author><name>ROI Hunter</name><user>MAG003490427</user><email>petr.skornok@b.cz</email></author></authors>
|
45 |
+
<date>2017-03-16</date>
|
46 |
+
<time>14:11:46</time>
|
47 |
+
<contents><target name="magecommunity"><dir name="Businessfactory"><dir name="Roihuntereasy"><dir name="Block"><file name="AddedToCartAnalytics.php" hash="eeb701f487b06ed82e0754aefb192fab"/><dir name="Adminhtml"><file name="Admin.php" hash="2b33d562e7edb07d3a33a9f4d1652c9d"/><dir name="System"><dir name="Config"><file name="Cronbutton.php" hash="a07a6cfbd52a9a96fb4ec78cc8270924"/><file name="Resetbutton.php" hash="7721bb62feafe5d9d2951e70bfb0c30e"/></dir></dir></dir><file name="CategoryViewAnalytics.php" hash="8a47d9b4b0ad88c2e3fc1aa38258c465"/><file name="CheckoutAnalytics.php" hash="831094424cf896e6644d66b0c70c3688"/><file name="Database.php" hash="4333ce4f66b762097cb50b4f04a7a4d2"/><file name="ProductViewAnalytics.php" hash="033e6702927d92ae5f2d388f00b46bd5"/></dir><dir name="Helper"><file name="Data.php" hash="05ee8de6f74805d4a2b4643b0b0fe33a"/></dir><dir name="Model"><file name="AddedToCartObserver.php" hash="4e6d394f8f0902904e357f441aca6289"/><file name="CheckoutObserver.php" hash="2468bfbdf1083205a0e3aba14d2b7510"/><file name="Cron.php" hash="d1e3bb04cbf1f9dd0cce907dbd724dc3"/><file name="Main.php" hash="06766b59391b52aaa701d8bf01e80d1a"/><file name="Options.php" hash="f6ecd5ab10cfcc5e0948b236bb873932"/><dir name="Resource"><dir name="Main"><file name="Collection.php" hash="9b66b73b312ac16e270c1435a789fdb9"/></dir><file name="Main.php" hash="1432c450ff554fb5057d1d6c4fd26c3c"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="RoihuntereasyController.php" hash="687380dafaffd792a281e2bfd653d027"/></dir><file name="CronController.php" hash="f160c324b60ce92b249731bb97aa1e75"/><file name="FeedController.php" hash="e185b7550c6ef091b5fbcf51f315dc5a"/><file name="IndexController.php" hash="33c2a22770591cbeb7fb394d3654d904"/><file name="ResetController.php" hash="1a6c578829957c0a2ec2a4085ed5a089"/><file name="RoihuntereasyController.php" hash="b2b37f613badb75be2198e6643ef8d85"/><file name="StoredetailsController.php" hash="c3373d35eb7113dc6191e1ad2438b145"/></dir><dir name="etc"><file name="adminhtml.xml" hash="bbab6af370448895030570a657469a15"/><file name="config.xml" hash="19c9d6c837551ad3886229f61a85ba07"/><file name="system.xml" hash="718ea25db00b6a500b8783f9c8e1ba5c"/></dir><dir name="sql"><dir name="businessfactory_roihuntereasy_setup"><file name="install-1.0.0.php" hash="f490ddfd229eb5680e68fb7ec55a5820"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="businessfactory_roihuntereasy.xml" hash="fa2e345d2461459e15c641731d1b114a"/></dir><dir name="template"><dir name="businessfactory_roihuntereasy"><file name="admin.phtml" hash="85afee6d3f1d3c1eb46e644ce1eba324"/><dir name="system"><dir name="config"><file name="cronbutton.phtml" hash="758b97b5da81c92aaeb175e4b0142288"/><file name="resetbutton.phtml" hash="7aedce71c5d21bfce1a08c77e603143d"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="businessfactory_roihuntereasy.xml" hash="e1379f4d0a022d6740d0a6d96fd9fbed"/></dir><dir name="template"><dir name="businessfactory_roihuntereasy"><file name="added_to_cart_view_analytics.phtml" hash="8679d7940136d046ce46d2bc9aa2b522"/><file name="category_view_analytics.phtml" hash="420fe9c183c444e655250efa0b037da4"/><file name="checkout_analytics.phtml" hash="f06507f3867d78e0e6f1791fc210797d"/><file name="index.phtml" hash="a69cff3727b7bba2be7154b94b86ff08"/><file name="product_view_analytics.phtml" hash="a9ce50a31d64edcc70b2bbabd2ebf227"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Businessfactory_Roihuntereasy.xml" hash="d46e92b8a1b158bfdc47b9daa3274a3d"/></dir></target></contents>
|
48 |
<compatible/>
|
49 |
+
<dependencies><required><php><min>5.5.0</min><max>7.0.0</max></php></required></dependencies>
|
50 |
</package>
|