Version Notes
edrone magento module - initial public release
Download this release
Release Info
| Developer | Michał Blak |
| Extension | edroneCRM |
| Version | 1.1.15 |
| Comparing to | |
| See all releases | |
Code changes from version 1.1.14 to 1.1.15
- app/code/local/Edrone/Base/Model/Observer.php +1 -1
- app/code/local/Edrone/Base/controllers/EdroneproductController.php +57 -0
- app/code/local/Edrone/Base/etc/config.xml +8 -1
- app/design/frontend/base/default/template/edrone/cart_view.phtml +40 -1
- app/design/frontend/base/default/template/edrone/default.phtml +1 -1
- app/design/frontend/base/default/template/edrone/product_view.phtml +1 -1
- app/design/frontend/base/default/template/edrone/success_view.phtml +1 -1
- package.xml +4 -4
app/code/local/Edrone/Base/Model/Observer.php
CHANGED
|
@@ -483,7 +483,7 @@ if (!defined('EDRONE_SDK_VERSION')) {
|
|
| 483 |
* @param string $trace_url def https://api.edrone.me/trace
|
| 484 |
* @since 1.0.0
|
| 485 |
*/
|
| 486 |
-
function __construct($appid, $secret, $trace_url = 'https://api.edrone.me/trace.php')
|
| 487 |
{
|
| 488 |
$this->appid = $appid;
|
| 489 |
$this->secret = $secret;
|
| 483 |
* @param string $trace_url def https://api.edrone.me/trace
|
| 484 |
* @since 1.0.0
|
| 485 |
*/
|
| 486 |
+
function __construct($appid, $secret, $trace_url = 'https://api-test.edrone.me/trace.php')
|
| 487 |
{
|
| 488 |
$this->appid = $appid;
|
| 489 |
$this->secret = $secret;
|
app/code/local/Edrone/Base/controllers/EdroneproductController.php
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
class Edrone_Base_EdroneproductController extends Mage_Core_Controller_Front_Action {
|
| 4 |
+
public function indexAction(){
|
| 5 |
+
|
| 6 |
+
}
|
| 7 |
+
public function skuAction(){
|
| 8 |
+
$sku = Mage::app()->getRequest()->getParam('v');
|
| 9 |
+
$product = Mage::getModel('catalog/product')->loadByAttribute('sku',$sku);
|
| 10 |
+
|
| 11 |
+
$productArray['sku'] = $product->getSku();
|
| 12 |
+
$productArray['id'] = $product->getId();
|
| 13 |
+
$productArray['title'] = $product->getName();
|
| 14 |
+
$productArray['image'] = (string)Mage::helper('catalog/image')->init($product, 'image')->resize(438);
|
| 15 |
+
$productArray['product_url'] = $product->getUrl();
|
| 16 |
+
|
| 17 |
+
$categoryIds = $product->getCategoryIds();//array of product categories
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
$categoryId = array_pop($categoryIds);
|
| 22 |
+
if(is_numeric($categoryId)){
|
| 23 |
+
$category = Mage::getModel('catalog/category')->load($categoryId);
|
| 24 |
+
$productArray['product_category_names'] = $category->getName();
|
| 25 |
+
$productArray['product_category_ids'] = $categoryId;
|
| 26 |
+
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
$this->getResponse()->setHeader('Content-type', 'application/json');
|
| 30 |
+
$this->getResponse()->setBody(json_encode($productArray));
|
| 31 |
+
}
|
| 32 |
+
public function idAction(){
|
| 33 |
+
$id = Mage::app()->getRequest()->getParam('v');
|
| 34 |
+
$product = Mage::getModel('catalog/product')->load($id);
|
| 35 |
+
|
| 36 |
+
$productArray['sku'] = $product->getSku();
|
| 37 |
+
$productArray['id'] = $product->getId();
|
| 38 |
+
$productArray['title'] = $product->getName();
|
| 39 |
+
$productArray['image'] = (string)Mage::helper('catalog/image')->init($product, 'image')->resize(438);
|
| 40 |
+
$productArray['product_url'] = $product->getUrl();
|
| 41 |
+
|
| 42 |
+
$categoryIds = $product->getCategoryIds();//array of product categories
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
$categoryId = array_pop($categoryIds);
|
| 47 |
+
if(is_numeric($categoryId)){
|
| 48 |
+
$category = Mage::getModel('catalog/category')->load($categoryId);
|
| 49 |
+
$productArray['product_category_names'] = $category->getName();
|
| 50 |
+
$productArray['product_category_ids'] = $categoryId;
|
| 51 |
+
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
$this->getResponse()->setHeader('Content-type', 'application/json');
|
| 55 |
+
$this->getResponse()->setBody(json_encode($productArray));
|
| 56 |
+
}
|
| 57 |
+
}
|
app/code/local/Edrone/Base/etc/config.xml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Edrone_Base>
|
| 5 |
-
<version>1.1.
|
| 6 |
</Edrone_Base>
|
| 7 |
</modules>
|
| 8 |
<global>
|
|
@@ -72,6 +72,13 @@
|
|
| 72 |
<module>Edrone_Base</module>
|
| 73 |
</args>
|
| 74 |
</edrone_newsletter>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
</routers>
|
| 76 |
</frontend>
|
| 77 |
<adminhtml>
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Edrone_Base>
|
| 5 |
+
<version>1.1.15</version>
|
| 6 |
</Edrone_Base>
|
| 7 |
</modules>
|
| 8 |
<global>
|
| 72 |
<module>Edrone_Base</module>
|
| 73 |
</args>
|
| 74 |
</edrone_newsletter>
|
| 75 |
+
<edrone_edroneproduct>
|
| 76 |
+
<use>standard</use>
|
| 77 |
+
<args>
|
| 78 |
+
<frontName>edroneproduct</frontName>
|
| 79 |
+
<module>Edrone_Base</module>
|
| 80 |
+
</args>
|
| 81 |
+
</edrone_edroneproduct>
|
| 82 |
</routers>
|
| 83 |
</frontend>
|
| 84 |
<adminhtml>
|
app/design/frontend/base/default/template/edrone/cart_view.phtml
CHANGED
|
@@ -11,7 +11,7 @@ $productData = $this->getProductData();
|
|
| 11 |
(function (srcjs) {
|
| 12 |
window._edrone = window._edrone || {};
|
| 13 |
_edrone.app_id = '<?php echo $helper->getAppId() ?>';
|
| 14 |
-
_edrone.version = '1.1.
|
| 15 |
_edrone.platform = 'Magento';
|
| 16 |
_edrone.platform_version = '<?php echo Mage::getVersion(); ?>';
|
| 17 |
_edrone.trace_url = '<?php echo $helper->getCollectorUrl() ?>';
|
|
@@ -36,6 +36,45 @@ $productData = $this->getProductData();
|
|
| 36 |
_edrone.utc_time = '<?php echo $helper2->utcNow() ?>';
|
| 37 |
|
| 38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
var doc = document.createElement('script');
|
| 40 |
doc.type = 'text/javascript';
|
| 41 |
doc.async = true;
|
| 11 |
(function (srcjs) {
|
| 12 |
window._edrone = window._edrone || {};
|
| 13 |
_edrone.app_id = '<?php echo $helper->getAppId() ?>';
|
| 14 |
+
_edrone.version = '1.1.15';
|
| 15 |
_edrone.platform = 'Magento';
|
| 16 |
_edrone.platform_version = '<?php echo Mage::getVersion(); ?>';
|
| 17 |
_edrone.trace_url = '<?php echo $helper->getCollectorUrl() ?>';
|
| 36 |
_edrone.utc_time = '<?php echo $helper2->utcNow() ?>';
|
| 37 |
|
| 38 |
|
| 39 |
+
var doc = document.createElement('script');
|
| 40 |
+
doc.type = 'text/javascript';
|
| 41 |
+
doc.async = true;
|
| 42 |
+
doc.src = ('https:' == document.location.protocol ? 'https:' : 'http:') + srcjs;
|
| 43 |
+
var s = document.getElementsByTagName('script')[0];
|
| 44 |
+
s.parentNode.insertBefore(doc, s);
|
| 45 |
+
|
| 46 |
+
})("<?php echo $helper->getExternalScriptUrl() ?>");
|
| 47 |
+
</script>
|
| 48 |
+
<?php else: ?>
|
| 49 |
+
<script type="text/javascript">
|
| 50 |
+
(function (srcjs) {
|
| 51 |
+
window._edrone = window._edrone || {};
|
| 52 |
+
_edrone.app_id = '<?php echo $helper->getAppId() ?>';
|
| 53 |
+
_edrone.version = '1.1.15';
|
| 54 |
+
_edrone.platform = 'Magento';
|
| 55 |
+
_edrone.platform_version = '<?php echo Mage::getVersion(); ?>';
|
| 56 |
+
_edrone.trace_url = '<?php echo $helper->getCollectorUrl() ?>';
|
| 57 |
+
_edrone.is_logged_in = '<?php echo $customerData['is_logged_in'] ?>';
|
| 58 |
+
_edrone.email = '<?php echo $customerData['email'] ?>';
|
| 59 |
+
_edrone.phone = '<?php echo $customerData['phone'] ?>';
|
| 60 |
+
_edrone.first_name = '<?php echo urlencode($customerData['first_name']); ?>';
|
| 61 |
+
_edrone.last_name = '<?php echo urlencode($customerData['last_name']); ?>';
|
| 62 |
+
_edrone.product_skus = '';
|
| 63 |
+
_edrone.product_ids = '';
|
| 64 |
+
_edrone.product_titles = '';
|
| 65 |
+
_edrone.product_images = '';
|
| 66 |
+
_edrone.product_category_ids = '';
|
| 67 |
+
_edrone.product_category_names = '';
|
| 68 |
+
_edrone.order_id = '';
|
| 69 |
+
_edrone.order_payment_value = '';
|
| 70 |
+
_edrone.currency = '';
|
| 71 |
+
_edrone.action_type = 'other';
|
| 72 |
+
_edrone.country = '<?php echo $customerData['country'] ?>';
|
| 73 |
+
_edrone.city = '<?php echo urlencode($customerData['city']); ?>';
|
| 74 |
+
_edrone.subscriber_status = '<?php echo $customerData['subscriber_status'] ?>';
|
| 75 |
+
_edrone.utc_time = '<?php echo $helper2->utcNow() ?>';
|
| 76 |
+
|
| 77 |
+
|
| 78 |
var doc = document.createElement('script');
|
| 79 |
doc.type = 'text/javascript';
|
| 80 |
doc.async = true;
|
app/design/frontend/base/default/template/edrone/default.phtml
CHANGED
|
@@ -9,7 +9,7 @@ $customerData = $this->getCustomerData();
|
|
| 9 |
(function (srcjs) {
|
| 10 |
window._edrone = window._edrone || {};
|
| 11 |
_edrone.app_id = '<?php echo $helper->getAppId() ?>';
|
| 12 |
-
_edrone.version = '1.1.
|
| 13 |
_edrone.platform = 'Magento';
|
| 14 |
_edrone.platform_version = '<?php echo Mage::getVersion(); ?>';
|
| 15 |
_edrone.trace_url = '<?php echo $helper->getCollectorUrl() ?>';
|
| 9 |
(function (srcjs) {
|
| 10 |
window._edrone = window._edrone || {};
|
| 11 |
_edrone.app_id = '<?php echo $helper->getAppId() ?>';
|
| 12 |
+
_edrone.version = '1.1.15';
|
| 13 |
_edrone.platform = 'Magento';
|
| 14 |
_edrone.platform_version = '<?php echo Mage::getVersion(); ?>';
|
| 15 |
_edrone.trace_url = '<?php echo $helper->getCollectorUrl() ?>';
|
app/design/frontend/base/default/template/edrone/product_view.phtml
CHANGED
|
@@ -10,7 +10,7 @@ $productData = $this->getProductData();
|
|
| 10 |
(function (srcjs) {
|
| 11 |
window._edrone = window._edrone || {};
|
| 12 |
_edrone.app_id = '<?php echo $helper->getAppId() ?>';
|
| 13 |
-
_edrone.version = '1.1.
|
| 14 |
_edrone.platform = 'Magento';
|
| 15 |
_edrone.platform_version = '<?php echo Mage::getVersion(); ?>';
|
| 16 |
_edrone.trace_url = '<?php echo $helper->getCollectorUrl() ?>';
|
| 10 |
(function (srcjs) {
|
| 11 |
window._edrone = window._edrone || {};
|
| 12 |
_edrone.app_id = '<?php echo $helper->getAppId() ?>';
|
| 13 |
+
_edrone.version = '1.1.15';
|
| 14 |
_edrone.platform = 'Magento';
|
| 15 |
_edrone.platform_version = '<?php echo Mage::getVersion(); ?>';
|
| 16 |
_edrone.trace_url = '<?php echo $helper->getCollectorUrl() ?>';
|
app/design/frontend/base/default/template/edrone/success_view.phtml
CHANGED
|
@@ -12,7 +12,7 @@ $this->sendDataToServer($orderData, $customerData);
|
|
| 12 |
(function (srcjs) {
|
| 13 |
window._edrone = window._edrone || {};
|
| 14 |
_edrone.app_id = '<?php echo $helper->getAppId() ?>';
|
| 15 |
-
_edrone.version = '1.1.
|
| 16 |
_edrone.platform = 'Magento';
|
| 17 |
_edrone.platform_version = '<?php echo Mage::getVersion(); ?>';
|
| 18 |
_edrone.trace_url = '<?php echo $helper->getCollectorUrl() ?>';
|
| 12 |
(function (srcjs) {
|
| 13 |
window._edrone = window._edrone || {};
|
| 14 |
_edrone.app_id = '<?php echo $helper->getAppId() ?>';
|
| 15 |
+
_edrone.version = '1.1.15';
|
| 16 |
_edrone.platform = 'Magento';
|
| 17 |
_edrone.platform_version = '<?php echo Mage::getVersion(); ?>';
|
| 18 |
_edrone.trace_url = '<?php echo $helper->getCollectorUrl() ?>';
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>edroneCRM</name>
|
| 4 |
-
<version>1.1.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>GPL</license>
|
| 7 |
<channel>community</channel>
|
|
@@ -10,9 +10,9 @@
|
|
| 10 |
<description>edrone is collecting and analyzing Magento visitors and customers data. The plugin allows processing personal data in the real-time in order to communicate with them through dynamic and personalized e-mail.</description>
|
| 11 |
<notes>edrone magento module - initial public release</notes>
|
| 12 |
<authors><author><name>Michał Blak</name><user>MAG002993376</user><email>admin@edrone.me</email></author></authors>
|
| 13 |
-
<date>2016-
|
| 14 |
-
<time>13:
|
| 15 |
-
<contents><target name="magelocal"><dir name="Edrone"><dir name="Base"><dir name="Block"><file name="Base.php" hash="d0e605725b25d2bf1bc2d27af954ab69"/><file name="Cart.php" hash="0f1243e1a6e886a8676a407e03e039ea"/><file name="Order.php" hash="bc369d79c562dd7d84dd9bb193d6d846"/><file name="Product.php" hash="6ed93a752b59228a0121cc0d6f8efe15"/></dir><dir name="Helper"><file name="Config.php" hash="194670e7ef6eb1dc89b8a61a38499264"/><file name="Data.php" hash="a9040014b1b54a1d3cc7ebf401f489c0"/></dir><dir name="Model"><file name="Observer.php" hash="
|
| 16 |
<compatible/>
|
| 17 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
| 18 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>edroneCRM</name>
|
| 4 |
+
<version>1.1.15</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>GPL</license>
|
| 7 |
<channel>community</channel>
|
| 10 |
<description>edrone is collecting and analyzing Magento visitors and customers data. The plugin allows processing personal data in the real-time in order to communicate with them through dynamic and personalized e-mail.</description>
|
| 11 |
<notes>edrone magento module - initial public release</notes>
|
| 12 |
<authors><author><name>Michał Blak</name><user>MAG002993376</user><email>admin@edrone.me</email></author></authors>
|
| 13 |
+
<date>2016-12-06</date>
|
| 14 |
+
<time>13:52:55</time>
|
| 15 |
+
<contents><target name="magelocal"><dir name="Edrone"><dir name="Base"><dir name="Block"><file name="Base.php" hash="d0e605725b25d2bf1bc2d27af954ab69"/><file name="Cart.php" hash="0f1243e1a6e886a8676a407e03e039ea"/><file name="Order.php" hash="bc369d79c562dd7d84dd9bb193d6d846"/><file name="Product.php" hash="6ed93a752b59228a0121cc0d6f8efe15"/></dir><dir name="Helper"><file name="Config.php" hash="194670e7ef6eb1dc89b8a61a38499264"/><file name="Data.php" hash="a9040014b1b54a1d3cc7ebf401f489c0"/></dir><dir name="Model"><file name="Observer.php" hash="3f18003288b328d94b4789d204011ab1"/></dir><dir name="controllers"><file name="EdroneproductController.php" hash="1c6ec2f45cbc433ec82f4e0e342f92f8"/><file name="NewsletterController.php" hash="fa9e82363c785ce94e005a7aad141162"/></dir><dir name="etc"><file name="adminhtml.xml" hash="0e715e76c00295dc4e555411455fedfb"/><file name="config.xml" hash="e725934aa0a1b60404d1fb759fd113e0"/><file name="system.xml" hash="4651c48710b53d58c4b6af0da08f1d4e"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="edrone"><file name="cart_view.phtml" hash="4172f9dae5383675416983aa0bc9eb05"/><file name="default.phtml" hash="29ec60db2b77ec5748b5ebb9c53d9f26"/><file name="product_view.phtml" hash="2e3c167332be825ef283d20c4a7a31ea"/><file name="success_view.phtml" hash="159f03d0e89c5c3b0ea8f74ce6ba35a2"/></dir></dir><dir name="layout"><file name="edrone.xml" hash="48e37d1c01507337f8dc33eb9e03af34"/></dir></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="Edrone_Base.xml" hash="29d3699c3a83fa4fea848a6cb7800872"/></dir></dir></target><target name="magelocale"><dir name="pl_PL"><file name="Edrone.csv" hash="b8aa59d39815f4d92738129cc9fbdf34"/></dir></target></contents>
|
| 16 |
<compatible/>
|
| 17 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
| 18 |
</package>
|
