Version Notes
Added feature to support SSL.
Added new API to import order details.
Added new API to import product details with all attribute.
Download this release
Release Info
Developer | Increasingly |
Extension | increasingly_key |
Version | 1.0.12 |
Comparing to | |
See all releases |
Code changes from version 1.0.11 to 1.0.12
- app/code/community/Increasingly/Analytics/Helper/Data.php +2 -2
- app/code/community/Increasingly/Analytics/Helper/ProductFormatter.php +12 -16
- app/code/community/Increasingly/Analytics/controllers/ImportLogsController.php +31 -0
- app/code/community/Increasingly/Analytics/controllers/OrdersApiController.php +194 -0
- app/code/community/Increasingly/Analytics/controllers/ProductsApiController.php +3 -74
- app/code/community/Increasingly/Analytics/controllers/ProductsImportApiController.php +294 -0
- app/code/community/Increasingly/Analytics/etc/config.xml +1 -1
- app/code/community/Increasingly/Analytics/etc/config.xml~ +0 -250
- app/code/community/Increasingly/Analytics/sql/increasingly_analytics_setup/mysql4-install-1.0.11.php~ +0 -0
- app/code/community/Increasingly/Analytics/sql/increasingly_analytics_setup/mysql4-install-1.0.12.php +29 -0
- app/design/frontend/base/default/template/increasingly/track.phtml +2 -2
- package.xml +7 -5
app/code/community/Increasingly/Analytics/Helper/Data.php
CHANGED
@@ -244,7 +244,7 @@ class Increasingly_Analytics_Helper_Data extends Mage_Core_Helper_Abstract
|
|
244 |
try {
|
245 |
$cookieValue = Mage::getModel('core/cookie')->get('ivid');
|
246 |
$userBundleCollection = Mage::getModel('increasingly_analytics/bundle')->getCollection()->addFieldToFilter('increasingly_visitor_id',$cookieValue);
|
247 |
-
|
248 |
if($quote->getItemsCount() == 0 && count($userBundleCollection) >= 0) {
|
249 |
foreach ($userBundleCollection as $userBundle) {
|
250 |
$userBundle->delete();
|
@@ -279,7 +279,7 @@ class Increasingly_Analytics_Helper_Data extends Mage_Core_Helper_Abstract
|
|
279 |
ksort($data);
|
280 |
$encodedData = base64_encode(Mage::helper('core')->jsonEncode($data));
|
281 |
$signature = md5($encodedData.$api_secret);
|
282 |
-
$url = '
|
283 |
$client = new Varien_Http_Client($url);
|
284 |
|
285 |
$postData = array(
|
244 |
try {
|
245 |
$cookieValue = Mage::getModel('core/cookie')->get('ivid');
|
246 |
$userBundleCollection = Mage::getModel('increasingly_analytics/bundle')->getCollection()->addFieldToFilter('increasingly_visitor_id',$cookieValue);
|
247 |
+
//$productIds = explode(',', $userBundle->getProductIds);
|
248 |
if($quote->getItemsCount() == 0 && count($userBundleCollection) >= 0) {
|
249 |
foreach ($userBundleCollection as $userBundle) {
|
250 |
$userBundle->delete();
|
279 |
ksort($data);
|
280 |
$encodedData = base64_encode(Mage::helper('core')->jsonEncode($data));
|
281 |
$signature = md5($encodedData.$api_secret);
|
282 |
+
$url = 'https://optimizedby.increasingly.co/ImportData';
|
283 |
$client = new Varien_Http_Client($url);
|
284 |
|
285 |
$postData = array(
|
app/code/community/Increasingly/Analytics/Helper/ProductFormatter.php
CHANGED
@@ -40,17 +40,9 @@ class Increasingly_Analytics_Helper_ProductFormatter extends Mage_Core_Helper_Ab
|
|
40 |
$dateFormatter = Mage::helper('increasingly_analytics/DateFormatter');
|
41 |
|
42 |
$productData = array(
|
43 |
-
'product_id' => $product->getId(),
|
44 |
-
|
45 |
-
|
46 |
-
'categories' => array(),
|
47 |
-
//'currency' => Mage::app()->getStore()->getDefaultCurrencyCode(),
|
48 |
-
// 'product_price' => $priceFormatter->format($product->getPrice()),
|
49 |
-
// 'special_price' => $priceFormatter->format($product->getSpecialPrice()),
|
50 |
-
'product_url' => $product->getProductUrl(),
|
51 |
-
//'description' => $product->getDescription(),
|
52 |
-
//'short_description' => $product->getShortDescription(),
|
53 |
-
//'status' => (int)$product->getStatus(),
|
54 |
'product_type' => $product->getTypeId(),
|
55 |
'created_at' => $dateFormatter->getFormattedDate($product->getCreatedAt()),
|
56 |
'updated_at' => $dateFormatter->getFormattedDate($product->getUpdatedAt())
|
@@ -96,13 +88,12 @@ class Increasingly_Analytics_Helper_ProductFormatter extends Mage_Core_Helper_Ab
|
|
96 |
{
|
97 |
$productDefaultImage = $product->getData('image');
|
98 |
if(!empty($productDefaultImage) && $productDefaultImage !== 'no_selection')
|
99 |
-
{
|
100 |
-
//$productData['image_url'] = $product->getImageUrl();
|
101 |
$productData['image_url'] = Mage::getModel('catalog/product_media_config')->getMediaUrl($product->getImage());
|
102 |
}
|
103 |
else
|
104 |
{
|
105 |
-
$productData['image_url'] =
|
106 |
}
|
107 |
}
|
108 |
|
@@ -241,9 +232,14 @@ class Increasingly_Analytics_Helper_ProductFormatter extends Mage_Core_Helper_Ab
|
|
241 |
{
|
242 |
foreach($otherImages as $img)
|
243 |
{
|
244 |
-
if(!empty($productDefaultImage)
|
245 |
{
|
246 |
-
$
|
|
|
|
|
|
|
|
|
|
|
247 |
}
|
248 |
}
|
249 |
}
|
40 |
$dateFormatter = Mage::helper('increasingly_analytics/DateFormatter');
|
41 |
|
42 |
$productData = array(
|
43 |
+
'product_id' => $product->getId(),
|
44 |
+
'categories' => array(),
|
45 |
+
'product_url' => $product->getProductUrl(),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
'product_type' => $product->getTypeId(),
|
47 |
'created_at' => $dateFormatter->getFormattedDate($product->getCreatedAt()),
|
48 |
'updated_at' => $dateFormatter->getFormattedDate($product->getUpdatedAt())
|
88 |
{
|
89 |
$productDefaultImage = $product->getData('image');
|
90 |
if(!empty($productDefaultImage) && $productDefaultImage !== 'no_selection')
|
91 |
+
{
|
|
|
92 |
$productData['image_url'] = Mage::getModel('catalog/product_media_config')->getMediaUrl($product->getImage());
|
93 |
}
|
94 |
else
|
95 |
{
|
96 |
+
$productData['image_url'] = $product->getImageUrl();
|
97 |
}
|
98 |
}
|
99 |
|
232 |
{
|
233 |
foreach($otherImages as $img)
|
234 |
{
|
235 |
+
if(!empty($productDefaultImage))
|
236 |
{
|
237 |
+
if($img->getFile() != $productDefaultImage){
|
238 |
+
$productData['other_image_list'][] = $img->getUrl();
|
239 |
+
}
|
240 |
+
}
|
241 |
+
else{
|
242 |
+
$productData['other_image_list'][] = $img->getUrl();
|
243 |
}
|
244 |
}
|
245 |
}
|
app/code/community/Increasingly/Analytics/controllers/ImportLogsController.php
CHANGED
@@ -78,4 +78,35 @@ class Increasingly_Analytics_ImportLogsController extends Mage_Core_Controller_F
|
|
78 |
}
|
79 |
}
|
80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
}
|
78 |
}
|
79 |
}
|
80 |
|
81 |
+
public function getIncreasinglyLogsAction()
|
82 |
+
{
|
83 |
+
try
|
84 |
+
{
|
85 |
+
$errorLines = "";
|
86 |
+
|
87 |
+
/* increasingly log */
|
88 |
+
$increasinglyLogFilePath = Mage::getBaseDir('log')."/Increasingly_Analytics.log";
|
89 |
+
|
90 |
+
if(file_exists($increasinglyLogFilePath))
|
91 |
+
{
|
92 |
+
$errorLines = $errorLines.file_get_contents($increasinglyLogFilePath);
|
93 |
+
}
|
94 |
+
|
95 |
+
$this->getResponse()
|
96 |
+
->setBody($errorLines)
|
97 |
+
->setHttpResponseCode(200)
|
98 |
+
->setHeader('Content-type', 'application/text', true);
|
99 |
+
|
100 |
+
}
|
101 |
+
catch(Exception $e) {
|
102 |
+
|
103 |
+
Mage::log($e->getMessage(), null, 'Increasingly_Analytics.log');
|
104 |
+
|
105 |
+
$this->getResponse()
|
106 |
+
->setBody(json_encode(array('status' => 'error', 'message' => $e->getMessage(), 'version' => $version)))
|
107 |
+
->setHttpResponseCode(500)
|
108 |
+
->setHeader('Content-type', 'application/json', true);
|
109 |
+
}
|
110 |
+
}
|
111 |
+
|
112 |
}
|
app/code/community/Increasingly/Analytics/controllers/OrdersApiController.php
ADDED
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Increasingly
|
22 |
+
* @package Increasingly_Analytics
|
23 |
+
* @author Increasingly Pvt Ltd
|
24 |
+
* @copyright Copyright (c) 2015-2016 Increasingly Ltd (http://www.increasingly.co)
|
25 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
26 |
+
*/
|
27 |
+
/**
|
28 |
+
* Returns order details to increasingly on API call
|
29 |
+
*/
|
30 |
+
|
31 |
+
class Increasingly_Analytics_OrdersApiController extends Mage_Core_Controller_Front_Action
|
32 |
+
{
|
33 |
+
|
34 |
+
public function ordersAction()
|
35 |
+
{
|
36 |
+
try
|
37 |
+
{
|
38 |
+
$version = (string)Mage::getConfig()->getModuleConfig("Increasingly_Analytics")->version;
|
39 |
+
|
40 |
+
if(!$this->isRequestAuthorized())
|
41 |
+
{
|
42 |
+
return $this;
|
43 |
+
}
|
44 |
+
|
45 |
+
$orders = array();
|
46 |
+
|
47 |
+
$limit = $this->getRequest()->getParam('limit', 200);
|
48 |
+
$offset = $this->getRequest()->getParam('offset', 1);
|
49 |
+
|
50 |
+
$orders =Mage::getModel('sales/order')->getCollection()->setPageSize($limit)->setCurPage($offset);
|
51 |
+
$totalOrdersCount = Mage::getModel('sales/order')->getCollection()->getSize();
|
52 |
+
|
53 |
+
$orderDetailsForImport = array();
|
54 |
+
|
55 |
+
foreach ($orders as $order)
|
56 |
+
{
|
57 |
+
if ($order->getId())
|
58 |
+
{
|
59 |
+
$priceFormatter = Mage::helper('increasingly_analytics/PriceFormatter');
|
60 |
+
|
61 |
+
$orderDetails = array(
|
62 |
+
'order_id' => $order->getIncrementId(),
|
63 |
+
'order_status' => $order->getStatus(),
|
64 |
+
'order_amount' => $priceFormatter->format($order->getGrandTotal()),
|
65 |
+
'shipping_amount' => $priceFormatter->format($order->getShippingAmount()),
|
66 |
+
'tax_amount' => $priceFormatter->format($order->getTaxAmount()),
|
67 |
+
'items' => array(),
|
68 |
+
'shipping_method' => $order->getShippingDescription(),
|
69 |
+
'currency_code' => $order->getOrderCurrencyCode(),
|
70 |
+
'payment_method' => $order->getPayment()->getMethodInstance()->getTitle()
|
71 |
+
);
|
72 |
+
|
73 |
+
if($order->getCustomerIsGuest()){
|
74 |
+
$orderDetails['customer_email'] = $order->getCustomerEmail();
|
75 |
+
$orderDetails['customer_first_name'] = $order->getCustomerFirstname();
|
76 |
+
$orderDetails['customer_last_name'] = $order->getCustomerLastname();
|
77 |
+
$orderDetails['customer_name'] = $order->getCustomerFirstname(). ' '. $order->getCustomerLastname();
|
78 |
+
}
|
79 |
+
else {
|
80 |
+
$orderDetails['customer_email'] = $order->getCustomerEmail();
|
81 |
+
$orderDetails['customer_first_name'] = $order->getBillingAddress()->getFirstname();
|
82 |
+
$orderDetails['customer_last_name'] = $order->getBillingAddress()->getLastname();
|
83 |
+
$orderDetails['customer_name'] = $order->getBillingAddress()->getName();
|
84 |
+
}
|
85 |
+
|
86 |
+
if ($order->getDiscountAmount()) {
|
87 |
+
$orderDetails['discount_amount'] = $priceFormatter->format($order->getDiscountAmount());
|
88 |
+
}
|
89 |
+
if ($order->getCouponCode()) {
|
90 |
+
$orderDetails['coupons'] = $order->getCouponCode();
|
91 |
+
}
|
92 |
+
if($order->getRemoteIp()){
|
93 |
+
$orderDetails['user_ip'] = $order->getRemoteIp();
|
94 |
+
}
|
95 |
+
if ($order->getCreatedAt()) {
|
96 |
+
$orderDetails['order_time'] = $order->getCreatedAt();
|
97 |
+
}
|
98 |
+
|
99 |
+
foreach ($order->getAllItems() as $item)
|
100 |
+
{
|
101 |
+
$orderItem = array(
|
102 |
+
'product_id' => $item->getProductId(),
|
103 |
+
'product_price' => $priceFormatter->format($item->getPrice()) ? $priceFormatter->format($item->getPrice()) :
|
104 |
+
$priceFormatter->format($item->getProduct()->getFinalPrice()),
|
105 |
+
'product_name' => $item->getName(),
|
106 |
+
'product_url' => $item->getProduct()->getProductUrl(),
|
107 |
+
'product_sku' => $item->getSku(),
|
108 |
+
'qty' => (int)$item->getQtyOrdered(),
|
109 |
+
'product_type' => $item->getProductType()
|
110 |
+
);
|
111 |
+
$orderDetails['items'][] = $orderItem;
|
112 |
+
}
|
113 |
+
|
114 |
+
array_push($orderDetailsForImport, $orderDetails);
|
115 |
+
}
|
116 |
+
}
|
117 |
+
|
118 |
+
$this->getResponse()
|
119 |
+
->setBody(json_encode(array('orders' => $orderDetailsForImport,'version' => $version, 'total_order_count' => $totalOrdersCount)))
|
120 |
+
->setHttpResponseCode(200)
|
121 |
+
->setHeader('Content-type', 'application/json', true);
|
122 |
+
|
123 |
+
|
124 |
+
} catch(Exception $e) {
|
125 |
+
|
126 |
+
Mage::log($e->getMessage(), null, 'Increasingly_Analytics.log');
|
127 |
+
|
128 |
+
$this->getResponse()
|
129 |
+
->setBody(json_encode(array('status' => 'error', 'message' => $e->getMessage(), 'version' => $version)))
|
130 |
+
->setHttpResponseCode(500)
|
131 |
+
->setHeader('Content-type', 'application/json', true);
|
132 |
+
}
|
133 |
+
|
134 |
+
return $this;
|
135 |
+
|
136 |
+
}
|
137 |
+
|
138 |
+
private function isRequestAuthorized()
|
139 |
+
{
|
140 |
+
$helper = Mage::helper('increasingly_analytics');
|
141 |
+
|
142 |
+
if ($helper->isEnabled())
|
143 |
+
{
|
144 |
+
$apiKey = $helper->getApiToken();
|
145 |
+
$version = (string)Mage::getConfig()->getModuleConfig("Increasingly_Analytics")->version;
|
146 |
+
|
147 |
+
// Check for api key
|
148 |
+
if(!$apiKey && strlen($apiKey) === 0) {
|
149 |
+
|
150 |
+
$this->getResponse()
|
151 |
+
->setBody(json_encode(array('status' => 'error', 'message' => 'API key is missing', 'version' => $version)))
|
152 |
+
->setHttpResponseCode(403)
|
153 |
+
->setHeader('Content-type', 'application/json', true);
|
154 |
+
return false;
|
155 |
+
}
|
156 |
+
|
157 |
+
$authKey = $this->getRequest()->getHeader('authKey');
|
158 |
+
|
159 |
+
if (!$authKey || strlen($authKey) == 0) {
|
160 |
+
$authKey = $this->getRequest()->getParam('authKey');
|
161 |
+
}
|
162 |
+
|
163 |
+
if (!$authKey) {
|
164 |
+
|
165 |
+
$this->getResponse()
|
166 |
+
->setBody(json_encode(array('status' => 'error', 'message' => 'Error,Authorization header not found', 'version' => $version)))
|
167 |
+
->setHttpResponseCode(500)
|
168 |
+
->setHeader('Content-type', 'application/json', true);
|
169 |
+
return false;
|
170 |
+
}
|
171 |
+
|
172 |
+
if(trim($authKey) !== trim($apiKey)) {
|
173 |
+
|
174 |
+
$this->getResponse()
|
175 |
+
->setBody(json_encode(array('status' => 'error', 'message' => 'Authorization failed', 'version' => $version)))
|
176 |
+
->setHttpResponseCode(401)
|
177 |
+
->setHeader('Content-type', 'application/json', true);
|
178 |
+
return false;
|
179 |
+
}
|
180 |
+
|
181 |
+
return true;
|
182 |
+
}
|
183 |
+
else {
|
184 |
+
|
185 |
+
$this->getResponse()
|
186 |
+
->setBody(json_encode(array('status' => 'error', 'message' => 'Increasingly module is disabled', 'version' => $version)))
|
187 |
+
->setHttpResponseCode(403)
|
188 |
+
->setHeader('Content-type', 'application/json', true);
|
189 |
+
return false;
|
190 |
+
}
|
191 |
+
|
192 |
+
}
|
193 |
+
|
194 |
+
}
|
app/code/community/Increasingly/Analytics/controllers/ProductsApiController.php
CHANGED
@@ -45,82 +45,11 @@ class Increasingly_Analytics_ProductsApiController extends Mage_Core_Controller_
|
|
45 |
$products = array();
|
46 |
$productFormatHelper = Mage::helper('increasingly_analytics/ProductFormatter');
|
47 |
|
48 |
-
// $attributes = array(
|
49 |
-
// 'name',
|
50 |
-
// 'sku',
|
51 |
-
// 'image',
|
52 |
-
// 'manufacturer',
|
53 |
-
// 'price',
|
54 |
-
// 'final_price',
|
55 |
-
// 'special_price',
|
56 |
-
// 'description',
|
57 |
-
// 'short_description',
|
58 |
-
// 'color',
|
59 |
-
// 'weight',
|
60 |
-
// 'size'
|
61 |
-
// );
|
62 |
-
|
63 |
$limit = $this->getRequest()->getParam('limit', 200);
|
64 |
-
$offset = $this->getRequest()->getParam('offset', 1);
|
65 |
-
|
66 |
$productsCollection = Mage::getModel('catalog/product')->getCollection();
|
67 |
-
$
|
68 |
-
$attributes = $tempProduct->getAttributes();
|
69 |
-
foreach ($attributes as $attribute) {
|
70 |
-
if($attribute->getAttributeCode() == 'name')
|
71 |
-
{
|
72 |
-
array_push($tempAttributes,'name');
|
73 |
-
}
|
74 |
-
if($attribute->getAttributeCode() == 'sku')
|
75 |
-
{
|
76 |
-
array_push($tempAttributes,'sku');
|
77 |
-
}
|
78 |
-
if($attribute->getAttributeCode() == 'image')
|
79 |
-
{
|
80 |
-
array_push($tempAttributes,'image');
|
81 |
-
}
|
82 |
-
if($attribute->getAttributeCode() == 'manufacturer')
|
83 |
-
{
|
84 |
-
array_push($tempAttributes,'manufacturer');
|
85 |
-
}
|
86 |
-
if($attribute->getAttributeCode() == 'price')
|
87 |
-
{
|
88 |
-
array_push($tempAttributes,'price');
|
89 |
-
}
|
90 |
-
if($attribute->getAttributeCode() == 'special_price')
|
91 |
-
{
|
92 |
-
array_push($tempAttributes,'special_price');
|
93 |
-
}
|
94 |
-
if($attribute->getAttributeCode() == 'description')
|
95 |
-
{
|
96 |
-
array_push($tempAttributes,'description');
|
97 |
-
}
|
98 |
-
if($attribute->getAttributeCode() == 'short_description')
|
99 |
-
{
|
100 |
-
array_push($tempAttributes,'short_description');
|
101 |
-
}
|
102 |
-
if($attribute->getAttributeCode() == 'color')
|
103 |
-
{
|
104 |
-
array_push($tempAttributes,'color');
|
105 |
-
}
|
106 |
-
if($attribute->getAttributeCode() == 'weight')
|
107 |
-
{
|
108 |
-
array_push($tempAttributes,'weight');
|
109 |
-
}
|
110 |
-
if($attribute->getAttributeCode() == 'size')
|
111 |
-
{
|
112 |
-
array_push($tempAttributes,'size');
|
113 |
-
}
|
114 |
-
if($attribute->getAttributeCode() == 'visibility')
|
115 |
-
{
|
116 |
-
array_push($tempAttributes,'visibility');
|
117 |
-
}
|
118 |
-
}
|
119 |
-
$attributes = $tempAttributes;
|
120 |
-
$productsCollection = Mage::getModel('catalog/product')->getCollection();
|
121 |
-
|
122 |
-
$productsCollection->addAttributeToSelect($attributes)->getSelect()->limit($limit, $offset);
|
123 |
-
|
124 |
$totalProductCount = Mage::getModel('catalog/product')->getCollection()->count();
|
125 |
|
126 |
foreach($productsCollection as $product)
|
45 |
$products = array();
|
46 |
$productFormatHelper = Mage::helper('increasingly_analytics/ProductFormatter');
|
47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
$limit = $this->getRequest()->getParam('limit', 200);
|
49 |
+
$offset = $this->getRequest()->getParam('offset', 1);
|
50 |
+
|
51 |
$productsCollection = Mage::getModel('catalog/product')->getCollection();
|
52 |
+
$productsCollection->addAttributeToSelect('*')->getSelect()->limit($limit, $offset);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
$totalProductCount = Mage::getModel('catalog/product')->getCollection()->count();
|
54 |
|
55 |
foreach($productsCollection as $product)
|
app/code/community/Increasingly/Analytics/controllers/ProductsImportApiController.php
ADDED
@@ -0,0 +1,294 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Increasingly
|
22 |
+
* @package Increasingly_Analytics
|
23 |
+
* @author Increasingly Pvt Ltd
|
24 |
+
* @copyright Copyright (c) 2015-2016 Increasingly Ltd (http://www.increasingly.co)
|
25 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
26 |
+
*/
|
27 |
+
/**
|
28 |
+
* Returns product details to increasingly on API call
|
29 |
+
*/
|
30 |
+
|
31 |
+
class Increasingly_Analytics_ProductsImportApiController extends Mage_Core_Controller_Front_Action
|
32 |
+
{
|
33 |
+
|
34 |
+
public function productsAction()
|
35 |
+
{
|
36 |
+
try
|
37 |
+
{
|
38 |
+
$version = (string)Mage::getConfig()->getModuleConfig("Increasingly_Analytics")->version;
|
39 |
+
|
40 |
+
if(!$this->isRequestAuthorized())
|
41 |
+
{
|
42 |
+
return $this;
|
43 |
+
}
|
44 |
+
|
45 |
+
$products = array();
|
46 |
+
|
47 |
+
$limit = $this->getRequest()->getParam('limit', 200);
|
48 |
+
$offset = $this->getRequest()->getParam('offset', 1);
|
49 |
+
|
50 |
+
$attributes = Mage::getResourceModel('catalog/product_attribute_collection')->getItems();
|
51 |
+
$productsCollection = Mage::getModel('catalog/product')->getCollection();
|
52 |
+
$productsCollection->addAttributeToSelect('*')->getSelect()->limit($limit, $offset);
|
53 |
+
$totalProductCount = Mage::getModel('catalog/product')->getCollection()->count();
|
54 |
+
|
55 |
+
foreach($productsCollection as $product)
|
56 |
+
{
|
57 |
+
try
|
58 |
+
{
|
59 |
+
if($product !== null)
|
60 |
+
{
|
61 |
+
$productData = array(
|
62 |
+
'product_id' => $product->getId(),
|
63 |
+
'categories' => array(),
|
64 |
+
'product_url' => $product->getProductUrl(),
|
65 |
+
'product_type' => $product->getTypeId(),
|
66 |
+
'created_at' => $product->getCreatedAt(),
|
67 |
+
'updated_at' => $product->getUpdatedAt()
|
68 |
+
);
|
69 |
+
|
70 |
+
foreach ($attributes as $attribute)
|
71 |
+
{
|
72 |
+
try
|
73 |
+
{
|
74 |
+
$attributeCode = $attribute->getAttributecode();
|
75 |
+
$attributeValue = null;
|
76 |
+
|
77 |
+
if($product->getResource()->getAttribute($attribute->getAttributecode()))
|
78 |
+
{
|
79 |
+
$attributeValue = $product->getData($attribute->getAttributecode());
|
80 |
+
|
81 |
+
if($attributeValue == null || empty($attributeValue))
|
82 |
+
{
|
83 |
+
$attributeText = $product->getAttributeText($attribute->getAttributecode());
|
84 |
+
if($attributeText != null && !empty($attributeText))
|
85 |
+
{
|
86 |
+
$attributeValue = $attributeText;
|
87 |
+
}
|
88 |
+
}
|
89 |
+
}
|
90 |
+
|
91 |
+
if($attributeCode == 'image' && !empty($attributeValue) && $attributeValue !== 'no_selection')
|
92 |
+
{
|
93 |
+
$productData[$attributeCode] = Mage::getModel('catalog/product_media_config')->getMediaUrl($attributeValue);
|
94 |
+
$productData['image_url'] = $product->getImageUrl();
|
95 |
+
}
|
96 |
+
else
|
97 |
+
{
|
98 |
+
$productData[$attribute->getAttributecode()] = $attributeValue;
|
99 |
+
}
|
100 |
+
}
|
101 |
+
catch(Exception $e)
|
102 |
+
{
|
103 |
+
Mage::log($e->getMessage(), null, 'Increasingly_Analytics.log');
|
104 |
+
}
|
105 |
+
}
|
106 |
+
|
107 |
+
if($productData['product_type'] == "configurable")
|
108 |
+
{
|
109 |
+
$configurableProducts = Mage::getModel('catalog/product_type_configurable')->getChildrenIds($productData['product_id']);
|
110 |
+
$configurable_items = array();
|
111 |
+
|
112 |
+
foreach($configurableProducts as $key=>$configurableProductList)
|
113 |
+
{
|
114 |
+
foreach($configurableProductList as $itemValue)
|
115 |
+
{
|
116 |
+
$configurable_items[] = $itemValue;
|
117 |
+
}
|
118 |
+
}
|
119 |
+
|
120 |
+
$productData['associated_products'] = $configurable_items;
|
121 |
+
}
|
122 |
+
|
123 |
+
if($productData['product_type'] == "grouped")
|
124 |
+
{
|
125 |
+
$groupedProducts = Mage::getModel('catalog/product_type_grouped')->getChildrenIds($productData['product_id']);
|
126 |
+
$grouped_items = array();
|
127 |
+
|
128 |
+
foreach($groupedProducts as $key=>$groupedProductList)
|
129 |
+
{
|
130 |
+
foreach($groupedProductList as $itemValue)
|
131 |
+
{
|
132 |
+
$grouped_items[] = $itemValue;
|
133 |
+
}
|
134 |
+
}
|
135 |
+
$productData['associated_products'] = $grouped_items;
|
136 |
+
}
|
137 |
+
|
138 |
+
if($productData['product_type'] == "bundle")
|
139 |
+
{
|
140 |
+
$selectionCollection = $product->getTypeInstance(true)->getSelectionsCollection(
|
141 |
+
$product->getTypeInstance(true)->getOptionsIds($product), $product);
|
142 |
+
|
143 |
+
$bundled_items = array();
|
144 |
+
|
145 |
+
foreach($selectionCollection as $option)
|
146 |
+
{
|
147 |
+
$bundled_items[] = $option->getId();
|
148 |
+
}
|
149 |
+
|
150 |
+
$productData['associated_products'] = $bundled_items;
|
151 |
+
}
|
152 |
+
|
153 |
+
$relatedProducts = $product->getRelatedProductIds();
|
154 |
+
if(count($relatedProducts) > 0)
|
155 |
+
{
|
156 |
+
$productData['related_products'] = $relatedProducts;
|
157 |
+
}
|
158 |
+
|
159 |
+
$upSellProducts = $product->getUpSellProductIds();
|
160 |
+
if(count($upSellProducts) > 0)
|
161 |
+
{
|
162 |
+
$productData['up_sell_products'] = $upSellProducts;
|
163 |
+
}
|
164 |
+
|
165 |
+
$crossSellProducts = $product->getCrossSellProductIds();
|
166 |
+
if(count($crossSellProducts) > 0)
|
167 |
+
{
|
168 |
+
$productData['cross_sell_products'] = $crossSellProducts;
|
169 |
+
}
|
170 |
+
|
171 |
+
// get stock info
|
172 |
+
$stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product);
|
173 |
+
$productData['qty'] = (int)$stock->getQty();
|
174 |
+
|
175 |
+
$categories = $product->getCategoryCollection()
|
176 |
+
->addAttributeToSelect('id')
|
177 |
+
->addAttributeToSelect('name');
|
178 |
+
|
179 |
+
foreach($categories as $category)
|
180 |
+
{
|
181 |
+
$categoryInfo = array();
|
182 |
+
$categoryInfo['id'] = $category->getId();
|
183 |
+
$categoryInfo['name'] = $category->getName();
|
184 |
+
$productData['categories'][] = $categoryInfo;
|
185 |
+
}
|
186 |
+
|
187 |
+
if($product->getResource()->getAttribute('media_gallery'))
|
188 |
+
{
|
189 |
+
$otherImages = $product->getMediaGalleryImages();
|
190 |
+
|
191 |
+
if($otherImages == '' || count($otherImages) == 0)
|
192 |
+
{
|
193 |
+
$productImage_Data = Mage::getModel('catalog/product')->load($product->getId());
|
194 |
+
$otherImages = $productImage_Data->getMediaGalleryImages();
|
195 |
+
}
|
196 |
+
|
197 |
+
if(count($otherImages) > 1)
|
198 |
+
{
|
199 |
+
foreach($otherImages as $img)
|
200 |
+
{
|
201 |
+
$productData['other_image_list'][] = $img->getUrl();
|
202 |
+
}
|
203 |
+
}
|
204 |
+
}
|
205 |
+
|
206 |
+
$products[] = $productData;
|
207 |
+
|
208 |
+
}
|
209 |
+
|
210 |
+
}
|
211 |
+
catch(Exception $e)
|
212 |
+
{
|
213 |
+
Mage::log($e->getMessage(), null, 'Increasingly_Analytics.log');
|
214 |
+
}
|
215 |
+
|
216 |
+
}
|
217 |
+
|
218 |
+
$this->getResponse()
|
219 |
+
->setBody(json_encode(array('products' => $products,'version' => $version, 'total_product_count' => $totalProductCount)))
|
220 |
+
->setHttpResponseCode(200)
|
221 |
+
->setHeader('Content-type', 'application/json', true);
|
222 |
+
|
223 |
+
|
224 |
+
} catch(Exception $e) {
|
225 |
+
|
226 |
+
Mage::log($e->getMessage(), null, 'Increasingly_Analytics.log');
|
227 |
+
|
228 |
+
$this->getResponse()
|
229 |
+
->setBody(json_encode(array('status' => 'error', 'message' => $e->getMessage(), 'version' => $version)))
|
230 |
+
->setHttpResponseCode(500)
|
231 |
+
->setHeader('Content-type', 'application/json', true);
|
232 |
+
}
|
233 |
+
|
234 |
+
return $this;
|
235 |
+
|
236 |
+
}
|
237 |
+
|
238 |
+
private function isRequestAuthorized()
|
239 |
+
{
|
240 |
+
$helper = Mage::helper('increasingly_analytics');
|
241 |
+
|
242 |
+
if ($helper->isEnabled())
|
243 |
+
{
|
244 |
+
$apiKey = $helper->getApiToken();
|
245 |
+
$version = (string)Mage::getConfig()->getModuleConfig("Increasingly_Analytics")->version;
|
246 |
+
|
247 |
+
// Check for api key
|
248 |
+
if(!$apiKey && strlen($apiKey) === 0) {
|
249 |
+
|
250 |
+
$this->getResponse()
|
251 |
+
->setBody(json_encode(array('status' => 'error', 'message' => 'API key is missing', 'version' => $version)))
|
252 |
+
->setHttpResponseCode(403)
|
253 |
+
->setHeader('Content-type', 'application/json', true);
|
254 |
+
return false;
|
255 |
+
}
|
256 |
+
|
257 |
+
$authKey = $this->getRequest()->getHeader('authKey');
|
258 |
+
|
259 |
+
if (!$authKey || strlen($authKey) == 0) {
|
260 |
+
$authKey = $this->getRequest()->getParam('authKey');
|
261 |
+
}
|
262 |
+
|
263 |
+
if (!$authKey) {
|
264 |
+
|
265 |
+
$this->getResponse()
|
266 |
+
->setBody(json_encode(array('status' => 'error', 'message' => 'Error,Authorization header not found', 'version' => $version)))
|
267 |
+
->setHttpResponseCode(500)
|
268 |
+
->setHeader('Content-type', 'application/json', true);
|
269 |
+
return false;
|
270 |
+
}
|
271 |
+
|
272 |
+
if(trim($authKey) !== trim($apiKey)) {
|
273 |
+
|
274 |
+
$this->getResponse()
|
275 |
+
->setBody(json_encode(array('status' => 'error', 'message' => 'Authorization failed', 'version' => $version)))
|
276 |
+
->setHttpResponseCode(401)
|
277 |
+
->setHeader('Content-type', 'application/json', true);
|
278 |
+
return false;
|
279 |
+
}
|
280 |
+
|
281 |
+
return true;
|
282 |
+
}
|
283 |
+
else {
|
284 |
+
|
285 |
+
$this->getResponse()
|
286 |
+
->setBody(json_encode(array('status' => 'error', 'message' => 'Increasingly module is disabled', 'version' => $version)))
|
287 |
+
->setHttpResponseCode(403)
|
288 |
+
->setHeader('Content-type', 'application/json', true);
|
289 |
+
return false;
|
290 |
+
}
|
291 |
+
|
292 |
+
}
|
293 |
+
|
294 |
+
}
|
app/code/community/Increasingly/Analytics/etc/config.xml
CHANGED
@@ -32,7 +32,7 @@
|
|
32 |
<config>
|
33 |
<modules>
|
34 |
<Increasingly_Analytics>
|
35 |
-
<version>1.0.
|
36 |
</Increasingly_Analytics>
|
37 |
</modules>
|
38 |
<global>
|
32 |
<config>
|
33 |
<modules>
|
34 |
<Increasingly_Analytics>
|
35 |
+
<version>1.0.12</version>
|
36 |
</Increasingly_Analytics>
|
37 |
</modules>
|
38 |
<global>
|
app/code/community/Increasingly/Analytics/etc/config.xml~
DELETED
@@ -1,250 +0,0 @@
|
|
1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<!--
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/osl-3.0.php
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
-
*
|
15 |
-
* DISCLAIMER
|
16 |
-
*
|
17 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
-
* versions in the future. If you wish to customize Magento for your
|
19 |
-
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
-
*
|
21 |
-
* @category Increasingly
|
22 |
-
* @package Increasingly_Analytics
|
23 |
-
* @author Increasingly Pvt Ltd
|
24 |
-
* @copyright Copyright (c) 2015-2016 Increasingly Ltd (http://www.increasingly.co)
|
25 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
26 |
-
-->
|
27 |
-
<!--
|
28 |
-
/**
|
29 |
-
* @package Increasingly_Analytics
|
30 |
-
*/
|
31 |
-
-->
|
32 |
-
<config>
|
33 |
-
<modules>
|
34 |
-
<Increasingly_Analytics>
|
35 |
-
<version>1.0.10</version>
|
36 |
-
</Increasingly_Analytics>
|
37 |
-
</modules>
|
38 |
-
<global>
|
39 |
-
<events>
|
40 |
-
<controller_action_layout_generate_blocks_after>
|
41 |
-
<observers>
|
42 |
-
<page_view>
|
43 |
-
<class>Increasingly_Analytics_Model_Observer</class>
|
44 |
-
<method>trackPageView</method>
|
45 |
-
<type>singleton</type>
|
46 |
-
</page_view>
|
47 |
-
</observers>
|
48 |
-
</controller_action_layout_generate_blocks_after>
|
49 |
-
<checkout_cart_product_add_after>
|
50 |
-
<observers>
|
51 |
-
<add_to_cart>
|
52 |
-
<type>singleton</type>
|
53 |
-
<class>Increasingly_Analytics_Model_Observer</class>
|
54 |
-
<method>addToCart</method>
|
55 |
-
</add_to_cart>
|
56 |
-
</observers>
|
57 |
-
</checkout_cart_product_add_after>
|
58 |
-
<sales_quote_remove_item>
|
59 |
-
<observers>
|
60 |
-
<remove_from_cart>
|
61 |
-
<type>singleton</type>
|
62 |
-
<class>Increasingly_Analytics_Model_Observer</class>
|
63 |
-
<method>removeFromCart</method>
|
64 |
-
</remove_from_cart>
|
65 |
-
</observers>
|
66 |
-
</sales_quote_remove_item>
|
67 |
-
<sales_order_place_after>
|
68 |
-
<observers>
|
69 |
-
<place_order>
|
70 |
-
<type>singleton</type>
|
71 |
-
<class>Increasingly_Analytics_Model_Observer</class>
|
72 |
-
<method>trackNewOrder</method>
|
73 |
-
</place_order>
|
74 |
-
</observers>
|
75 |
-
</sales_order_place_after>
|
76 |
-
<sales_quote_collect_totals_after>
|
77 |
-
<observers>
|
78 |
-
<apply_cart_discount>
|
79 |
-
<type>singleton</type>
|
80 |
-
<class>Increasingly_Analytics_Model_Observer</class>
|
81 |
-
<method>applyCartDiscount</method>
|
82 |
-
</apply_cart_discount>
|
83 |
-
</observers>
|
84 |
-
</sales_quote_collect_totals_after>
|
85 |
-
<sales_quote_save_after>
|
86 |
-
<observers>
|
87 |
-
<empty_cart>
|
88 |
-
<type>singleton</type>
|
89 |
-
<class>Increasingly_Analytics_Model_Observer</class>
|
90 |
-
<method>empty_cart</method>
|
91 |
-
</empty_cart>
|
92 |
-
</observers>
|
93 |
-
</sales_quote_save_after>
|
94 |
-
<catalog_product_save_commit_after>
|
95 |
-
<observers>
|
96 |
-
<product_update>
|
97 |
-
<type>singleton</type>
|
98 |
-
<class>Increasingly_Analytics_Model_Observer</class>
|
99 |
-
<method>productAddOrUpdate</method>
|
100 |
-
</product_update>
|
101 |
-
</observers>
|
102 |
-
</catalog_product_save_commit_after>
|
103 |
-
<catalog_product_delete_commit_after>
|
104 |
-
<observers>
|
105 |
-
<product_delete>
|
106 |
-
<type>singleton</type>
|
107 |
-
<class>Increasingly_Analytics_Model_Observer</class>
|
108 |
-
<method>productDelete</method>
|
109 |
-
</product_delete>
|
110 |
-
</observers>
|
111 |
-
</catalog_product_delete_commit_after>
|
112 |
-
<admin_system_config_changed_section_carriers>
|
113 |
-
<observers>
|
114 |
-
<import_shipping_details>
|
115 |
-
<type>singleton</type>
|
116 |
-
<class>Increasingly_Analytics_Model_Observer</class>
|
117 |
-
<method>importShippingDetails</method>
|
118 |
-
</import_shipping_details>
|
119 |
-
</observers>
|
120 |
-
</admin_system_config_changed_section_carriers>
|
121 |
-
</events>
|
122 |
-
<models>
|
123 |
-
<increasingly_analytics>
|
124 |
-
<class>Increasingly_Analytics_Model</class>
|
125 |
-
<resourceModel>increasingly_analytics_mysql4</resourceModel>
|
126 |
-
</increasingly_analytics>
|
127 |
-
<increasingly_analytics_mysql4>
|
128 |
-
<class>Increasingly_Analytics_Model_Mysql4</class>
|
129 |
-
<entities>
|
130 |
-
<bundle>
|
131 |
-
<table>increasingly_analytics_bundle</table>
|
132 |
-
</bundle>
|
133 |
-
</entities>
|
134 |
-
</increasingly_analytics_mysql4>
|
135 |
-
</models>
|
136 |
-
<resources>
|
137 |
-
<increasingly_analytics_setup>
|
138 |
-
<setup>
|
139 |
-
<module>Increasingly_Analytics</module>
|
140 |
-
<class>Increasingly_Analytics_Model_Mysql4_Setup</class>
|
141 |
-
</setup>
|
142 |
-
<connection>
|
143 |
-
<use>core_setup</use>
|
144 |
-
</connection>
|
145 |
-
</increasingly_analytics_setup>
|
146 |
-
<increasingly_analytics_write>
|
147 |
-
<connection>
|
148 |
-
<use>core_write</use>
|
149 |
-
</connection>
|
150 |
-
</increasingly_analytics_write>
|
151 |
-
<increasingly_analytics_read>
|
152 |
-
<connection>
|
153 |
-
<use>core_read</use>
|
154 |
-
</connection>
|
155 |
-
</increasingly_analytics_read>
|
156 |
-
</resources>
|
157 |
-
<blocks>
|
158 |
-
<increasingly_analytics>
|
159 |
-
<class>Increasingly_Analytics_Block</class>
|
160 |
-
</increasingly_analytics>
|
161 |
-
</blocks>
|
162 |
-
<helpers>
|
163 |
-
<increasingly_analytics>
|
164 |
-
<class>Increasingly_Analytics_Helper</class>
|
165 |
-
</increasingly_analytics>
|
166 |
-
</helpers>
|
167 |
-
</global>
|
168 |
-
<frontend>
|
169 |
-
<layout>
|
170 |
-
<updates>
|
171 |
-
<increasingly_analytics>
|
172 |
-
<file>increasingly_analytics.xml</file>
|
173 |
-
</increasingly_analytics>
|
174 |
-
</updates>
|
175 |
-
</layout>
|
176 |
-
<routers>
|
177 |
-
<increasingly_analytics>
|
178 |
-
<use>standard</use>
|
179 |
-
<args>
|
180 |
-
<module>Increasingly_Analytics</module>
|
181 |
-
<frontName>increasingly</frontName>
|
182 |
-
</args>
|
183 |
-
</increasingly_analytics>
|
184 |
-
</routers>
|
185 |
-
<events>
|
186 |
-
<customer_login>
|
187 |
-
<observers>
|
188 |
-
<increasingly_login>
|
189 |
-
<type>singleton</type>
|
190 |
-
<class>Increasingly_Analytics_Model_Observer</class>
|
191 |
-
<method>customerLogin</method>
|
192 |
-
</increasingly_login>
|
193 |
-
</observers>
|
194 |
-
</customer_login>
|
195 |
-
</events>
|
196 |
-
</frontend>
|
197 |
-
<admin>
|
198 |
-
<routers>
|
199 |
-
<adminhtml>
|
200 |
-
<args>
|
201 |
-
<modules>
|
202 |
-
<Increasingly_Analytics before="Mage_adminhtml">Increasingly_Analytics_Adminhtml</Increasingly_Analytics>
|
203 |
-
</modules>
|
204 |
-
</args>
|
205 |
-
</adminhtml>
|
206 |
-
</routers>
|
207 |
-
</admin>
|
208 |
-
<adminhtml>
|
209 |
-
<acl>
|
210 |
-
<resources>
|
211 |
-
<admin>
|
212 |
-
<children>
|
213 |
-
<system>
|
214 |
-
<children>
|
215 |
-
<config>
|
216 |
-
<children>
|
217 |
-
<increasingly_analytics>
|
218 |
-
<title>Increasingly Configuration</title>
|
219 |
-
</increasingly_analytics>
|
220 |
-
</children>
|
221 |
-
</config>
|
222 |
-
</children>
|
223 |
-
</system>
|
224 |
-
</children>
|
225 |
-
</admin>
|
226 |
-
</resources>
|
227 |
-
</acl>
|
228 |
-
<layout>
|
229 |
-
<updates>
|
230 |
-
<increasingly_analytics>
|
231 |
-
<file>increasingly_analytics.xml</file>
|
232 |
-
</increasingly_analytics>
|
233 |
-
</updates>
|
234 |
-
</layout>
|
235 |
-
<menu>
|
236 |
-
<increasingly>
|
237 |
-
<title>Increasingly</title>
|
238 |
-
<sort_order>70</sort_order>
|
239 |
-
<action>adminhtml/DataIntegration/index</action>
|
240 |
-
</increasingly>
|
241 |
-
</menu>
|
242 |
-
</adminhtml>
|
243 |
-
<default>
|
244 |
-
<increasingly_analytics>
|
245 |
-
<settings>
|
246 |
-
<enable>0</enable>
|
247 |
-
</settings>
|
248 |
-
</increasingly_analytics>
|
249 |
-
</default>
|
250 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Increasingly/Analytics/sql/increasingly_analytics_setup/mysql4-install-1.0.11.php~
DELETED
File without changes
|
app/code/community/Increasingly/Analytics/sql/increasingly_analytics_setup/mysql4-install-1.0.12.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$installer = $this;
|
4 |
+
|
5 |
+
$installer->startSetup();
|
6 |
+
|
7 |
+
$installer->run("
|
8 |
+
|
9 |
+
CREATE TABLE IF NOT EXISTS {$this->getTable('increasingly_analytics_bundle')} (
|
10 |
+
|
11 |
+
`id` int NOT NULL auto_increment,
|
12 |
+
|
13 |
+
`bundle_id` int NOT NULL default 0,
|
14 |
+
|
15 |
+
`product_ids` varchar(100) NOT NULL,
|
16 |
+
|
17 |
+
`increasingly_visitor_id` varchar(100) NOT NULL,
|
18 |
+
|
19 |
+
`discount_price` decimal(12,4) NULL,
|
20 |
+
|
21 |
+
`total_price` decimal(12,4) NOT NULL,
|
22 |
+
|
23 |
+
PRIMARY KEY (`id`)
|
24 |
+
|
25 |
+
);
|
26 |
+
|
27 |
+
");
|
28 |
+
|
29 |
+
$installer->endSetup();
|
app/design/frontend/base/default/template/increasingly/track.phtml
CHANGED
@@ -40,10 +40,10 @@
|
|
40 |
}
|
41 |
|
42 |
window.increasingly.load=function(){var t=document;var n=t.getElementsByTagName("script")[0];var r=t.createElement("script");
|
43 |
-
r.type="text/javascript";r.async=true;r.src="
|
44 |
|
45 |
window.increasingly.loadJs=function(){var t=document;var n=t.getElementsByTagName("script")[0];var r=t.createElement("script");
|
46 |
-
r.type="text/javascript";r.async=true;r.src="
|
47 |
|
48 |
increasingly.load();
|
49 |
increasingly.loadJs();
|
40 |
}
|
41 |
|
42 |
window.increasingly.load=function(){var t=document;var n=t.getElementsByTagName("script")[0];var r=t.createElement("script");
|
43 |
+
r.type="text/javascript";r.async=true;r.src="//www.increasingly.co/js/track.js";n.parentNode.insertBefore(r,n);};
|
44 |
|
45 |
window.increasingly.loadJs=function(){var t=document;var n=t.getElementsByTagName("script")[0];var r=t.createElement("script");
|
46 |
+
r.type="text/javascript";r.async=true;r.src="//www.increasingly.co/js/increasingly.js";n.parentNode.insertBefore(r,n);};
|
47 |
|
48 |
increasingly.load();
|
49 |
increasingly.loadJs();
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>increasingly_key</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="https://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
7 |
<channel>community</channel>
|
@@ -44,11 +44,13 @@ It's free to try & we have a 14-day trial where you can test it for no-risk
|
|
44 |

|
45 |
We have a dashboard which provides you with in depth analytics and insights on what's sells together & allows you to administer and manage your bundles.
|
46 |
</description>
|
47 |
-
<notes>Added feature to
|
|
|
|
|
48 |
<authors><author><name>Increasingly</name><user>Increasingly</user><email>renu@increasingly.co</email></author><author><name>Increasingly</name><user>Increasingly</user><email>shree@increasingly.co</email></author><author><name>Increasingly</name><user>Increasingly</user><email>satish@increasingly.co</email></author></authors>
|
49 |
-
<date>2016-
|
50 |
-
<time>
|
51 |
-
<contents><target name="magecommunity"><dir name="Increasingly"><dir name="Analytics"><dir name="Block"><file name="Addtocart.php" hash="3429b60b501c7681a3c79fd46138b787"/><dir name="Adminhtml"><file name="DataIntegration.php" hash="b7c543b33f563ef458d403df94c62a4c"/></dir><file name="Cart.php" hash="56c9f503b7c55d835cbd93c675dcc338"/><file name="Category.php" hash="3b87f305e0957dd1fdace455c1f0fa7c"/><file name="Element.php" hash="8d533705e7a3c1ada7d775a6d9282f43"/><file name="Embed.php" hash="5ba08a6642ed22d8bb1a84ab0501f8dc"/><file name="Pagetype.php" hash="f670440a3f90bfa9a48b406fc37d538c"/><file name="Product.php" hash="2da759eb9bd2bf13e5a8a92087981206"/><file name="Track.php" hash="aa6a9d870f14c4e3721675658dfb276e"/></dir><dir name="Helper"><file name="Data.php" hash="
|
52 |
<compatible/>
|
53 |
<dependencies><required><php><min>5.2.0</min><max>7.0.7</max></php></required></dependencies>
|
54 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>increasingly_key</name>
|
4 |
+
<version>1.0.12</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="https://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
7 |
<channel>community</channel>
|
44 |

|
45 |
We have a dashboard which provides you with in depth analytics and insights on what's sells together & allows you to administer and manage your bundles.
|
46 |
</description>
|
47 |
+
<notes>Added feature to support SSL.
|
48 |
+
Added new API to import order details.
|
49 |
+
Added new API to import product details with all attribute.</notes>
|
50 |
<authors><author><name>Increasingly</name><user>Increasingly</user><email>renu@increasingly.co</email></author><author><name>Increasingly</name><user>Increasingly</user><email>shree@increasingly.co</email></author><author><name>Increasingly</name><user>Increasingly</user><email>satish@increasingly.co</email></author></authors>
|
51 |
+
<date>2016-09-02</date>
|
52 |
+
<time>11:01:44</time>
|
53 |
+
<contents><target name="magecommunity"><dir name="Increasingly"><dir name="Analytics"><dir name="Block"><file name="Addtocart.php" hash="3429b60b501c7681a3c79fd46138b787"/><dir name="Adminhtml"><file name="DataIntegration.php" hash="b7c543b33f563ef458d403df94c62a4c"/></dir><file name="Cart.php" hash="56c9f503b7c55d835cbd93c675dcc338"/><file name="Category.php" hash="3b87f305e0957dd1fdace455c1f0fa7c"/><file name="Element.php" hash="8d533705e7a3c1ada7d775a6d9282f43"/><file name="Embed.php" hash="5ba08a6642ed22d8bb1a84ab0501f8dc"/><file name="Pagetype.php" hash="f670440a3f90bfa9a48b406fc37d538c"/><file name="Product.php" hash="2da759eb9bd2bf13e5a8a92087981206"/><file name="Track.php" hash="aa6a9d870f14c4e3721675658dfb276e"/></dir><dir name="Helper"><file name="Data.php" hash="0dc07596570d1fbda071f3a91e9357b5"/><file name="DateFormatter.php" hash="d8f963bd1f9fe390e038a2065fd5c4c4"/><file name="PriceFormatter.php" hash="9bc46d3afb4612131a29b9a1c2b82fad"/><file name="ProductFormatter.php" hash="3762703c111d9b718570ea709f0f3663"/></dir><dir name="Model"><file name="Base.php" hash="957cc5bb083e9b49b5468c986a1e846a"/><file name="Bundle.php" hash="767a26eaefaed893d163737d64930933"/><file name="DataIntegration.php" hash="ff9dc202ea17e49ceaba09c6190492cd"/><dir name="Meta"><file name="Product.php" hash="6a037e5325193fae3147fc1a9891606c"/></dir><dir name="Mysql4"><dir name="Bundle"><file name="Collection.php" hash="021c49a92767b78e238477a3dc8da783"/></dir><file name="Bundle.php" hash="83ad548248f3ebcfc73158ab672cb683"/><file name="Setup.php" hash="664019080c6c0ebdbc50b889eac1e1e0"/></dir><file name="Observer.php" hash="3f50c7b59b931584b18a2f9693cb7c72"/><file name="Product.php" hash="f473c25a470a2509b00a4a15ed8b857f"/></dir><dir name="controllers"><file name="AddbundletocartController.php" hash="d9de59fcb68d0d27326f8ccfa24d1486"/><dir name="Adminhtml"><file name="DataIntegrationController.php" hash="0758d4716d337002a8c49f843e06cec2"/></dir><file name="ImportLogsController.php" hash="035f739ed0727685f47e7d8405b4448c"/><file name="OrdersApiController.php" hash="30195b469077e96f012538899f7d4f27"/><file name="ProductsApiController.php" hash="5ac96ef4089b835968acdbca3539172a"/><file name="ProductsImportApiController.php" hash="e6b481526176bb93631983923c61adcf"/></dir><dir name="etc"><file name="config.xml" hash="507e4c24c321b89a1c0475431ff928af"/></dir><dir name="sql"><dir name="increasingly_analytics_setup"><file name="mysql-install-1.0.0.php" hash="bddf4e67e7b69c5604b448e3b1fa27a0"/><file name="mysql4-install-1.0.10.php" hash="e857df177cfbb887cece6de0ff5498b6"/><file name="mysql4-install-1.0.11.php" hash="e857df177cfbb887cece6de0ff5498b6"/><file name="mysql4-install-1.0.12.php" hash="e857df177cfbb887cece6de0ff5498b6"/><file name="mysql4-install-1.0.3.php" hash="e857df177cfbb887cece6de0ff5498b6"/><file name="mysql4-install-1.0.4.php" hash="e857df177cfbb887cece6de0ff5498b6"/><file name="mysql4-install-1.0.5.php" hash="e857df177cfbb887cece6de0ff5498b6"/><file name="mysql4-install-1.0.6.php" hash="e857df177cfbb887cece6de0ff5498b6"/><file name="mysql4-install-1.0.7.php" hash="e857df177cfbb887cece6de0ff5498b6"/><file name="mysql4-install-1.0.8.php" hash="e857df177cfbb887cece6de0ff5498b6"/><file name="mysql4-install-1.0.9.php" hash="e857df177cfbb887cece6de0ff5498b6"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="increasingly"><file name="dataintegration.phtml" hash="8a730e566c21b2155d6f3e4ca73a1b6d"/></dir></dir><dir name="layout"><file name="increasingly_analytics.xml" hash="d859a26dba5142f02e514f28f507891c"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="increasingly"><file name="addtocart.phtml" hash="e3af2445ac014887b3072cf85dd81d4f"/><file name="cart.phtml" hash="1c5ee986109cfb4600d3e15057263d36"/><file name="category.phtml" hash="75e77b9d1cbbd1e0129c0c10737461e6"/><file name="element.phtml" hash="c5f1cbbc02801009247409890172ca4e"/><file name="embed.phtml" hash="52cde76a239e3084ce3a1254b004a742"/><file name="pagetype.phtml" hash="fe1a7f313c82f355f14d5f13c284cb28"/><file name="product.phtml" hash="14d24b0ced5abc85619aa3538b21f2f7"/><file name="track.phtml" hash="9984d00c000ee76712e0636e84c69b1a"/></dir></dir><dir name="layout"><file name="increasingly_analytics.xml" hash="8fdd89adb4a85e83237ada872ba43f88"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Increasingly_Analytics.xml" hash="d285a9ae62b5b0624b727e341fe8e005"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="increasingly"><file name="loader.gif" hash="a51c5608d01acf32df728f299767f82b"/></dir></dir></dir></dir></target></contents>
|
54 |
<compatible/>
|
55 |
<dependencies><required><php><min>5.2.0</min><max>7.0.7</max></php></required></dependencies>
|
56 |
</package>
|