Version Notes
Fix some issues in customer order total amount
Download this release
Release Info
Developer | jitendra |
Extension | Betaout |
Version | 1.1.5 |
Comparing to | |
See all releases |
Code changes from version 1.1.2 to 1.1.5
- app/code/community/Betaout/Amplify/Model/Amplify.php +48 -29
- app/code/community/Betaout/Amplify/Model/Key.php +264 -899
- app/code/community/Betaout/Amplify/Model/magentoGetOrderByUserId.php +0 -82
- app/code/community/Betaout/Amplify/etc/config.xml +12 -132
- app/code/community/Betaout/Amplify/etc/system.xml +2 -2
- app/design/adminhtml/default/default/template/betaout_amplify/amplify.phtml +4 -8
- app/design/adminhtml/default/default/template/betaout_amplify/logo.phtml +5 -9
- app/design/frontend/base/default/layout/betaout_amplify.xml +0 -79
- app/design/frontend/base/default/template/betaout_amplify/account.phtml +0 -17
- app/design/frontend/base/default/template/betaout_amplify/account_edit.phtml +0 -17
- app/design/frontend/base/default/template/betaout_amplify/cart.phtml +0 -19
- app/design/frontend/base/default/template/betaout_amplify/checkout.phtml +26 -36
- app/design/frontend/base/default/template/betaout_amplify/create.phtml +0 -27
- app/design/frontend/base/default/template/betaout_amplify/head.phtml +16 -25
- app/design/frontend/base/default/template/betaout_amplify/homepage.phtml +0 -40
- app/design/frontend/base/default/template/betaout_amplify/login.phtml +0 -19
- app/design/frontend/base/default/template/betaout_amplify/order.phtml +0 -44
- app/design/frontend/base/default/template/betaout_amplify/sales_history.phtml +0 -19
- app/design/frontend/base/default/template/betaout_amplify/search.phtml +0 -14
- app/design/frontend/base/default/template/betaout_amplify/wishlist.phtml +0 -34
- package.xml +9 -9
- skin/adminhtml/base/default/amplify/images/Users_1.png +0 -0
- skin/adminhtml/base/default/amplify/images/ajax-loader-tr_1.gif +0 -0
- skin/adminhtml/base/default/amplify/images/ajax-loader_1.gif +0 -0
- skin/adminhtml/base/default/amplify/images/amp-connect.png +0 -0
- skin/adminhtml/base/default/amplify/images/amp-connect_1.png +0 -0
- skin/adminhtml/base/default/amplify/images/amplify.png +0 -0
- skin/adminhtml/base/default/amplify/images/amplify_1.png +0 -0
- skin/adminhtml/base/default/amplify/images/btn_1.png +0 -0
- skin/adminhtml/base/default/amplify/images/check_1.png +0 -0
- skin/adminhtml/base/default/amplify/images/com-app_1.png +0 -0
- skin/adminhtml/base/default/amplify/images/db-1_1.png +0 -0
- skin/adminhtml/base/default/amplify/images/engage-app_1.png +0 -0
- skin/adminhtml/base/default/amplify/images/icon_1.png +0 -0
- skin/adminhtml/base/default/amplify/images/large_bracket_1.png +0 -0
- skin/adminhtml/base/default/amplify/images/mini_bracket_1.png +0 -0
- skin/adminhtml/base/default/amplify/images/plugin-logo.png +0 -0
- skin/adminhtml/base/default/amplify/images/plugin-logo_1.png +0 -0
- skin/adminhtml/base/default/amplify/images/socialicon.png +0 -0
- skin/adminhtml/base/default/amplify/images/socialicon_1.png +0 -0
- skin/adminhtml/base/default/amplify/images/u111_normal.png +0 -0
- skin/adminhtml/base/default/amplify/images/u111_normal_1.png +0 -0
- skin/adminhtml/base/default/amplify/images/u151_normal.png +0 -0
- skin/adminhtml/base/default/amplify/images/u151_normal_1.png +0 -0
- skin/adminhtml/base/default/amplify/images/u185_normal.png +0 -0
- skin/adminhtml/base/default/amplify/images/u185_normal_1.png +0 -0
- skin/adminhtml/base/default/amplify/images/u187_normal.png +0 -0
- skin/adminhtml/base/default/amplify/images/u187_normal_1.png +0 -0
- skin/adminhtml/base/default/amplify/images/u189_normal.png +0 -0
- skin/adminhtml/base/default/amplify/images/u189_normal_1.png +0 -0
- skin/adminhtml/base/default/amplify/images/u192_normal.png +0 -0
- skin/adminhtml/base/default/amplify/images/u192_normal_1.png +0 -0
- skin/adminhtml/base/default/amplify/images/u204_normal.png +0 -0
- skin/adminhtml/base/default/amplify/images/u204_normal_1.png +0 -0
- skin/adminhtml/base/default/amplify/images/u206_normal.png +0 -0
- skin/adminhtml/base/default/amplify/images/u206_normal_1.png +0 -0
- skin/adminhtml/base/default/amplify/images/u3_normal.png +0 -0
- skin/adminhtml/base/default/amplify/images/u3_normal_1.png +0 -0
- skin/adminhtml/base/default/amplify/images/u74_normal.png +0 -0
- skin/adminhtml/base/default/amplify/images/u74_normal_1.png +0 -0
- skin/adminhtml/base/default/amplify/images/u89_normal.png +0 -0
- skin/adminhtml/base/default/amplify/images/u89_normal_1.png +0 -0
- skin/adminhtml/base/default/amplify/images/u93_normal.png +0 -0
- skin/adminhtml/base/default/amplify/images/u93_normal_1.png +0 -0
- skin/adminhtml/base/default/amplify/images/u96_normal.png +0 -0
- skin/adminhtml/base/default/amplify/images/u96_normal_1.png +0 -0
- skin/adminhtml/default/default/images/amplify/ajax-loader-tr.gif +0 -0
- skin/adminhtml/default/default/images/amplify/ajax-loader-tr_1.gif +0 -0
- skin/adminhtml/default/default/images/amplify/ajax-loader.gif +0 -0
- skin/adminhtml/default/default/images/amplify/ajax-loader_1.gif +0 -0
- skin/adminhtml/default/default/images/amplify/amp-n-logo.png +0 -0
- skin/adminhtml/default/default/images/amplify/amp-n-logo_1.png +0 -0
- skin/adminhtml/default/default/images/amplify/amplify.gif +0 -0
- skin/adminhtml/default/default/images/amplify/amplify_1.gif +0 -0
- skin/adminhtml/default/default/images/amplify/logo-amp.png +0 -0
- skin/adminhtml/default/default/images/amplify/logo-amp_1.png +0 -0
- skin/adminhtml/default/default/images/amplify/small_amp.png +0 -0
- skin/adminhtml/default/default/images/amplify/small_amp_1.png +0 -0
app/code/community/Betaout/Amplify/Model/Amplify.php
CHANGED
@@ -65,12 +65,12 @@ class Amplify {
|
|
65 |
Â
*
|
66 |
Â
*/
|
67 |
Â
protected $publicationUrl;
|
68 |
-
protected $agent = '
|
69 |
Â
|
70 |
Â
/**
|
71 |
Â
* amplify host
|
72 |
Â
*/
|
73 |
-
public $host = 'betaout.
|
74 |
Â
|
75 |
Â
/**
|
76 |
Â
* amplify version
|
@@ -124,7 +124,7 @@ class Amplify {
|
|
124 |
Â
* function end point mapping
|
125 |
Â
*/
|
126 |
Â
protected $functionUrlMap = array(
|
127 |
-
'identify' => 'user/
|
128 |
Â
'event' => 'user/event/',
|
129 |
Â
'update' => 'user/update/',
|
130 |
Â
'add' => 'user/add/',
|
@@ -508,7 +508,7 @@ class Amplify {
|
|
508 |
Â
}
|
509 |
Â
|
510 |
Â
public function setOtt() {
|
511 |
-
$this->ott = Mage::getModel('core/cookie')->get('
|
512 |
Â
}
|
513 |
Â
|
514 |
Â
public function getOtt() {
|
@@ -522,15 +522,23 @@ class Amplify {
|
|
522 |
Â
$this->showError[] = "paramter should be associative array!";
|
523 |
Â
$this->setOtt();
|
524 |
Â
if (isset($this->ott)) {
|
525 |
-
$params['
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
526 |
Â
}
|
527 |
Â
try {
|
528 |
Â
if (!isset($params['apiKey']))
|
529 |
Â
$params['apiKey'] = $this->getApiKey();
|
530 |
Â
if (!isset($params['timestamp']))
|
531 |
Â
$params['timestamp'] = $this->getTimeStamp();
|
532 |
-
|
533 |
-
|
534 |
Â
$this->setParams($paramUrl);
|
535 |
Â
} catch (Exception $ex) {
|
536 |
Â
$this->showError[] = $ex->getCode() . ":" . $ex->getMessage();
|
@@ -553,15 +561,16 @@ class Amplify {
|
|
553 |
Â
$this->deviceDetector();
|
554 |
Â
$requestUrl = $this->getPublicationUrl() . $this->functionUrlMap[$functionName]; //there should be error handling to make sure function name exist
|
555 |
Â
if (isset($argumentsArray) && is_array($argumentsArray) && count($argumentsArray) > 0) {
|
556 |
-
|
557 |
Â
$this->makeParams($argumentsArray);
|
558 |
Â
} else
|
559 |
Â
$this->makeParams();
|
560 |
-
$
|
561 |
-
$this->
|
562 |
-
|
563 |
-
|
564 |
-
|
Â
|
|
565 |
Â
} catch (Exception $ex) {
|
566 |
Â
$this->showError[] = $ex->getCode() . ":" . $ex->getMessage();
|
567 |
Â
}
|
@@ -589,12 +598,14 @@ class Amplify {
|
|
589 |
Â
// return str_replace(str_replace('%7E', '~', rawurlencode(($string))));
|
590 |
Â
}
|
591 |
Â
|
592 |
-
protected function makeRequest($requestUrl, $ch = null) {
|
593 |
Â
if (!$ch) {
|
594 |
Â
$ch = curl_init();
|
595 |
Â
}
|
596 |
Â
$options = self::$CURL_OPTS;
|
597 |
Â
$options[CURLOPT_URL] = $requestUrl;
|
Â
|
|
Â
|
|
598 |
Â
// print_r($requestUrl);
|
599 |
Â
|
600 |
Â
|
@@ -643,22 +654,27 @@ class Amplify {
|
|
643 |
Â
* Replace with name and email of current user
|
644 |
Â
*/
|
645 |
Â
|
646 |
-
public function identify($email = '', $name = '', $url = '', $referer = '') {
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
651 |
Â
$argumentsArray = array('email' => $email, 'name' => $name, 'url' => $url, 'referer' => $referer);
|
652 |
Â
$response = $this->http_call('identify', $argumentsArray);
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
// if (!isset($_COOKIE['userKnown']))
|
660 |
-
// setcookie('userKnown', $response['userKnown'], time() + 604800, '/');
|
661 |
-
}
|
662 |
Â
|
663 |
Â
return $response;
|
664 |
Â
}
|
@@ -802,7 +818,10 @@ class Amplify {
|
|
802 |
Â
$argumentsArray = $actionDescription;
|
803 |
Â
return $this->http_call('send_old_order', $argumentsArray);
|
804 |
Â
}
|
805 |
-
|
Â
|
|
Â
|
|
Â
|
|
806 |
Â
}
|
807 |
Â
|
808 |
Â
?>
|
65 |
Â
*
|
66 |
Â
*/
|
67 |
Â
protected $publicationUrl;
|
68 |
+
protected $agent = 'v10';
|
69 |
Â
|
70 |
Â
/**
|
71 |
Â
* amplify host
|
72 |
Â
*/
|
73 |
+
public $host = 'betaout.in';
|
74 |
Â
|
75 |
Â
/**
|
76 |
Â
* amplify version
|
124 |
Â
* function end point mapping
|
125 |
Â
*/
|
126 |
Â
protected $functionUrlMap = array(
|
127 |
+
'identify' => 'user/identify/',
|
128 |
Â
'event' => 'user/event/',
|
129 |
Â
'update' => 'user/update/',
|
130 |
Â
'add' => 'user/add/',
|
508 |
Â
}
|
509 |
Â
|
510 |
Â
public function setOtt() {
|
511 |
+
$this->ott = Mage::getModel('core/cookie')->get('_ampUITN');
|
512 |
Â
}
|
513 |
Â
|
514 |
Â
public function getOtt() {
|
522 |
Â
$this->showError[] = "paramter should be associative array!";
|
523 |
Â
$this->setOtt();
|
524 |
Â
if (isset($this->ott)) {
|
525 |
+
$params['token'] = $this->getOtt();
|
526 |
+
}
|
527 |
+
if((isset($params['email'])&& empty($params['email'])) ||!isset($params['email']))
|
528 |
+
{
|
529 |
+
$email=base64_decode(Mage::getModel('core/cookie')->get('_ampEm'));
|
530 |
+
if($email!=""){
|
531 |
+
$params['email']= base64_decode(Mage::getModel('core/cookie')->get('_ampEm'));
|
532 |
+
$params['token']="";
|
533 |
+
}
|
534 |
Â
}
|
535 |
Â
try {
|
536 |
Â
if (!isset($params['apiKey']))
|
537 |
Â
$params['apiKey'] = $this->getApiKey();
|
538 |
Â
if (!isset($params['timestamp']))
|
539 |
Â
$params['timestamp'] = $this->getTimeStamp();
|
540 |
+
|
541 |
+
$paramUrl = json_encode($params);
|
542 |
Â
$this->setParams($paramUrl);
|
543 |
Â
} catch (Exception $ex) {
|
544 |
Â
$this->showError[] = $ex->getCode() . ":" . $ex->getMessage();
|
561 |
Â
$this->deviceDetector();
|
562 |
Â
$requestUrl = $this->getPublicationUrl() . $this->functionUrlMap[$functionName]; //there should be error handling to make sure function name exist
|
563 |
Â
if (isset($argumentsArray) && is_array($argumentsArray) && count($argumentsArray) > 0) {
|
564 |
+
$argumentsArray['systemInfo'] = $_SERVER['HTTP_USER_AGENT'];
|
565 |
Â
$this->makeParams($argumentsArray);
|
566 |
Â
} else
|
567 |
Â
$this->makeParams();
|
568 |
+
$paramdata=$this->getParams();
|
569 |
+
//$requestUrl.="?" . $this->getParams();
|
570 |
+
//$this->setRequestUrl($requestUrl,$paramdata);
|
571 |
+
//$this->signString();
|
572 |
+
|
573 |
+
return $this->makeRequest($requestUrl,$paramdata);
|
574 |
Â
} catch (Exception $ex) {
|
575 |
Â
$this->showError[] = $ex->getCode() . ":" . $ex->getMessage();
|
576 |
Â
}
|
598 |
Â
// return str_replace(str_replace('%7E', '~', rawurlencode(($string))));
|
599 |
Â
}
|
600 |
Â
|
601 |
+
protected function makeRequest($requestUrl,$data="", $ch = null) {
|
602 |
Â
if (!$ch) {
|
603 |
Â
$ch = curl_init();
|
604 |
Â
}
|
605 |
Â
$options = self::$CURL_OPTS;
|
606 |
Â
$options[CURLOPT_URL] = $requestUrl;
|
607 |
+
|
608 |
+
$options[CURLOPT_POSTFIELDS]=array("params"=>$data);
|
609 |
Â
// print_r($requestUrl);
|
610 |
Â
|
611 |
Â
|
654 |
Â
* Replace with name and email of current user
|
655 |
Â
*/
|
656 |
Â
|
657 |
+
public function identify($email = '', $name = '', $url = '', $referer = '',$token='') {
|
658 |
+
|
659 |
+
$cemail="";
|
660 |
+
if(Mage::getModel('core/cookie')->get('_ampUITN')!=""){
|
661 |
+
$token=Mage::getModel('core/cookie')->get('_ampUITN');
|
662 |
+
}
|
663 |
+
if(Mage::getModel('core/cookie')->get('_ampEm')!=""){
|
664 |
+
$cemail= base64_decode(Mage::getModel('core/cookie')->get('_ampEm'));
|
665 |
+
}
|
666 |
+
if($email==''){
|
667 |
+
$email=$cemail;
|
668 |
+
}
|
669 |
+
|
670 |
Â
$argumentsArray = array('email' => $email, 'name' => $name, 'url' => $url, 'referer' => $referer);
|
671 |
Â
$response = $this->http_call('identify', $argumentsArray);
|
672 |
+
if($email!=''){
|
673 |
+
setcookie('_ampEm',base64_encode($email),time()+604800,'/');
|
674 |
+
setcookie('_ampUITN','',time()+604800,'/');
|
675 |
+
}
|
676 |
+
|
677 |
+
|
Â
|
|
Â
|
|
Â
|
|
678 |
Â
|
679 |
Â
return $response;
|
680 |
Â
}
|
818 |
Â
$argumentsArray = $actionDescription;
|
819 |
Â
return $this->http_call('send_old_order', $argumentsArray);
|
820 |
Â
}
|
821 |
+
public function getToken() {
|
822 |
+
$visitorData = Mage::getSingleton('core/session')->getVisitorData();
|
823 |
+
return $visitorData['visitor_id'];
|
824 |
+
}
|
825 |
Â
}
|
826 |
Â
|
827 |
Â
?>
|
app/code/community/Betaout/Amplify/Model/Key.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
Â
<?php
|
2 |
-
|
3 |
Â
require_once 'Amplify.php';
|
4 |
Â
require_once('app/Mage.php');
|
5 |
-
// Need to send default shopping cart url during installation of magento plugin
|
6 |
Â
|
Â
|
|
7 |
Â
//30 8 * * 6 home/path/to/command/the_command.sh >/dev/null
|
8 |
Â
//curl -s -o /dev/null http://www.YOURDOMAIN.com/PATH_TO_MAGENTO/cron.php > /dev/null
|
9 |
Â
class Betaout_Amplify_Model_Key extends Mage_Core_Model_Abstract {
|
@@ -35,104 +35,68 @@ class Betaout_Amplify_Model_Key extends Mage_Core_Model_Abstract {
|
|
35 |
Â
|
36 |
Â
public function __construct($key_string) {
|
37 |
Â
try {
|
Â
|
|
38 |
Â
$this->key = Mage::getStoreConfig(self::XML_PATH_KEY);
|
39 |
Â
$this->secret = Mage::getStoreConfig(self::XML_PATH_SECRET);
|
40 |
Â
$this->projectId = Mage::getStoreConfig(self::XML_PATH_PROJECTID);
|
41 |
-
$this->verified = Mage::getStoreConfig('betaout_amplify_options/settings/amplify_verified');
|
42 |
Â
$this->amplify = new Amplify($this->key, $this->secret, $this->projectId);
|
43 |
-
|
Â
|
|
44 |
Â
} catch (Exception $ex) {
|
45 |
Â
|
46 |
Â
}
|
47 |
Â
}
|
48 |
Â
|
49 |
-
public function
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
$order = $observer->getEvent()->getOrder();
|
54 |
Â
|
Â
|
|
55 |
Â
|
56 |
-
// $order = Mage::getModel('sales/order')->load($orderId);
|
57 |
-
$order = $observer->getEvent()->getOrder();
|
58 |
-
$state = $observer->getEvent()->getState();
|
59 |
-
$status = $observer->getEvent()->getStatus();
|
60 |
-
$orderId = $order->getIncrement_id();
|
61 |
-
$this->amplify->update_order($orderId, $state);
|
62 |
-
$items = $order->getAllItems();
|
63 |
-
foreach ($items as $itemId => $item) {
|
64 |
-
$product = $item;
|
65 |
-
|
66 |
-
$actionData = array();
|
67 |
-
$actionData[0]['productId'] = $product->getId();
|
68 |
-
$actionData[0]['productTitle'] = $product->getName();
|
69 |
-
$actionData[0]['sku'] = $product->getSku();
|
70 |
-
$actionData[0]['price'] = $product->getPrice();
|
71 |
-
$actionData[0]['currency'] = Mage::app()->getStore()->getBaseCurrencyCode();
|
72 |
-
$actionData[0]['specialPrice'] = $product->getFinalPrice();
|
73 |
-
$actionData[0]['status'] = $product->getStatus();
|
74 |
-
$actionData[0]['productPictureUrl'] = $product->getImageUrl();
|
75 |
-
$actionData[0]['pageUrl'] = $product->getProductUrl();
|
76 |
-
$actionData[0]['state'] = $observer->getEvent()->getState();
|
77 |
-
$actionData[0]['size'] = false;
|
78 |
-
$actionData[0]['color'] = false;
|
79 |
-
$actionData[0]['qty'] = $product->getQtyOrdered();
|
80 |
-
$actionData[0]['category'] = $categoryName;
|
81 |
-
}
|
82 |
-
$actionDescription = array(
|
83 |
-
'action' => 'completed',
|
84 |
-
'email' => $this->getCustomerIdentity(),
|
85 |
-
'products' => $actionData
|
86 |
-
);
|
87 |
-
if ($order->getState() == Mage_Sales_Model_Order::STATE_COMPLETE)
|
88 |
-
$res = $this->amplify->customer_action($actionDescription);
|
89 |
-
if ($order->getState() == Mage_Sales_Model_Order::STATE_CLOSED) {
|
90 |
-
$actionDescription['action'] = 'Closed';
|
91 |
-
$res = $this->amplify->customer_action($actionDescription);
|
92 |
-
}
|
93 |
-
}
|
94 |
-
} catch (Exception $ex) {
|
95 |
-
|
96 |
-
}
|
97 |
Â
}
|
98 |
Â
|
99 |
Â
public function getAmplifyConfigChangeObserver($evnt) {
|
100 |
-
if (
|
101 |
-
$this->key = Mage::getStoreConfig(self::XML_PATH_KEY);
|
102 |
-
$this->secret = Mage::getStoreConfig(self::XML_PATH_SECRET);
|
103 |
-
$this->projectId = Mage::getStoreConfig(self::XML_PATH_PROJECTID);
|
104 |
-
$this->amplify = new Amplify($this->key, $this->secret, $this->projectId);
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
Â
|
|
127 |
Â
}
|
128 |
Â
|
129 |
Â
public function getAmplifyEventRemoveFromCart(Varien_Event_Observer $observer) {
|
Â
|
|
130 |
Â
try {
|
131 |
Â
if ($this->verified && is_object($observer)) {
|
Â
|
|
132 |
Â
$product = $observer->getEvent()->getQuote_item();
|
133 |
-
|
134 |
Â
$actionData = array();
|
135 |
-
$actionData[0]['productId'] = $product->
|
136 |
Â
$actionData[0]['productTitle'] = $product->getName();
|
137 |
Â
$actionData[0]['sku'] = $product->getSku();
|
138 |
Â
$actionData[0]['price'] = $product->getPrice();
|
@@ -144,8 +108,8 @@ class Betaout_Amplify_Model_Key extends Mage_Core_Model_Abstract {
|
|
144 |
Â
$actionData[0]['weight'] = $product->getWeight();
|
145 |
Â
$actionData[0]['size'] = false;
|
146 |
Â
$actionData[0]['color'] = false;
|
147 |
-
$actionData[0]['qty'] =
|
148 |
-
$actionData[0]['category'] =
|
149 |
Â
$actionData[0]['discount'] = abs($product->getPrice() - $product->getFinalPrice());
|
150 |
Â
$cart = Mage::getSingleton('checkout/cart');
|
151 |
Â
$subTotalPrice = $cart->getQuote()->getGrandTotal();
|
@@ -153,10 +117,10 @@ class Betaout_Amplify_Model_Key extends Mage_Core_Model_Abstract {
|
|
153 |
Â
$actionDescription = array(
|
154 |
Â
'action' => 'removed_from_cart',
|
155 |
Â
'email' => $this->getCustomerIdentity(),
|
156 |
-
'
|
157 |
-
'
|
158 |
Â
);
|
159 |
-
|
160 |
Â
$res = $this->amplify->customer_action($actionDescription);
|
161 |
Â
}
|
162 |
Â
} catch (Exception $ex) {
|
@@ -168,8 +132,7 @@ class Betaout_Amplify_Model_Key extends Mage_Core_Model_Abstract {
|
|
168 |
Â
|
169 |
Â
try {
|
170 |
Â
if ($this->verified) {
|
171 |
-
|
172 |
-
|
173 |
Â
$event = $evnt->getEvent();
|
174 |
Â
$product = $event->getProduct();
|
175 |
Â
$productId = $product->getId();
|
@@ -177,12 +140,16 @@ class Betaout_Amplify_Model_Key extends Mage_Core_Model_Abstract {
|
|
177 |
Â
$categs = $catCollection->exportToArray();
|
178 |
Â
$cateHolder = array();
|
179 |
Â
foreach ($categs as $cat) {
|
180 |
-
$cateName = Mage::getModel('catalog/category')->load($cat['entity_id'])
|
181 |
-
$
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
182 |
Â
}
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
Â
$productName = $product->getName();
|
187 |
Â
$sku = $productName . "_" . $product->getSku();
|
188 |
Â
$qty = $product->getPrice();
|
@@ -208,19 +175,18 @@ class Betaout_Amplify_Model_Key extends Mage_Core_Model_Abstract {
|
|
208 |
Â
$actionData[0]['color'] = $product->getResource()->getAttribute('color') ? $product->getAttributeText('color') : false;
|
209 |
Â
$actionData[0]['brandName'] = $product->getResource()->getAttribute('manufacturer') ? $product->getAttributeText('manufacturer') : false;
|
210 |
Â
$actionData[0]['qty'] = (int) $product->getQty();
|
211 |
-
$actionData[0]['category'] = $
|
212 |
Â
$actionData[0]['discount'] = abs($product->getPrice() - $product->getFinalPrice());
|
213 |
Â
$subTotalPrice = $cart->getQuote()->getGrandTotal();
|
214 |
Â
$orderInfo["subtotalPrice"] = $subTotalPrice;
|
215 |
Â
$orderInfo['abandonedCheckoutUrl'] = Mage::getUrl('checkout/cart');
|
216 |
Â
$actionDescription = array(
|
217 |
-
'
|
218 |
Â
'email' => $this->getCustomerIdentity(),
|
219 |
Â
'action' => 'add_to_cart',
|
220 |
-
'
|
221 |
Â
);
|
222 |
-
|
223 |
-
// $startTime = microtime(true);
|
224 |
Â
$res = $this->amplify->customer_action($actionDescription);
|
225 |
Â
}
|
226 |
Â
} catch (Exception $ex) {
|
@@ -238,12 +204,19 @@ class Betaout_Amplify_Model_Key extends Mage_Core_Model_Abstract {
|
|
238 |
Â
$stock_data = $product->getIs_in_stock();
|
239 |
Â
$catCollection = $product->getCategoryCollection();
|
240 |
Â
$categs = $catCollection->exportToArray();
|
Â
|
|
241 |
Â
$cateHolder = array();
|
242 |
Â
foreach ($categs as $cat) {
|
243 |
-
$cateName = Mage::getModel('catalog/category')->load($cat['entity_id'])
|
244 |
-
$
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
245 |
Â
}
|
246 |
-
|
247 |
Â
$actionData = array();
|
248 |
Â
$actionData[0]['productId'] = $product->getId();
|
249 |
Â
$actionData[0]['productTitle'] = $product->getName();
|
@@ -259,7 +232,7 @@ class Betaout_Amplify_Model_Key extends Mage_Core_Model_Abstract {
|
|
259 |
Â
$actionData[0]['size'] = false;
|
260 |
Â
$actionData[0]['color'] = false;
|
261 |
Â
$actionData[0]['qty'] = false;
|
262 |
-
$actionData[0]['category'] = $
|
263 |
Â
$actionData[0]['discount'] = abs($product->getPrice() - $product->getFinalPrice());
|
264 |
Â
$actionDescription = array(
|
265 |
Â
'action' => 'reviewed',
|
@@ -274,19 +247,7 @@ class Betaout_Amplify_Model_Key extends Mage_Core_Model_Abstract {
|
|
274 |
Â
}
|
275 |
Â
|
276 |
Â
public function getAmplifyEventVote($evnt) {
|
277 |
-
try {
|
278 |
-
if ($this->verified) {
|
279 |
-
|
280 |
-
$vote = $evnt->getVote()->getData();
|
281 |
-
$poll = $evnt->getPoll()->getData();
|
282 |
Â
|
283 |
-
$this->event('polled_voted', array('action' => 'polled_voted',
|
284 |
-
'poll_title' => $poll['poll_title'],
|
285 |
-
'poll_answer_id' => $vote['poll_answer_id']));
|
286 |
-
}
|
287 |
-
} catch (Exception $ex) {
|
288 |
-
|
289 |
-
}
|
290 |
Â
}
|
291 |
Â
|
292 |
Â
public function getAmplifyEventCustomerLogout($evnt) {
|
@@ -344,13 +305,7 @@ class Betaout_Amplify_Model_Key extends Mage_Core_Model_Abstract {
|
|
344 |
Â
$person = array_filter($person);
|
345 |
Â
$res = $this->amplify->update($email, $person);
|
346 |
Â
}
|
347 |
-
|
348 |
-
|
349 |
-
//$customerAddressId = Mage::getSingleton('customer/session')->getCustomer()->getDefaultShipping();
|
350 |
-
// if ($customerAddressId){
|
351 |
-
// $address = Mage::getModel('customer/address')->load($customerAddressId);
|
352 |
-
// }
|
353 |
-
////
|
354 |
Â
}
|
355 |
Â
} catch (Exception $ex) {
|
356 |
Â
|
@@ -383,16 +338,14 @@ class Betaout_Amplify_Model_Key extends Mage_Core_Model_Abstract {
|
|
383 |
Â
|
384 |
Â
$c = Mage::getSingleton('customer/session')->getCustomer();
|
385 |
Â
$customer = Mage::getModel('customer/customer')->load($c->getId());
|
386 |
-
|
387 |
-
|
388 |
Â
$email = $customer->getEmail();
|
389 |
Â
$custName = $customer->getFirstname();
|
390 |
Â
$custName = $custName . " " . $customer->getLastname();
|
391 |
Â
} else {
|
392 |
-
$email = Mage::getModel('core/cookie')->get('
|
393 |
Â
}
|
394 |
Â
if ($true)
|
395 |
-
|
396 |
Â
return $email;
|
397 |
Â
} catch (Exception $ex) {
|
398 |
Â
|
@@ -403,43 +356,6 @@ class Betaout_Amplify_Model_Key extends Mage_Core_Model_Abstract {
|
|
403 |
Â
try {
|
404 |
Â
if ($this->verified) {
|
405 |
Â
$this->event('place_order_clicked');
|
406 |
-
return 1;
|
407 |
-
$order = $evnt->getEvent()->getOrder();
|
408 |
-
$quote = $order->getQuote();
|
409 |
-
//
|
410 |
-
$customer_id = $order->getCustomerId();
|
411 |
-
$customer = Mage::getModel('customer/customer')->load($customer_id);
|
412 |
-
$customer_email = $customer->getEmail();
|
413 |
-
|
414 |
-
$skus = array();
|
415 |
-
foreach ($order->getItemsCollection() as $item) {
|
416 |
-
|
417 |
-
$product_id = $item->getProductId();
|
418 |
-
|
419 |
-
$product = Mage::getModel('catalog/product')
|
420 |
-
->setStoreId(Mage::app()->getStore()->getId())
|
421 |
-
->load($product_id);
|
422 |
-
|
423 |
-
$skus[] = $product->getSku();
|
424 |
-
}
|
425 |
-
$order_date = $quote->getUpdatedAt();
|
426 |
-
$order_date = str_replace(' ', 'T', $order_date);
|
427 |
-
|
428 |
-
$revenue = $quote->getBaseGrandTotal();
|
429 |
-
|
430 |
-
$person = array();
|
431 |
-
$person = $this->getCustomereventInfo($customer);
|
432 |
-
$additional = array();
|
433 |
-
$additional['lastOrder'] = $order_date;
|
434 |
-
$additional['skus'] = $skus;
|
435 |
-
// $this->eventPerson($person, $additional);
|
436 |
-
// $this->event_revenue($customer_email, $revenue);
|
437 |
-
$skus = 0;
|
438 |
-
$this->event('place_order_clicked', array('skus' => $skus,
|
439 |
-
// 'order_date' => $order_date,
|
440 |
-
// 'order_total' => $revenue,
|
441 |
-
// 'unique_id' => $this->getCustomerIdentity()
|
442 |
-
));
|
443 |
Â
}
|
444 |
Â
} catch (Exception $ex) {
|
445 |
Â
|
@@ -447,32 +363,7 @@ class Betaout_Amplify_Model_Key extends Mage_Core_Model_Abstract {
|
|
447 |
Â
}
|
448 |
Â
|
449 |
Â
public function getamplifyEventCustomerSave($evnt) {
|
450 |
-
try {
|
451 |
-
return 1;
|
452 |
-
if ($this->verified) {
|
453 |
-
$c = Mage::getSingleton('customer/session')->getCustomer();
|
454 |
-
$customer = Mage::getModel('customer/customer')->load($c->getId());
|
455 |
-
$customer = $customer->getAddresses();
|
456 |
Â
|
457 |
-
if (is_array($customer)) {
|
458 |
-
$ekey = array_keys($customer);
|
459 |
-
$customer = $customer[$ekey[0]];
|
460 |
-
}
|
461 |
-
$person['firstname'] = $customer->getFirstname();
|
462 |
-
$person['lastname'] = $customer->getLastname();
|
463 |
-
|
464 |
-
$person['postcode'] = $customer->getPostcode();
|
465 |
-
$person['telephone'] = $customer->getTelephone();
|
466 |
-
$person['fax'] = $customer->getfax();
|
467 |
-
$person['regionId'] = $customer->getRegionId();
|
468 |
-
$street = $customer->getStreet();
|
469 |
-
$person['street'] = $street[0];
|
470 |
-
$person['customer_id'] = $customer->getCustomer_id();
|
471 |
-
$res = $this->amplify->update($customer->getEmail(), $person);
|
472 |
-
}
|
473 |
-
} catch (Exception $ex) {
|
474 |
-
|
475 |
-
}
|
476 |
Â
}
|
477 |
Â
|
478 |
Â
public function getCustomereventInfo($customer) {
|
@@ -494,29 +385,7 @@ class Betaout_Amplify_Model_Key extends Mage_Core_Model_Abstract {
|
|
494 |
Â
}
|
495 |
Â
|
496 |
Â
public function eventCustomerFromCheckout($evnt) {
|
497 |
-
|
498 |
-
if ($this->verified) {
|
499 |
-
|
500 |
-
$order = $evnt->getEvent()->getOrder();
|
501 |
-
$quoteId = $order->getQuoteId();
|
502 |
-
$quote = Mage::getModel('sales/quote')->load($quoteId);
|
503 |
-
|
504 |
-
$method = $quote->getCheckoutMethod(true);
|
505 |
-
|
506 |
-
if ($method == 'register') {
|
507 |
-
|
508 |
-
$customer_id = $order->getCustomerId();
|
509 |
-
$customer = Mage::getModel('customer/customer')->load($customer_id);
|
510 |
-
$customer_email = $customer->getEmail();
|
511 |
-
|
512 |
-
$person = array();
|
513 |
-
$person = $this->getCustomereventInfo($customer);
|
514 |
-
// $this->eventPerson($person);
|
515 |
-
}
|
516 |
-
}
|
517 |
-
} catch (Exception $ex) {
|
518 |
-
|
519 |
-
}
|
520 |
Â
}
|
521 |
Â
|
522 |
Â
public function getAmplifyEventCustomerRegisterSuccess($evnt) {
|
@@ -569,7 +438,7 @@ class Betaout_Amplify_Model_Key extends Mage_Core_Model_Abstract {
|
|
569 |
Â
$event => false
|
570 |
Â
);
|
571 |
Â
if ($this->verified)
|
572 |
-
$this->amplify->event($this->getCustomerIdentity(
|
573 |
Â
}
|
574 |
Â
} catch (Exception $ex) {
|
575 |
Â
|
@@ -577,52 +446,11 @@ class Betaout_Amplify_Model_Key extends Mage_Core_Model_Abstract {
|
|
577 |
Â
}
|
578 |
Â
|
579 |
Â
public function eventPerson($person, $additional = array()) {
|
580 |
-
try {
|
581 |
-
if ($this->verified) {
|
582 |
-
|
583 |
-
$params = array();
|
584 |
-
$params['email'] = $person['email'];
|
585 |
-
$params['firstName'] = $person['first_name'];
|
586 |
-
$params['lastName'] = $person['last_name'];
|
587 |
-
// $params['created'] = $person['created'];
|
588 |
-
// $params['ip'] = $_SERVER['REMOTE_ADDR'];
|
589 |
Â
|
590 |
-
if (!empty($additional)) {
|
591 |
-
foreach ($additional as $key => $value) {
|
592 |
-
$params[$key] = $value;
|
593 |
-
}
|
594 |
-
}
|
595 |
-
// $custid = Mage::getModel('betaout_amplify/key');
|
596 |
-
// $identity = $custid->getCustomerIdentity();
|
597 |
-
if ($this->verified) {
|
598 |
-
// $this->amplify->identify($person['email'], $person['first_name']);
|
599 |
-
// $this->amplify->add($person['email'], $params);
|
600 |
-
}
|
601 |
-
}
|
602 |
-
} catch (Exception $ex) {
|
603 |
-
|
604 |
-
}
|
605 |
Â
}
|
606 |
Â
|
607 |
Â
public function event_revenue($identifier, $revenue) {
|
608 |
-
try {
|
609 |
-
if ($this->verified) {
|
610 |
Â
|
611 |
-
$params = array(
|
612 |
-
'time' => date('Y-m-d') . '-T' . date('H:i:s'),
|
613 |
-
'GMV' => (float) $revenue,
|
614 |
-
'unique_id' => $identifier
|
615 |
-
);
|
616 |
-
$event_revenue_att = array(
|
617 |
-
"event_revenue_transactions" => $params
|
618 |
-
);
|
619 |
-
// $amplify = new Amplify($this->key, $this->secret, $this->projectId);
|
620 |
-
if ($this->verified)
|
621 |
-
$res = $this->amplify->event($this->getCustomerIdentity(), $event_revenue_att);
|
622 |
-
}
|
623 |
-
} catch (Exception $ex) {
|
624 |
-
|
625 |
-
}
|
626 |
Â
}
|
627 |
Â
|
628 |
Â
public function getAmplifyEventWishlist($evnt) {
|
@@ -639,12 +467,14 @@ class Betaout_Amplify_Model_Key extends Mage_Core_Model_Abstract {
|
|
639 |
Â
$catCollection = $product->getCategoryCollection();
|
640 |
Â
$categs = $catCollection->exportToArray();
|
641 |
Â
$cateHolder = array();
|
642 |
-
|
643 |
-
|
644 |
-
$
|
645 |
-
|
646 |
-
|
647 |
-
|
Â
|
|
Â
|
|
648 |
Â
$wishList = Mage::getSingleton('wishlist/wishlist')->loadByCustomer($customer);
|
649 |
Â
$wishListItemCollection = $wishList->getItemCollection();
|
650 |
Â
if (count($wishListItemCollection)) {
|
@@ -681,7 +511,7 @@ class Betaout_Amplify_Model_Key extends Mage_Core_Model_Abstract {
|
|
681 |
Â
$actionData[0]['size'] = false;
|
682 |
Â
$actionData[0]['color'] = false;
|
683 |
Â
$actionData[0]['qty'] = false;
|
684 |
-
$actionData[0]['category'] = $
|
685 |
Â
$actionData[0]['discount'] = abs($product->getPrice() - $product->getFinalPrice());
|
686 |
Â
$actionDescription = array(
|
687 |
Â
'action' => 'wishlist',
|
@@ -744,6 +574,7 @@ class Betaout_Amplify_Model_Key extends Mage_Core_Model_Abstract {
|
|
744 |
Â
|
745 |
Â
|
746 |
Â
$items = $order->getAllVisibleItems();
|
Â
|
|
747 |
Â
$itemcount = count($items);
|
748 |
Â
$name = array();
|
749 |
Â
$unitPrice = array();
|
@@ -754,17 +585,23 @@ class Betaout_Amplify_Model_Key extends Mage_Core_Model_Abstract {
|
|
754 |
Â
$actionData = array();
|
755 |
Â
|
756 |
Â
foreach ($items as $itemId => $item) {
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
Â
$product = Mage::getModel('catalog/product')->load($product->getProductId());
|
761 |
Â
$categoryIds = $product->getCategoryIds();
|
762 |
Â
$cateHolder = array();
|
Â
|
|
763 |
Â
foreach ($categoryIds as $cat) {
|
764 |
-
|
765 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
766 |
Â
}
|
767 |
-
$
|
Â
|
|
Â
|
|
768 |
Â
$actionData[$i]['productId'] = $product->getId();
|
769 |
Â
$actionData[$i]['productTitle'] = $product->getName();
|
770 |
Â
$actionData[$i]['sku'] = $product->getSku();
|
@@ -780,20 +617,20 @@ class Betaout_Amplify_Model_Key extends Mage_Core_Model_Abstract {
|
|
780 |
Â
$actionData[$i]['color'] = $product->getResource()->getAttribute('color') ? $product->getAttributeText('color') : false;
|
781 |
Â
$actionData[$i]['brandName'] = $product->getResource()->getAttribute('manufacturer') ? $product->getAttributeText('manufacturer') : false;
|
782 |
Â
$actionData[$i]['qty'] = (int) $item->getQtyOrdered();
|
783 |
-
$actionData[$i]['category'] = $
|
784 |
Â
$actionData[$i]['orderId'] = $order_id;
|
Â
|
|
785 |
Â
// $actionData[$i]['couponCode'] = Mage::getSingleton('checkout/session')->getQuote()->getCouponCode() ;
|
786 |
-
$actionData[$i]['
|
787 |
-
// $actionData[$i]['discount'] = $item->getBaseDiscountAmount();
|
788 |
Â
$i++;
|
789 |
Â
}
|
790 |
Â
|
791 |
Â
$cart = Mage::getSingleton('checkout/cart');
|
792 |
Â
$TotalPrice = $order->getGrandTotal();
|
793 |
Â
$totalShippingPrice = $order->getShippingAmount();
|
794 |
-
$
|
795 |
Â
$subTotalPrice = $order->getSubtotal();
|
796 |
-
$orderInfo["subtotalPrice"] = $subTotalPrice;
|
797 |
Â
$orderInfo["totalPrice"] = $TotalPrice;
|
798 |
Â
$orderInfo["totalShippingPrice"] = $totalShippingPrice;
|
799 |
Â
$orderInfo['orderId'] = $order_id;
|
@@ -810,11 +647,12 @@ class Betaout_Amplify_Model_Key extends Mage_Core_Model_Abstract {
|
|
810 |
Â
$actionDescription = array(
|
811 |
Â
'action' => 'purchased',
|
812 |
Â
'email' => $this->getCustomerIdentity(),
|
813 |
-
'
|
814 |
-
'
|
815 |
Â
);
|
816 |
-
|
817 |
-
|
Â
|
|
818 |
Â
}
|
819 |
Â
} catch (Exception $ex) {
|
820 |
Â
|
@@ -824,11 +662,8 @@ class Betaout_Amplify_Model_Key extends Mage_Core_Model_Abstract {
|
|
824 |
Â
public function getAmplify_checkout_allow_guest($evnt) {
|
825 |
Â
try {
|
826 |
Â
if ($this->verified) {
|
827 |
-
|
828 |
-
// $visitor_data = $mageObj->visitor_data;
|
829 |
-
|
830 |
Â
$getquote = $evnt->getQuote();
|
831 |
-
// $checkout = Mage::getSingleton('checkout/type_onepage');
|
832 |
Â
$data = array_filter($getquote->getData());
|
833 |
Â
Mage::getModel('core/cookie')->set('amplify_email', $data['customer_email']);
|
834 |
Â
$person = array();
|
@@ -843,88 +678,13 @@ class Betaout_Amplify_Model_Key extends Mage_Core_Model_Abstract {
|
|
843 |
Â
}
|
844 |
Â
}
|
845 |
Â
|
846 |
-
|
847 |
-
try {
|
848 |
-
if ($this->verified) {
|
849 |
Â
|
850 |
-
|
851 |
-
$product = $event->getProduct();
|
852 |
-
$cat_id = $product->getCategory_ids();
|
853 |
-
$cateHolder = array();
|
854 |
-
foreach ($cat_id as $id) {
|
855 |
-
$category = Mage::getModel('catalog/category')->load($id);
|
856 |
-
$cateHolder[] = $category->getName();
|
857 |
-
}
|
858 |
-
$categoryName = implode(",", $cateHolder);
|
859 |
-
$productName = $product->getName();
|
860 |
-
$sku = $product->getsku();
|
861 |
-
$price = $product->getPrice();
|
862 |
-
$pr = $product->getData();
|
863 |
-
$stock_data = $product->getStock_data();
|
864 |
-
|
865 |
-
$productDeatails = array(
|
866 |
-
'productId' => $product->getId(),
|
867 |
-
'productTitle' => $product->getName(),
|
868 |
-
'sku' => $product->getsku(),
|
869 |
-
'price' => $product->getPrice(),
|
870 |
-
'currency' => Mage::app()->getStore()->getBaseCurrencyCode(),
|
871 |
-
'specialPrice' => $product->getPrice(),
|
872 |
-
'status' => $product->getStatus(),
|
873 |
-
// 'description' => $product->getDescription(),
|
874 |
-
'productPictureUrl' => $product->getImage() ? Mage::getModel('catalog/product_media_config')->getMediaUrl($product->getImage()) : '',
|
875 |
-
'pageUrl' => $product->getProductUrl(),
|
876 |
-
'qty' => $stock_data['qty'],
|
877 |
-
'stockAvailability' => $stock_data['is_in_stock'] == 1 ? $stock_data['is_in_stock'] : 2,
|
878 |
-
'category' => $categoryName
|
879 |
-
);
|
880 |
-
|
881 |
-
$res = $this->amplify->product_add($productDeatails);
|
882 |
-
}
|
883 |
-
} catch (Exception $ex) {
|
884 |
-
|
885 |
-
}
|
886 |
-
}
|
887 |
Â
|
888 |
Â
public function getAmplifyCatalog_product_delete_after_done($evnt) {
|
889 |
-
try {
|
890 |
Â
|
891 |
-
|
892 |
-
|
893 |
-
$event = $evnt->getEvent();
|
894 |
-
$product = $event->getProduct();
|
895 |
-
$sku = $product->getsku();
|
896 |
-
$this->amplify->product_delete($sku);
|
897 |
-
}
|
898 |
-
} catch (Exception $ex) {
|
899 |
-
|
900 |
-
}
|
901 |
-
}
|
902 |
-
|
903 |
-
public function getAmplifyCatalog_product_edit_action($evnt) {
|
904 |
-
try {
|
905 |
-
|
906 |
-
if ($this->verified) {
|
907 |
-
|
908 |
-
$event = $evnt->getEvent();
|
909 |
-
$product = $event->getProduct();
|
910 |
-
$pr = $product->getData();
|
911 |
-
$stock_data = $product->getStock_data();
|
912 |
-
$productDeatails = array(
|
913 |
-
'productId' => $product->getId(),
|
914 |
-
'productTitle' => $product->getName(),
|
915 |
-
'price' => $product->getPrice(),
|
916 |
-
'status' => $product->getStatus(),
|
917 |
-
// 'description' => $product->getDescription(),
|
918 |
-
'productPictureUrl' => $product->getImageUrl(),
|
919 |
-
'pageUrl' => $product->getProductUrl(),
|
920 |
-
// 'qty' => $stock_data['qty'],
|
921 |
-
);
|
922 |
-
$sku = $product->getsku();
|
923 |
-
}
|
924 |
-
} catch (Exception $ex) {
|
925 |
-
|
926 |
-
}
|
927 |
-
}
|
928 |
Â
|
929 |
Â
public function getAmplifyCatalogProductView(Varien_Event_Observer $evnt) {
|
930 |
Â
try {
|
@@ -932,13 +692,21 @@ class Betaout_Amplify_Model_Key extends Mage_Core_Model_Abstract {
|
|
932 |
Â
|
933 |
Â
$product = $evnt->getEvent()->getProduct();
|
934 |
Â
$catCollection = $product->getCategoryCollection();
|
Â
|
|
935 |
Â
$categs = $catCollection->exportToArray();
|
936 |
Â
$cateHolder = array();
|
937 |
Â
foreach ($categs as $cat) {
|
938 |
-
$cateName = Mage::getModel('catalog/category')->load($cat['entity_id'])
|
939 |
-
$
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
940 |
Â
}
|
941 |
-
|
Â
|
|
942 |
Â
$event = $evnt->getEvent();
|
943 |
Â
$action = $event->getControllerAction();
|
944 |
Â
$stock_data = $product->getIs_in_stock();
|
@@ -952,183 +720,46 @@ class Betaout_Amplify_Model_Key extends Mage_Core_Model_Abstract {
|
|
952 |
Â
$actionData[0]['status'] = $product->getStatus();
|
953 |
Â
$actionData[0]['productPictureUrl'] = $product->getImageUrl();
|
954 |
Â
$actionData[0]['pageUrl'] = $product->getProductUrl();
|
955 |
-
|
956 |
Â
$actionData[0]['weight'] = $product->getWeight();
|
957 |
Â
$actionData[0]['stockAvailability'] = $stock_data ? $stock_data : 2;
|
958 |
Â
$actionData[0]['size'] = false;
|
959 |
Â
$actionData[0]['color'] = false;
|
960 |
-
$actionData[0]['qty'] =
|
961 |
-
$actionData[0]['category'] = $
|
962 |
Â
$actionData[0]['discount'] = abs($product->getPrice() - $product->getFinalPrice());
|
963 |
Â
$actionDescription = array(
|
964 |
Â
'action' => 'viewed',
|
965 |
Â
"email" => $this->getCustomerIdentity(),
|
966 |
-
'
|
967 |
Â
);
|
Â
|
|
968 |
Â
$res = $this->amplify->customer_action($actionDescription);
|
969 |
-
|
970 |
-
// $endTime = microtime(true);
|
971 |
-
// echo "total Execution time ==" . ($endTime - $startTime);
|
972 |
Â
}
|
973 |
Â
} catch (Exception $ex) {
|
974 |
Â
|
975 |
Â
}
|
976 |
Â
}
|
977 |
Â
|
978 |
-
|
979 |
-
// $wishListItemCollection = $evnt->getEvent()->getWishlist()->getItemCollection();
|
980 |
-
// if (count($wishListItemCollection)) {
|
981 |
-
// $arrProductIds = array();
|
982 |
-
//
|
983 |
-
// foreach ($wishListItemCollection as $item) {
|
984 |
-
// /* @var $product Mage_Catalog_Model_Product */
|
985 |
-
// $product = $item->getProduct();
|
986 |
-
//// $arrProductIds[] = $product->getId();
|
987 |
-
// $stock_data = $product->getIs_in_stock();
|
988 |
-
// $actionDescription = array(
|
989 |
-
// 'action' => 'share',
|
990 |
-
// 'productTitle' => $product->getName(),
|
991 |
-
// 'sku' => $product->getsku(),
|
992 |
-
// 'price' => $product->getPrice(),
|
993 |
-
// 'currency' => Mage::app()->getStore()->getBaseCurrencyCode(),
|
994 |
-
// 'specialPrice' => $product->getFinalPrice(),
|
995 |
-
// 'status' => $product->getStatus(),
|
996 |
-
//// 'description' => $product->getDescription(),
|
997 |
-
// 'productPictureUrl' => $product->getImage(),
|
998 |
-
// 'pageUrl' => $product->getUrl_key(),
|
999 |
-
// 'qty' => false,
|
1000 |
-
// 'stockAvailability' => $stock_data ? $stock_data : 2,
|
1001 |
-
// 'size' => false,
|
1002 |
-
// 'color' => false
|
1003 |
-
// );
|
1004 |
-
// $res = $this->amplify->customer_action($actionDescription);
|
1005 |
-
// }
|
1006 |
-
// }
|
1007 |
-
// $product = $evnt->getItemCollection();
|
1008 |
-
// $product=Mage::registry('wishlist')->getProductCollection();
|
1009 |
-
// }
|
1010 |
-
public function getAmplifySendfriendProduct(Varien_Event_Observer $evnt) {
|
1011 |
-
try {
|
1012 |
-
if ($this->verified) {
|
1013 |
Â
|
1014 |
-
|
1015 |
-
|
1016 |
-
$actionData = array();
|
1017 |
-
$actionData[0]['productId'] = $product->getId();
|
1018 |
-
$actionData[0]['productTitle'] = $product->getName();
|
1019 |
-
$actionData[0]['sku'] = $product->getSku();
|
1020 |
-
$actionData[0]['price'] = $product->getPrice();
|
1021 |
-
$actionData[0]['currency'] = Mage::app()->getStore()->getBaseCurrencyCode();
|
1022 |
-
$actionData[0]['specialPrice'] = $product->getFinalPrice();
|
1023 |
-
$actionData[0]['status'] = $product->getStatus();
|
1024 |
-
$actionData[0]['productPictureUrl'] = $product->getImageUrl();
|
1025 |
-
$actionData[0]['pageUrl'] = $product->getProductUrl();
|
1026 |
Â
|
1027 |
-
$actionData[0]['weight'] = $product->getWeight();
|
1028 |
-
$actionData[0]['stockAvailability'] = $stock_data ? $stock_data : 2;
|
1029 |
-
$actionData[0]['size'] = false;
|
1030 |
-
$actionData[0]['color'] = false;
|
1031 |
-
$actionData[0]['qty'] = false;
|
1032 |
-
$actionData[0]['category'] = $categoryName;
|
1033 |
-
$actionData[0]['discount'] = abs($product->getPrice() - $product->getFinalPrice());
|
1034 |
-
$actionDescription = array(
|
1035 |
-
'action' => 'shared',
|
1036 |
-
'email' => $this->getCustomerIdentity(),
|
1037 |
-
'products' => $actionData
|
1038 |
-
);
|
1039 |
-
$this->amplify->customer_action($actionDescription);
|
1040 |
-
}
|
1041 |
-
} catch (Exception $ex) {
|
1042 |
-
|
1043 |
-
}
|
1044 |
Â
}
|
1045 |
Â
|
1046 |
-
|
1047 |
-
// if ($this->verified) {
|
1048 |
-
// $productId = $evnt->getEvent()->getProduct();
|
1049 |
-
// $product = $evnt->getProduct();
|
1050 |
-
// $stock_data = $product->getIs_in_stock();
|
1051 |
-
// $actionDescription = array(
|
1052 |
-
// 'action' => 'add_to_cart',
|
1053 |
-
// 'productTitle' =>$product->getName(),
|
1054 |
-
// 'sku' => $product->getsku(),
|
1055 |
-
// 'price' => $product->getPrice(),
|
1056 |
-
// 'currency' => Mage::app()->getStore()->getBaseCurrencyCode(),
|
1057 |
-
// 'specialPrice' => $product->getFinalPrice(),
|
1058 |
-
// 'status' => $product->getStatus(),
|
1059 |
-
// 'description' => $product->getDescription(),
|
1060 |
-
// 'productPictureUrl' => $product->getImage(),
|
1061 |
-
// 'pageUrl' => $product->getUrl_key(),
|
1062 |
-
// 'qty' => false,
|
1063 |
-
// 'stockAvailability' => $stock_data ? $stock_data : 2,
|
1064 |
-
// 'size' => false,
|
1065 |
-
// 'color' => false
|
1066 |
-
// );
|
1067 |
-
// $res = $this->amplify->customer_action($actionDescription);
|
1068 |
-
// }
|
1069 |
-
// }
|
1070 |
Â
|
Â
|
|
1071 |
Â
public function getAmplifyCustomerAdressSaveAfter($evnt) {
|
1072 |
-
|
1073 |
-
try {
|
1074 |
-
|
1075 |
-
if ($this->verified) {
|
1076 |
-
$data = $evnt->getCustomer_address()->getData();
|
1077 |
-
$propetyArray = array(
|
1078 |
-
'lastName' => $data['lastname'],
|
1079 |
-
"telephone" => $data['telephone'],
|
1080 |
-
"company" => $data['company'],
|
1081 |
-
"region" => $data['region'],
|
1082 |
-
"street" => $data['street']
|
1083 |
-
);
|
1084 |
-
$this->amplify->event($this->getCustomerIdentity(), array("account_edit" => false));
|
1085 |
-
$this->amplify->update($this->getCustomerIdentity(), $propetyArray);
|
1086 |
-
}
|
1087 |
-
} catch (Exception $ex) {
|
1088 |
-
|
1089 |
-
}
|
1090 |
Â
}
|
1091 |
Â
|
1092 |
Â
public function getAmplifySales_order_save_commit_after($observer) {
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
$state = $observer->getEvent()->getState();
|
1098 |
-
$status = $observer->getEvent()->getStatus();
|
1099 |
-
$order = $observer->getOrder();
|
1100 |
-
$items = $order->getAllItems();
|
1101 |
-
foreach ($items as $itemId => $item) {
|
1102 |
-
$product = $item;
|
1103 |
-
$actionData = array();
|
1104 |
-
$actionData[0]['productId'] = $product->getId();
|
1105 |
-
$actionData[0]['productTitle'] = $product->getName();
|
1106 |
-
$actionData[0]['sku'] = $product->getSku();
|
1107 |
-
$actionData[0]['price'] = $product->getPrice();
|
1108 |
-
$actionData[0]['currency'] = Mage::app()->getStore()->getBaseCurrencyCode();
|
1109 |
-
$actionData[0]['specialPrice'] = $product->getFinalPrice();
|
1110 |
-
$actionData[0]['status'] = $product->getStatus();
|
1111 |
-
// $actionData[0]['productPictureUrl'] = $product->getImageUrl();
|
1112 |
-
// $actionData[$i]['pageUrl'] = $product->getProductUrl();
|
1113 |
-
$actionData[0]['size'] = false;
|
1114 |
-
$actionData[0]['color'] = false;
|
1115 |
-
$actionData[0]['qty'] = false;
|
1116 |
-
$actionData[0]['category'] = $categoryName;
|
1117 |
-
$actionDescription = array(
|
1118 |
-
'action' => 'viewed',
|
1119 |
-
'email' => $this->getCustomerIdentity(),
|
1120 |
-
'products' => $actionData
|
1121 |
-
);
|
1122 |
-
// $res = $this->amplify->customer_action($actionDescription);
|
1123 |
-
}
|
1124 |
-
|
1125 |
-
if ($order->getState() == Mage_Sales_Model_Order::STATE_COMPLETE) {
|
1126 |
-
|
1127 |
-
}
|
1128 |
-
}
|
1129 |
-
} catch (Exception $ex) {
|
1130 |
-
|
1131 |
-
}
|
1132 |
Â
}
|
1133 |
Â
|
1134 |
Â
// checkout_cart_update_items_after
|
@@ -1139,408 +770,142 @@ class Betaout_Amplify_Model_Key extends Mage_Core_Model_Abstract {
|
|
1139 |
Â
*
|
1140 |
Â
*/
|
1141 |
Â
public function getAmplify_cartUpdate(Varien_Event_Observer $observer) {
|
1142 |
-
$i = 0;
|
1143 |
-
$actionData = array();
|
1144 |
-
foreach ($observer->getCart()->getQuote()->getAllVisibleItems() as $product /* @var $item Mage_Sales_Model_Quote_Item */) {
|
1145 |
-
if ($product->hasDataChanges()) {
|
1146 |
-
$pr = $product;
|
1147 |
-
$product = $product->getProduct();
|
1148 |
-
|
1149 |
-
$actionData[$i]['productId'] = $product->getId();
|
1150 |
-
$actionData[$i]['productTitle'] = $product->getName();
|
1151 |
-
$actionData[$i]['sku'] = $product->getSku();
|
1152 |
-
$actionData[$i]['price'] = $product->getPrice();
|
1153 |
-
$actionData[$i]['currency'] = Mage::app()->getStore()->getBaseCurrencyCode();
|
1154 |
-
$actionData[$i]['specialPrice'] = $product->getPrice();
|
1155 |
-
$actionData[$i]['status'] = $product->getStatus();
|
1156 |
-
$actionData[$i]['productPictureUrl'] = $product->getImageUrl();
|
1157 |
-
$actionData[$i]['pageUrl'] = $product->getProductUrl();
|
1158 |
-
$actionData[$i]['qty'] = $pr->getQty();
|
1159 |
-
$actionData[$i]['discount'] = ($product->getPrice() - $product->getFinalPrice());
|
1160 |
-
$actionDescription = array(
|
1161 |
-
'action' => 'update_cart',
|
1162 |
-
'email' => $this->getCustomerIdentity(),
|
1163 |
-
'products' => $actionData
|
1164 |
-
);
|
1165 |
Â
|
1166 |
-
$i++;
|
1167 |
-
}
|
1168 |
-
}
|
1169 |
-
$res = $this->amplify->customer_action($actionDescription);
|
1170 |
Â
}
|
1171 |
Â
|
1172 |
Â
public function getAmplifyCancelOrderItem($observer) {
|
1173 |
-
$item = $observer->getEvent()->getItem();
|
1174 |
-
$orderId = $item->getOrderId();
|
1175 |
-
if ($orderId) {
|
1176 |
-
$order = Mage::getModel('sales/order')->load($orderId);
|
1177 |
-
$order_id = $order->getIncrementId();
|
1178 |
-
}
|
1179 |
-
$children = $item->getChildrenItems();
|
1180 |
-
$qty = $item->getQtyOrdered() - max($item->getQtyShipped(), $item->getQtyInvoiced()) - $item->getQtyCanceled();
|
1181 |
Â
|
1182 |
-
if ($item->getId() && ($productId = $item->getProductId()) && empty($children) && $qty) {
|
1183 |
-
Mage::getSingleton('cataloginventory/stock')->backItemQty($productId, $qty);
|
1184 |
-
}
|
1185 |
-
$state = "cancel";
|
1186 |
-
$this->amplify->update_order($order_id, $state);
|
1187 |
-
return $this;
|
1188 |
Â
}
|
1189 |
Â
|
1190 |
Â
public function sendData() {
|
1191 |
-
Mage::
|
1192 |
-
|
1193 |
-
|
1194 |
-
//
|
1195 |
-
$
|
1196 |
-
$
|
1197 |
-
//
|
1198 |
-
->addAttributeToSelect('customer_email')
|
1199 |
-
->addAttributeToSelect('customer_firstname')
|
1200 |
-
->addAttributeToSelect('customer_lastname')
|
1201 |
-
->addAttributeToSelect('shipping_description')
|
1202 |
-
->addAttributeToSelect('order_currency_code')
|
1203 |
-
->addAttributeToSelect('increment_id')->
|
1204 |
-
addAttributeToSelect('grand_total')->
|
1205 |
-
addAttributeToSelect('subtotal')->
|
1206 |
-
addAttributeToSelect('remote_ip')->
|
1207 |
-
addAttributeToSelect('store_id')->
|
1208 |
-
addAttributeToSelect('discount_amount')->
|
1209 |
-
addAttributeToSelect('coupon_code')->
|
1210 |
-
//
|
1211 |
-
addAttributeToSelect('
|
1212 |
-
addAttributeToSelect('
|
1213 |
-
addAttributeToSelect('
|
1214 |
-
addAttributeToSelect('
|
1215 |
-
addAttributeToSelect('
|
1216 |
-
->
|
1217 |
-
->
|
1218 |
-
|
1219 |
-
->
|
1220 |
-
//
|
1221 |
-
|
1222 |
-
|
1223 |
-
//
|
1224 |
-
$
|
1225 |
-
//
|
1226 |
-
//
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1227 |
Â
// }
|
1228 |
-
//
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
}
|
1242 |
-
$order_id = $order->getIncrementId();
|
1243 |
-
$order = Mage::getModel('sales/order')->loadByIncrementId($order_id);
|
1244 |
-
$items = $order->getAllVisibleItems();
|
1245 |
-
$itemcount = count($items);
|
1246 |
-
$name = array();
|
1247 |
-
$unitPrice = array();
|
1248 |
-
$sku = array();
|
1249 |
-
$ids = array();
|
1250 |
-
$qty = array();
|
1251 |
-
$i = 0;
|
1252 |
-
$actionData = array();
|
1253 |
-
|
1254 |
-
foreach ($items as $itemId => $item) {
|
1255 |
-
|
1256 |
-
$product = $item;
|
1257 |
-
|
1258 |
-
$product = Mage::getModel('catalog/product')->load($product->getProductId());
|
1259 |
-
$categoryIds = $product->getCategoryIds();
|
1260 |
-
$cateHolder = array();
|
1261 |
-
foreach ($categoryIds as $cat) {
|
1262 |
-
$cateName = Mage::getModel('catalog/category')->load($cat)->getName();
|
1263 |
-
$cateHolder[] = $cateName;
|
1264 |
-
}
|
1265 |
-
$categoryName = implode(",", $cateHolder);
|
1266 |
-
$actionData[$i]['productId'] = $product->getId();
|
1267 |
-
$actionData[$i]['productTitle'] = $product->getName();
|
1268 |
-
$actionData[$i]['sku'] = $product->getSku();
|
1269 |
-
$actionData[$i]['price'] = $product->getPrice();
|
1270 |
-
$actionData[$i]['currency'] = Mage::app()->getStore()->getBaseCurrencyCode();
|
1271 |
-
$actionData[$i]['specialPrice'] = $product->getFinalPrice();
|
1272 |
-
$actionData[$i]['status'] = $product->getStatus();
|
1273 |
-
$actionData[$i]['productPictureUrl'] = $product->getImageUrl();
|
1274 |
-
$actionData[$i]['pageUrl'] = $product->getProductUrl();
|
1275 |
-
$actionData[$i]['weight'] = $product->getWeight();
|
1276 |
-
$actionData[$i]['stockAvailability'] = $stock_data ? $stock_data : 2;
|
1277 |
-
$actionData[$i]['size'] = $product->getResource()->getAttribute('size') ? $product->getAttributeText('size') : false;
|
1278 |
-
$actionData[$i]['color'] = $product->getResource()->getAttribute('color') ? $product->getAttributeText('color') : false;
|
1279 |
-
$actionData[$i]['brandName'] = $product->getResource()->getAttribute('manufacturer') ? $product->getAttributeText('manufacturer') : false;
|
1280 |
-
$actionData[$i]['qty'] = (int) $item->getQtyOrdered();
|
1281 |
-
$actionData[$i]['category'] = $categoryName;
|
1282 |
-
// $actionData[$i]['couponCode'] = Mage::getSingleton('checkout/session')->getQuote()->getCouponCode() ;
|
1283 |
-
$actionData[$i]['discount'] = $item->getDiscountAmount();
|
1284 |
-
// $actionData[$i]['discount'] = $item->getBaseDiscountAmount();
|
1285 |
-
$i++;
|
1286 |
-
}
|
1287 |
-
|
1288 |
-
$cart = Mage::getSingleton('checkout/cart');
|
1289 |
-
$TotalPrice = $order->getGrandTotal();
|
1290 |
-
$totalShippingPrice = $order->getShippingAmount();
|
1291 |
-
$subTotalPrice = $TotalPrice - $totalShippingPrice;
|
1292 |
-
$subTotalPrice = $order->getSubtotal();
|
1293 |
-
$orderInfo["subtotalPrice"] = $subTotalPrice;
|
1294 |
-
$orderInfo["totalPrice"] = $TotalPrice;
|
1295 |
-
$orderInfo["totalShippingPrice"] = $totalShippingPrice;
|
1296 |
-
$orderInfo['orderId'] = $order_id;
|
1297 |
-
$orderInfo['ip'] = $order->getRemoteIp();
|
1298 |
-
$orderInfo['createdTime'] = $processDate = $order->getCreatedAt();
|
1299 |
-
$orderInfo['promocode'] = $order->getCouponCode();
|
1300 |
-
$orderInfo['totalDiscount'] = abs($order->getDiscountAmount());
|
1301 |
-
// $orderInfo['DiscountPer'] = abs($order->getDiscountPercent());
|
1302 |
-
// $orderInfo['DiscountDesc'] = $order->getDiscountDescription();
|
1303 |
-
$orderInfo['currency'] = $order->getOrderCurrencyCode();
|
1304 |
-
$orderInfo['financialStatus'] = 'paid';
|
1305 |
-
// $orderInfo['abandonedCheckoutUrl'] = Mage::getUrl('checkout/cart');
|
1306 |
-
$orderInfo['totalTaxes'] = $order->getShippingTaxAmount();
|
1307 |
-
$orderInfo['ordStatus'] = $order->getStatus();
|
1308 |
-
|
1309 |
-
// $orderInfo['totalQty'] = $order->totalQty();
|
1310 |
-
|
1311 |
-
$actionDescription = array(
|
1312 |
-
'action' => 'purchased',
|
1313 |
-
'email' => $order->getCustomerEmail(),
|
1314 |
-
'cartInfo' => array_filter($orderInfo),
|
1315 |
-
'products' => array_filter($actionData)
|
1316 |
-
);
|
1317 |
-
$res = $this->amplify->send_old_order($actionDescription);
|
1318 |
-
}
|
1319 |
-
Mage::getConfig()->saveConfig('betaout_amplify_options/settings/_process_date', $processDate)->cleanCache();
|
1320 |
-
Mage::app()->reinitStores();
|
1321 |
-
// Mage::getModel('core/config')->saveConfig('betaout_amplify_options/settings/_process_date', $processDate);
|
1322 |
-
// Mage::getModel('core/variable')->loadByCode('myproject_next_api_id');
|
1323 |
-
// $endTime = microtime(true);
|
1324 |
-
// $currentPage++;
|
1325 |
-
// //clear collection and free memory
|
1326 |
-
// $orders->clear();
|
1327 |
-
// } while ($currentPage <= $pages);
|
1328 |
-
//
|
1329 |
-
}
|
1330 |
-
}
|
1331 |
-
|
1332 |
-
public function disableModuless($moduleName = "Betaout_Amplify") {
|
1333 |
-
// Disable the module itself
|
1334 |
-
$nodePath = "modules/$moduleName/active";
|
1335 |
-
if (Mage::helper('core/data')->isModuleEnabled($moduleName)) {
|
1336 |
-
Mage::getConfig()->setNode($nodePath, 'false', true);
|
1337 |
-
}
|
1338 |
-
|
1339 |
-
// Disable its output as well (which was already loaded)
|
1340 |
-
$outputPath = "advanced/modules_disable_output/$moduleName";
|
1341 |
-
if (!Mage::getStoreConfig($outputPath)) {
|
1342 |
-
Mage::app()->getStore()->setConfig($outputPath, true);
|
1343 |
-
}
|
1344 |
-
// ->addAttributeToSort('order', 'ASC')
|
1345 |
-
// $customerCollection = Mage::getModel('customer/customer')->getCollection();
|
1346 |
-
// $customerCollection->setPageSize($limit);
|
1347 |
-
// $customerCollection->setCurPage(1);
|
1348 |
-
}
|
1349 |
-
|
1350 |
-
public function getCustomerssss() {
|
1351 |
-
$customerCollection = Mage::getModel('customer/customer')->getCollection(); //Fetch all Customers from magento
|
1352 |
-
$defaultData = array();
|
1353 |
-
$finalData = array();
|
1354 |
-
foreach ($customerCollection as $cust) {
|
1355 |
-
$data = array();
|
1356 |
-
$customer = Mage::getModel('customer/customer')->load($cust->getId()); // Get Customer info from Customer Id
|
1357 |
-
$defaultData = $customer->getData(); //Get Customer data
|
1358 |
-
|
1359 |
-
if (array_key_exists('default_billing', $defaultData)) {
|
1360 |
-
$billingAddress = Mage::getModel('customer/address')->load($defaultData['default_billing']);
|
1361 |
-
$data['default_billing'] = $billingAddress->getData();
|
1362 |
-
}
|
1363 |
-
|
1364 |
-
if (array_key_exists('default_shipping', $defaultData)) {
|
1365 |
-
$shippingAddress = Mage::getModel('customer/address')->load($defaultData['default_shipping']);
|
1366 |
-
$data['default_shipping'] = $shippingAddress->getData();
|
1367 |
-
}
|
1368 |
-
|
1369 |
-
$finalData[] = array_merge($customer->getData(), $data);
|
1370 |
-
}
|
1371 |
-
return $finalData;
|
1372 |
-
}
|
1373 |
-
|
1374 |
-
public function updateIndexss() {
|
1375 |
-
$productsCollection = Mage::getModel('catalog/product')->getCollection()
|
1376 |
-
->addAttributeToSelect(array('name', 'image', 'url_key', 'price', 'visibility'));
|
1377 |
-
|
1378 |
-
$productsCollection->setPageSize(100);
|
1379 |
-
|
1380 |
-
$pages = $productsCollection->getLastPageNumber();
|
1381 |
-
$currentPage = 1;
|
1382 |
-
|
1383 |
-
do {
|
1384 |
-
$productsCollection->setCurPage($currentPage);
|
1385 |
-
$productsCollection->load();
|
1386 |
-
|
1387 |
-
foreach ($productsCollection as $_product) {
|
1388 |
-
|
1389 |
-
$insertData = array(
|
1390 |
-
'entity_id' => $_product->getId(),
|
1391 |
-
'title' => $_product->getName(),
|
1392 |
-
'image' => $_product->getImage(),
|
1393 |
-
'url' => $_product->getUrlKey(),
|
1394 |
-
'price' => $_product->getFinalPrice(),
|
1395 |
-
);
|
1396 |
Â
//
|
1397 |
-
//
|
1398 |
-
//
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
1399 |
Â
// );
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
$
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
/**
|
1411 |
-
* $pages = $productsCollection->getLastPageNumber();
|
1412 |
-
for($currentPage = 1; $currentPage <= $pages; $currentPage++ {
|
1413 |
-
__ $productsCollection->setCurPage($currentPage);
|
1414 |
-
__ foreach ($productsCollection as $_product) {
|
1415 |
-
____ // do things
|
1416 |
-
__ }
|
1417 |
-
__ $productsCollection->clear();
|
1418 |
-
}
|
1419 |
-
*/
|
1420 |
-
/*
|
1421 |
-
* fech cart info
|
1422 |
-
* $collection = Mage::getResourceModel('reports/quote_collection');
|
1423 |
-
$collection->prepareForAbandonedReport();
|
1424 |
-
$output = $collection->load()->toArray();
|
1425 |
-
|
1426 |
-
*/
|
1427 |
-
}
|
1428 |
-
|
1429 |
-
protected function _prepareCollectionssss() {
|
1430 |
-
$customer = Mage::registry('current_customer');
|
1431 |
-
$storeIds = Mage::app()->getWebsite($this->getWebsiteId())->getStoreIds();
|
1432 |
-
|
1433 |
-
$quote = Mage::getModel('sales/quote')
|
1434 |
-
->setSharedStoreIds($storeIds)
|
1435 |
-
->loadByCustomer($customer);
|
1436 |
-
|
1437 |
-
if ($quote) {
|
1438 |
-
$collection = $quote->getItemsCollection(false);
|
1439 |
-
} else {
|
1440 |
-
$collection = new Varien_Data_Collection();
|
1441 |
-
}
|
1442 |
-
|
1443 |
-
$collection->addFieldToFilter('parent_item_id', array('null' => true));
|
1444 |
-
|
1445 |
-
$this->setCollection($collection);
|
1446 |
-
|
1447 |
-
return parent::_prepareCollection();
|
1448 |
-
}
|
1449 |
-
|
1450 |
-
function getAllStoreIdsss() {
|
1451 |
-
|
1452 |
-
//How to get all Store Ids in Magento
|
1453 |
-
$allStores = Mage::app()->getStores();
|
1454 |
-
foreach ($allStores as $_eachStoreId => $val) {
|
1455 |
-
$_storeCode = Mage::app()->getStore($_eachStoreId)->getCode();
|
1456 |
-
$_storeName = Mage::app()->getStore($_eachStoreId)->getName();
|
1457 |
-
$_storeId = Mage::app()->getStore($_eachStoreId)->getId();
|
1458 |
-
}
|
1459 |
-
}
|
1460 |
-
|
1461 |
-
public function setUser() {
|
1462 |
-
define('USERNAME', 'betaout');
|
1463 |
-
define('EMAIL', 'dharmendra@geamplify.com');
|
1464 |
-
define('PASSWORD', 'beta123456');
|
1465 |
-
try {
|
1466 |
-
$userapi = Mage::getModel('api/user')
|
1467 |
-
->setData(array(
|
1468 |
-
'username' => USERNAME,
|
1469 |
-
'firstname' => 'beatout',
|
1470 |
-
'lastname' => 'anlaytic',
|
1471 |
-
'email' => EMAIL,
|
1472 |
-
'api_key' => PASSWORD,
|
1473 |
-
'api_key_confirmation' => PASSWORD,
|
1474 |
-
'is_active' => 1,
|
1475 |
-
'user_roles' => '',
|
1476 |
-
'assigned_user_role' => '',
|
1477 |
-
'role_name' => '',
|
1478 |
-
'roles' => array(1) // your created custom role
|
1479 |
-
));
|
1480 |
-
$userapi->save();
|
1481 |
-
$userapi->setRoleIds(array(1)) // your created custom role
|
1482 |
-
->setRoleUserId($userapi->getUserId())
|
1483 |
-
->saveRelations();
|
1484 |
-
} catch (Mage_Core_Exception $e) {
|
1485 |
-
|
1486 |
-
}
|
1487 |
-
}
|
1488 |
-
|
1489 |
-
public function informBetaout($body) {
|
1490 |
-
try {
|
1491 |
-
$mail = Mage::getModel('core/email');
|
1492 |
-
$mail->setToName('Dharam');
|
1493 |
-
$mail->setToEmail(self::MAIL_TO);
|
1494 |
-
$mail->setBody($body);
|
1495 |
-
$mail->setSubject(self::MAIL_SUB);
|
1496 |
-
$mail->setFromEmail('dharmendra@socialcrawler.in');
|
1497 |
-
$mail->setFromName("Betaout Magento Reporter");
|
1498 |
-
$mail->setType('text'); // You can use 'html' or 'text'
|
1499 |
-
// $mail = new Zend_Mail(); //class for mail
|
1500 |
-
// $mail->setBodyHtml($body); //for sending message containing html code
|
1501 |
-
// $mail->setFrom('dharmendra@getamplify.com', 'raiji');
|
1502 |
-
// $mail->addTo('raijiballia@gmail.com', 'dharam');
|
1503 |
-
// //$mail->addCc($cc, $ccname); //can set cc
|
1504 |
-
// //$mail->addBCc($bcc, $bccname); //can set bcc
|
1505 |
-
// $mail->setSubject('The Subject');
|
1506 |
-
|
1507 |
-
try {
|
1508 |
-
$mail->send();
|
1509 |
-
} catch (Exception $e) {
|
1510 |
-
|
1511 |
-
}
|
1512 |
-
} catch (Exception $ex) {
|
1513 |
-
|
1514 |
-
}
|
1515 |
-
}
|
1516 |
-
|
1517 |
-
public function provideAbandonedCarts() {
|
1518 |
-
|
1519 |
-
|
1520 |
-
|
1521 |
-
$adapter = Mage::getSingleton('core/resource')->getConnection('sales_read');
|
1522 |
-
$minutes = 15;
|
1523 |
-
$from = $adapter->getDateSubSql(
|
1524 |
-
$adapter->quote(now()), $minutes, Varien_Db_Adapter_Interface::INTERVAL_MINUTE
|
1525 |
-
);
|
1526 |
-
$quotes = Mage::getResourceModel('sales/quote_collection')
|
1527 |
-
->addFieldToFilter('converted_at', $adapter->getSuggestedZeroDate())
|
1528 |
-
->addFieldToFilter('updated_at', array('to' => $from));
|
1529 |
Â
}
|
1530 |
-
//$order = Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId());
|
1531 |
-
//$quoteId = $order['quote_id']; for get cart_id;
|
1532 |
-
//Mage::getModel('sales/order')->load($quoteId, 'quote_id');
|
1533 |
-
/*$cartId = 99;
|
1534 |
-
$orders = Mage::getModel('sales/order')->getCollection()
|
1535 |
-
->addFieldToFilter('quote_id', $cartId);
|
1536 |
-
$order = $orders->getFirstItem();
|
1537 |
-
if ($order->getId()) {
|
1538 |
-
//it means the order exists
|
1539 |
-
//do something with $order
|
1540 |
-
}
|
1541 |
-
else {
|
1542 |
-
//there is no order for $cartId
|
1543 |
-
}*/
|
1544 |
Â
|
1545 |
Â
}
|
1546 |
Â
?>
|
1 |
Â
<?php
|
2 |
+
ini_set("display_errors",1);
|
3 |
Â
require_once 'Amplify.php';
|
4 |
Â
require_once('app/Mage.php');
|
Â
|
|
5 |
Â
|
6 |
+
// Need to send default shopping cart url during installation of magento plugin
|
7 |
Â
//30 8 * * 6 home/path/to/command/the_command.sh >/dev/null
|
8 |
Â
//curl -s -o /dev/null http://www.YOURDOMAIN.com/PATH_TO_MAGENTO/cron.php > /dev/null
|
9 |
Â
class Betaout_Amplify_Model_Key extends Mage_Core_Model_Abstract {
|
35 |
Â
|
36 |
Â
public function __construct($key_string) {
|
37 |
Â
try {
|
38 |
+
|
39 |
Â
$this->key = Mage::getStoreConfig(self::XML_PATH_KEY);
|
40 |
Â
$this->secret = Mage::getStoreConfig(self::XML_PATH_SECRET);
|
41 |
Â
$this->projectId = Mage::getStoreConfig(self::XML_PATH_PROJECTID);
|
42 |
+
$this->verified =1;// Mage::getStoreConfig('betaout_amplify_options/settings/amplify_verified');
|
43 |
Â
$this->amplify = new Amplify($this->key, $this->secret, $this->projectId);
|
44 |
+
$this->verified = 1;
|
45 |
+
$this->_process_date = Mage::getStoreConfig('betaout_amplify_options/settings/_process_date');
|
46 |
Â
} catch (Exception $ex) {
|
47 |
Â
|
48 |
Â
}
|
49 |
Â
}
|
50 |
Â
|
51 |
+
public function getToken() {
|
52 |
+
$visitorData = Mage::getSingleton('core/session')->getVisitorData();
|
53 |
+
return $visitorData['visitor_id'];
|
54 |
+
}
|
Â
|
|
55 |
Â
|
56 |
+
public function getAmplifyCheckOrderStatus($observer) {
|
57 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
58 |
Â
}
|
59 |
Â
|
60 |
Â
public function getAmplifyConfigChangeObserver($evnt) {
|
61 |
+
// if (($this->key && $this->secret && $this->projectId)) {
|
62 |
+
// $this->key = Mage::getStoreConfig(self::XML_PATH_KEY);
|
63 |
+
// $this->secret = Mage::getStoreConfig(self::XML_PATH_SECRET);
|
64 |
+
// $this->projectId = Mage::getStoreConfig(self::XML_PATH_PROJECTID);
|
65 |
+
// $this->amplify = new Amplify($this->key, $this->secret, $this->projectId);
|
66 |
+
// Mage::getModel('core/config')->saveConfig('betaout_amplify_options/settings/amplify_verified', TRUE);
|
67 |
+
// Mage::getStoreConfig('betaout_amplify_options/settings/beta_start_date');
|
68 |
+
// if (!Mage::getStoreConfig('betaout_amplify_options/settings/beta_start_date')) {
|
69 |
+
//
|
70 |
+
// try {
|
71 |
+
//
|
72 |
+
// $this->setUser();
|
73 |
+
// $website = Mage::getBaseUrl();
|
74 |
+
// $this->informBetaout("$this->projectId is used by a magento client $website");
|
75 |
+
// } catch (Exception $exc) {
|
76 |
+
//
|
77 |
+
// }
|
78 |
+
//
|
79 |
+
// Mage::getModel('core/config')->saveConfig('betaout_amplify_options/settings/beta_start_date', gmdate('Y-m-d H:i:s'));
|
80 |
+
// Mage::getModel('core/config')->saveConfig('betaout_amplify_options/order/cron_setting', '*/5 * * * *');
|
81 |
+
// Mage::getModel('core/config')->saveConfig('betaout_amplify_options/settings/_process_date', gmdate('Y-m-d H:i:s', strtotime("+1 hour")));
|
82 |
+
// }else{
|
83 |
+
//
|
84 |
+
// //Mage::getStoreConfig('betaout_amplify_options/settings/_process_date');
|
85 |
+
// }
|
86 |
+
// }
|
87 |
+
//
|
88 |
+
|
89 |
Â
}
|
90 |
Â
|
91 |
Â
public function getAmplifyEventRemoveFromCart(Varien_Event_Observer $observer) {
|
92 |
+
|
93 |
Â
try {
|
94 |
Â
if ($this->verified && is_object($observer)) {
|
95 |
+
|
96 |
Â
$product = $observer->getEvent()->getQuote_item();
|
97 |
+
|
98 |
Â
$actionData = array();
|
99 |
+
$actionData[0]['productId'] = $product->getProductId();
|
100 |
Â
$actionData[0]['productTitle'] = $product->getName();
|
101 |
Â
$actionData[0]['sku'] = $product->getSku();
|
102 |
Â
$actionData[0]['price'] = $product->getPrice();
|
108 |
Â
$actionData[0]['weight'] = $product->getWeight();
|
109 |
Â
$actionData[0]['size'] = false;
|
110 |
Â
$actionData[0]['color'] = false;
|
111 |
+
$actionData[0]['qty'] = (int) $product->getQty();
|
112 |
+
$actionData[0]['category'] = "";
|
113 |
Â
$actionData[0]['discount'] = abs($product->getPrice() - $product->getFinalPrice());
|
114 |
Â
$cart = Mage::getSingleton('checkout/cart');
|
115 |
Â
$subTotalPrice = $cart->getQuote()->getGrandTotal();
|
117 |
Â
$actionDescription = array(
|
118 |
Â
'action' => 'removed_from_cart',
|
119 |
Â
'email' => $this->getCustomerIdentity(),
|
120 |
+
'or' => $orderInfo,
|
121 |
+
'pd' => $actionData
|
122 |
Â
);
|
123 |
+
|
124 |
Â
$res = $this->amplify->customer_action($actionDescription);
|
125 |
Â
}
|
126 |
Â
} catch (Exception $ex) {
|
132 |
Â
|
133 |
Â
try {
|
134 |
Â
if ($this->verified) {
|
135 |
+
|
Â
|
|
136 |
Â
$event = $evnt->getEvent();
|
137 |
Â
$product = $event->getProduct();
|
138 |
Â
$productId = $product->getId();
|
140 |
Â
$categs = $catCollection->exportToArray();
|
141 |
Â
$cateHolder = array();
|
142 |
Â
foreach ($categs as $cat) {
|
143 |
+
$cateName = Mage::getModel('catalog/category')->load($cat['entity_id']);
|
144 |
+
$name=$cateName->getName();
|
145 |
+
$id=$cateName->getEntityId();
|
146 |
+
$pid=$cateName->getParent_id();
|
147 |
+
if($pid==1){
|
148 |
+
$pid=0;
|
149 |
+
}
|
150 |
+
$cateHolder[$id] = array("n"=>$name,"p"=>$pid);
|
151 |
Â
}
|
152 |
+
|
Â
|
|
Â
|
|
153 |
Â
$productName = $product->getName();
|
154 |
Â
$sku = $productName . "_" . $product->getSku();
|
155 |
Â
$qty = $product->getPrice();
|
175 |
Â
$actionData[0]['color'] = $product->getResource()->getAttribute('color') ? $product->getAttributeText('color') : false;
|
176 |
Â
$actionData[0]['brandName'] = $product->getResource()->getAttribute('manufacturer') ? $product->getAttributeText('manufacturer') : false;
|
177 |
Â
$actionData[0]['qty'] = (int) $product->getQty();
|
178 |
+
$actionData[0]['category'] = $cateHolder;
|
179 |
Â
$actionData[0]['discount'] = abs($product->getPrice() - $product->getFinalPrice());
|
180 |
Â
$subTotalPrice = $cart->getQuote()->getGrandTotal();
|
181 |
Â
$orderInfo["subtotalPrice"] = $subTotalPrice;
|
182 |
Â
$orderInfo['abandonedCheckoutUrl'] = Mage::getUrl('checkout/cart');
|
183 |
Â
$actionDescription = array(
|
184 |
+
'or' => $orderInfo,
|
185 |
Â
'email' => $this->getCustomerIdentity(),
|
186 |
Â
'action' => 'add_to_cart',
|
187 |
+
'pd' => $actionData
|
188 |
Â
);
|
189 |
+
|
Â
|
|
190 |
Â
$res = $this->amplify->customer_action($actionDescription);
|
191 |
Â
}
|
192 |
Â
} catch (Exception $ex) {
|
204 |
Â
$stock_data = $product->getIs_in_stock();
|
205 |
Â
$catCollection = $product->getCategoryCollection();
|
206 |
Â
$categs = $catCollection->exportToArray();
|
207 |
+
|
208 |
Â
$cateHolder = array();
|
209 |
Â
foreach ($categs as $cat) {
|
210 |
+
$cateName = Mage::getModel('catalog/category')->load($cat['entity_id']);
|
211 |
+
$name=$cateName->getName();
|
212 |
+
$id=$cateName->getEntityId();
|
213 |
+
$pid=$cateName->getParent_id();
|
214 |
+
if($pid==1){
|
215 |
+
$pid=0;
|
216 |
+
}
|
217 |
+
$cateHolder[$id] = array("n"=>$name,"p"=>$pid);
|
218 |
Â
}
|
219 |
+
|
220 |
Â
$actionData = array();
|
221 |
Â
$actionData[0]['productId'] = $product->getId();
|
222 |
Â
$actionData[0]['productTitle'] = $product->getName();
|
232 |
Â
$actionData[0]['size'] = false;
|
233 |
Â
$actionData[0]['color'] = false;
|
234 |
Â
$actionData[0]['qty'] = false;
|
235 |
+
$actionData[0]['category'] = $cateHolder;
|
236 |
Â
$actionData[0]['discount'] = abs($product->getPrice() - $product->getFinalPrice());
|
237 |
Â
$actionDescription = array(
|
238 |
Â
'action' => 'reviewed',
|
247 |
Â
}
|
248 |
Â
|
249 |
Â
public function getAmplifyEventVote($evnt) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
250 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
251 |
Â
}
|
252 |
Â
|
253 |
Â
public function getAmplifyEventCustomerLogout($evnt) {
|
305 |
Â
$person = array_filter($person);
|
306 |
Â
$res = $this->amplify->update($email, $person);
|
307 |
Â
}
|
308 |
+
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
309 |
Â
}
|
310 |
Â
} catch (Exception $ex) {
|
311 |
Â
|
338 |
Â
|
339 |
Â
$c = Mage::getSingleton('customer/session')->getCustomer();
|
340 |
Â
$customer = Mage::getModel('customer/customer')->load($c->getId());
|
Â
|
|
Â
|
|
341 |
Â
$email = $customer->getEmail();
|
342 |
Â
$custName = $customer->getFirstname();
|
343 |
Â
$custName = $custName . " " . $customer->getLastname();
|
344 |
Â
} else {
|
345 |
+
$email = base64_decode(Mage::getModel('core/cookie')->get('_ampEm'));
|
346 |
Â
}
|
347 |
Â
if ($true)
|
348 |
+
|
349 |
Â
return $email;
|
350 |
Â
} catch (Exception $ex) {
|
351 |
Â
|
356 |
Â
try {
|
357 |
Â
if ($this->verified) {
|
358 |
Â
$this->event('place_order_clicked');
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
359 |
Â
}
|
360 |
Â
} catch (Exception $ex) {
|
361 |
Â
|
363 |
Â
}
|
364 |
Â
|
365 |
Â
public function getamplifyEventCustomerSave($evnt) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
366 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
367 |
Â
}
|
368 |
Â
|
369 |
Â
public function getCustomereventInfo($customer) {
|
385 |
Â
}
|
386 |
Â
|
387 |
Â
public function eventCustomerFromCheckout($evnt) {
|
388 |
+
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
389 |
Â
}
|
390 |
Â
|
391 |
Â
public function getAmplifyEventCustomerRegisterSuccess($evnt) {
|
438 |
Â
$event => false
|
439 |
Â
);
|
440 |
Â
if ($this->verified)
|
441 |
+
$this->amplify->event($this->getCustomerIdentity(1), $params);
|
442 |
Â
}
|
443 |
Â
} catch (Exception $ex) {
|
444 |
Â
|
446 |
Â
}
|
447 |
Â
|
448 |
Â
public function eventPerson($person, $additional = array()) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
449 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
450 |
Â
}
|
451 |
Â
|
452 |
Â
public function event_revenue($identifier, $revenue) {
|
Â
|
|
Â
|
|
453 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
454 |
Â
}
|
455 |
Â
|
456 |
Â
public function getAmplifyEventWishlist($evnt) {
|
467 |
Â
$catCollection = $product->getCategoryCollection();
|
468 |
Â
$categs = $catCollection->exportToArray();
|
469 |
Â
$cateHolder = array();
|
470 |
+
|
471 |
+
foreach ($categs as $cat) {
|
472 |
+
$cateName = Mage::getModel('catalog/category')->load($cat['entity_id']);
|
473 |
+
$name=$cateName->getName();
|
474 |
+
$id=$cateName->getEntityId();
|
475 |
+
$pid=$cateName->getParent_id();
|
476 |
+
$cateHolder[$id] = array("n"=>$name,"p"=>$pid);
|
477 |
+
}
|
478 |
Â
$wishList = Mage::getSingleton('wishlist/wishlist')->loadByCustomer($customer);
|
479 |
Â
$wishListItemCollection = $wishList->getItemCollection();
|
480 |
Â
if (count($wishListItemCollection)) {
|
511 |
Â
$actionData[0]['size'] = false;
|
512 |
Â
$actionData[0]['color'] = false;
|
513 |
Â
$actionData[0]['qty'] = false;
|
514 |
+
$actionData[0]['category'] = $cateHolder;
|
515 |
Â
$actionData[0]['discount'] = abs($product->getPrice() - $product->getFinalPrice());
|
516 |
Â
$actionDescription = array(
|
517 |
Â
'action' => 'wishlist',
|
574 |
Â
|
575 |
Â
|
576 |
Â
$items = $order->getAllVisibleItems();
|
577 |
+
|
578 |
Â
$itemcount = count($items);
|
579 |
Â
$name = array();
|
580 |
Â
$unitPrice = array();
|
585 |
Â
$actionData = array();
|
586 |
Â
|
587 |
Â
foreach ($items as $itemId => $item) {
|
588 |
+
$product = $item;
|
589 |
+
|
Â
|
|
590 |
Â
$product = Mage::getModel('catalog/product')->load($product->getProductId());
|
591 |
Â
$categoryIds = $product->getCategoryIds();
|
592 |
Â
$cateHolder = array();
|
593 |
+
|
594 |
Â
foreach ($categoryIds as $cat) {
|
595 |
+
$cateName = Mage::getModel('catalog/category')->load($cat['entity_id']);
|
596 |
+
$name=$cateName->getName();
|
597 |
+
$id=$cateName->getEntityId();
|
598 |
+
$pid=$cateName->getParent_id();
|
599 |
+
if($pid==1){
|
600 |
+
$pid=0;
|
601 |
Â
}
|
602 |
+
$cateHolder[$id] = array("n"=>$name,"p"=>$pid);
|
603 |
+
}
|
604 |
+
|
605 |
Â
$actionData[$i]['productId'] = $product->getId();
|
606 |
Â
$actionData[$i]['productTitle'] = $product->getName();
|
607 |
Â
$actionData[$i]['sku'] = $product->getSku();
|
617 |
Â
$actionData[$i]['color'] = $product->getResource()->getAttribute('color') ? $product->getAttributeText('color') : false;
|
618 |
Â
$actionData[$i]['brandName'] = $product->getResource()->getAttribute('manufacturer') ? $product->getAttributeText('manufacturer') : false;
|
619 |
Â
$actionData[$i]['qty'] = (int) $item->getQtyOrdered();
|
620 |
+
$actionData[$i]['category'] = $cateHolder;
|
621 |
Â
$actionData[$i]['orderId'] = $order_id;
|
622 |
+
$actionData[$i]['totalProductPrice']=$item->getRowTotal()-$item->getDiscountAmount();
|
623 |
Â
// $actionData[$i]['couponCode'] = Mage::getSingleton('checkout/session')->getQuote()->getCouponCode() ;
|
624 |
+
$actionData[$i]['discountPrice'] = $item->getDiscountAmount();
|
Â
|
|
625 |
Â
$i++;
|
626 |
Â
}
|
627 |
Â
|
628 |
Â
$cart = Mage::getSingleton('checkout/cart');
|
629 |
Â
$TotalPrice = $order->getGrandTotal();
|
630 |
Â
$totalShippingPrice = $order->getShippingAmount();
|
631 |
+
$TotalPrice = $TotalPrice;
|
632 |
Â
$subTotalPrice = $order->getSubtotal();
|
633 |
+
$orderInfo["subtotalPrice"] = $subTotalPrice-abs($order->getDiscountAmount());
|
634 |
Â
$orderInfo["totalPrice"] = $TotalPrice;
|
635 |
Â
$orderInfo["totalShippingPrice"] = $totalShippingPrice;
|
636 |
Â
$orderInfo['orderId'] = $order_id;
|
647 |
Â
$actionDescription = array(
|
648 |
Â
'action' => 'purchased',
|
649 |
Â
'email' => $this->getCustomerIdentity(),
|
650 |
+
'or' => $orderInfo,
|
651 |
+
'pd' => $actionData
|
652 |
Â
);
|
653 |
+
|
654 |
+
$res = $this->amplify->customer_action($actionDescription);
|
655 |
+
|
656 |
Â
}
|
657 |
Â
} catch (Exception $ex) {
|
658 |
Â
|
662 |
Â
public function getAmplify_checkout_allow_guest($evnt) {
|
663 |
Â
try {
|
664 |
Â
if ($this->verified) {
|
665 |
+
|
Â
|
|
Â
|
|
666 |
Â
$getquote = $evnt->getQuote();
|
Â
|
|
667 |
Â
$data = array_filter($getquote->getData());
|
668 |
Â
Mage::getModel('core/cookie')->set('amplify_email', $data['customer_email']);
|
669 |
Â
$person = array();
|
678 |
Â
}
|
679 |
Â
}
|
680 |
Â
|
681 |
+
public function getAmplifyCatalog_product_save_after($evnt) {
|
Â
|
|
Â
|
|
682 |
Â
|
683 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
684 |
Â
|
685 |
Â
public function getAmplifyCatalog_product_delete_after_done($evnt) {
|
Â
|
|
686 |
Â
|
687 |
+
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
688 |
Â
|
689 |
Â
public function getAmplifyCatalogProductView(Varien_Event_Observer $evnt) {
|
690 |
Â
try {
|
692 |
Â
|
693 |
Â
$product = $evnt->getEvent()->getProduct();
|
694 |
Â
$catCollection = $product->getCategoryCollection();
|
695 |
+
|
696 |
Â
$categs = $catCollection->exportToArray();
|
697 |
Â
$cateHolder = array();
|
698 |
Â
foreach ($categs as $cat) {
|
699 |
+
$cateName = Mage::getModel('catalog/category')->load($cat['entity_id']);
|
700 |
+
$name=$cateName->getName();
|
701 |
+
$id=$cateName->getEntityId();
|
702 |
+
$pid=$cateName->getParent_id();
|
703 |
+
if($pid==1){
|
704 |
+
$pid=0;
|
705 |
+
}
|
706 |
+
$cateHolder[$id] = array("n"=>$name,"p"=>$pid);
|
707 |
Â
}
|
708 |
+
|
709 |
+
|
710 |
Â
$event = $evnt->getEvent();
|
711 |
Â
$action = $event->getControllerAction();
|
712 |
Â
$stock_data = $product->getIs_in_stock();
|
720 |
Â
$actionData[0]['status'] = $product->getStatus();
|
721 |
Â
$actionData[0]['productPictureUrl'] = $product->getImageUrl();
|
722 |
Â
$actionData[0]['pageUrl'] = $product->getProductUrl();
|
Â
|
|
723 |
Â
$actionData[0]['weight'] = $product->getWeight();
|
724 |
Â
$actionData[0]['stockAvailability'] = $stock_data ? $stock_data : 2;
|
725 |
Â
$actionData[0]['size'] = false;
|
726 |
Â
$actionData[0]['color'] = false;
|
727 |
+
$actionData[0]['qty'] = 1;
|
728 |
+
$actionData[0]['category'] = $cateHolder;
|
729 |
Â
$actionData[0]['discount'] = abs($product->getPrice() - $product->getFinalPrice());
|
730 |
Â
$actionDescription = array(
|
731 |
Â
'action' => 'viewed',
|
732 |
Â
"email" => $this->getCustomerIdentity(),
|
733 |
+
'pd' => $actionData
|
734 |
Â
);
|
735 |
+
|
736 |
Â
$res = $this->amplify->customer_action($actionDescription);
|
737 |
+
|
Â
|
|
Â
|
|
738 |
Â
}
|
739 |
Â
} catch (Exception $ex) {
|
740 |
Â
|
741 |
Â
}
|
742 |
Â
}
|
743 |
Â
|
744 |
+
public function wishlistShare(Mage_Framework_Event_Observer $evnt) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
745 |
Â
|
746 |
+
}
|
747 |
+
public function getAmplifySendfriendProduct(Varien_Event_Observer $evnt) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
748 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
749 |
Â
}
|
750 |
Â
|
751 |
+
public function catalogProductCompareAddProduct(Varien_Event_Observer $evnt) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
752 |
Â
|
753 |
+
}
|
754 |
Â
public function getAmplifyCustomerAdressSaveAfter($evnt) {
|
755 |
+
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
756 |
Â
}
|
757 |
Â
|
758 |
Â
public function getAmplifySales_order_save_commit_after($observer) {
|
759 |
+
// $order = $observer->getOrder();
|
760 |
+
// echo $order->getIncrementId();
|
761 |
+
// echo $order->getState();
|
762 |
+
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
763 |
Â
}
|
764 |
Â
|
765 |
Â
// checkout_cart_update_items_after
|
770 |
Â
*
|
771 |
Â
*/
|
772 |
Â
public function getAmplify_cartUpdate(Varien_Event_Observer $observer) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
773 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
774 |
Â
}
|
775 |
Â
|
776 |
Â
public function getAmplifyCancelOrderItem($observer) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
777 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
778 |
Â
}
|
779 |
Â
|
780 |
Â
public function sendData() {
|
781 |
+
// Mage::log("WORKS!");
|
782 |
+
// Mage::app()->getCacheInstance()->cleanType('config');
|
783 |
+
// $sendOrderFlag =true;// Mage::getStoreConfig(self::XML_PATH_SEND_ORDER_STATUS);
|
784 |
+
// if ($sendOrderFlag && $this->verified) {
|
785 |
+
//// $startTime = microtime(true);
|
786 |
+
// $processDate = Mage::getStoreConfig('betaout_amplify_options/settings/_process_date');
|
787 |
+
// $orders = Mage::getModel('sales/order')->getCollection()
|
788 |
+
// ->addAttributeToSelect('customer_email')
|
789 |
+
// ->addAttributeToSelect('customer_firstname')
|
790 |
+
// ->addAttributeToSelect('customer_lastname')
|
791 |
+
// ->addAttributeToSelect('shipping_description')
|
792 |
+
// ->addAttributeToSelect('order_currency_code')
|
793 |
+
// ->addAttributeToSelect('increment_id')->
|
794 |
+
// addAttributeToSelect('grand_total')->
|
795 |
+
// addAttributeToSelect('subtotal')->
|
796 |
+
// addAttributeToSelect('remote_ip')->
|
797 |
+
// addAttributeToSelect('store_id')->
|
798 |
+
// addAttributeToSelect('discount_amount')->
|
799 |
+
// addAttributeToSelect('coupon_code')->
|
800 |
+
// addAttributeToSelect('shipping_address_id')->
|
801 |
+
// addAttributeToSelect('billing_address_id')->
|
802 |
+
// addAttributeToSelect('created_at')->
|
803 |
+
// addAttributeToSelect('shipping_incl_tax')->
|
804 |
+
// addAttributeToSelect('created_at')
|
805 |
+
// ->addAttributeToSelect('status')
|
806 |
+
// ->addAttributeToSort('created_at', 'DESC')
|
807 |
+
// ->addAttributeToFilter('created_at', array('to' => $processDate, 'date' => true))
|
808 |
+
// //->addAttributeToFilter('status', array('eq' => Mage_Sales_Model_Order::STATE_COMPLETE))
|
809 |
+
// ->setPageSize(10);
|
810 |
+
// $currentPage = 1;
|
811 |
+
// $orders->setCurPage($currentPage);
|
812 |
+
// $orders->load();
|
813 |
+
//
|
814 |
+
// $count = count($orders);
|
815 |
+
// if ($count <= 0)
|
816 |
+
// Mage::getModel('core/config')->saveConfig('betaout_amplify_options/order/cron_setting', $this->_schedule);
|
817 |
+
// $flage = 1;
|
818 |
+
//
|
819 |
+
// foreach ($orders as $order) {
|
820 |
+
// if ($flage) {
|
821 |
+
// $flage = 0;
|
822 |
+
// continue;
|
823 |
Â
// }
|
824 |
+
// $order_id = $order->getIncrementId();
|
825 |
+
// $order = Mage::getModel('sales/order')->loadByIncrementId($order_id);
|
826 |
+
// $items = $order->getAllVisibleItems();
|
827 |
+
// $itemcount = count($items);
|
828 |
+
// $name = array();
|
829 |
+
// $unitPrice = array();
|
830 |
+
// $sku = array();
|
831 |
+
// $ids = array();
|
832 |
+
// $qty = array();
|
833 |
+
// $i = 0;
|
834 |
+
// $actionData = array();
|
835 |
+
//
|
836 |
+
// foreach ($items as $itemId => $item) {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
837 |
Â
//
|
838 |
+
// $product = $item;
|
839 |
+
//
|
840 |
+
// $product = Mage::getModel('catalog/product')->load($product->getProductId());
|
841 |
+
// $categoryIds = $product->getCategoryIds();
|
842 |
+
// $cateHolder = array();
|
843 |
+
//
|
844 |
+
// foreach ($categoryIds as $cat) {
|
845 |
+
// $cateName = Mage::getModel('catalog/category')->load($cat['entity_id']);
|
846 |
+
// $name=$cateName->getName();
|
847 |
+
// $id=$cateName->getEntityId();
|
848 |
+
// $pid=$cateName->getParent_id();
|
849 |
+
// $cateHolder[$id] = array("n"=>$name,"p"=>$pid);
|
850 |
+
// }
|
851 |
+
// $cateHolder[1] = array("n"=>"root catalog","p"=>0);
|
852 |
+
// $categoryName = implode(",", $cateHolder);
|
853 |
+
// $actionData[$i]['productId'] = $product->getId();
|
854 |
+
// $actionData[$i]['productTitle'] = $product->getName();
|
855 |
+
// $actionData[$i]['sku'] = $product->getSku();
|
856 |
+
// $actionData[$i]['price'] = $product->getPrice();
|
857 |
+
// $actionData[$i]['currency'] = Mage::app()->getStore()->getBaseCurrencyCode();
|
858 |
+
// $actionData[$i]['specialPrice'] = $product->getFinalPrice();
|
859 |
+
// $actionData[$i]['status'] = $product->getStatus();
|
860 |
+
// $actionData[$i]['productPictureUrl'] = $product->getImageUrl();
|
861 |
+
// $actionData[$i]['pageUrl'] = $product->getProductUrl();
|
862 |
+
// $actionData[$i]['weight'] = $product->getWeight();
|
863 |
+
// $actionData[$i]['stockAvailability'] = $stock_data ? $stock_data : 2;
|
864 |
+
// $actionData[$i]['size'] = $product->getResource()->getAttribute('size') ? $product->getAttributeText('size') : false;
|
865 |
+
// $actionData[$i]['color'] = $product->getResource()->getAttribute('color') ? $product->getAttributeText('color') : false;
|
866 |
+
// $actionData[$i]['brandName'] = $product->getResource()->getAttribute('manufacturer') ? $product->getAttributeText('manufacturer') : false;
|
867 |
+
// $actionData[$i]['qty'] = (int) $item->getQtyOrdered();
|
868 |
+
// $actionData[$i]['category'] = $cateHolder;
|
869 |
+
//// $actionData[$i]['couponCode'] = Mage::getSingleton('checkout/session')->getQuote()->getCouponCode() ;
|
870 |
+
// $actionData[$i]['discount'] = $item->getDiscountAmount();
|
871 |
+
// $actionData[$i]['totalProductPrice']=$item->getRowTotal()-$item->getDiscountAmount();
|
872 |
+
//// $actionData[$i]['discount'] = $item->getBaseDiscountAmount();
|
873 |
+
// $i++;
|
874 |
+
// }
|
875 |
+
//
|
876 |
+
// $cart = Mage::getSingleton('checkout/cart');
|
877 |
+
// $TotalPrice = $order->getGrandTotal();
|
878 |
+
// $totalShippingPrice = $order->getShippingAmount();
|
879 |
+
// $orTotalPrice = $TotalPrice - $totalShippingPrice;
|
880 |
+
// $subTotalPrice = $order->getSubtotal();
|
881 |
+
// $orderInfo["subtotalPrice"] = $orTotalPrice;
|
882 |
+
// $orderInfo["totalPrice"] = $TotalPrice;
|
883 |
+
// $orderInfo["totalShippingPrice"] = $totalShippingPrice;
|
884 |
+
// $orderInfo['orderId'] = $order_id;
|
885 |
+
// $orderInfo['ip'] = $order->getRemoteIp();
|
886 |
+
// $orderInfo['createdTime'] = $processDate = $order->getCreatedAt();
|
887 |
+
// $orderInfo['promocode'] = $order->getCouponCode();
|
888 |
+
// $orderInfo['totalDiscount'] = abs($order->getDiscountAmount());
|
889 |
+
// $orderInfo['currency'] = $order->getOrderCurrencyCode();
|
890 |
+
// $orderInfo['financialStatus'] = 'paid';
|
891 |
+
// $orderInfo['totalTaxes'] = $order->getShippingTaxAmount();
|
892 |
+
// $orderInfo['ordStatus'] = $order->getStatus();
|
893 |
+
//
|
894 |
+
// $actionDescription = array(
|
895 |
+
// 'action' => 'purchased',
|
896 |
+
// 'email' => $order->getCustomerEmail(),
|
897 |
+
// 'cartInfo' => array_filter($orderInfo),
|
898 |
+
// 'products' => array_filter($actionData)
|
899 |
Â
// );
|
900 |
+
// Mage::log($actionDescription);
|
901 |
+
// $this->amplify->customer_action($actionDescription);
|
902 |
+
// //$res = $this->amplify->send_old_order($actionDescription);
|
903 |
+
// }
|
904 |
+
// Mage::getConfig()->saveConfig('betaout_amplify_options/settings/_process_date', $processDate)->cleanCache();
|
905 |
+
// Mage::app()->reinitStores();
|
906 |
+
//
|
907 |
+
// }
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
908 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
909 |
Â
|
910 |
Â
}
|
911 |
Â
?>
|
app/code/community/Betaout/Amplify/Model/magentoGetOrderByUserId.php
DELETED
@@ -1,82 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
* To change this license header, choose License Headers in Project Properties.
|
5 |
-
* To change this template file, choose Tools | Templates
|
6 |
-
* and open the template in the editor.
|
7 |
-
*/
|
8 |
-
chdir(dirname(__FILE__));
|
9 |
-
echo "running";
|
10 |
-
echo "111111111111111111111111111";
|
11 |
-
require 'app/Mage.php';
|
12 |
-
echo "433333333333333333333";
|
13 |
-
if (!Mage::isInstalled()) {
|
14 |
-
echo "Application is not installed yet, please complete install wizard first.";
|
15 |
-
exit;
|
16 |
-
}
|
17 |
-
|
18 |
-
|
19 |
-
umask( 0 );
|
20 |
-
Mage :: app( "default" );
|
21 |
-
if (Mage::getSingleton('customer/session')->isLoggedIn()) {
|
22 |
-
|
23 |
-
/* Get the customer data */
|
24 |
-
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
25 |
-
/* Get the customer's email address */
|
26 |
-
$customer_email = $customer->getEmail();
|
27 |
-
|
28 |
-
}
|
29 |
-
|
30 |
-
$customer_email='raviraz@gmail.com';
|
31 |
-
|
32 |
-
$collection = Mage::getModel('sales/order')
|
33 |
-
->getCollection()
|
34 |
-
->addAttributeToFilter('customer_email',array('like'=>$customer_email));
|
35 |
-
|
36 |
-
foreach($collection as $order){
|
37 |
-
//do something
|
38 |
-
$order_id = $order->getId();
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
$order = Mage::getModel("sales/order")->load($order_id); //load order by order id
|
43 |
-
|
44 |
-
$ordered_items = $order->getAllItems();
|
45 |
-
|
46 |
-
foreach($ordered_items as $item){ //item detail
|
47 |
-
|
48 |
-
echo $item->getItemId(); //product id
|
49 |
-
|
50 |
-
echo $item->getSku();
|
51 |
-
echo $item->getQtyOrdered(); //ordered qty of item
|
52 |
-
|
53 |
-
echo $item->getName();
|
54 |
-
|
55 |
-
}
|
56 |
-
}
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
//require_once('app/Mage.php');
|
61 |
-
//Mage::app();
|
62 |
-
//
|
63 |
-
//$orders = Mage::getModel('sales/order')->getCollection()
|
64 |
-
// ->addFieldToFilter('status', 'complete')
|
65 |
-
// ->addAttributeToSelect('customer_email')
|
66 |
-
// ;
|
67 |
-
//foreach ($orders as $order) {
|
68 |
-
// $email = $order->getCustomerEmail();
|
69 |
-
// echo $email . "\n";
|
70 |
-
//}
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
/* Format our dates */
|
76 |
-
$fromDate = date('Y-m-d H:i:s', strtotime($fromDate));
|
77 |
-
$toDate = date('Y-m-d H:i:s', strtotime($toDate));
|
78 |
-
|
79 |
-
/* Get the collection */
|
80 |
-
$orders = Mage::getModel('sales/order')->getCollection()
|
81 |
-
->addAttributeToFilter('created_at', array('from'=>$fromDate, 'to'=>$toDate))
|
82 |
-
->addAttributeToFilter('status', array('eq' => Mage_Sales_Model_Order::STATE_COMPLETE));
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
app/code/community/Betaout/Amplify/etc/config.xml
CHANGED
@@ -1,11 +1,8 @@
|
|
1 |
Â
<?xml version="1.0" encoding="utf-8"?>
|
2 |
Â
<config>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
<modules>
|
7 |
Â
<Betaout_Amplify>
|
8 |
-
<version>0.1.
|
9 |
Â
</Betaout_Amplify>
|
10 |
Â
</modules>
|
11 |
Â
<global>
|
@@ -73,15 +70,7 @@
|
|
73 |
Â
</customer_address_before_save>
|
74 |
Â
</observers>
|
75 |
Â
</customer_address_save_before>
|
76 |
-
|
77 |
-
<observers>
|
78 |
-
<customer_save_after>
|
79 |
-
<class>Betaout_Amplify_Model_Key</class>
|
80 |
-
<method>customerSaveAfter</method>
|
81 |
-
</customer_save_after>
|
82 |
-
</observers>
|
83 |
-
</customer_save_after>
|
84 |
-
<customer_register_success>
|
85 |
Â
<observers>
|
86 |
Â
<amplify_customer_register_success>
|
87 |
Â
<type>singleton</type>
|
@@ -107,24 +96,7 @@
|
|
107 |
Â
</checkout_type_onepage_save_order>
|
108 |
Â
</observers>
|
109 |
Â
</checkout_onepage_controller_success_action>
|
110 |
-
|
111 |
-
<observers>
|
112 |
-
<checkout_type_onepage_save_order>
|
113 |
-
<class>Betaout_Amplify_Model_Key</class>
|
114 |
-
<method>checkout_type_onepage_save_order</method>
|
115 |
-
</checkout_type_onepage_save_order>
|
116 |
-
</observers>
|
117 |
-
</checkout_type_onepage_save_order>
|
118 |
-
<!-- <catalog_product_save_before>
|
119 |
-
<observers>
|
120 |
-
<catalog_product_save_before>
|
121 |
-
<type>singleton</type>
|
122 |
-
<class>Betaout_Amplify_Model_Key</class>
|
123 |
-
<method>catalog_product_save_before</method>
|
124 |
-
</catalog_product_save_before>
|
125 |
-
</observers>
|
126 |
-
</catalog_product_save_before>-->
|
127 |
-
<catalog_product_save_after>
|
128 |
Â
<observers>
|
129 |
Â
<catalog_product_save_after>
|
130 |
Â
<type>singleton</type>
|
@@ -173,24 +145,6 @@
|
|
173 |
Â
</sales_quote_remove_item>
|
174 |
Â
</observers>
|
175 |
Â
</sales_quote_remove_item>
|
176 |
-
<!-- <checkout_cart_save_after>
|
177 |
-
<observers>
|
178 |
-
<checkout_cart_save_after>
|
179 |
-
<type>singleton</type>
|
180 |
-
<class>Betaout_Amplify_Model_Key</class>
|
181 |
-
<method>removeQuoteItem</method>
|
182 |
-
</checkout_cart_save_after>
|
183 |
-
</observers>
|
184 |
-
</checkout_cart_save_after>-->
|
185 |
-
<!-- <checkout_cart_update_items_before>
|
186 |
-
<observers>
|
187 |
-
<wishlist>
|
188 |
-
<class>Betaout_Amplify_Model_Key</class>
|
189 |
-
<method>eventRemoveFromCart</method>
|
190 |
-
</wishlist>
|
191 |
-
</observers>
|
192 |
-
</checkout_cart_update_items_before>-->
|
193 |
-
|
194 |
Â
<customer_logout>
|
195 |
Â
<observers>
|
196 |
Â
<amplify_customer_logout>
|
@@ -214,7 +168,7 @@
|
|
214 |
Â
<amplify_customer_save>
|
215 |
Â
<type>singleton</type>
|
216 |
Â
<class>Betaout_Amplify_Model_Key</class>
|
217 |
-
<method>
|
218 |
Â
</amplify_customer_save>
|
219 |
Â
</observers>
|
220 |
Â
</customer_save_commit_after>
|
@@ -227,17 +181,7 @@
|
|
227 |
Â
</amplify_order_save>
|
228 |
Â
</observers>
|
229 |
Â
</sales_order_place_after>
|
230 |
-
|
231 |
-
|
232 |
-
<!-- <sales_order_place_before>
|
233 |
-
<observers>
|
234 |
-
<amplify_customer_register_from_checkout>
|
235 |
-
<type>singleton</type>
|
236 |
-
<class>Betaout_Amplify_Model_Key</class>
|
237 |
-
<method>getamplifyEventCustomerSave</method>
|
238 |
-
</amplify_customer_register_from_checkout>
|
239 |
-
</observers>
|
240 |
-
</sales_order_place_before>-->
|
241 |
Â
<customer_register_success>
|
242 |
Â
<observers>
|
243 |
Â
<amplify_customer_register_success>
|
@@ -247,15 +191,6 @@
|
|
247 |
Â
</amplify_customer_register_success>
|
248 |
Â
</observers>
|
249 |
Â
</customer_register_success>
|
250 |
-
<!-- <checkout_cart_add_product_complete>
|
251 |
-
<observers>
|
252 |
-
<amplify_add_to_cart>
|
253 |
-
<type>singleton</type>
|
254 |
-
<class>Betaout_Amplify_Model_Key</class>
|
255 |
-
<method>getAmplifyEventAddToCart</method>
|
256 |
-
</amplify_add_to_cart>
|
257 |
-
</observers>
|
258 |
-
</checkout_cart_add_product_complete> -->
|
259 |
Â
<controller_action_predispatch_checkout_cart_couponPost>
|
260 |
Â
<observers>
|
261 |
Â
<amplify_add_coupon_from_cart>
|
@@ -270,7 +205,7 @@
|
|
270 |
Â
<amplify_add_coupon>
|
271 |
Â
<type>singleton</type>
|
272 |
Â
<class>Betaout_Amplify_Model_Key</class>
|
273 |
-
<method>
|
274 |
Â
</amplify_add_coupon>
|
275 |
Â
</observers>
|
276 |
Â
</controller_action_predispatch_onestepcheckout_index_add_coupon>
|
@@ -283,23 +218,6 @@
|
|
283 |
Â
</amplify_newsletter_subscribe>
|
284 |
Â
</observers>
|
285 |
Â
</newsletter_subscriber_save_before>
|
286 |
-
<!-- <newsletter_subscriber_save_after>
|
287 |
-
<observers>
|
288 |
-
<personalmerchant_newsletter_subscribe_observer>
|
289 |
-
<class>personalmerchant/backend_observer</class>
|
290 |
-
<method>subscribeCustomer</method>
|
291 |
-
</personalmerchant_newsletter_subscribe_observer>
|
292 |
-
</observers>
|
293 |
-
</newsletter_subscriber_save_after>
|
294 |
-
<newsletter_subscriber_delete_after>
|
295 |
-
<observers>
|
296 |
-
<personalmerchant_newsletter_unsubscribe_observer>
|
297 |
-
<class>personalmerchant/backend_observer</class>
|
298 |
-
<method>unsubscribeCustomer</method>
|
299 |
-
</personalmerchant_newsletter_unsubscribe_observer>
|
300 |
-
</observers>
|
301 |
-
</newsletter_subscriber_delete_after>-->
|
302 |
-
|
303 |
Â
<review_controller_product_init_after>
|
304 |
Â
<observers>
|
305 |
Â
<amplify_product_review>
|
@@ -309,15 +227,6 @@
|
|
309 |
Â
</amplify_product_review>
|
310 |
Â
</observers>
|
311 |
Â
</review_controller_product_init_after>
|
312 |
-
<poll_vote_add>
|
313 |
-
<observers>
|
314 |
-
<amplify_poll_vote>
|
315 |
-
<type>singleton</type>
|
316 |
-
<class>Betaout_Amplify_Model_Key</class>
|
317 |
-
<method>getAmplifyEventVote</method>
|
318 |
-
</amplify_poll_vote>
|
319 |
-
</observers>
|
320 |
-
</poll_vote_add>
|
321 |
Â
<wishlist_add_product>
|
322 |
Â
<observers>
|
323 |
Â
<amplify_wishlist_add_product >
|
@@ -327,25 +236,7 @@
|
|
327 |
Â
</amplify_wishlist_add_product >
|
328 |
Â
</observers>
|
329 |
Â
</wishlist_add_product>
|
330 |
-
|
331 |
-
<observers>
|
332 |
-
<amplify_sales_quote_save_after>
|
333 |
-
<type>singleton</type>
|
334 |
-
<class>Betaout_Amplify_Model_Key</class>
|
335 |
-
<method>sales_quote_save_after</method>
|
336 |
-
</amplify_sales_quote_save_after>
|
337 |
-
</observers>
|
338 |
-
</sales_quote_save_after>
|
339 |
-
<!-- <sales_quote_save_before>
|
340 |
-
<observers>
|
341 |
-
<amplify_sales_quote_save_before>
|
342 |
-
<type>singleton</type>
|
343 |
-
<class>Betaout_Amplify_Model_Key</class>
|
344 |
-
<method>sales_quote_save_after</method>
|
345 |
-
</amplify_sales_quote_save_before>
|
346 |
-
</observers>
|
347 |
-
</sales_quote_save_before>-->
|
348 |
-
<checkout_allow_guest>
|
349 |
Â
<observers>
|
350 |
Â
<amplify_checkout_allow_guest>
|
351 |
Â
<type>singleton</type>
|
@@ -440,14 +331,14 @@
|
|
440 |
Â
</catalog_product_edit_action>
|
441 |
Â
</events>
|
442 |
Â
</adminhtml>
|
443 |
-
<default>
|
444 |
Â
<betaout_amplify_options>
|
445 |
Â
<order>
|
446 |
Â
<cron_setting>*/1 * * * *</cron_setting>
|
447 |
Â
</order>
|
448 |
Â
</betaout_amplify_options>
|
449 |
-
</default
|
450 |
-
<crontab>
|
451 |
Â
<jobs>
|
452 |
Â
<betaout_export_send_order>
|
453 |
Â
<schedule>
|
@@ -458,17 +349,6 @@
|
|
458 |
Â
</run>
|
459 |
Â
</betaout_export_send_order>
|
460 |
Â
</jobs>
|
461 |
-
|
462 |
-
<checkout_cart_add_product_complete>
|
463 |
-
<observers>
|
464 |
-
<amplify_add_to_cart>
|
465 |
-
<type>singleton</type>
|
466 |
-
<class>Betaout_Amplify_Model_Key</class>
|
467 |
-
<method>getAmplifyEventAddToCart</method>
|
468 |
-
</amplify_add_to_cart>
|
469 |
-
</observers>
|
470 |
-
</checkout_cart_add_product_complete>
|
471 |
-
</events>-->
|
472 |
-
</crontab>
|
473 |
Â
|
474 |
Â
</config>
|
1 |
Â
<?xml version="1.0" encoding="utf-8"?>
|
2 |
Â
<config>
|
3 |
+
<modules>
|
Â
|
|
Â
|
|
Â
|
|
4 |
Â
<Betaout_Amplify>
|
5 |
+
<version>0.1.5</version>
|
6 |
Â
</Betaout_Amplify>
|
7 |
Â
</modules>
|
8 |
Â
<global>
|
70 |
Â
</customer_address_before_save>
|
71 |
Â
</observers>
|
72 |
Â
</customer_address_save_before>
|
73 |
+
<customer_register_success>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
74 |
Â
<observers>
|
75 |
Â
<amplify_customer_register_success>
|
76 |
Â
<type>singleton</type>
|
96 |
Â
</checkout_type_onepage_save_order>
|
97 |
Â
</observers>
|
98 |
Â
</checkout_onepage_controller_success_action>
|
99 |
+
<catalog_product_save_after>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
100 |
Â
<observers>
|
101 |
Â
<catalog_product_save_after>
|
102 |
Â
<type>singleton</type>
|
145 |
Â
</sales_quote_remove_item>
|
146 |
Â
</observers>
|
147 |
Â
</sales_quote_remove_item>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
148 |
Â
<customer_logout>
|
149 |
Â
<observers>
|
150 |
Â
<amplify_customer_logout>
|
168 |
Â
<amplify_customer_save>
|
169 |
Â
<type>singleton</type>
|
170 |
Â
<class>Betaout_Amplify_Model_Key</class>
|
171 |
+
<method>getamplifyEventCustomerSave</method>
|
172 |
Â
</amplify_customer_save>
|
173 |
Â
</observers>
|
174 |
Â
</customer_save_commit_after>
|
181 |
Â
</amplify_order_save>
|
182 |
Â
</observers>
|
183 |
Â
</sales_order_place_after>
|
184 |
+
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
185 |
Â
<customer_register_success>
|
186 |
Â
<observers>
|
187 |
Â
<amplify_customer_register_success>
|
191 |
Â
</amplify_customer_register_success>
|
192 |
Â
</observers>
|
193 |
Â
</customer_register_success>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
194 |
Â
<controller_action_predispatch_checkout_cart_couponPost>
|
195 |
Â
<observers>
|
196 |
Â
<amplify_add_coupon_from_cart>
|
205 |
Â
<amplify_add_coupon>
|
206 |
Â
<type>singleton</type>
|
207 |
Â
<class>Betaout_Amplify_Model_Key</class>
|
208 |
+
<method>getAmplifyEventCoupon</method>
|
209 |
Â
</amplify_add_coupon>
|
210 |
Â
</observers>
|
211 |
Â
</controller_action_predispatch_onestepcheckout_index_add_coupon>
|
218 |
Â
</amplify_newsletter_subscribe>
|
219 |
Â
</observers>
|
220 |
Â
</newsletter_subscriber_save_before>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
221 |
Â
<review_controller_product_init_after>
|
222 |
Â
<observers>
|
223 |
Â
<amplify_product_review>
|
227 |
Â
</amplify_product_review>
|
228 |
Â
</observers>
|
229 |
Â
</review_controller_product_init_after>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
230 |
Â
<wishlist_add_product>
|
231 |
Â
<observers>
|
232 |
Â
<amplify_wishlist_add_product >
|
236 |
Â
</amplify_wishlist_add_product >
|
237 |
Â
</observers>
|
238 |
Â
</wishlist_add_product>
|
239 |
+
<checkout_allow_guest>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
240 |
Â
<observers>
|
241 |
Â
<amplify_checkout_allow_guest>
|
242 |
Â
<type>singleton</type>
|
331 |
Â
</catalog_product_edit_action>
|
332 |
Â
</events>
|
333 |
Â
</adminhtml>
|
334 |
+
<!-- <default>
|
335 |
Â
<betaout_amplify_options>
|
336 |
Â
<order>
|
337 |
Â
<cron_setting>*/1 * * * *</cron_setting>
|
338 |
Â
</order>
|
339 |
Â
</betaout_amplify_options>
|
340 |
+
</default>-->
|
341 |
+
<!-- <crontab>
|
342 |
Â
<jobs>
|
343 |
Â
<betaout_export_send_order>
|
344 |
Â
<schedule>
|
349 |
Â
</run>
|
350 |
Â
</betaout_export_send_order>
|
351 |
Â
</jobs>
|
352 |
+
</crontab>-->
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
353 |
Â
|
354 |
Â
</config>
|
app/code/community/Betaout/Amplify/etc/system.xml
CHANGED
@@ -123,7 +123,7 @@
|
|
123 |
Â
</check_conflicts>
|
124 |
Â
</fields>
|
125 |
Â
</conflictchecker>
|
126 |
-
<order translate="label">
|
127 |
Â
<label>What's about previous data</label>
|
128 |
Â
<frontend_type>text</frontend_type>
|
129 |
Â
<sort_order>2</sort_order>
|
@@ -146,7 +146,7 @@
|
|
146 |
Â
<show_in_default>1</show_in_default>
|
147 |
Â
</cron_setting>
|
148 |
Â
</fields>
|
149 |
-
</order
|
150 |
Â
</groups>
|
151 |
Â
</betaout_amplify_options>
|
152 |
Â
|
123 |
Â
</check_conflicts>
|
124 |
Â
</fields>
|
125 |
Â
</conflictchecker>
|
126 |
+
<!-- <order translate="label">
|
127 |
Â
<label>What's about previous data</label>
|
128 |
Â
<frontend_type>text</frontend_type>
|
129 |
Â
<sort_order>2</sort_order>
|
146 |
Â
<show_in_default>1</show_in_default>
|
147 |
Â
</cron_setting>
|
148 |
Â
</fields>
|
149 |
+
</order>-->
|
150 |
Â
</groups>
|
151 |
Â
</betaout_amplify_options>
|
152 |
Â
|
app/design/adminhtml/default/default/template/betaout_amplify/amplify.phtml
CHANGED
@@ -1,8 +1,4 @@
|
|
1 |
-
|
2 |
Â
<style>
|
3 |
-
body{
|
4 |
-
font-family: 'Open Sans',sans-serif;
|
5 |
-
}
|
6 |
Â
.col-xs-12{width: 100%;display: table;float:left}
|
7 |
Â
.relative{position: relative}
|
8 |
Â
.absolute{position: absolute}
|
@@ -12,7 +8,7 @@
|
|
12 |
Â
.pull-right{float: right}
|
13 |
Â
/*.head{height: 95px;background-color: #c93c23;padding: 35px 30px 30px;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box}*/
|
14 |
Â
.inner-box{background-color: #fff;padding :25px 0 25px 25px;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;width: 670px}
|
15 |
-
.header{
|
16 |
Â
.small-header{font-size: 12px;line-height: 1;color: #a1a1a1}
|
17 |
Â
.well{background-color: #fafafa;padding: 20px 38px 20px 25px;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;margin-bottom: 20px;float: left}
|
18 |
Â
.well .control-label{font-size: 16px!important;color:#454545!important;line-height: 1;width: 125px;margin-top: 10px;color: #3d3d3d}
|
@@ -24,7 +20,7 @@
|
|
24 |
Â
.text-center{ text-align: center}
|
25 |
Â
|
26 |
Â
.label{ font-size: 16px!important;color:#454545!important}
|
27 |
-
|
28 |
Â
root {
|
29 |
Â
display: block;
|
30 |
Â
}
|
@@ -39,7 +35,7 @@
|
|
39 |
Â
.vertical-align-middle{ vertical-align: middle }
|
40 |
Â
.vertical-align-bottom{ vertical-align: bottom }
|
41 |
Â
|
42 |
-
.desc-bx-outer{ width:
|
43 |
Â
/*.desc-bx-outer:first-child{margin-left: 50px}*/
|
44 |
Â
.desc-bx-outer:last-child{margin-right: 0}
|
45 |
Â
.desc-bx-outer .top-bx{ width: 155px;height:190px;display: inline-block;float: left;}
|
@@ -53,7 +49,7 @@
|
|
53 |
Â
.desc-bx-outer .eg-txt{font-size:13px;font-weight:400;color: #838383;text-align: center;line-height:1.2;margin-top:10px}
|
54 |
Â
.plus-sign{color: #494949;font-size: 26px;vertical-align:top;margin:70px 25px 0;display: inline-block }
|
55 |
Â
.font30{font-size: 30px}
|
56 |
-
.desc-bx-outer{ width:
|
57 |
Â
.well {
|
58 |
Â
min-height: 20px;
|
59 |
Â
padding: 19px 30px;
|
Â
|
|
1 |
Â
<style>
|
Â
|
|
Â
|
|
Â
|
|
2 |
Â
.col-xs-12{width: 100%;display: table;float:left}
|
3 |
Â
.relative{position: relative}
|
4 |
Â
.absolute{position: absolute}
|
8 |
Â
.pull-right{float: right}
|
9 |
Â
/*.head{height: 95px;background-color: #c93c23;padding: 35px 30px 30px;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box}*/
|
10 |
Â
.inner-box{background-color: #fff;padding :25px 0 25px 25px;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;width: 670px}
|
11 |
+
.header{color: #585858;line-height: 1;margin-bottom: 10px}
|
12 |
Â
.small-header{font-size: 12px;line-height: 1;color: #a1a1a1}
|
13 |
Â
.well{background-color: #fafafa;padding: 20px 38px 20px 25px;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;margin-bottom: 20px;float: left}
|
14 |
Â
.well .control-label{font-size: 16px!important;color:#454545!important;line-height: 1;width: 125px;margin-top: 10px;color: #3d3d3d}
|
20 |
Â
.text-center{ text-align: center}
|
21 |
Â
|
22 |
Â
.label{ font-size: 16px!important;color:#454545!important}
|
23 |
+
|
24 |
Â
root {
|
25 |
Â
display: block;
|
26 |
Â
}
|
35 |
Â
.vertical-align-middle{ vertical-align: middle }
|
36 |
Â
.vertical-align-bottom{ vertical-align: bottom }
|
37 |
Â
|
38 |
+
.desc-bx-outer{ width:150px;display: inline-block;float: left;margin-right:50px; }
|
39 |
Â
/*.desc-bx-outer:first-child{margin-left: 50px}*/
|
40 |
Â
.desc-bx-outer:last-child{margin-right: 0}
|
41 |
Â
.desc-bx-outer .top-bx{ width: 155px;height:190px;display: inline-block;float: left;}
|
49 |
Â
.desc-bx-outer .eg-txt{font-size:13px;font-weight:400;color: #838383;text-align: center;line-height:1.2;margin-top:10px}
|
50 |
Â
.plus-sign{color: #494949;font-size: 26px;vertical-align:top;margin:70px 25px 0;display: inline-block }
|
51 |
Â
.font30{font-size: 30px}
|
52 |
+
.desc-bx-outer{ width:150px;display: inline-block;float: none;margin-right:0px; }
|
53 |
Â
.well {
|
54 |
Â
min-height: 20px;
|
55 |
Â
padding: 19px 30px;
|
app/design/adminhtml/default/default/template/betaout_amplify/logo.phtml
CHANGED
@@ -1,7 +1,4 @@
|
|
1 |
Â
<style>
|
2 |
-
body{
|
3 |
-
font-family: 'Open Sans',sans-serif;
|
4 |
-
}
|
5 |
Â
.col-xs-12{width: 100%;display: table;float:left}
|
6 |
Â
.relative{position: relative}
|
7 |
Â
.absolute{position: absolute}
|
@@ -11,7 +8,7 @@
|
|
11 |
Â
.pull-right{float: right}
|
12 |
Â
/*.head{height: 95px;background-color: #c93c23;padding: 35px 30px 30px;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box}*/
|
13 |
Â
.inner-box{background-color: #fff;padding :25px 0 25px 25px;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;width: 670px}
|
14 |
-
.header{
|
15 |
Â
.small-header{font-size: 12px;line-height: 1;color: #a1a1a1}
|
16 |
Â
.well{background-color: #fafafa;padding: 20px 38px 20px 25px;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;margin-bottom: 20px;float: left}
|
17 |
Â
.well .control-label{font-size: 16px!important;color:#454545!important;line-height: 1;width: 125px;margin-top: 10px;color: #3d3d3d}
|
@@ -22,8 +19,7 @@
|
|
22 |
Â
.btn1{background-color: #e7543c;border-radius: 5px;color: #fff;font-size: 18px;font-weight: 600;padding: 10px 30px;border-style: none;}
|
23 |
Â
.text-center{ text-align: center}
|
24 |
Â
|
25 |
-
.label{ font-size: 16px!important;color:#454545!important}
|
26 |
-
body {font-family: 'Open Sans', Helvetica, Arial, sans-serif; overflow-x: hidden;font-weight:300}
|
27 |
Â
root {
|
28 |
Â
display: block;
|
29 |
Â
}
|
@@ -38,7 +34,7 @@
|
|
38 |
Â
.vertical-align-middle{ vertical-align: middle }
|
39 |
Â
.vertical-align-bottom{ vertical-align: bottom }
|
40 |
Â
|
41 |
-
.desc-bx-outer{ width:
|
42 |
Â
/*.desc-bx-outer:first-child{margin-left: 50px}*/
|
43 |
Â
.desc-bx-outer:last-child{margin-right: 0}
|
44 |
Â
.desc-bx-outer .top-bx{ width: 155px;height:190px;display: inline-block;float: left;}
|
@@ -52,7 +48,7 @@
|
|
52 |
Â
.desc-bx-outer .eg-txt{font-size:13px;font-weight:400;color: #838383;text-align: center;line-height:1.2;margin-top:10px}
|
53 |
Â
.plus-sign{color: #494949;font-size: 26px;vertical-align:top;margin:70px 25px 0;display: inline-block }
|
54 |
Â
.font30{font-size: 30px}
|
55 |
-
.desc-bx-outer{ width:
|
56 |
Â
.well {
|
57 |
Â
min-height: 20px;
|
58 |
Â
padding: 19px 30px;
|
@@ -71,7 +67,7 @@
|
|
71 |
Â
<br/>
|
72 |
Â
<br/>
|
73 |
Â
<div style="color:#454545;font-size: 18px">
|
74 |
-
To enable Betaout, please open an account at <a href="https://www.betaout.
|
75 |
Â
for your API key and secret.
|
76 |
Â
</div>
|
77 |
Â
|
1 |
Â
<style>
|
Â
|
|
Â
|
|
Â
|
|
2 |
Â
.col-xs-12{width: 100%;display: table;float:left}
|
3 |
Â
.relative{position: relative}
|
4 |
Â
.absolute{position: absolute}
|
8 |
Â
.pull-right{float: right}
|
9 |
Â
/*.head{height: 95px;background-color: #c93c23;padding: 35px 30px 30px;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box}*/
|
10 |
Â
.inner-box{background-color: #fff;padding :25px 0 25px 25px;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;width: 670px}
|
11 |
+
.header{color: #585858;line-height: 1;margin-bottom: 10px}
|
12 |
Â
.small-header{font-size: 12px;line-height: 1;color: #a1a1a1}
|
13 |
Â
.well{background-color: #fafafa;padding: 20px 38px 20px 25px;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;margin-bottom: 20px;float: left}
|
14 |
Â
.well .control-label{font-size: 16px!important;color:#454545!important;line-height: 1;width: 125px;margin-top: 10px;color: #3d3d3d}
|
19 |
Â
.btn1{background-color: #e7543c;border-radius: 5px;color: #fff;font-size: 18px;font-weight: 600;padding: 10px 30px;border-style: none;}
|
20 |
Â
.text-center{ text-align: center}
|
21 |
Â
|
22 |
+
.label{ font-size: 16px!important;color:#454545!important} body {font-family: 'Open Sans', Helvetica, Arial, sans-serif; overflow-x: hidden;font-weight:300}
|
Â
|
|
23 |
Â
root {
|
24 |
Â
display: block;
|
25 |
Â
}
|
34 |
Â
.vertical-align-middle{ vertical-align: middle }
|
35 |
Â
.vertical-align-bottom{ vertical-align: bottom }
|
36 |
Â
|
37 |
+
.desc-bx-outer{ width:150px;display: inline-block;float: left;margin-right:50px; }
|
38 |
Â
/*.desc-bx-outer:first-child{margin-left: 50px}*/
|
39 |
Â
.desc-bx-outer:last-child{margin-right: 0}
|
40 |
Â
.desc-bx-outer .top-bx{ width: 155px;height:190px;display: inline-block;float: left;}
|
48 |
Â
.desc-bx-outer .eg-txt{font-size:13px;font-weight:400;color: #838383;text-align: center;line-height:1.2;margin-top:10px}
|
49 |
Â
.plus-sign{color: #494949;font-size: 26px;vertical-align:top;margin:70px 25px 0;display: inline-block }
|
50 |
Â
.font30{font-size: 30px}
|
51 |
+
.desc-bx-outer{ width:150px;display: inline-block;float: none;margin-right:0px; }
|
52 |
Â
.well {
|
53 |
Â
min-height: 20px;
|
54 |
Â
padding: 19px 30px;
|
67 |
Â
<br/>
|
68 |
Â
<br/>
|
69 |
Â
<div style="color:#454545;font-size: 18px">
|
70 |
+
To enable Betaout, please open an account at <a href="https://www.betaout.in" style=" color:#ff7200">www.betaout.in </a>and
|
71 |
Â
for your API key and secret.
|
72 |
Â
</div>
|
73 |
Â
|
app/design/frontend/base/default/layout/betaout_amplify.xml
CHANGED
@@ -5,88 +5,9 @@
|
|
5 |
Â
<block type="page/html_head" name="betaout_amplify_head" template="betaout_amplify/head.phtml" />
|
6 |
Â
</reference>
|
7 |
Â
</default>
|
8 |
-
<cms_index_index>
|
9 |
-
<reference name="content">
|
10 |
-
<block type="page/html" name="betaout_amplify_homepage" template="betaout_amplify/homepage.phtml" />
|
11 |
-
</reference>
|
12 |
-
</cms_index_index>
|
13 |
-
<catalogsearch_result_index>
|
14 |
-
<reference name="after_body_start">
|
15 |
-
<block type="page/html" name="betaout_amplify_search" template="betaout_amplify/search.phtml" />
|
16 |
-
</reference>
|
17 |
-
</catalogsearch_result_index>
|
18 |
-
<catalogsearch_advanced_result>
|
19 |
-
<reference name="after_body_start">
|
20 |
-
<block type="page/html" name="betaout_amplify_search_advanced" template="betaout_amplify/search.phtml" />
|
21 |
-
</reference>
|
22 |
-
</catalogsearch_advanced_result>
|
23 |
Â
<checkout_onepage_index>
|
24 |
Â
<reference name="after_body_start">
|
25 |
Â
<block type="page/html" name="betaout_amplify_checkout" template="betaout_amplify/checkout.phtml" />
|
26 |
Â
</reference>
|
27 |
Â
</checkout_onepage_index>
|
28 |
-
<!-- <catalog_product_view>
|
29 |
-
<reference name="after_body_start">
|
30 |
-
<block type="page/html" name="betaout_amplify_product" template="betaout_amplify/product.phtml" />
|
31 |
-
</reference>
|
32 |
-
</catalog_product_view>-->
|
33 |
-
<customer_account_login>
|
34 |
-
<reference name="after_body_start">
|
35 |
-
<block type="page/html" name="betaout_amplify_login" template="betaout_amplify/login.phtml" />
|
36 |
-
</reference>
|
37 |
-
</customer_account_login>
|
38 |
-
<customer_account_create>
|
39 |
-
<reference name="after_body_start">
|
40 |
-
<block type="page/html" name="betaout_amplify_create" template="betaout_amplify/create.phtml" />
|
41 |
-
</reference>
|
42 |
-
</customer_account_create>
|
43 |
-
<customer_account_index>
|
44 |
-
<reference name="after_body_start">
|
45 |
-
<block type="page/html" name="betaout_amplify_account" template="betaout_amplify/account.phtml" />
|
46 |
-
</reference>
|
47 |
-
</customer_account_index>
|
48 |
-
<customer_account_edit>
|
49 |
-
<reference name="after_body_start">
|
50 |
-
<block type="page/html" name="betaout_amplify_account_edit" template="betaout_amplify/account_edit.phtml" />
|
51 |
-
</reference>
|
52 |
-
</customer_account_edit>
|
53 |
-
<sales_order_history>
|
54 |
-
<reference name="after_body_start">
|
55 |
-
<block type="page/html" name="betaout_amplify_sales_history" template="betaout_amplify/sales_history.phtml" />
|
56 |
-
</reference>
|
57 |
-
</sales_order_history>
|
58 |
-
<wishlist_index_index>
|
59 |
-
<reference name="after_body_start">
|
60 |
-
<block type="page/html" name="betaout_amplify_wishlist" template="betaout_amplify/wishlist.phtml" />
|
61 |
-
</reference>
|
62 |
-
</wishlist_index_index>
|
63 |
-
<checkout_cart_index>
|
64 |
-
<reference name="after_body_start">
|
65 |
-
<block type="page/html" name="betaout_amplify_cart" template="betaout_amplify/cart.phtml" />
|
66 |
-
</reference>
|
67 |
-
</checkout_cart_index>
|
68 |
-
|
69 |
-
|
70 |
-
<checkout_onepage_success>
|
71 |
-
<!-- <remove name="checkout.success"/>
|
72 |
-
<reference name="head">
|
73 |
-
<action method="addCss">
|
74 |
-
<stylesheet>meanbee/ordershare/css/ordershare.css</stylesheet>
|
75 |
-
</action>
|
76 |
-
</reference>-->
|
77 |
-
<reference name="after_body_start">
|
78 |
-
<block type="page/html" name="betaout_amplify_or" template="betaout_amplify/order.phtml" />
|
79 |
-
</reference>
|
80 |
-
</checkout_onepage_success>
|
81 |
-
<checkout_multishipping_success>
|
82 |
-
<!-- <remove name="checkout_success"/>
|
83 |
-
<reference name="head">
|
84 |
-
<action method="addCss">
|
85 |
-
<stylesheet>meanbee/ordershare/css/ordershare.css</stylesheet>
|
86 |
-
</action>
|
87 |
-
</reference>-->
|
88 |
-
<reference name="after_body_start">
|
89 |
-
<block type="page/html" name="betaout_amplify_or" template="betaout_amplify/order.phtml" />
|
90 |
-
</reference>
|
91 |
-
</checkout_multishipping_success>
|
92 |
Â
</layouts>
|
5 |
Â
<block type="page/html_head" name="betaout_amplify_head" template="betaout_amplify/head.phtml" />
|
6 |
Â
</reference>
|
7 |
Â
</default>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
8 |
Â
<checkout_onepage_index>
|
9 |
Â
<reference name="after_body_start">
|
10 |
Â
<block type="page/html" name="betaout_amplify_checkout" template="betaout_amplify/checkout.phtml" />
|
11 |
Â
</reference>
|
12 |
Â
</checkout_onepage_index>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
13 |
Â
</layouts>
|
app/design/frontend/base/default/template/betaout_amplify/account.phtml
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
<!--<script>
|
2 |
-
function addEvent() {
|
3 |
-
if ((typeof (Amplify) != 'undifined' && typeof (Amplify) == "object")) {
|
4 |
-
Amplify.addEvent("", {'viewed_account_dashboard': {
|
5 |
-
'viewed_account_dashboard': 1
|
6 |
-
}});
|
7 |
-
}
|
8 |
-
else {
|
9 |
-
setTimeout(addEvent, 10);
|
10 |
-
}
|
11 |
-
}
|
12 |
-
addEvent();
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
</script>-->
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
app/design/frontend/base/default/template/betaout_amplify/account_edit.phtml
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
<!--<script>
|
2 |
-
function addEvent() {
|
3 |
-
if ((typeof (Amplify) != 'undifined' && typeof (Amplify) == "object")) {
|
4 |
-
Amplify.addEvent("", {'viewed_account_edit': {
|
5 |
-
'viewed_account_edit': 1
|
6 |
-
}});
|
7 |
-
}
|
8 |
-
else {
|
9 |
-
setTimeout(addEvent, 10);
|
10 |
-
}
|
11 |
-
}
|
12 |
-
addEvent();
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
</script>-->
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
app/design/frontend/base/default/template/betaout_amplify/cart.phtml
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
<script>
|
2 |
-
// function addEvent() {
|
3 |
-
// if ((typeof (Amplify) != 'undifined' && typeof (Amplify) == "object")) {
|
4 |
-
// Amplify.addEvent("", {'viewed_shopping_cart': {
|
5 |
-
// 'viewed_shopping_cart': 1
|
6 |
-
// }});
|
7 |
-
// }
|
8 |
-
// else {
|
9 |
-
// setTimeout(addEvent, 10);
|
10 |
-
// }
|
11 |
-
// }
|
12 |
-
// addEvent();
|
13 |
-
//
|
14 |
-
//
|
15 |
-
//
|
16 |
-
//
|
17 |
-
//</script>
|
18 |
-
|
19 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
app/design/frontend/base/default/template/betaout_amplify/checkout.phtml
CHANGED
@@ -1,52 +1,42 @@
|
|
1 |
Â
<script>
|
2 |
-
if(Ajax.Responders){
|
3 |
Â
|
4 |
-
|
Â
|
|
Â
|
|
5 |
Â
|
6 |
-
|
7 |
Â
|
8 |
-
|
9 |
-
|
10 |
-
if(data.url.include("saveOrder")) {
|
11 |
-
|
12 |
-
Amplify.addEvent("",{'checkout_process_completed':{
|
13 |
Â
'step': 'checkout_process_completed'
|
14 |
-
}});
|
15 |
Â
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
Â
|
23 |
-
|
24 |
Â
}
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
}});
|
31 |
Â
}
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
}});
|
38 |
Â
}
|
39 |
Â
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
Â
|
44 |
Â
}
|
45 |
-
}
|
46 |
-
|
47 |
-
}
|
48 |
Â
|
49 |
-
|
50 |
-
}
|
51 |
Â
|
52 |
Â
</script>
|
1 |
Â
<script>
|
2 |
+
if (Ajax.Responders) {
|
3 |
Â
|
4 |
+
Ajax.Responders.register({
|
5 |
+
onComplete: function (data) {
|
6 |
+
if (!data.url.include("progress") && !data.url.include("getAdditional")) {
|
7 |
Â
|
8 |
+
if (data.url.include("saveOrder")) {
|
9 |
Â
|
10 |
+
_bOut.push(["addEvent", {'checkout_process_completed': {
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
11 |
Â
'step': 'checkout_process_completed'
|
12 |
+
}}]);
|
13 |
Â
|
14 |
+
} else if (accordion.currentSection) {
|
15 |
+
temp = (accordion.currentSection).split("-");
|
16 |
+
evtName = 'checkout_process_' + temp[1];
|
17 |
+
if (evtName == "checkout_process_billing") {
|
18 |
+
_bOut.push(["addEvent", {"checkout_process_billing": {
|
19 |
+
'step': accordion.currentSection
|
20 |
Â
|
21 |
+
}}]);
|
22 |
Â
}
|
23 |
+
if (evtName == "checkout_process_payment") {
|
24 |
+
_bOut.push(["addEvent", {"checkout_process_payment": {
|
25 |
+
'step': accordion.currentSection
|
26 |
+
}}]);
|
Â
|
|
Â
|
|
27 |
Â
}
|
28 |
+
if (evtName == "checkout_process_review") {
|
29 |
+
_bOut.push(["addEvent", {"checkout_process_review": {
|
30 |
+
'step': accordion.currentSection
|
31 |
+
}}]);
|
Â
|
|
Â
|
|
32 |
Â
}
|
33 |
Â
|
34 |
+
}
|
35 |
+
}
|
Â
|
|
36 |
Â
|
37 |
Â
}
|
Â
|
|
Â
|
|
Â
|
|
38 |
Â
|
39 |
+
});
|
40 |
+
}
|
41 |
Â
|
42 |
Â
</script>
|
app/design/frontend/base/default/template/betaout_amplify/create.phtml
DELETED
@@ -1,27 +0,0 @@
|
|
1 |
-
|
2 |
-
<!--<script>
|
3 |
-
function addEvent() {
|
4 |
-
if ((typeof (Amplify) != 'undifined' && typeof (Amplify) == "object")) {
|
5 |
-
Amplify.addEvent("", {'viewed_customer_create_page': {
|
6 |
-
'viewed_customer_create_page': 1
|
7 |
-
}});
|
8 |
-
}
|
9 |
-
else {
|
10 |
-
setTimeout(addEvent, 10);
|
11 |
-
}
|
12 |
-
}
|
13 |
-
addEvent();
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
</script>
|
19 |
-
-->
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
app/design/frontend/base/default/template/betaout_amplify/head.phtml
CHANGED
@@ -11,45 +11,36 @@ try {
|
|
11 |
Â
}
|
12 |
Â
else {
|
13 |
Â
$identity= Mage::getModel('core/cookie')->get('amplify_email');
|
14 |
-
|
15 |
-
|
16 |
Â
?>
|
17 |
Â
<script type="text/javascript">
|
18 |
Â
var Amplify = "";
|
19 |
-
|
20 |
-
|
21 |
Â
urlTracking = "<?php echo Mage::getStoreConfig("betaout_amplify_options/settings/urlTracking"); ?>";
|
22 |
-
|
23 |
-
|
24 |
-
|
Â
|
|
Â
|
|
25 |
Â
var d = document, f = d.getElementsByTagName("script")[0], _sc = d.createElement("script");
|
26 |
Â
_sc.type = "text/javascript";
|
27 |
Â
_sc.async = true;
|
28 |
Â
_sc.src = u;
|
29 |
Â
f.parentNode.insertBefore(_sc, f);
|
30 |
-
|
31 |
-
|
32 |
-
if (!__d && (!this.readyState || this.readyState === "loaded" || this.readyState === "complete")) {
|
33 |
-
__d = true;
|
34 |
-
Amplify = new AmplifyEngine();
|
35 |
-
}
|
36 |
-
};
|
37 |
-
}
|
38 |
-
_amplify("//d3oa6jk77hlbow.cloudfront.net/tejas.min.js");
|
39 |
-
// _amplify("//1.amplify.to/tejasv2/testerNew.js?v=47");
|
40 |
-
window.amplifyInit = function () {
|
41 |
-
|
42 |
-
Amplify.identify({
|
43 |
-
email: '<?php echo $identity; ?>',
|
44 |
-
name: ''
|
45 |
-
});
|
46 |
Â
|
47 |
-
|
Â
|
|
Â
|
|
Â
|
|
48 |
Â
|
49 |
Â
</script>
|
50 |
Â
|
51 |
Â
<?php
|
52 |
-
|
53 |
Â
} catch (Exception $ex) {
|
54 |
Â
|
55 |
Â
}
|
11 |
Â
}
|
12 |
Â
else {
|
13 |
Â
$identity= Mage::getModel('core/cookie')->get('amplify_email');
|
14 |
+
}
|
15 |
+
|
16 |
Â
?>
|
17 |
Â
<script type="text/javascript">
|
18 |
Â
var Amplify = "";
|
19 |
+
_bOutCW = <?php echo Mage::getStoreConfig("betaout_amplify_options/settings/AmplifyConnect_Widget"); ?>;
|
20 |
+
_bOutST = "<?php echo Mage::getStoreConfig("betaout_amplify_options/settings/shareTracking"); ?>";
|
21 |
Â
urlTracking = "<?php echo Mage::getStoreConfig("betaout_amplify_options/settings/urlTracking"); ?>";
|
22 |
+
_bOutAKEY = '<?php echo Mage::getStoreConfig("betaout_amplify_options/settings/amplify_key"); ?>';
|
23 |
+
_bOutPID = '<?php echo Mage::getStoreConfig("betaout_amplify_options/settings/amplify_projectId"); ?>';
|
24 |
+
|
25 |
+
var _bOut = _bOut || [];
|
26 |
+
function _bOutS(u) {
|
27 |
Â
var d = document, f = d.getElementsByTagName("script")[0], _sc = d.createElement("script");
|
28 |
Â
_sc.type = "text/javascript";
|
29 |
Â
_sc.async = true;
|
30 |
Â
_sc.src = u;
|
31 |
Â
f.parentNode.insertBefore(_sc, f);
|
32 |
+
}
|
33 |
+
_bOutS("//d22vyp49cxb9py.cloudfront.net/jal.min.js");
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
34 |
Â
|
35 |
+
_bOut.push(["identify", {
|
36 |
+
"email": "<?php echo $identity; ?>",
|
37 |
+
"name": ""
|
38 |
+
}]);
|
39 |
Â
|
40 |
Â
</script>
|
41 |
Â
|
42 |
Â
<?php
|
43 |
+
|
44 |
Â
} catch (Exception $ex) {
|
45 |
Â
|
46 |
Â
}
|
app/design/frontend/base/default/template/betaout_amplify/homepage.phtml
DELETED
@@ -1,40 +0,0 @@
|
|
1 |
-
|
2 |
-
<?php
|
3 |
-
$st = microtime(true);
|
4 |
-
?>
|
5 |
-
<!--<script>
|
6 |
-
(function() {
|
7 |
-
function addEvent() {
|
8 |
-
if ((typeof (Amplify) != 'undifined' && typeof (Amplify) == "object")) {
|
9 |
-
Amplify.addEvent("", {'viewed_homepage': {
|
10 |
-
'viewed_homepage': 1
|
11 |
-
}});
|
12 |
-
}
|
13 |
-
else {
|
14 |
-
setTimeout(addEvent, 10);
|
15 |
-
}
|
16 |
-
}
|
17 |
-
addEvent();
|
18 |
-
|
19 |
-
})();
|
20 |
-
|
21 |
-
</script>-->
|
22 |
-
<?php
|
23 |
-
//try{
|
24 |
-
//require_once MAGENTO_ROOT . '/app/code/community/Betaout/Amplify/Model/Amplify.php';
|
25 |
-
// $key = Mage::getStoreConfig('betaout_amplify_options/settings/amplify_key');
|
26 |
-
// $secret = Mage::getStoreConfig('betaout_amplify_options/settings/amplify_secret');
|
27 |
-
//
|
28 |
-
// $projectId = Mage::getStoreConfig('betaout_amplify_options/settings/amplify_projectId');
|
29 |
-
// $amplify = new Amplify($key, $secret, $projectId);
|
30 |
-
//// $model = Mage::getModel('betaout_amplify/key');
|
31 |
-
////$identity = $model->getCustomerIdentity();
|
32 |
-
//$amplify->event($identity,array('viewed_homepage'=>false));
|
33 |
-
//} catch (Exception $ex) {
|
34 |
-
//
|
35 |
-
//}
|
36 |
-
//
|
37 |
-
|
38 |
-
//$endTime = microtime(true);
|
39 |
-
//echo "total Execution time ==" . number_format(($endTime - $st), 9);
|
40 |
-
?>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
app/design/frontend/base/default/template/betaout_amplify/login.phtml
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
<!--<script>
|
2 |
-
function addEvent() {
|
3 |
-
if ((typeof (Amplify) != 'undifined' && typeof (Amplify) == "object")) {
|
4 |
-
Amplify.addEvent("", {'viewed_login_page': {
|
5 |
-
'viewed_login_page': 1
|
6 |
-
}});
|
7 |
-
}
|
8 |
-
else {
|
9 |
-
setTimeout(addEvent, 10);
|
10 |
-
}
|
11 |
-
}
|
12 |
-
addEvent();
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
</script>
|
18 |
-
|
19 |
-
-->
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
app/design/frontend/base/default/template/betaout_amplify/order.phtml
DELETED
@@ -1,44 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
* To change this license header, choose License Headers in Project Properties.
|
5 |
-
* To change this template file, choose Tools | Templates
|
6 |
-
* and open the template in the editor.
|
7 |
-
*/
|
8 |
-
//if (Mage::getSingleton('customer/session')->isLoggedIn()) {
|
9 |
-
//
|
10 |
-
///* Get the customer data */
|
11 |
-
//$customer = Mage::getSingleton('customer/session')->getCustomer();
|
12 |
-
///* Get the customer's email address */
|
13 |
-
//$customer_email = $customer->getEmail();
|
14 |
-
//
|
15 |
-
//}
|
16 |
-
//
|
17 |
-
//
|
18 |
-
//
|
19 |
-
//$collection = Mage::getModel('sales/order')
|
20 |
-
// ->getCollection()
|
21 |
-
// ->addAttributeToFilter('customer_email',array('like'=>$customer_email));
|
22 |
-
//
|
23 |
-
//foreach($collection as $order){
|
24 |
-
// //do something
|
25 |
-
// $order_id = $order->getId();
|
26 |
-
//
|
27 |
-
//
|
28 |
-
//
|
29 |
-
//$order = Mage::getModel("sales/order")->load($order_id); //load order by order id
|
30 |
-
//
|
31 |
-
//$ordered_items = $order->getAllItems();
|
32 |
-
//
|
33 |
-
//foreach($ordered_items as $item){ //item detail
|
34 |
-
//
|
35 |
-
//echo $item->getItemId(); //product id
|
36 |
-
//
|
37 |
-
//echo $item->getSku();
|
38 |
-
// echo $item->getQtyOrdered(); //ordered qty of item
|
39 |
-
//
|
40 |
-
// echo $item->getName();
|
41 |
-
//
|
42 |
-
// }
|
43 |
-
//}
|
44 |
-
?>
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
app/design/frontend/base/default/template/betaout_amplify/sales_history.phtml
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
<!--<script>
|
2 |
-
function addEvent() {
|
3 |
-
if ((typeof (Amplify) != 'undifined' && typeof (Amplify) == "object")) {
|
4 |
-
Amplify.addEvent("", {'viewed_sales_order_history': {
|
5 |
-
'viewed_sales_order_history': 1
|
6 |
-
}});
|
7 |
-
}
|
8 |
-
else {
|
9 |
-
setTimeout(addEvent, 10);
|
10 |
-
}
|
11 |
-
}
|
12 |
-
addEvent();
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
</script>
|
18 |
-
|
19 |
-
-->
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
app/design/frontend/base/default/template/betaout_amplify/search.phtml
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
<!--<script>
|
2 |
-
function addEvent() {
|
3 |
-
if ((typeof (Amplify) != 'undifined' && typeof (Amplify) == "object")) {
|
4 |
-
Amplify.addEvent("", {'keywords_searched_internally': {
|
5 |
-
'keywords_searched_internally': 1
|
6 |
-
}});
|
7 |
-
}
|
8 |
-
else {
|
9 |
-
setTimeout(addEvent, 10);
|
10 |
-
}
|
11 |
-
}
|
12 |
-
addEvent();
|
13 |
-
</script>
|
14 |
-
-->
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
app/design/frontend/base/default/template/betaout_amplify/wishlist.phtml
DELETED
@@ -1,34 +0,0 @@
|
|
1 |
-
<!--<script>
|
2 |
-
function addEvent() {
|
3 |
-
if ((typeof (Amplify) != 'undifined' && typeof (Amplify) == "object")) {
|
4 |
-
Amplify.addEvent("", {'viewed_wishlist': {
|
5 |
-
'viewed_wishlist': 1
|
6 |
-
}});
|
7 |
-
}
|
8 |
-
else {
|
9 |
-
setTimeout(addEvent, 10);
|
10 |
-
}
|
11 |
-
}
|
12 |
-
addEvent();
|
13 |
-
</script>-->
|
14 |
-
<?php
|
15 |
-
//try{
|
16 |
-
//require_once MAGENTO_ROOT . '/app/code/community/Betaout/Amplify/Model/Amplify.php';
|
17 |
-
// $key = Mage::getStoreConfig('betaout_amplify_options/settings/amplify_key');
|
18 |
-
// $secret = Mage::getStoreConfig('betaout_amplify_options/settings/amplify_secret');
|
19 |
-
//
|
20 |
-
// $projectId = Mage::getStoreConfig('betaout_amplify_options/settings/amplify_projectId');
|
21 |
-
// $amplify = new Amplify($key, $secret, $projectId);
|
22 |
-
// $model = Mage::getModel('betaout_amplify/key');
|
23 |
-
//$identity = $model->getCustomerIdentity();
|
24 |
-
//$amplify->event($identity,array('viewed_wishlist'=>false));
|
25 |
-
//} catch (Exception $ex) {
|
26 |
-
//
|
27 |
-
//}
|
28 |
-
//
|
29 |
-
?>
|
30 |
-
<?php
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
Â
<?xml version="1.0"?>
|
2 |
Â
<package>
|
3 |
Â
<name>Betaout</name>
|
4 |
-
<version>1.1.
|
5 |
Â
<stability>stable</stability>
|
6 |
Â
<license>GPL</license>
|
7 |
Â
<channel>community</channel>
|
8 |
Â
<extends/>
|
9 |
-
<summary>
|
10 |
-
<description>
|
11 |
-
<notes>
|
12 |
-
<authors><author><name>
|
13 |
-
<date>2015-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="Betaout"><dir name="Amplify"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="About.php" hash="5d714a88c93aa83a3cdfed81712a1611"/><dir name="Form"><dir name="Field"><file name="Conflict.php" hash="6f91b2528452ee1a96440d3a9da43962"/></dir></dir><file name="Logo.php" hash="40f74b3fab0f1bed08315ae83abb4d42"/></dir></dir><dir name="Widget"><dir name="Button"><file name="Conflict.php" hash="903c3c00124ae86bde48f7ce2ad2f066"/></dir></dir></dir><file name="Conflictprinter.php" hash="ce0256621be50bfe02bf01a80ac11b20"/></dir><dir name="Helper"><file name="Conflictchecker.php" hash="a03e8cff4427d5a7ed28f06530f75838"/><file name="Data.php" hash="ab8d5234d07dd762f516169f3be73fe8"/></dir><dir name="Model"><file name="Amplify.php" hash="a5daf54fc159ca75c730c0ac7f4f1194"/><file name="Amplifyconnectwidget.php" hash="904cedccd8685cb3f4e801b81802ec6d"/><dir name="Config"><file name="Blocks.php" hash="d32094f94f70ddc75f4ecb4ea90bdc16"/><file name="Checker.php" hash="b2b4fc113e7511f23360dc01ca3dc7e3"/><file name="ConfigAbstract.php" hash="b19f0f25177fbea91c817758886d6373"/><file name="ConfigInterface.php" hash="85c1b11953b73728feb498ae81711c29"/><file name="Datastore.php" hash="f8a8c60c2f4e1801941c334ebe45cc1a"/><file name="Helpers.php" hash="f337bdceb3fb867f7e2aa8ad90b1216e"/><file name="Models.php" hash="500a145c160beb6797f7450d03069637"/><file name="Printer.php" hash="577801efaeb6bc6dd8bd096875fda08b"/><file name="Resources.php" hash="1f14e467d10ba2afbd2354f78c0047e7"/></dir><dir name="Core"><dir name="Config"><file name="Base.php" hash="7bccfac5cac9b19f1073bb97568958f8"/><file name="Element.php" hash="d2ce6a9a5840dbe335514b7455c60688"/></dir><file name="Config.php" hash="4222a35a2c71b3702199efbfddbee701"/></dir><file name="CronStatus.php" hash="298e6e428249ed7020c27e3c8abc52a2"/><file name="Key.php" hash="d244e7dc815027266b5bed48948c1177"/><dir name="Lib"><dir name="Varien"><dir name="Simplexml"><file name="Config.php" hash="eba1dfcc303065cf5b3c9067d87dd35a"/><file name="Element.php" hash="24cb3b7db31ae8e2c813485a6b6ef749"/></dir></dir></dir><dir name="Mysql4"><dir name="Core"><file name="Config.php" hash="c0a59f8ff1f747224655de39b217abde"/></dir></dir><file name="Order.php" hash="5a0f2583fa8eb6d943d3e700a88bd59d"/><dir name="Path"><dir name="Locator"><file name="Array.php" hash="722f4125eb1cbd5fbc2be05facd44cd4"/><file name="Factory.php" hash="5a57006974d9870affbcbafa6ed00175"/><file name="IteratorAbstract.php" hash="adba5c801c91efdbc5afa493d353224a"/><file name="LocatorInterface.php" hash="30571ef5c7ebf942870a0ddd2ab341cb"/><file name="Stack.php" hash="73a27e38db4768019613c99407205771"/></dir></dir><dir name="Resource"><dir name="Core"><file name="Config.php" hash="14736455e9f006a69dc638e4b93f7e6e"/></dir><dir name="Db"><file name="Abstract.php" hash="3874d4c5cc4b1af30a550cc792bbe22f"/></dir></dir><file name="Sharetracking.php" hash="05f4fe212dfd53027525bae6321ea641"/><file name="Urltracking.php" hash="d4e7e48cbb8168c2baab17e1edde1eac"/><file name="Verify.php" hash="3e385480fdfdfb3b1219ba48c1ef1644"/><file name="magentoGetOrderByUserId.php" hash="d7090c9353f3bf989d88cff4e4063998"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ConflictcheckerController.php" hash="28bf9f8cca4f3e63ea90c575c424deb0"/></dir><file name="indexController.php" hash="ca84b19b9ee9ea2678ba6ef5a6d23afa"/></dir><dir name="etc"><file name="config.xml" hash="e4d6d889afac6baab05f1edd43a7f593"/><file name="system.xml" hash="b0209ad686f8a15ccef20a92c62028ba"/></dir><dir name="log"><file name="log.log" hash="be8a8d092fd7ba1381cfbe23eda18c2e"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="betaout_amplify"><file name="amplify.phtml" hash="85e5918735770c07615fcb482ec8a59d"/><file name="conflict.phtml" hash="43277d57972e4f750d8b65e0bfb5bcb8"/><file name="logo.phtml" hash="e3ba04dadaa851b305fc2c4aca3aff96"/></dir></dir><dir name="layout"><file name="betaout_amplify.xml" hash="3f6dc67340bd11b6708541d4abd2a3c6"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="betaout_amplify"><file name="account.phtml" hash="01cd3a0360e0311084892e6aa91670f6"/><file name="account_edit.phtml" hash="0f05ae8838cef60cfa6939d8f7b8e99e"/><file name="cart.phtml" hash="a27a29bd64a8829b535149364bcf8ce3"/><file name="checkout.phtml" hash="4724eb870c615572497e21aa6264252f"/><file name="create.phtml" hash="bbfa7ecefe6c7aee482e475b594ea048"/><file name="head.phtml" hash="4d760e35a6fcf830f3bcfff387898120"/><file name="homepage.phtml" hash="26aad4234a7f50da95e584801fefec30"/><file name="login.phtml" hash="c9cd89dc9f30747a294b4dce3f85c53b"/><file name="order.phtml" hash="c069a455e83c9132a84cf41e26fbc1d0"/><file name="sales_history.phtml" hash="2fdb5b83f9f15b6c7a678968ecac807c"/><file name="search.phtml" hash="0131538e90e885e74247e89fa3708995"/><file name="wishlist.phtml" hash="7576e63e137c2b02dea575f55c919b5d"/></dir></dir><dir name="layout"><file name="betaout_amplify.xml" hash="6636dd0293f6edde04b08e5f07457ed9"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="amplify"><dir name="images"><file name="Users.png" hash="96e906660b1fbd8a17831bd3049dbcfa"/><file name="Users_1.png" hash="96e906660b1fbd8a17831bd3049dbcfa"/><file name="ajax-loader-tr.gif" hash="1ae32bc8232ff2527c627e5b38eb319a"/><file name="ajax-loader-tr_1.gif" hash="1ae32bc8232ff2527c627e5b38eb319a"/><file name="ajax-loader.gif" hash="e2a38f1e23288e315af3c55416bc1ce7"/><file name="ajax-loader_1.gif" hash="e2a38f1e23288e315af3c55416bc1ce7"/><file name="amp-connect.png" hash="0cea8d77700915725b17b59b6d2dcfcc"/><file name="amp-connect_1.png" hash="0cea8d77700915725b17b59b6d2dcfcc"/><file name="amplify.png" hash="1b4adb0d54bb79680fd8108f4a17e898"/><file name="amplify_1.png" hash="1b4adb0d54bb79680fd8108f4a17e898"/><file name="btn.png" hash="769b6736cb1bb8cb91ad7526ce9d9db8"/><file name="btn_1.png" hash="769b6736cb1bb8cb91ad7526ce9d9db8"/><file name="check.png" hash="252fd93a83e2a412ecd3b6eac01500b7"/><file name="check_1.png" hash="252fd93a83e2a412ecd3b6eac01500b7"/><file name="com-app.png" hash="1f241f552bdbe1f86763981c79c8d85f"/><file name="com-app_1.png" hash="1f241f552bdbe1f86763981c79c8d85f"/><file name="db-1.png" hash="840d96bd5679bf4fa2d6a9577f7d3539"/><file name="db-1_1.png" hash="840d96bd5679bf4fa2d6a9577f7d3539"/><file name="engage-app.png" hash="888cde6a10a3dd9abcfccd1a5f0c8fde"/><file name="engage-app_1.png" hash="888cde6a10a3dd9abcfccd1a5f0c8fde"/><file name="icon.png" hash="22ea725b0bee73cb03f63b063b02469f"/><file name="icon_1.png" hash="22ea725b0bee73cb03f63b063b02469f"/><file name="large_bracket.png" hash="d2e8da8266e513bd5f15b0c9855be058"/><file name="large_bracket_1.png" hash="d2e8da8266e513bd5f15b0c9855be058"/><file name="mini_bracket.png" hash="e844112e5e5173f64b3385a4a140bdeb"/><file name="mini_bracket_1.png" hash="e844112e5e5173f64b3385a4a140bdeb"/><file name="plugin-logo.png" hash="cdbe958c79bb55fd615d5c3918ad3831"/><file name="plugin-logo_1.png" hash="cdbe958c79bb55fd615d5c3918ad3831"/><file name="socialicon.png" hash="f1145a7105620196bd23ed65d3b3f468"/><file name="socialicon_1.png" hash="f1145a7105620196bd23ed65d3b3f468"/><file name="u111_normal.png" hash="fae6b2993bb6b055547280b5090764a0"/><file name="u111_normal_1.png" hash="fae6b2993bb6b055547280b5090764a0"/><file name="u151_normal.png" hash="5bc3388cb53aa21aad192b72a3b51c8c"/><file name="u151_normal_1.png" hash="5bc3388cb53aa21aad192b72a3b51c8c"/><file name="u185_normal.png" hash="34d1b35c670f1465ef270ef32c6daaff"/><file name="u185_normal_1.png" hash="34d1b35c670f1465ef270ef32c6daaff"/><file name="u187_normal.png" hash="8a40e2eafc78055efee2daf50d4705d5"/><file name="u187_normal_1.png" hash="8a40e2eafc78055efee2daf50d4705d5"/><file name="u189_normal.png" hash="8035feedcfdd96da5c4755c8f38318ff"/><file name="u189_normal_1.png" hash="8035feedcfdd96da5c4755c8f38318ff"/><file name="u192_normal.png" hash="4b043b0d2c32a3804a189f9383fd83f2"/><file name="u192_normal_1.png" hash="4b043b0d2c32a3804a189f9383fd83f2"/><file name="u204_normal.png" hash="2d8347498231f64c3cfe055c13599544"/><file name="u204_normal_1.png" hash="2d8347498231f64c3cfe055c13599544"/><file name="u206_normal.png" hash="1113a57fe91593ff5e239bcf4dee100a"/><file name="u206_normal_1.png" hash="1113a57fe91593ff5e239bcf4dee100a"/><file name="u3_normal.png" hash="769b6736cb1bb8cb91ad7526ce9d9db8"/><file name="u3_normal_1.png" hash="769b6736cb1bb8cb91ad7526ce9d9db8"/><file name="u74_normal.png" hash="7dc03403001cb96e1247243bd0e73391"/><file name="u74_normal_1.png" hash="7dc03403001cb96e1247243bd0e73391"/><file name="u89_normal.png" hash="abd8a60573df3db36ae9908a81d0b197"/><file name="u89_normal_1.png" hash="abd8a60573df3db36ae9908a81d0b197"/><file name="u93_normal.png" hash="66fd0ba981b8407cbe630607ecbe0223"/><file name="u93_normal_1.png" hash="66fd0ba981b8407cbe630607ecbe0223"/><file name="u96_normal.png" hash="6e91f7aa2454ab6cb06fcb01cd77bb26"/><file name="u96_normal_1.png" hash="6e91f7aa2454ab6cb06fcb01cd77bb26"/></dir></dir></dir></dir><dir name="default"><dir name="default"><dir name="images"><dir name="amplify"><file name="ajax-loader-tr.gif" hash="1ae32bc8232ff2527c627e5b38eb319a"/><file name="ajax-loader-tr_1.gif" hash="1ae32bc8232ff2527c627e5b38eb319a"/><file name="ajax-loader.gif" hash="e2a38f1e23288e315af3c55416bc1ce7"/><file name="ajax-loader_1.gif" hash="e2a38f1e23288e315af3c55416bc1ce7"/><file name="amp-n-logo.png" hash="2f63b2187049acfd7be9bcc515abf4eb"/><file name="amp-n-logo_1.png" hash="2f63b2187049acfd7be9bcc515abf4eb"/><file name="amplify.gif" hash="82085013e11db77a7164dbd7faeb427b"/><file name="amplify_1.gif" hash="82085013e11db77a7164dbd7faeb427b"/><file name="logo-amp.png" hash="8719f9859bfb5497ecbf05962f15b8c6"/><file name="logo-amp_1.png" hash="8719f9859bfb5497ecbf05962f15b8c6"/><file name="small_amp.png" hash="7245bb50b46c0689dd76d41fd8e5efe8"/><file name="small_amp_1.png" hash="7245bb50b46c0689dd76d41fd8e5efe8"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Betaout_Amplify.xml" hash="a8228fbbf2d0a09dc90cd7c80b4692f0"/></dir></target></contents>
|
16 |
Â
<compatible/>
|
17 |
-
<dependencies><required><php><min>
|
18 |
Â
</package>
|
1 |
Â
<?xml version="1.0"?>
|
2 |
Â
<package>
|
3 |
Â
<name>Betaout</name>
|
4 |
+
<version>1.1.5</version>
|
5 |
Â
<stability>stable</stability>
|
6 |
Â
<license>GPL</license>
|
7 |
Â
<channel>community</channel>
|
8 |
Â
<extends/>
|
9 |
+
<summary>Helping Ecommerce Companies drive more sales and customer happiness. </summary>
|
10 |
+
<description>Helping Ecommerce Companies drive more sales and customer happiness. </description>
|
11 |
+
<notes>Fix some issues in customer order total amount </notes>
|
12 |
+
<authors><author><name>jitendra</name><user>jitendra</user><email>jitendra@getamplify.com</email></author></authors>
|
13 |
+
<date>2015-04-18</date>
|
14 |
+
<time>13:08:44</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Betaout"><dir name="Amplify"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="About.php" hash="5d714a88c93aa83a3cdfed81712a1611"/><dir name="Form"><dir name="Field"><file name="Conflict.php" hash="6f91b2528452ee1a96440d3a9da43962"/></dir></dir><file name="Logo.php" hash="40f74b3fab0f1bed08315ae83abb4d42"/></dir></dir><dir name="Widget"><dir name="Button"><file name="Conflict.php" hash="903c3c00124ae86bde48f7ce2ad2f066"/></dir></dir></dir><file name="Conflictprinter.php" hash="ce0256621be50bfe02bf01a80ac11b20"/></dir><dir name="Helper"><file name="Conflictchecker.php" hash="a03e8cff4427d5a7ed28f06530f75838"/><file name="Data.php" hash="ab8d5234d07dd762f516169f3be73fe8"/></dir><dir name="Model"><file name="Amplify.php" hash="2ef4e8f386c730f044553bf39b975d8f"/><file name="Amplifyconnectwidget.php" hash="904cedccd8685cb3f4e801b81802ec6d"/><dir name="Config"><file name="Blocks.php" hash="d32094f94f70ddc75f4ecb4ea90bdc16"/><file name="Checker.php" hash="b2b4fc113e7511f23360dc01ca3dc7e3"/><file name="ConfigAbstract.php" hash="b19f0f25177fbea91c817758886d6373"/><file name="ConfigInterface.php" hash="85c1b11953b73728feb498ae81711c29"/><file name="Datastore.php" hash="f8a8c60c2f4e1801941c334ebe45cc1a"/><file name="Helpers.php" hash="f337bdceb3fb867f7e2aa8ad90b1216e"/><file name="Models.php" hash="500a145c160beb6797f7450d03069637"/><file name="Printer.php" hash="577801efaeb6bc6dd8bd096875fda08b"/><file name="Resources.php" hash="1f14e467d10ba2afbd2354f78c0047e7"/></dir><dir name="Core"><dir name="Config"><file name="Base.php" hash="7bccfac5cac9b19f1073bb97568958f8"/><file name="Element.php" hash="d2ce6a9a5840dbe335514b7455c60688"/></dir><file name="Config.php" hash="4222a35a2c71b3702199efbfddbee701"/></dir><file name="CronStatus.php" hash="298e6e428249ed7020c27e3c8abc52a2"/><file name="Key.php" hash="c04793c06f420d0989c181f98fd8c69e"/><dir name="Lib"><dir name="Varien"><dir name="Simplexml"><file name="Config.php" hash="eba1dfcc303065cf5b3c9067d87dd35a"/><file name="Element.php" hash="24cb3b7db31ae8e2c813485a6b6ef749"/></dir></dir></dir><dir name="Mysql4"><dir name="Core"><file name="Config.php" hash="c0a59f8ff1f747224655de39b217abde"/></dir></dir><file name="Order.php" hash="5a0f2583fa8eb6d943d3e700a88bd59d"/><dir name="Path"><dir name="Locator"><file name="Array.php" hash="722f4125eb1cbd5fbc2be05facd44cd4"/><file name="Factory.php" hash="5a57006974d9870affbcbafa6ed00175"/><file name="IteratorAbstract.php" hash="adba5c801c91efdbc5afa493d353224a"/><file name="LocatorInterface.php" hash="30571ef5c7ebf942870a0ddd2ab341cb"/><file name="Stack.php" hash="73a27e38db4768019613c99407205771"/></dir></dir><dir name="Resource"><dir name="Core"><file name="Config.php" hash="14736455e9f006a69dc638e4b93f7e6e"/></dir><dir name="Db"><file name="Abstract.php" hash="3874d4c5cc4b1af30a550cc792bbe22f"/></dir></dir><file name="Sharetracking.php" hash="05f4fe212dfd53027525bae6321ea641"/><file name="Urltracking.php" hash="d4e7e48cbb8168c2baab17e1edde1eac"/><file name="Verify.php" hash="3e385480fdfdfb3b1219ba48c1ef1644"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ConflictcheckerController.php" hash="28bf9f8cca4f3e63ea90c575c424deb0"/></dir><file name="indexController.php" hash="ca84b19b9ee9ea2678ba6ef5a6d23afa"/></dir><dir name="etc"><file name="config.xml" hash="233d2b9afd76fe06190e628ee9d789ce"/><file name="system.xml" hash="611f0840b3c73ec6925156ab109b3ba6"/></dir><dir name="log"><file name="log.log" hash="be8a8d092fd7ba1381cfbe23eda18c2e"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Betaout_Amplify.xml" hash="a8228fbbf2d0a09dc90cd7c80b4692f0"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="betaout_amplify.xml" hash="3f6dc67340bd11b6708541d4abd2a3c6"/></dir><dir name="template"><dir name="betaout_amplify"><file name="amplify.phtml" hash="ce94f7e9e16d3c519bc8efcf4541716c"/><file name="conflict.phtml" hash="43277d57972e4f750d8b65e0bfb5bcb8"/><file name="logo.phtml" hash="0af4376bf5074d24519ab7e9d3ea035b"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="betaout_amplify"><file name="checkout.phtml" hash="b159304292870dd53db29ad81e5312f0"/><file name="head.phtml" hash="d07c888313f4beb4566567abc8e73ee3"/></dir></dir><dir name="layout"><file name="betaout_amplify.xml" hash="553f1a3f03e01dbefbc96916b552118c"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="base"><dir name="default"><dir name="amplify"><dir name="images"><file name="Users.png" hash="96e906660b1fbd8a17831bd3049dbcfa"/><file name="ajax-loader-tr.gif" hash="1ae32bc8232ff2527c627e5b38eb319a"/><file name="ajax-loader.gif" hash="e2a38f1e23288e315af3c55416bc1ce7"/><file name="btn.png" hash="769b6736cb1bb8cb91ad7526ce9d9db8"/><file name="check.png" hash="252fd93a83e2a412ecd3b6eac01500b7"/><file name="com-app.png" hash="1f241f552bdbe1f86763981c79c8d85f"/><file name="db-1.png" hash="840d96bd5679bf4fa2d6a9577f7d3539"/><file name="engage-app.png" hash="888cde6a10a3dd9abcfccd1a5f0c8fde"/><file name="icon.png" hash="22ea725b0bee73cb03f63b063b02469f"/><file name="large_bracket.png" hash="d2e8da8266e513bd5f15b0c9855be058"/><file name="mini_bracket.png" hash="e844112e5e5173f64b3385a4a140bdeb"/></dir></dir></dir></dir><dir name="default"><dir name="default"><dir name="images"><file name="amplify" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir></dir></dir></target></contents>
|
16 |
Â
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.0.0</min><max>5.6.7</max></php></required></dependencies>
|
18 |
Â
</package>
|
skin/adminhtml/base/default/amplify/images/Users_1.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/ajax-loader-tr_1.gif
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/ajax-loader_1.gif
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/amp-connect.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/amp-connect_1.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/amplify.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/amplify_1.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/btn_1.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/check_1.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/com-app_1.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/db-1_1.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/engage-app_1.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/icon_1.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/large_bracket_1.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/mini_bracket_1.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/plugin-logo.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/plugin-logo_1.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/socialicon.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/socialicon_1.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/u111_normal.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/u111_normal_1.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/u151_normal.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/u151_normal_1.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/u185_normal.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/u185_normal_1.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/u187_normal.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/u187_normal_1.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/u189_normal.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/u189_normal_1.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/u192_normal.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/u192_normal_1.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/u204_normal.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/u204_normal_1.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/u206_normal.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/u206_normal_1.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/u3_normal.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/u3_normal_1.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/u74_normal.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/u74_normal_1.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/u89_normal.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/u89_normal_1.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/u93_normal.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/u93_normal_1.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/u96_normal.png
DELETED
Binary file
|
skin/adminhtml/base/default/amplify/images/u96_normal_1.png
DELETED
Binary file
|
skin/adminhtml/default/default/images/amplify/ajax-loader-tr.gif
DELETED
Binary file
|
skin/adminhtml/default/default/images/amplify/ajax-loader-tr_1.gif
DELETED
Binary file
|
skin/adminhtml/default/default/images/amplify/ajax-loader.gif
DELETED
Binary file
|
skin/adminhtml/default/default/images/amplify/ajax-loader_1.gif
DELETED
Binary file
|
skin/adminhtml/default/default/images/amplify/amp-n-logo.png
DELETED
Binary file
|
skin/adminhtml/default/default/images/amplify/amp-n-logo_1.png
DELETED
Binary file
|
skin/adminhtml/default/default/images/amplify/amplify.gif
DELETED
Binary file
|
skin/adminhtml/default/default/images/amplify/amplify_1.gif
DELETED
Binary file
|
skin/adminhtml/default/default/images/amplify/logo-amp.png
DELETED
Binary file
|
skin/adminhtml/default/default/images/amplify/logo-amp_1.png
DELETED
Binary file
|
skin/adminhtml/default/default/images/amplify/small_amp.png
DELETED
Binary file
|
skin/adminhtml/default/default/images/amplify/small_amp_1.png
DELETED
Binary file
|