Version Notes
edrone magento module - initial public release
Download this release
Release Info
| Developer | Michał Blak |
| Extension | edroneCRM |
| Version | 1.0.12 |
| Comparing to | |
| See all releases | |
Code changes from version 1.1.11 to 1.0.12
- app/code/local/Edrone/Base/Block/Cart.php +2 -0
- app/code/local/Edrone/Base/Block/Order.php +25 -16
- app/code/local/Edrone/Base/Block/Product.php +4 -0
- app/code/local/Edrone/Base/Helper/Config.php +0 -8
- app/code/local/Edrone/Base/etc/config.xml +1 -2
- app/code/local/Edrone/Base/etc/system.xml +2 -3
- app/design/frontend/base/default/template/edrone/cart_view.phtml +0 -47
- app/design/frontend/base/default/template/edrone/default.phtml +0 -42
- app/design/frontend/base/default/template/edrone/product_view.phtml +0 -65
- app/design/frontend/base/default/template/edrone/success_view.phtml +0 -53
- package.xml +5 -5
app/code/local/Edrone/Base/Block/Cart.php
CHANGED
|
@@ -20,6 +20,8 @@ class Edrone_Base_Block_Cart extends Edrone_Base_Block_Base
|
|
| 20 |
$_Product = Mage::getModel("catalog/product")->load( $productData['id'] );
|
| 21 |
$categoryIds = $_Product->getCategoryIds();//array of product categories
|
| 22 |
$categoryId = array_pop($categoryIds);
|
|
|
|
|
|
|
| 23 |
if(is_numeric($categoryId)){
|
| 24 |
$category = Mage::getModel('catalog/category')->load($categoryId);
|
| 25 |
$productData['product_category_names'] = $category->getName();
|
| 20 |
$_Product = Mage::getModel("catalog/product")->load( $productData['id'] );
|
| 21 |
$categoryIds = $_Product->getCategoryIds();//array of product categories
|
| 22 |
$categoryId = array_pop($categoryIds);
|
| 23 |
+
|
| 24 |
+
|
| 25 |
if(is_numeric($categoryId)){
|
| 26 |
$category = Mage::getModel('catalog/category')->load($categoryId);
|
| 27 |
$productData['product_category_names'] = $category->getName();
|
app/code/local/Edrone/Base/Block/Order.php
CHANGED
|
@@ -255,7 +255,7 @@ class EdroneEventOrder extends EdroneEvent{
|
|
| 255 |
return $this;
|
| 256 |
}
|
| 257 |
|
| 258 |
-
|
| 259 |
* @return EdroneEventOrder
|
| 260 |
*/
|
| 261 |
public static function create(){
|
|
@@ -292,7 +292,7 @@ class EdroneIns{
|
|
| 292 |
* @param string $trace_url def https://api.edrone.me/trace
|
| 293 |
* @since 1.0.0
|
| 294 |
*/
|
| 295 |
-
function __construct($appid,$secret,$trace_url='https://api.edrone.me/trace'){
|
| 296 |
$this->appid = $appid;
|
| 297 |
$this->secret = $secret;
|
| 298 |
$this->trace_url = $trace_url;
|
|
@@ -314,12 +314,15 @@ class EdroneIns{
|
|
| 314 |
$event->pre_init();
|
| 315 |
$event->init();
|
| 316 |
$this->preparedpack = array_merge($event->get(),array(
|
| 317 |
-
"app_id"
|
| 318 |
-
"version"
|
| 319 |
-
"platform_version"=> Mage::getVersion(),
|
| 320 |
-
"platform" => "Magento",
|
| 321 |
-
"sender_type" => "server",
|
| 322 |
));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 323 |
return $this;
|
| 324 |
}
|
| 325 |
|
|
@@ -376,11 +379,15 @@ class Edrone_Base_Block_Order extends Edrone_Base_Block_Base
|
|
| 376 |
|
| 377 |
|
| 378 |
|
| 379 |
-
public function sendDataToServer($orderData,$customerData
|
| 380 |
-
|
| 381 |
-
try{
|
| 382 |
$configHelper = Mage::helper('edrone/config');
|
| 383 |
-
$edrone = new EdroneIns($configHelper->getAppId(),''
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 384 |
$edrone->prepare(
|
| 385 |
EdroneEventOrder::create()->
|
| 386 |
userFirstName(($customerData['first_name']))->
|
|
@@ -393,13 +400,12 @@ class Edrone_Base_Block_Order extends Edrone_Base_Block_Base
|
|
| 393 |
productCategoryNames($orderData['product_category_names'])->
|
| 394 |
orderId($orderData['order_id'])->
|
| 395 |
orderPaymentValue($orderData['order_payment_value'])->
|
| 396 |
-
orderCurrency($orderData['order_currency'])
|
|
|
|
| 397 |
)->send();
|
| 398 |
} catch (Exception $e){
|
| 399 |
error_log("EDRONEPHPSDK ERROR:".$e->getMessage().' more :'.json_encode($e));
|
| 400 |
-
return "Error";
|
| 401 |
}
|
| 402 |
-
return "OK:200".json_encode($edrone->getLastRequest());
|
| 403 |
}
|
| 404 |
/**
|
| 405 |
* @return array
|
|
@@ -413,20 +419,22 @@ class Edrone_Base_Block_Order extends Edrone_Base_Block_Base
|
|
| 413 |
|
| 414 |
$product_category_names = array();
|
| 415 |
$product_category_ids = array();
|
| 416 |
-
|
| 417 |
|
| 418 |
foreach ($order->getAllVisibleItems() as $item) {
|
| 419 |
$skus[] = $item->getSku();
|
| 420 |
$ids[] = $item->getId();
|
| 421 |
$titles[] = $item->getName();
|
| 422 |
|
| 423 |
-
$_Product = Mage::getModel("catalog/product")->load( $item->
|
| 424 |
$categoryIds = $_Product->getCategoryIds();//array of product categories
|
|
|
|
| 425 |
$categoryId = array_pop($categoryIds);
|
| 426 |
if(is_numeric($categoryId)){
|
| 427 |
$category = Mage::getModel('catalog/category')->load($categoryId);
|
| 428 |
$product_category_names[] = $category->getName();
|
| 429 |
$product_category_ids[] = $categoryId;
|
|
|
|
| 430 |
}
|
| 431 |
|
| 432 |
|
|
@@ -446,6 +454,7 @@ class Edrone_Base_Block_Order extends Edrone_Base_Block_Base
|
|
| 446 |
$orderData['coupon'] = $order->getCouponCode();
|
| 447 |
$orderData['product_category_names'] = join('|',$product_category_names);
|
| 448 |
$orderData['product_category_ids'] = join('|',$product_category_ids);
|
|
|
|
| 449 |
|
| 450 |
return $orderData;
|
| 451 |
}
|
| 255 |
return $this;
|
| 256 |
}
|
| 257 |
|
| 258 |
+
/**
|
| 259 |
* @return EdroneEventOrder
|
| 260 |
*/
|
| 261 |
public static function create(){
|
| 292 |
* @param string $trace_url def https://api.edrone.me/trace
|
| 293 |
* @since 1.0.0
|
| 294 |
*/
|
| 295 |
+
function __construct($appid,$secret,$trace_url='https://api-test.edrone.me/trace.php'){
|
| 296 |
$this->appid = $appid;
|
| 297 |
$this->secret = $secret;
|
| 298 |
$this->trace_url = $trace_url;
|
| 314 |
$event->pre_init();
|
| 315 |
$event->init();
|
| 316 |
$this->preparedpack = array_merge($event->get(),array(
|
| 317 |
+
"app_id" => $this->appid,
|
| 318 |
+
"version" => EDRONE_SDK_VERSION,
|
|
|
|
|
|
|
|
|
|
| 319 |
));
|
| 320 |
+
//Calc sign - beta
|
| 321 |
+
ksort($this->preparedpack);
|
| 322 |
+
$sign = '';
|
| 323 |
+
foreach($this->preparedpack as $key=>$value){$sign .= $value;}
|
| 324 |
+
$this->preparedpack['sign'] = md5($this->secret.$sign);
|
| 325 |
+
//
|
| 326 |
return $this;
|
| 327 |
}
|
| 328 |
|
| 379 |
|
| 380 |
|
| 381 |
|
| 382 |
+
public function sendDataToServer($orderData,$customerData){
|
| 383 |
+
try{
|
|
|
|
| 384 |
$configHelper = Mage::helper('edrone/config');
|
| 385 |
+
$edrone = new EdroneIns($configHelper->getAppId(),'');
|
| 386 |
+
$edrone->setCallbacks(function($obj){
|
| 387 |
+
error_log("EDRONEPHPSDK ERROR - wrong request:". json_encode($obj->getLastRequest()));
|
| 388 |
+
},function(){
|
| 389 |
+
|
| 390 |
+
});
|
| 391 |
$edrone->prepare(
|
| 392 |
EdroneEventOrder::create()->
|
| 393 |
userFirstName(($customerData['first_name']))->
|
| 400 |
productCategoryNames($orderData['product_category_names'])->
|
| 401 |
orderId($orderData['order_id'])->
|
| 402 |
orderPaymentValue($orderData['order_payment_value'])->
|
| 403 |
+
orderCurrency($orderData['order_currency'])->
|
| 404 |
+
productCounts($orderData['product_counts'])
|
| 405 |
)->send();
|
| 406 |
} catch (Exception $e){
|
| 407 |
error_log("EDRONEPHPSDK ERROR:".$e->getMessage().' more :'.json_encode($e));
|
|
|
|
| 408 |
}
|
|
|
|
| 409 |
}
|
| 410 |
/**
|
| 411 |
* @return array
|
| 419 |
|
| 420 |
$product_category_names = array();
|
| 421 |
$product_category_ids = array();
|
| 422 |
+
$product_counts = array();
|
| 423 |
|
| 424 |
foreach ($order->getAllVisibleItems() as $item) {
|
| 425 |
$skus[] = $item->getSku();
|
| 426 |
$ids[] = $item->getId();
|
| 427 |
$titles[] = $item->getName();
|
| 428 |
|
| 429 |
+
$_Product = Mage::getModel("catalog/product")->load( $item->getProductId() );
|
| 430 |
$categoryIds = $_Product->getCategoryIds();//array of product categories
|
| 431 |
+
$product_counts[] = settype($item->getQtyOrdered(), 'int');
|
| 432 |
$categoryId = array_pop($categoryIds);
|
| 433 |
if(is_numeric($categoryId)){
|
| 434 |
$category = Mage::getModel('catalog/category')->load($categoryId);
|
| 435 |
$product_category_names[] = $category->getName();
|
| 436 |
$product_category_ids[] = $categoryId;
|
| 437 |
+
|
| 438 |
}
|
| 439 |
|
| 440 |
|
| 454 |
$orderData['coupon'] = $order->getCouponCode();
|
| 455 |
$orderData['product_category_names'] = join('|',$product_category_names);
|
| 456 |
$orderData['product_category_ids'] = join('|',$product_category_ids);
|
| 457 |
+
$orderData['product_counts'] = join('|',$product_counts);
|
| 458 |
|
| 459 |
return $orderData;
|
| 460 |
}
|
app/code/local/Edrone/Base/Block/Product.php
CHANGED
|
@@ -14,16 +14,20 @@ class Edrone_Base_Block_Product extends Edrone_Base_Block_Base
|
|
| 14 |
$productArray['id'] = $product->getId();
|
| 15 |
$productArray['title'] = $product->getName();
|
| 16 |
$productArray['image'] = (string)Mage::helper('catalog/image')->init($product, 'image')->resize(438);
|
|
|
|
| 17 |
|
| 18 |
$categoryIds = $product->getCategoryIds();//array of product categories
|
| 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 |
return $productArray;
|
| 28 |
}
|
| 29 |
}
|
| 14 |
$productArray['id'] = $product->getId();
|
| 15 |
$productArray['title'] = $product->getName();
|
| 16 |
$productArray['image'] = (string)Mage::helper('catalog/image')->init($product, 'image')->resize(438);
|
| 17 |
+
$productArray['product_url'] = $product->getUrl();
|
| 18 |
|
| 19 |
$categoryIds = $product->getCategoryIds();//array of product categories
|
| 20 |
|
| 21 |
+
|
| 22 |
|
| 23 |
$categoryId = array_pop($categoryIds);
|
| 24 |
if(is_numeric($categoryId)){
|
| 25 |
$category = Mage::getModel('catalog/category')->load($categoryId);
|
| 26 |
$productArray['product_category_names'] = $category->getName();
|
| 27 |
$productArray['product_category_ids'] = $categoryId;
|
| 28 |
+
|
| 29 |
}
|
| 30 |
+
|
| 31 |
return $productArray;
|
| 32 |
}
|
| 33 |
}
|
app/code/local/Edrone/Base/Helper/Config.php
CHANGED
|
@@ -8,14 +8,6 @@ class Edrone_Base_Helper_Config extends Mage_Core_Helper_Abstract
|
|
| 8 |
const EXTERNAL_SCRIPT_URL_CONFIG_PATH = "edrone/base/external_script_url";
|
| 9 |
const COLLECTOR_URL_CONFIG_PATH = "edrone/base/collector_url";
|
| 10 |
const NEWSLETTER_SYNC_ENABLED_PATH = "edrone/newsletter/subscription_sync_enabled";
|
| 11 |
-
const SERVER_SIDE_ORDER_PATH = "edrone/base/serverside_order";
|
| 12 |
-
/**
|
| 13 |
-
* @return string
|
| 14 |
-
*/
|
| 15 |
-
public function getServersideOrder()
|
| 16 |
-
{
|
| 17 |
-
return (string)Mage::getStoreConfig(self::SERVER_SIDE_ORDER_PATH);
|
| 18 |
-
}
|
| 19 |
|
| 20 |
/**
|
| 21 |
* @return string
|
| 8 |
const EXTERNAL_SCRIPT_URL_CONFIG_PATH = "edrone/base/external_script_url";
|
| 9 |
const COLLECTOR_URL_CONFIG_PATH = "edrone/base/collector_url";
|
| 10 |
const NEWSLETTER_SYNC_ENABLED_PATH = "edrone/newsletter/subscription_sync_enabled";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
/**
|
| 13 |
* @return string
|
app/code/local/Edrone/Base/etc/config.xml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Edrone_Base>
|
| 5 |
-
<version>1.
|
| 6 |
</Edrone_Base>
|
| 7 |
</modules>
|
| 8 |
<global>
|
|
@@ -72,7 +72,6 @@
|
|
| 72 |
<app_secret>INSERT_APP_SECRET_HERE</app_secret>
|
| 73 |
<external_script_url>//d3bo67muzbfgtl.cloudfront.net/edrone_2_0.js</external_script_url>
|
| 74 |
<collector_url>https://api.edrone.me/trace</collector_url>
|
| 75 |
-
<serverside_order>1</serverside_order>
|
| 76 |
</base>
|
| 77 |
</edrone>
|
| 78 |
</default>
|
| 2 |
<config>
|
| 3 |
<modules>
|
| 4 |
<Edrone_Base>
|
| 5 |
+
<version>1.0.10</version>
|
| 6 |
</Edrone_Base>
|
| 7 |
</modules>
|
| 8 |
<global>
|
| 72 |
<app_secret>INSERT_APP_SECRET_HERE</app_secret>
|
| 73 |
<external_script_url>//d3bo67muzbfgtl.cloudfront.net/edrone_2_0.js</external_script_url>
|
| 74 |
<collector_url>https://api.edrone.me/trace</collector_url>
|
|
|
|
| 75 |
</base>
|
| 76 |
</edrone>
|
| 77 |
</default>
|
app/code/local/Edrone/Base/etc/system.xml
CHANGED
|
@@ -57,12 +57,11 @@
|
|
| 57 |
</collector_url>
|
| 58 |
<serverside_order>
|
| 59 |
<label>Send order via curl (serverside method)</label>
|
| 60 |
-
<frontend_type>
|
| 61 |
-
<sort_order>
|
| 62 |
<show_in_default>1</show_in_default>
|
| 63 |
<show_in_website>1</show_in_website>
|
| 64 |
<show_in_store>1</show_in_store>
|
| 65 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 66 |
</serverside_order>
|
| 67 |
</fields>
|
| 68 |
</base>
|
| 57 |
</collector_url>
|
| 58 |
<serverside_order>
|
| 59 |
<label>Send order via curl (serverside method)</label>
|
| 60 |
+
<frontend_type>checkbox</frontend_type>
|
| 61 |
+
<sort_order>30</sort_order>
|
| 62 |
<show_in_default>1</show_in_default>
|
| 63 |
<show_in_website>1</show_in_website>
|
| 64 |
<show_in_store>1</show_in_store>
|
|
|
|
| 65 |
</serverside_order>
|
| 66 |
</fields>
|
| 67 |
</base>
|
app/design/frontend/base/default/template/edrone/cart_view.phtml
DELETED
|
@@ -1,47 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/* @var $this Edrone_Base_Block_Cart */
|
| 3 |
-
$helper = $this->getConfigHelper();
|
| 4 |
-
$helper2 = Mage::helper('edrone');
|
| 5 |
-
$customerData = $this->getCustomerData();
|
| 6 |
-
$productData = $this->getProductData();
|
| 7 |
-
?>
|
| 8 |
-
|
| 9 |
-
<?php if(!empty($productData)): ?>
|
| 10 |
-
<script type="text/javascript">
|
| 11 |
-
(function (srcjs) {
|
| 12 |
-
window._edrone = window._edrone || {};
|
| 13 |
-
_edrone.app_id = '<?php echo $helper->getAppId() ?>';
|
| 14 |
-
_edrone.version = '1.1.11';
|
| 15 |
-
_edrone.platform = 'Magento';
|
| 16 |
-
_edrone.platform_version = '<?php echo Mage::getVersion(); ?>';
|
| 17 |
-
_edrone.trace_url = '<?php echo $helper->getCollectorUrl() ?>';
|
| 18 |
-
_edrone.is_logged_in = '<?php echo $customerData['is_logged_in'] ?>';
|
| 19 |
-
_edrone.email = '<?php echo $customerData['email'] ?>';
|
| 20 |
-
_edrone.phone = '<?php echo $customerData['phone'] ?>';
|
| 21 |
-
_edrone.first_name = '<?php echo urlencode($customerData['first_name']); ?>';
|
| 22 |
-
_edrone.last_name = '<?php echo urlencode($customerData['last_name']); ?>';
|
| 23 |
-
_edrone.product_skus = '<?php echo $productData['sku'] ?>';
|
| 24 |
-
_edrone.product_ids = '';
|
| 25 |
-
_edrone.product_titles = '<?php echo urlencode($productData['title']); ?>';
|
| 26 |
-
_edrone.product_images = '<?php echo urlencode($productData['image']); ?>';
|
| 27 |
-
_edrone.product_category_ids = '<?php echo $productData['product_category_ids'] ?>';
|
| 28 |
-
_edrone.product_category_names = '<?php echo urlencode($productData['product_category_names']); ?>';
|
| 29 |
-
_edrone.order_id = '';
|
| 30 |
-
_edrone.order_payment_value = '';
|
| 31 |
-
_edrone.currency = '';
|
| 32 |
-
_edrone.action_type = 'add_to_cart';
|
| 33 |
-
_edrone.country = '<?php echo $customerData['country'] ?>';
|
| 34 |
-
_edrone.city = '<?php echo urlencode($customerData['city']); ?>';
|
| 35 |
-
_edrone.subscriber_status = '<?php echo $customerData['subscriber_status'] ?>';
|
| 36 |
-
_edrone.utc_time = '<?php echo $helper2->utcNow() ?>';
|
| 37 |
-
|
| 38 |
-
var doc = document.createElement('script');
|
| 39 |
-
doc.type = 'text/javascript';
|
| 40 |
-
doc.async = true;
|
| 41 |
-
doc.src = ('https:' == document.location.protocol ? 'https:' : 'http:') + srcjs;
|
| 42 |
-
var s = document.getElementsByTagName('script')[0];
|
| 43 |
-
s.parentNode.insertBefore(doc, s);
|
| 44 |
-
|
| 45 |
-
})("<?php echo $helper->getExternalScriptUrl() ?>");
|
| 46 |
-
</script>
|
| 47 |
-
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/edrone/default.phtml
DELETED
|
@@ -1,42 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/* @var $this Edrone_Base_Block_Base */
|
| 3 |
-
$helper = $this->getConfigHelper();
|
| 4 |
-
$helper2 = Mage::helper('edrone');
|
| 5 |
-
$customerData = $this->getCustomerData();
|
| 6 |
-
?>
|
| 7 |
-
|
| 8 |
-
<script type="text/javascript">
|
| 9 |
-
(function (srcjs) {
|
| 10 |
-
window._edrone = window._edrone || {};
|
| 11 |
-
_edrone.app_id = '<?php echo $helper->getAppId() ?>';
|
| 12 |
-
_edrone.version = '1.1.11';
|
| 13 |
-
_edrone.platform = 'Magento';
|
| 14 |
-
_edrone.platform_version = '<?php echo Mage::getVersion(); ?>';
|
| 15 |
-
_edrone.trace_url = '<?php echo $helper->getCollectorUrl() ?>';
|
| 16 |
-
_edrone.is_logged_in = '<?php echo $customerData['is_logged_in'] ?>';
|
| 17 |
-
_edrone.email = '<?php echo $customerData['email'] ?>';
|
| 18 |
-
_edrone.phone = '<?php echo $customerData['phone'] ?>';
|
| 19 |
-
_edrone.first_name = '<?php echo urlencode($customerData['first_name']); ?>';
|
| 20 |
-
_edrone.last_name = '<?php echo urlencode($customerData['last_name']); ?>';
|
| 21 |
-
_edrone.product_skus = '';
|
| 22 |
-
_edrone.product_ids = '';
|
| 23 |
-
_edrone.product_titles = '';
|
| 24 |
-
_edrone.product_images = '';
|
| 25 |
-
_edrone.order_id = '';
|
| 26 |
-
_edrone.order_payment_value = '';
|
| 27 |
-
_edrone.currency = '';
|
| 28 |
-
_edrone.action_type = 'other';
|
| 29 |
-
_edrone.country = '<?php echo $customerData['country'] ?>';
|
| 30 |
-
_edrone.city = '<?php echo urlencode($customerData['city']); ?>';
|
| 31 |
-
_edrone.subscriber_status = '<?php echo $customerData['subscriber_status'] ?>';
|
| 32 |
-
_edrone.utc_time = '<?php echo $helper2->utcNow() ?>';
|
| 33 |
-
|
| 34 |
-
var doc = document.createElement('script');
|
| 35 |
-
doc.type = 'text/javascript';
|
| 36 |
-
doc.async = true;
|
| 37 |
-
doc.src = ('https:' == document.location.protocol ? 'https:' : 'http:') + srcjs;
|
| 38 |
-
var s = document.getElementsByTagName('script')[0];
|
| 39 |
-
s.parentNode.insertBefore(doc, s);
|
| 40 |
-
|
| 41 |
-
})("<?php echo $helper->getExternalScriptUrl() ?>");
|
| 42 |
-
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/edrone/product_view.phtml
DELETED
|
@@ -1,65 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/* @var $this Edrone_Base_Block_Product */
|
| 3 |
-
$helper = $this->getConfigHelper();
|
| 4 |
-
$helper2 = Mage::helper('edrone');
|
| 5 |
-
$customerData = $this->getCustomerData();
|
| 6 |
-
$productData = $this->getProductData();
|
| 7 |
-
?>
|
| 8 |
-
|
| 9 |
-
<script type="text/javascript">
|
| 10 |
-
(function (srcjs) {
|
| 11 |
-
window._edrone = window._edrone || {};
|
| 12 |
-
_edrone.app_id = '<?php echo $helper->getAppId() ?>';
|
| 13 |
-
_edrone.version = '1.1.11';
|
| 14 |
-
_edrone.platform = 'Magento';
|
| 15 |
-
_edrone.platform_version = '<?php echo Mage::getVersion(); ?>';
|
| 16 |
-
_edrone.trace_url = '<?php echo $helper->getCollectorUrl() ?>';
|
| 17 |
-
_edrone.is_logged_in = '<?php echo $customerData['is_logged_in'] ?>';
|
| 18 |
-
_edrone.email = '<?php echo $customerData['email'] ?>';
|
| 19 |
-
_edrone.phone = '<?php echo $customerData['phone'] ?>';
|
| 20 |
-
_edrone.first_name = '<?php echo urlencode($customerData['first_name']); ?>';
|
| 21 |
-
_edrone.last_name = '<?php echo urlencode($customerData['last_name']); ?>';
|
| 22 |
-
_edrone.product_skus = '<?php echo $productData['sku'] ?>';
|
| 23 |
-
_edrone.product_ids = '';
|
| 24 |
-
_edrone.product_titles = '<?php echo urlencode($productData['title']); ?>';
|
| 25 |
-
_edrone.product_images = '<?php echo urlencode($productData['image']); ?>';
|
| 26 |
-
_edrone.product_urls = window.location.href;
|
| 27 |
-
_edrone.product_category_ids = '<?php echo $productData['product_category_ids'] ?>';
|
| 28 |
-
_edrone.product_category_names = '<?php echo urlencode($productData['product_category_names']); ?>';
|
| 29 |
-
_edrone.order_id = '';
|
| 30 |
-
_edrone.order_payment_value = '';
|
| 31 |
-
_edrone.currency = '';
|
| 32 |
-
_edrone.action_type = 'product_view';
|
| 33 |
-
_edrone.country = '<?php echo $customerData['country'] ?>';
|
| 34 |
-
_edrone.city = '<?php echo urlencode($customerData['city']); ?>';
|
| 35 |
-
_edrone.subscriber_status = '<?php echo $customerData['subscriber_status'] ?>';
|
| 36 |
-
_edrone.utc_time = '<?php echo $helper2->utcNow() ?>';
|
| 37 |
-
|
| 38 |
-
var doc = document.createElement('script');
|
| 39 |
-
doc.type = 'text/javascript';
|
| 40 |
-
doc.async = true;
|
| 41 |
-
doc.src = ('https:' == document.location.protocol ? 'https:' : 'http:') + srcjs;
|
| 42 |
-
var s = document.getElementsByTagName('script')[0];
|
| 43 |
-
s.parentNode.insertBefore(doc, s);
|
| 44 |
-
|
| 45 |
-
window.isBasketForm = function(find, txt) {
|
| 46 |
-
txt = txt.split("?")[0];
|
| 47 |
-
return txt.substr(txt.length - find.length) == find;
|
| 48 |
-
}
|
| 49 |
-
|
| 50 |
-
(function() {
|
| 51 |
-
var origOpen = XMLHttpRequest.prototype.open;
|
| 52 |
-
XMLHttpRequest.prototype.open = function() {
|
| 53 |
-
this.addEventListener('load', function() {
|
| 54 |
-
if (isBasketForm('ajaxcart/cart/add/', this.responseURL)) {
|
| 55 |
-
_edrone.action_type = "add_to_cart";
|
| 56 |
-
_edrone.init();
|
| 57 |
-
}
|
| 58 |
-
});
|
| 59 |
-
origOpen.apply(this, arguments);
|
| 60 |
-
};
|
| 61 |
-
})();
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
})("<?php echo $helper->getExternalScriptUrl() ?>");
|
| 65 |
-
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/edrone/success_view.phtml
DELETED
|
@@ -1,53 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/* @var $this Edrone_Base_Block_Order */
|
| 3 |
-
$helper = $this->getConfigHelper();
|
| 4 |
-
$helper2 = Mage::helper('edrone');
|
| 5 |
-
$customerData = $this->getCustomerData();
|
| 6 |
-
$orderData = $this->getOrderData();
|
| 7 |
-
$serverSideStatus = $this->sendDataToServer($orderData, $customerData,$helper);
|
| 8 |
-
?>
|
| 9 |
-
|
| 10 |
-
<?php if(!empty($orderData)): ?>
|
| 11 |
-
<script type="text/javascript">
|
| 12 |
-
(function (srcjs) {
|
| 13 |
-
window._edrone = window._edrone || {};
|
| 14 |
-
_edrone.app_id = '<?php echo $helper->getAppId() ?>';
|
| 15 |
-
_edrone.version = '1.1.11';
|
| 16 |
-
_edrone.platform = 'Magento';
|
| 17 |
-
_edrone.platform_version = '<?php echo Mage::getVersion(); ?>';
|
| 18 |
-
_edrone.trace_url = '<?php echo $helper->getCollectorUrl() ?>';
|
| 19 |
-
_edrone.is_logged_in = '<?php echo $customerData['is_logged_in'] ?>';
|
| 20 |
-
_edrone.email = '<?php echo $customerData['email'] ?>';
|
| 21 |
-
_edrone.phone = '<?php echo $customerData['phone'] ?>';
|
| 22 |
-
_edrone.first_name = '<?php echo urlencode($customerData['first_name']); ?>';
|
| 23 |
-
_edrone.last_name = '<?php echo urlencode($customerData['last_name']); ?>';
|
| 24 |
-
_edrone.product_skus = '<?php echo $orderData['sku'] ?>';
|
| 25 |
-
_edrone.product_ids = '';
|
| 26 |
-
_edrone.product_titles = '<?php echo urlencode($orderData['title']); ?>';
|
| 27 |
-
_edrone.product_images = '<?php echo urlencode($orderData['image']); ?>';
|
| 28 |
-
_edrone.product_category_ids = '<?php echo $orderData['product_category_ids'] ?>';
|
| 29 |
-
_edrone.product_category_names = '<?php echo urlencode($orderData['product_category_names']); ?>';
|
| 30 |
-
_edrone.order_id = '<?php echo $orderData['order_id'] ?>';
|
| 31 |
-
_edrone.order_payment_value = '<?php echo $orderData['order_payment_value'] ?>';
|
| 32 |
-
_edrone.base_payment_value = '<?php echo $orderData['base_payment_value'] ?>';
|
| 33 |
-
_edrone.base_currency = '<?php echo $orderData['base_currency'] ?>';
|
| 34 |
-
_edrone.order_currency = '<?php echo $orderData['order_currency'] ?>';
|
| 35 |
-
_edrone.coupon = '<?php echo $orderData['coupon'] ?>';
|
| 36 |
-
_edrone.action_type = 'order';
|
| 37 |
-
_edrone.country = '<?php echo $customerData['country'] ?>';
|
| 38 |
-
_edrone.city = '<?php echo urlencode($customerData['city']); ?>';
|
| 39 |
-
_edrone.subscriber_status = '<?php echo $customerData['subscriber_status'] ?>';
|
| 40 |
-
_edrone.utc_time = '<?php echo $helper2->utcNow() ?>';
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
var doc = document.createElement('script');
|
| 44 |
-
doc.type = 'text/javascript';
|
| 45 |
-
doc.async = true;
|
| 46 |
-
doc.src = ('https:' == document.location.protocol ? 'https:' : 'http:') + srcjs;
|
| 47 |
-
var s = document.getElementsByTagName('script')[0];
|
| 48 |
-
s.parentNode.insertBefore(doc, s);
|
| 49 |
-
|
| 50 |
-
/*ServerSideStatus : <?php echo $serverSideStatus ?>*/
|
| 51 |
-
})("<?php echo $helper->getExternalScriptUrl() ?>");
|
| 52 |
-
</script>
|
| 53 |
-
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>edroneCRM</name>
|
| 4 |
-
<version>1.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>GPL</license>
|
| 7 |
<channel>community</channel>
|
|
@@ -9,10 +9,10 @@
|
|
| 9 |
<summary>edrone - first CRM for e-commerce Maintain clients & increase customer retention with dynamic e-CRM.</summary>
|
| 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>
|
| 13 |
-
<date>2016-
|
| 14 |
-
<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="
|
| 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.0.12</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>GPL</license>
|
| 7 |
<channel>community</channel>
|
| 9 |
<summary>edrone - first CRM for e-commerce Maintain clients & increase customer retention with dynamic e-CRM.</summary>
|
| 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>michalblak@gmail.com</email></author></authors>
|
| 13 |
+
<date>2016-11-09</date>
|
| 14 |
+
<time>14:05:50</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="629475518c89a89fa990157d463422ca"/><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="f35c3bf591865d6db22e2477580df76c"/></dir><dir name="controllers"><file name="NewsletterController.php" hash="fa9e82363c785ce94e005a7aad141162"/></dir><dir name="etc"><file name="adminhtml.xml" hash="0e715e76c00295dc4e555411455fedfb"/><file name="config.xml" hash="1323c093110806ef1d4eb0092abc922b"/><file name="system.xml" hash="4651c48710b53d58c4b6af0da08f1d4e"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><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>
|
