Version Notes
-Bug Fixes
-Multi-store support
Download this release
Release Info
Developer | Glew |
Extension | Glew |
Version | 1.0.10 |
Comparing to | |
See all releases |
Code changes from version 1.0.2 to 1.0.10
- app/code/community/Glew/Service/Block/SecretKey.php +1 -7
- app/code/community/Glew/Service/Helper/Data.php +13 -0
- app/code/community/Glew/Service/Model/Glew.php +0 -11
- app/code/community/Glew/Service/Model/Resource/Mysql4/Setup.php +0 -26
- app/code/community/Glew/Service/Model/Resource/Setup.php +6 -0
- app/code/community/Glew/Service/Model/Types/AbandonedCarts.php +6 -5
- app/code/community/Glew/Service/Model/Types/Categories.php +12 -5
- app/code/community/Glew/Service/Model/Types/Customers.php +2 -1
- app/code/community/Glew/Service/Model/Types/Extensions.php +3 -2
- app/code/community/Glew/Service/Model/Types/Inventory.php +3 -2
- app/code/community/Glew/Service/Model/Types/OrderItems.php +3 -1
- app/code/community/Glew/Service/Model/Types/Orders.php +2 -1
- app/code/community/Glew/Service/Model/Types/ProductAlerts.php +4 -2
- app/code/community/Glew/Service/Model/Types/Products.php +13 -11
- app/code/community/Glew/Service/Model/Types/RefundItems.php +6 -4
- app/code/community/Glew/Service/Model/Types/Refunds.php +6 -4
- app/code/community/Glew/Service/Model/Types/Stores.php +4 -2
- app/code/community/Glew/Service/Model/Types/Subscribers.php +2 -1
- app/code/community/Glew/Service/controllers/ModuleController.php +15 -20
- app/code/community/Glew/Service/etc/config.xml +2 -2
- app/code/community/Glew/Service/sql/glew_setup/mysql4-install-0.0.2.php +0 -7
- app/code/community/Glew/Service/sql/glew_setup/mysql4-install-1.0.0.php +11 -0
- package.xml +19 -16
app/code/community/Glew/Service/Block/SecretKey.php
CHANGED
@@ -7,13 +7,7 @@ class Glew_Service_Block_SecretKey extends Mage_Adminhtml_Block_System_Config_Fo
|
|
7 |
$this->setElement($element);
|
8 |
$helper = Mage::helper('glew');
|
9 |
$config = $helper->getConfig();
|
10 |
-
$
|
11 |
-
if(!$config['security_token']) {
|
12 |
-
$token = $glew->createSecurityToken();
|
13 |
-
} else {
|
14 |
-
$token = $config['security_token'];
|
15 |
-
}
|
16 |
-
|
17 |
return trim($token);
|
18 |
}
|
19 |
}
|
7 |
$this->setElement($element);
|
8 |
$helper = Mage::helper('glew');
|
9 |
$config = $helper->getConfig();
|
10 |
+
$token = $config['security_token'];
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
return trim($token);
|
12 |
}
|
13 |
}
|
app/code/community/Glew/Service/Helper/Data.php
CHANGED
@@ -7,6 +7,7 @@ class Glew_Service_Helper_Data extends Mage_Core_Helper_Abstract
|
|
7 |
private static $filename = "glew.log";
|
8 |
private static $debug = true;
|
9 |
private $_config;
|
|
|
10 |
|
11 |
public function getBaseDir()
|
12 |
{
|
@@ -63,4 +64,16 @@ class Glew_Service_Helper_Data extends Mage_Core_Helper_Abstract
|
|
63 |
{
|
64 |
return Mage::log($msg, null, self::$filename);
|
65 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
}
|
7 |
private static $filename = "glew.log";
|
8 |
private static $debug = true;
|
9 |
private $_config;
|
10 |
+
protected $_store = null;
|
11 |
|
12 |
public function getBaseDir()
|
13 |
{
|
64 |
{
|
65 |
return Mage::log($msg, null, self::$filename);
|
66 |
}
|
67 |
+
|
68 |
+
public function getStore() {
|
69 |
+
if($this->_store == null) {
|
70 |
+
$this->_store = Mage::app()->getStore();
|
71 |
+
}
|
72 |
+
return $this->_store;
|
73 |
+
}
|
74 |
+
|
75 |
+
public function paginate($array, $pageNumber, $pageSize) {
|
76 |
+
$start = $pageNumber * $pageSize;
|
77 |
+
return array_slice($array, $start, $pageSize);
|
78 |
+
}
|
79 |
}
|
app/code/community/Glew/Service/Model/Glew.php
CHANGED
@@ -12,17 +12,6 @@ class Glew_Service_Model_Glew
|
|
12 |
$this->_config = $this->_helper->getConfig();
|
13 |
}
|
14 |
|
15 |
-
public function createSecurityToken()
|
16 |
-
{
|
17 |
-
if (!$this->_isGenerated()) {
|
18 |
-
$setup = Mage::getModel('glew/resource_mysql4_setup');
|
19 |
-
$token = $setup->createSecurityToken($this->_helper->getDatabaseReadConnection());
|
20 |
-
return $token;
|
21 |
-
} else {
|
22 |
-
return $this->_config['security_token'];
|
23 |
-
}
|
24 |
-
}
|
25 |
-
|
26 |
private function _isGenerated()
|
27 |
{
|
28 |
$securityToken = $this->_config['security_token'];
|
12 |
$this->_config = $this->_helper->getConfig();
|
13 |
}
|
14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
private function _isGenerated()
|
16 |
{
|
17 |
$securityToken = $this->_config['security_token'];
|
app/code/community/Glew/Service/Model/Resource/Mysql4/Setup.php
DELETED
@@ -1,26 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Glew_Service_Model_Resource_Mysql4_Setup extends Mage_Core_Model_Resource_Setup
|
4 |
-
{
|
5 |
-
|
6 |
-
public function createSecurityToken()
|
7 |
-
{
|
8 |
-
$hostname = version_compare(phpversion(),'5.3','>=') ? gethostname() : php_uname('n');
|
9 |
-
$prefix = md5($hostname);
|
10 |
-
$token = sha1(uniqid($prefix, true) . rand().microtime());
|
11 |
-
$this->_saveSecurityToken($token);
|
12 |
-
return $token;
|
13 |
-
}
|
14 |
-
|
15 |
-
private function _getSecurityToken()
|
16 |
-
{
|
17 |
-
return Mage::getStoreConfig('glew_settings/general/security_token');
|
18 |
-
}
|
19 |
-
|
20 |
-
private function _saveSecurityToken($token)
|
21 |
-
{
|
22 |
-
Mage::app()->getStore()->setConfig('glew_settings/general/security_token', $token);
|
23 |
-
Mage::getModel('core/config')->saveConfig('glew_settings/general/security_token', $token);
|
24 |
-
Mage::app()->getCacheInstance()->cleanType('config');
|
25 |
-
}
|
26 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Glew/Service/Model/Resource/Setup.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Glew_Service_Model_Resource_Setup extends Mage_Core_Model_Resource_Setup
|
4 |
+
{
|
5 |
+
|
6 |
+
}
|
app/code/community/Glew/Service/Model/Types/AbandonedCarts.php
CHANGED
@@ -9,24 +9,25 @@ class Glew_Service_Model_Types_AbandonedCarts
|
|
9 |
{
|
10 |
$helper = Mage::helper('glew');
|
11 |
$config = $helper->getConfig();
|
|
|
12 |
if($startDate && $endDate) {
|
13 |
$filter = array(
|
14 |
'datetime' => 1,
|
15 |
'locale' => 'en_US',
|
16 |
'from' => new Zend_Date(strtotime($startDate), Zend_Date::TIMESTAMP),
|
17 |
-
|
18 |
-
|
19 |
|
20 |
$collection = Mage::getResourceModel('reports/quote_collection')
|
21 |
->addFieldToFilter('main_table.' . $filterBy, $filter);
|
22 |
} else {
|
23 |
-
|
24 |
}
|
25 |
-
$collection->
|
|
|
26 |
$collection->setOrder('created_at', $sortDir);
|
27 |
$collection->setCurPage($pageNum);
|
28 |
$collection->setPageSize($pageSize);
|
29 |
-
$this->pageNum = $pageNum;
|
30 |
|
31 |
if($collection->getLastPageNumber() < $pageNum){
|
32 |
return $this;
|
9 |
{
|
10 |
$helper = Mage::helper('glew');
|
11 |
$config = $helper->getConfig();
|
12 |
+
$this->pageNum = $pageNum;
|
13 |
if($startDate && $endDate) {
|
14 |
$filter = array(
|
15 |
'datetime' => 1,
|
16 |
'locale' => 'en_US',
|
17 |
'from' => new Zend_Date(strtotime($startDate), Zend_Date::TIMESTAMP),
|
18 |
+
'to' => new Zend_Date(strtotime($endDate), Zend_Date::TIMESTAMP),
|
19 |
+
);
|
20 |
|
21 |
$collection = Mage::getResourceModel('reports/quote_collection')
|
22 |
->addFieldToFilter('main_table.' . $filterBy, $filter);
|
23 |
} else {
|
24 |
+
$collection = Mage::getResourceModel('reports/quote_collection');
|
25 |
}
|
26 |
+
$collection->addFieldToFilter('main_table.store_id', $helper->getStore()->getStoreId());
|
27 |
+
$collection->prepareForAbandonedReport(array($helper->getStore()->getWebsiteId()));
|
28 |
$collection->setOrder('created_at', $sortDir);
|
29 |
$collection->setCurPage($pageNum);
|
30 |
$collection->setPageSize($pageSize);
|
|
|
31 |
|
32 |
if($collection->getLastPageNumber() < $pageNum){
|
33 |
return $this;
|
app/code/community/Glew/Service/Model/Types/Categories.php
CHANGED
@@ -7,7 +7,15 @@ class Glew_Service_Model_Types_Categories
|
|
7 |
|
8 |
public function load($pageSize, $pageNum, $startDate = null, $endDate = null, $sortDir, $filterBy)
|
9 |
{
|
10 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
if($startDate && $endDate) {
|
12 |
$from = date('Y-m-d 00:00:00', strtotime($startDate));
|
13 |
$to = date('Y-m-d 23:59:59', strtotime($endDate));
|
@@ -17,13 +25,13 @@ class Glew_Service_Model_Types_Categories
|
|
17 |
} else {
|
18 |
$categories = Mage::getModel('catalog/category')->getCollection();
|
19 |
}
|
20 |
-
$
|
21 |
$categories->setOrder('created_at', $sortDir);
|
22 |
$categories->setCurPage($pageNum);
|
23 |
$categories->setPageSize($pageSize);
|
24 |
|
25 |
-
|
26 |
-
|
27 |
}
|
28 |
|
29 |
foreach ($categories as $category){
|
@@ -34,5 +42,4 @@ class Glew_Service_Model_Types_Categories
|
|
34 |
}
|
35 |
return $this;
|
36 |
}
|
37 |
-
|
38 |
}
|
7 |
|
8 |
public function load($pageSize, $pageNum, $startDate = null, $endDate = null, $sortDir, $filterBy)
|
9 |
{
|
10 |
+
$helper = Mage::helper('glew');
|
11 |
+
$config = $helper->getConfig();
|
12 |
+
$this->pageNum = $pageNum;
|
13 |
+
$rootCategoryId = $helper->getStore()->getRootCategoryId();
|
14 |
+
$rootpath = Mage::getModel('catalog/category')
|
15 |
+
->setStoreId($helper->getStore()->getStoreId())
|
16 |
+
->load($rootCategoryId)
|
17 |
+
->getPath();
|
18 |
+
|
19 |
if($startDate && $endDate) {
|
20 |
$from = date('Y-m-d 00:00:00', strtotime($startDate));
|
21 |
$to = date('Y-m-d 23:59:59', strtotime($endDate));
|
25 |
} else {
|
26 |
$categories = Mage::getModel('catalog/category')->getCollection();
|
27 |
}
|
28 |
+
$categories->addAttributeToFilter('path', array("like"=>$rootpath."/"."%"));
|
29 |
$categories->setOrder('created_at', $sortDir);
|
30 |
$categories->setCurPage($pageNum);
|
31 |
$categories->setPageSize($pageSize);
|
32 |
|
33 |
+
if($categories->getLastPageNumber() < $pageNum){
|
34 |
+
return $this;
|
35 |
}
|
36 |
|
37 |
foreach ($categories as $category){
|
42 |
}
|
43 |
return $this;
|
44 |
}
|
|
|
45 |
}
|
app/code/community/Glew/Service/Model/Types/Customers.php
CHANGED
@@ -9,6 +9,7 @@ class Glew_Service_Model_Types_Customers
|
|
9 |
{
|
10 |
$helper = Mage::helper('glew');
|
11 |
$config = $helper->getConfig();
|
|
|
12 |
if($startDate && $endDate) {
|
13 |
$from = date('Y-m-d 00:00:00', strtotime($startDate));
|
14 |
$to = date('Y-m-d 23:59:59', strtotime($endDate));
|
@@ -18,10 +19,10 @@ class Glew_Service_Model_Types_Customers
|
|
18 |
} else {
|
19 |
$collection = Mage::getModel('customer/customer')->getCollection();
|
20 |
}
|
|
|
21 |
$collection->setOrder('created_at', $sortDir);
|
22 |
$collection->setCurPage($pageNum);
|
23 |
$collection->setPageSize($pageSize);
|
24 |
-
$this->pageNum = $pageNum;
|
25 |
|
26 |
if($collection->getLastPageNumber() < $pageNum){
|
27 |
return $this;
|
9 |
{
|
10 |
$helper = Mage::helper('glew');
|
11 |
$config = $helper->getConfig();
|
12 |
+
$this->pageNum = $pageNum;
|
13 |
if($startDate && $endDate) {
|
14 |
$from = date('Y-m-d 00:00:00', strtotime($startDate));
|
15 |
$to = date('Y-m-d 23:59:59', strtotime($endDate));
|
19 |
} else {
|
20 |
$collection = Mage::getModel('customer/customer')->getCollection();
|
21 |
}
|
22 |
+
$collection->addAttributeToFilter('store_id', $helper->getStore()->getStoreId());
|
23 |
$collection->setOrder('created_at', $sortDir);
|
24 |
$collection->setCurPage($pageNum);
|
25 |
$collection->setPageSize($pageSize);
|
|
|
26 |
|
27 |
if($collection->getLastPageNumber() < $pageNum){
|
28 |
return $this;
|
app/code/community/Glew/Service/Model/Types/Extensions.php
CHANGED
@@ -9,10 +9,11 @@ class Glew_Service_Model_Types_Extensions
|
|
9 |
{
|
10 |
$helper = Mage::helper('glew');
|
11 |
$config = $helper->getConfig();
|
12 |
-
|
13 |
-
$collection = $modules = Mage::getConfig()->getNode('modules')->children();
|
14 |
$this->pageNum = $pageNum;
|
15 |
|
|
|
|
|
|
|
16 |
foreach($collection as $extension => $attributes) {
|
17 |
$model = Mage::getModel('glew/types_extension')->parse($extension, $attributes);
|
18 |
if($model) {
|
9 |
{
|
10 |
$helper = Mage::helper('glew');
|
11 |
$config = $helper->getConfig();
|
|
|
|
|
12 |
$this->pageNum = $pageNum;
|
13 |
|
14 |
+
$collection = (array) Mage::getConfig()->getNode('modules')->children();
|
15 |
+
$collection = $helper->paginate($collection, $pageNum, $pageSize);
|
16 |
+
|
17 |
foreach($collection as $extension => $attributes) {
|
18 |
$model = Mage::getModel('glew/types_extension')->parse($extension, $attributes);
|
19 |
if($model) {
|
app/code/community/Glew/Service/Model/Types/Inventory.php
CHANGED
@@ -7,10 +7,11 @@ class Glew_Service_Model_Types_Inventory
|
|
7 |
|
8 |
public function load($pageSize, $pageNum, $sortDir, $filterBy)
|
9 |
{
|
10 |
-
$
|
|
|
|
|
11 |
$inventory = Mage::getModel('cataloginventory/stock_item')->getCollection();
|
12 |
$inventory->setOrder('entity_id', $sortDir);
|
13 |
-
$this->pageNum = $pageNum;
|
14 |
$inventory->setCurPage($pageNum);
|
15 |
$inventory->setPageSize($pageSize);
|
16 |
|
7 |
|
8 |
public function load($pageSize, $pageNum, $sortDir, $filterBy)
|
9 |
{
|
10 |
+
$helper = Mage::helper('glew');
|
11 |
+
$config = $helper->getConfig();
|
12 |
+
$this->pageNum = $pageNum;
|
13 |
$inventory = Mage::getModel('cataloginventory/stock_item')->getCollection();
|
14 |
$inventory->setOrder('entity_id', $sortDir);
|
|
|
15 |
$inventory->setCurPage($pageNum);
|
16 |
$inventory->setPageSize($pageSize);
|
17 |
|
app/code/community/Glew/Service/Model/Types/OrderItems.php
CHANGED
@@ -9,6 +9,8 @@ class Glew_Service_Model_Types_OrderItems
|
|
9 |
{
|
10 |
$helper = Mage::helper('glew');
|
11 |
$config = $helper->getConfig();
|
|
|
|
|
12 |
$attribute = Mage::getSingleton('eav/config')->getAttribute(Mage_Catalog_Model_Product::ENTITY, 'cost');
|
13 |
if($startDate && $endDate) {
|
14 |
$from = date('Y-m-d 00:00:00', strtotime($startDate));
|
@@ -19,6 +21,7 @@ class Glew_Service_Model_Types_OrderItems
|
|
19 |
} else {
|
20 |
$collection = Mage::getModel('sales/order_item')->getCollection();
|
21 |
}
|
|
|
22 |
$resource = Mage::getSingleton('core/resource');
|
23 |
$catProdEntDecTable = $resource->getTableName('catalog_product_entity_decimal');
|
24 |
$collection->getSelect()->joinLeft(
|
@@ -27,7 +30,6 @@ class Glew_Service_Model_Types_OrderItems
|
|
27 |
array('cost' => 'value')
|
28 |
);
|
29 |
$collection->setOrder('created_at', $sortDir);
|
30 |
-
$this->pageNum = $pageNum;
|
31 |
$collection->setCurPage($pageNum);
|
32 |
$collection->setPageSize($pageSize);
|
33 |
if($collection->getLastPageNumber() < $pageNum){
|
9 |
{
|
10 |
$helper = Mage::helper('glew');
|
11 |
$config = $helper->getConfig();
|
12 |
+
$this->pageNum = $pageNum;
|
13 |
+
|
14 |
$attribute = Mage::getSingleton('eav/config')->getAttribute(Mage_Catalog_Model_Product::ENTITY, 'cost');
|
15 |
if($startDate && $endDate) {
|
16 |
$from = date('Y-m-d 00:00:00', strtotime($startDate));
|
21 |
} else {
|
22 |
$collection = Mage::getModel('sales/order_item')->getCollection();
|
23 |
}
|
24 |
+
$collection->addAttributeToFilter('main_table.store_id', $helper->getStore()->getStoreId());
|
25 |
$resource = Mage::getSingleton('core/resource');
|
26 |
$catProdEntDecTable = $resource->getTableName('catalog_product_entity_decimal');
|
27 |
$collection->getSelect()->joinLeft(
|
30 |
array('cost' => 'value')
|
31 |
);
|
32 |
$collection->setOrder('created_at', $sortDir);
|
|
|
33 |
$collection->setCurPage($pageNum);
|
34 |
$collection->setPageSize($pageSize);
|
35 |
if($collection->getLastPageNumber() < $pageNum){
|
app/code/community/Glew/Service/Model/Types/Orders.php
CHANGED
@@ -9,6 +9,7 @@ class Glew_Service_Model_Types_Orders
|
|
9 |
{
|
10 |
$helper = Mage::helper('glew');
|
11 |
$config = $helper->getConfig();
|
|
|
12 |
|
13 |
if($startDate && $endDate) {
|
14 |
$from = date('Y-m-d 00:00:00', strtotime($startDate));
|
@@ -18,10 +19,10 @@ class Glew_Service_Model_Types_Orders
|
|
18 |
} else {
|
19 |
$collection = Mage::getModel('sales/order')->getCollection();
|
20 |
}
|
|
|
21 |
$collection->addAttributeToSort('created_at', $sortDir);
|
22 |
$collection->setCurPage($pageNum);
|
23 |
$collection->setPageSize($pageSize);
|
24 |
-
$this->pageNum = $pageNum;
|
25 |
|
26 |
if($collection->getLastPageNumber() < $pageNum){
|
27 |
return $this;
|
9 |
{
|
10 |
$helper = Mage::helper('glew');
|
11 |
$config = $helper->getConfig();
|
12 |
+
$this->pageNum = $pageNum;
|
13 |
|
14 |
if($startDate && $endDate) {
|
15 |
$from = date('Y-m-d 00:00:00', strtotime($startDate));
|
19 |
} else {
|
20 |
$collection = Mage::getModel('sales/order')->getCollection();
|
21 |
}
|
22 |
+
$collection->addAttributeToFilter('main_table.store_id', $helper->getStore()->getStoreId());
|
23 |
$collection->addAttributeToSort('created_at', $sortDir);
|
24 |
$collection->setCurPage($pageNum);
|
25 |
$collection->setPageSize($pageSize);
|
|
|
26 |
|
27 |
if($collection->getLastPageNumber() < $pageNum){
|
28 |
return $this;
|
app/code/community/Glew/Service/Model/Types/ProductAlerts.php
CHANGED
@@ -7,7 +7,9 @@ class Glew_Service_Model_Types_ProductAlerts
|
|
7 |
|
8 |
public function load($pageSize, $pageNum, $startDate = null, $endDate = null, $sortDir, $filterBy)
|
9 |
{
|
10 |
-
$
|
|
|
|
|
11 |
if($startDate && $endDate) {
|
12 |
$condition = "add_date BETWEEN '" . date('Y-m-d 00:00:00', strtotime($startDate)) . "' AND '" . date('Y-m-d 23:59:59', strtotime($endDate)) . "'";
|
13 |
$alerts = Mage::getModel('productalert/stock')->getCollection()
|
@@ -15,8 +17,8 @@ class Glew_Service_Model_Types_ProductAlerts
|
|
15 |
} else {
|
16 |
$alerts = Mage::getModel('productalert/stock')->getCollection();
|
17 |
}
|
|
|
18 |
$alerts->setOrder('add_date', $sortDir);
|
19 |
-
$this->pageNum = $pageNum;
|
20 |
$alerts->setCurPage($pageNum);
|
21 |
$alerts->setPageSize($pageSize);
|
22 |
|
7 |
|
8 |
public function load($pageSize, $pageNum, $startDate = null, $endDate = null, $sortDir, $filterBy)
|
9 |
{
|
10 |
+
$helper = Mage::helper('glew');
|
11 |
+
$config = $helper->getConfig();
|
12 |
+
$this->pageNum = $pageNum;
|
13 |
if($startDate && $endDate) {
|
14 |
$condition = "add_date BETWEEN '" . date('Y-m-d 00:00:00', strtotime($startDate)) . "' AND '" . date('Y-m-d 23:59:59', strtotime($endDate)) . "'";
|
15 |
$alerts = Mage::getModel('productalert/stock')->getCollection()
|
17 |
} else {
|
18 |
$alerts = Mage::getModel('productalert/stock')->getCollection();
|
19 |
}
|
20 |
+
$alerts->addFilter('website_id', "website_id = " . $helper->getStore()->getWebsiteId(), 'string');
|
21 |
$alerts->setOrder('add_date', $sortDir);
|
|
|
22 |
$alerts->setCurPage($pageNum);
|
23 |
$alerts->setPageSize($pageSize);
|
24 |
|
app/code/community/Glew/Service/Model/Types/Products.php
CHANGED
@@ -8,7 +8,9 @@ class Glew_Service_Model_Types_Products
|
|
8 |
|
9 |
public function load($pageSize, $pageNum, $startDate = null, $endDate = null, $sortDir, $filterBy)
|
10 |
{
|
11 |
-
$
|
|
|
|
|
12 |
$this->_getProductAttribtues();
|
13 |
if($startDate && $endDate) {
|
14 |
$from = date('Y-m-d 00:00:00', strtotime($startDate));
|
@@ -19,24 +21,24 @@ class Glew_Service_Model_Types_Products
|
|
19 |
} else {
|
20 |
$products = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*');
|
21 |
}
|
22 |
-
$
|
23 |
$products->setOrder('updated_at', $sortDir);
|
24 |
$products->setCurPage($pageNum);
|
25 |
$products->setPageSize($pageSize);
|
26 |
|
27 |
-
|
28 |
-
|
29 |
}
|
30 |
|
31 |
-
foreach
|
32 |
$productId = $product->getId();
|
33 |
$model = Mage::getModel('glew/types_product')->parse($productId, $this->productAttributes);
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
}
|
41 |
return $this;
|
42 |
}
|
8 |
|
9 |
public function load($pageSize, $pageNum, $startDate = null, $endDate = null, $sortDir, $filterBy)
|
10 |
{
|
11 |
+
$helper = Mage::helper('glew');
|
12 |
+
$config = $helper->getConfig();
|
13 |
+
$this->pageNum = $pageNum;
|
14 |
$this->_getProductAttribtues();
|
15 |
if($startDate && $endDate) {
|
16 |
$from = date('Y-m-d 00:00:00', strtotime($startDate));
|
21 |
} else {
|
22 |
$products = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*');
|
23 |
}
|
24 |
+
$products->setStoreId($helper->getStore()->getStoreId());
|
25 |
$products->setOrder('updated_at', $sortDir);
|
26 |
$products->setCurPage($pageNum);
|
27 |
$products->setPageSize($pageSize);
|
28 |
|
29 |
+
if($products->getLastPageNumber() < $pageNum){
|
30 |
+
return $this;
|
31 |
}
|
32 |
|
33 |
+
foreach($products as $product) {
|
34 |
$productId = $product->getId();
|
35 |
$model = Mage::getModel('glew/types_product')->parse($productId, $this->productAttributes);
|
36 |
+
if($model) {
|
37 |
+
$model->cross_sell_products = $this->_getCrossSellProducts($product);
|
38 |
+
$model->up_sell_products = $this->_getUpSellProducts($product);
|
39 |
+
$model->related_products = $this->_getRelatedProducts($product);
|
40 |
+
$this->products[] = $model;
|
41 |
+
}
|
42 |
}
|
43 |
return $this;
|
44 |
}
|
app/code/community/Glew/Service/Model/Types/RefundItems.php
CHANGED
@@ -7,7 +7,9 @@ class Glew_Service_Model_Types_RefundItems
|
|
7 |
|
8 |
public function load($pageSize, $pageNum, $startDate = null, $endDate = null, $sortDir, $filterBy)
|
9 |
{
|
10 |
-
$
|
|
|
|
|
11 |
if($startDate && $endDate) {
|
12 |
$from = date('Y-m-d 00:00:00', strtotime($startDate));
|
13 |
$to = date('Y-m-d 23:59:59', strtotime($endDate));
|
@@ -17,16 +19,16 @@ class Glew_Service_Model_Types_RefundItems
|
|
17 |
} else {
|
18 |
$refunds = Mage::getResourceModel('sales/order_creditmemo_collection');
|
19 |
}
|
|
|
20 |
$resource = Mage::getSingleton('core/resource');
|
21 |
$salesFlatCredMemItem = $resource->getTableName('sales_flat_creditmemo_item');
|
22 |
$refunds->getSelect()->join(array('credit_item' => $salesFlatCredMemItem), 'credit_item.parent_id = main_table.entity_id', array('*'));
|
23 |
$refunds->setOrder('created_at', $sortDir);
|
24 |
-
$this->pageNum = $pageNum;
|
25 |
$refunds->setCurPage($pageNum);
|
26 |
$refunds->setPageSize($pageSize);
|
27 |
|
28 |
-
|
29 |
-
|
30 |
}
|
31 |
|
32 |
foreach ($refunds as $refund){
|
7 |
|
8 |
public function load($pageSize, $pageNum, $startDate = null, $endDate = null, $sortDir, $filterBy)
|
9 |
{
|
10 |
+
$helper = Mage::helper('glew');
|
11 |
+
$config = $helper->getConfig();
|
12 |
+
$this->pageNum = $pageNum;
|
13 |
if($startDate && $endDate) {
|
14 |
$from = date('Y-m-d 00:00:00', strtotime($startDate));
|
15 |
$to = date('Y-m-d 23:59:59', strtotime($endDate));
|
19 |
} else {
|
20 |
$refunds = Mage::getResourceModel('sales/order_creditmemo_collection');
|
21 |
}
|
22 |
+
$refunds->addAttributeToFilter('main_table.store_id', $helper->getStore()->getStoreId());
|
23 |
$resource = Mage::getSingleton('core/resource');
|
24 |
$salesFlatCredMemItem = $resource->getTableName('sales_flat_creditmemo_item');
|
25 |
$refunds->getSelect()->join(array('credit_item' => $salesFlatCredMemItem), 'credit_item.parent_id = main_table.entity_id', array('*'));
|
26 |
$refunds->setOrder('created_at', $sortDir);
|
|
|
27 |
$refunds->setCurPage($pageNum);
|
28 |
$refunds->setPageSize($pageSize);
|
29 |
|
30 |
+
if($refunds->getLastPageNumber() < $pageNum){
|
31 |
+
return $this;
|
32 |
}
|
33 |
|
34 |
foreach ($refunds as $refund){
|
app/code/community/Glew/Service/Model/Types/Refunds.php
CHANGED
@@ -7,7 +7,9 @@ class Glew_Service_Model_Types_Refunds
|
|
7 |
|
8 |
public function load($pageSize, $pageNum, $startDate = null, $endDate = null, $sortDir, $filterBy)
|
9 |
{
|
10 |
-
$
|
|
|
|
|
11 |
if($startDate && $endDate) {
|
12 |
$from = date('Y-m-d 00:00:00', strtotime($startDate));
|
13 |
$to = date('Y-m-d 23:59:59', strtotime($endDate));
|
@@ -17,13 +19,13 @@ class Glew_Service_Model_Types_Refunds
|
|
17 |
} else {
|
18 |
$refunds = Mage::getResourceModel('sales/order_creditmemo_collection');
|
19 |
}
|
|
|
20 |
$refunds->setOrder('created_at', $sortDir);
|
21 |
-
$this->pageNum = $pageNum;
|
22 |
$refunds->setCurPage($pageNum);
|
23 |
$refunds->setPageSize($pageSize);
|
24 |
|
25 |
-
|
26 |
-
|
27 |
}
|
28 |
|
29 |
foreach ($refunds as $refund){
|
7 |
|
8 |
public function load($pageSize, $pageNum, $startDate = null, $endDate = null, $sortDir, $filterBy)
|
9 |
{
|
10 |
+
$helper = Mage::helper('glew');
|
11 |
+
$config = $helper->getConfig();
|
12 |
+
$this->pageNum = $pageNum;
|
13 |
if($startDate && $endDate) {
|
14 |
$from = date('Y-m-d 00:00:00', strtotime($startDate));
|
15 |
$to = date('Y-m-d 23:59:59', strtotime($endDate));
|
19 |
} else {
|
20 |
$refunds = Mage::getResourceModel('sales/order_creditmemo_collection');
|
21 |
}
|
22 |
+
$refunds->addAttributeToFilter('main_table.store_id', $helper->getStore()->getStoreId());
|
23 |
$refunds->setOrder('created_at', $sortDir);
|
|
|
24 |
$refunds->setCurPage($pageNum);
|
25 |
$refunds->setPageSize($pageSize);
|
26 |
|
27 |
+
if($refunds->getLastPageNumber() < $pageNum){
|
28 |
+
return $this;
|
29 |
}
|
30 |
|
31 |
foreach ($refunds as $refund){
|
app/code/community/Glew/Service/Model/Types/Stores.php
CHANGED
@@ -5,13 +5,15 @@ class Glew_Service_Model_Types_Stores
|
|
5 |
public $stores = array();
|
6 |
private $pageNum;
|
7 |
|
8 |
-
public function load()
|
9 |
{
|
10 |
$helper = Mage::helper('glew');
|
11 |
$config = $helper->getConfig();
|
|
|
12 |
|
13 |
$stores = Mage::app()->getStores();
|
14 |
-
|
|
|
15 |
$model = Mage::getModel('glew/types_store')->parse($store);
|
16 |
if ($model) {
|
17 |
$this->stores[] = $model;
|
5 |
public $stores = array();
|
6 |
private $pageNum;
|
7 |
|
8 |
+
public function load($pageSize, $pageNum)
|
9 |
{
|
10 |
$helper = Mage::helper('glew');
|
11 |
$config = $helper->getConfig();
|
12 |
+
$this->pageNum = $pageNum;
|
13 |
|
14 |
$stores = Mage::app()->getStores();
|
15 |
+
$stores = $helper->paginate($stores, $pageNum, $pageSize);
|
16 |
+
foreach($stores as $store) {
|
17 |
$model = Mage::getModel('glew/types_store')->parse($store);
|
18 |
if ($model) {
|
19 |
$this->stores[] = $model;
|
app/code/community/Glew/Service/Model/Types/Subscribers.php
CHANGED
@@ -9,8 +9,9 @@ class Glew_Service_Model_Types_Subscribers
|
|
9 |
{
|
10 |
$helper = Mage::helper('glew');
|
11 |
$config = $helper->getConfig();
|
12 |
-
$subscribers = Mage::getModel('newsletter/subscriber')->getCollection();
|
13 |
$this->pageNum = $pageNum;
|
|
|
|
|
14 |
$subscribers->setOrder('subscriber_id', $sortDir);
|
15 |
$subscribers->setCurPage($pageNum);
|
16 |
$subscribers->setPageSize($pageSize);
|
9 |
{
|
10 |
$helper = Mage::helper('glew');
|
11 |
$config = $helper->getConfig();
|
|
|
12 |
$this->pageNum = $pageNum;
|
13 |
+
$subscribers = Mage::getModel('newsletter/subscriber')->getCollection();
|
14 |
+
$subscribers->addFilter('store_id', "store_id = " . $helper->getStore()->getStoreId(), 'string');
|
15 |
$subscribers->setOrder('subscriber_id', $sortDir);
|
16 |
$subscribers->setCurPage($pageNum);
|
17 |
$subscribers->setPageSize($pageSize);
|
app/code/community/Glew/Service/controllers/ModuleController.php
CHANGED
@@ -53,7 +53,7 @@ class Glew_Service_ModuleController extends Mage_Core_Controller_Front_Action
|
|
53 |
$collection = Mage::getModel('glew/types_abandonedCarts')->load($this->_pageSize, $this->_pageNum, $this->_startDate, $this->_endDate, $this->_sortDir, $this->_filterField);
|
54 |
$this->_sendResponse($collection);
|
55 |
} catch(Exception $e) {
|
56 |
-
if($e->getCode() !=
|
57 |
print_r($e);
|
58 |
}
|
59 |
$this->_helper->logException($e, 'abandonedCarts');
|
@@ -67,7 +67,7 @@ class Glew_Service_ModuleController extends Mage_Core_Controller_Front_Action
|
|
67 |
$collection = Mage::getModel('glew/types_customers')->load($this->_pageSize, $this->_pageNum, $this->_startDate, $this->_endDate, $this->_sortDir, $this->_filterField);
|
68 |
$this->_sendResponse($collection);
|
69 |
} catch(Exception $e) {
|
70 |
-
if($e->getCode() !=
|
71 |
print_r($e);
|
72 |
}
|
73 |
$this->_helper->logException($e, 'customers');
|
@@ -82,7 +82,7 @@ class Glew_Service_ModuleController extends Mage_Core_Controller_Front_Action
|
|
82 |
$collection = Mage::getModel('glew/types_orders')->load($this->_pageSize, $this->_pageNum, $this->_startDate, $this->_endDate, $this->_sortDir, $this->_filterField);
|
83 |
$this->_sendResponse($collection);
|
84 |
} catch(Exception $e) {
|
85 |
-
if($e->getCode() !=
|
86 |
print_r($e);
|
87 |
}
|
88 |
$this->_helper->logException($e, 'orders');
|
@@ -96,7 +96,7 @@ class Glew_Service_ModuleController extends Mage_Core_Controller_Front_Action
|
|
96 |
$collection = Mage::getModel('glew/types_orderItems')->load($this->_pageSize, $this->_pageNum, $this->_startDate, $this->_endDate, $this->_sortDir, $this->_filterField);
|
97 |
$this->_sendResponse($collection);
|
98 |
} catch(Exception $e) {
|
99 |
-
if($e->getCode() !=
|
100 |
print_r($e);
|
101 |
}
|
102 |
$this->_helper->logException($e, 'orderItems');
|
@@ -107,10 +107,10 @@ class Glew_Service_ModuleController extends Mage_Core_Controller_Front_Action
|
|
107 |
{
|
108 |
try {
|
109 |
$this->_initRequest();
|
110 |
-
$collection = Mage::getModel('glew/types_stores')->load();
|
111 |
$this->_sendResponse($collection);
|
112 |
} catch(Exception $e) {
|
113 |
-
if($e->getCode() !=
|
114 |
print_r($e);
|
115 |
}
|
116 |
$this->_helper->logException($e, 'stores');
|
@@ -124,7 +124,7 @@ class Glew_Service_ModuleController extends Mage_Core_Controller_Front_Action
|
|
124 |
$collection = Mage::getModel('glew/types_subscribers')->load($this->_pageSize, $this->_pageNum, $this->_sortDir, $this->_filterField);
|
125 |
$this->_sendResponse($collection);
|
126 |
} catch(Exception $e) {
|
127 |
-
if($e->getCode() !=
|
128 |
print_r($e);
|
129 |
}
|
130 |
$this->_helper->logException($e, 'subscribers');
|
@@ -138,7 +138,7 @@ class Glew_Service_ModuleController extends Mage_Core_Controller_Front_Action
|
|
138 |
$collection = Mage::getModel('glew/types_products')->load($this->_pageSize, $this->_pageNum, $this->_startDate, $this->_endDate, $this->_sortDir, $this->_filterField);
|
139 |
$this->_sendResponse($collection);
|
140 |
} catch(Exception $e) {
|
141 |
-
if($e->getCode() !=
|
142 |
print_r($e);
|
143 |
}
|
144 |
$this->_helper->logException($e, 'products');
|
@@ -152,7 +152,7 @@ class Glew_Service_ModuleController extends Mage_Core_Controller_Front_Action
|
|
152 |
$collection = Mage::getModel('glew/types_productAlerts')->load($this->_pageSize, $this->_pageNum, $this->_startDate, $this->_endDate, $this->_sortDir, $this->_filterField);
|
153 |
$this->_sendResponse($collection);
|
154 |
} catch(Exception $e) {
|
155 |
-
if($e->getCode() !=
|
156 |
print_r($e);
|
157 |
}
|
158 |
$this->_helper->logException($e, 'productAlerts');
|
@@ -166,7 +166,7 @@ class Glew_Service_ModuleController extends Mage_Core_Controller_Front_Action
|
|
166 |
$collection = Mage::getModel('glew/types_categories')->load($this->_pageSize, $this->_pageNum, $this->_startDate, $this->_endDate, $this->_sortDir, $this->_filterField);
|
167 |
$this->_sendResponse($collection);
|
168 |
} catch(Exception $e) {
|
169 |
-
if($e->getCode() !=
|
170 |
print_r($e);
|
171 |
}
|
172 |
$this->_helper->logException($e, 'categories');
|
@@ -205,7 +205,7 @@ class Glew_Service_ModuleController extends Mage_Core_Controller_Front_Action
|
|
205 |
$collection = Mage::getModel('glew/types_extensions')->load($this->_pageSize, $this->_pageNum, $this->_sortDir, $this->_filterField);
|
206 |
$this->_sendResponse($collection);
|
207 |
} catch(Exception $e) {
|
208 |
-
if($e->getCode() !=
|
209 |
print_r($e);
|
210 |
}
|
211 |
$this->_helper->logException($e, 'extensions');
|
@@ -219,7 +219,7 @@ class Glew_Service_ModuleController extends Mage_Core_Controller_Front_Action
|
|
219 |
$collection = Mage::getModel('glew/types_refundItems')->load($this->_pageSize, $this->_pageNum, $this->_startDate, $this->_endDate, $this->_sortDir, $this->_filterField);
|
220 |
$this->_sendResponse($collection);
|
221 |
} catch(Exception $e) {
|
222 |
-
if($e->getCode() !=
|
223 |
print_r($e);
|
224 |
}
|
225 |
$this->_helper->logException($e, 'refund items');
|
@@ -233,7 +233,7 @@ class Glew_Service_ModuleController extends Mage_Core_Controller_Front_Action
|
|
233 |
$collection = Mage::getModel('glew/types_refunds')->load($this->_pageSize, $this->_pageNum, $this->_startDate, $this->_endDate, $this->_sortDir, $this->_filterField);
|
234 |
$this->_sendResponse($collection);
|
235 |
} catch(Exception $e) {
|
236 |
-
if($e->getCode() !=
|
237 |
print_r($e);
|
238 |
}
|
239 |
$this->_helper->logException($e, 'refunds');
|
@@ -254,12 +254,7 @@ class Glew_Service_ModuleController extends Mage_Core_Controller_Front_Action
|
|
254 |
return true;
|
255 |
}
|
256 |
|
257 |
-
|
258 |
-
$setup = Mage::getModel('glew/resource_mysql4_setup');
|
259 |
-
$token = $setup->createSecurityToken();
|
260 |
-
} else {
|
261 |
-
$token = $this->_config['security_token'];
|
262 |
-
}
|
263 |
|
264 |
$authToken = (isset($_SERVER['HTTP_X_GLEW_TOKEN']) ? $_SERVER['HTTP_X_GLEW_TOKEN'] : $_SERVER['X_GLEW_TOKEN']);
|
265 |
|
@@ -276,7 +271,7 @@ class Glew_Service_ModuleController extends Mage_Core_Controller_Front_Action
|
|
276 |
private function _reject()
|
277 |
{
|
278 |
$this->getResponse()->setHttpResponseCode(401)->setBody('Invalid security token or module disabled');
|
279 |
-
throw new Exception('Invalid security token or module disabled',
|
280 |
}
|
281 |
|
282 |
}
|
53 |
$collection = Mage::getModel('glew/types_abandonedCarts')->load($this->_pageSize, $this->_pageNum, $this->_startDate, $this->_endDate, $this->_sortDir, $this->_filterField);
|
54 |
$this->_sendResponse($collection);
|
55 |
} catch(Exception $e) {
|
56 |
+
if($e->getCode() != 401) {
|
57 |
print_r($e);
|
58 |
}
|
59 |
$this->_helper->logException($e, 'abandonedCarts');
|
67 |
$collection = Mage::getModel('glew/types_customers')->load($this->_pageSize, $this->_pageNum, $this->_startDate, $this->_endDate, $this->_sortDir, $this->_filterField);
|
68 |
$this->_sendResponse($collection);
|
69 |
} catch(Exception $e) {
|
70 |
+
if($e->getCode() != 401) {
|
71 |
print_r($e);
|
72 |
}
|
73 |
$this->_helper->logException($e, 'customers');
|
82 |
$collection = Mage::getModel('glew/types_orders')->load($this->_pageSize, $this->_pageNum, $this->_startDate, $this->_endDate, $this->_sortDir, $this->_filterField);
|
83 |
$this->_sendResponse($collection);
|
84 |
} catch(Exception $e) {
|
85 |
+
if($e->getCode() != 401) {
|
86 |
print_r($e);
|
87 |
}
|
88 |
$this->_helper->logException($e, 'orders');
|
96 |
$collection = Mage::getModel('glew/types_orderItems')->load($this->_pageSize, $this->_pageNum, $this->_startDate, $this->_endDate, $this->_sortDir, $this->_filterField);
|
97 |
$this->_sendResponse($collection);
|
98 |
} catch(Exception $e) {
|
99 |
+
if($e->getCode() != 401) {
|
100 |
print_r($e);
|
101 |
}
|
102 |
$this->_helper->logException($e, 'orderItems');
|
107 |
{
|
108 |
try {
|
109 |
$this->_initRequest();
|
110 |
+
$collection = Mage::getModel('glew/types_stores')->load($this->_pageSize, $this->_pageNum);
|
111 |
$this->_sendResponse($collection);
|
112 |
} catch(Exception $e) {
|
113 |
+
if($e->getCode() != 401) {
|
114 |
print_r($e);
|
115 |
}
|
116 |
$this->_helper->logException($e, 'stores');
|
124 |
$collection = Mage::getModel('glew/types_subscribers')->load($this->_pageSize, $this->_pageNum, $this->_sortDir, $this->_filterField);
|
125 |
$this->_sendResponse($collection);
|
126 |
} catch(Exception $e) {
|
127 |
+
if($e->getCode() != 401) {
|
128 |
print_r($e);
|
129 |
}
|
130 |
$this->_helper->logException($e, 'subscribers');
|
138 |
$collection = Mage::getModel('glew/types_products')->load($this->_pageSize, $this->_pageNum, $this->_startDate, $this->_endDate, $this->_sortDir, $this->_filterField);
|
139 |
$this->_sendResponse($collection);
|
140 |
} catch(Exception $e) {
|
141 |
+
if($e->getCode() != 401) {
|
142 |
print_r($e);
|
143 |
}
|
144 |
$this->_helper->logException($e, 'products');
|
152 |
$collection = Mage::getModel('glew/types_productAlerts')->load($this->_pageSize, $this->_pageNum, $this->_startDate, $this->_endDate, $this->_sortDir, $this->_filterField);
|
153 |
$this->_sendResponse($collection);
|
154 |
} catch(Exception $e) {
|
155 |
+
if($e->getCode() != 401) {
|
156 |
print_r($e);
|
157 |
}
|
158 |
$this->_helper->logException($e, 'productAlerts');
|
166 |
$collection = Mage::getModel('glew/types_categories')->load($this->_pageSize, $this->_pageNum, $this->_startDate, $this->_endDate, $this->_sortDir, $this->_filterField);
|
167 |
$this->_sendResponse($collection);
|
168 |
} catch(Exception $e) {
|
169 |
+
if($e->getCode() != 401) {
|
170 |
print_r($e);
|
171 |
}
|
172 |
$this->_helper->logException($e, 'categories');
|
205 |
$collection = Mage::getModel('glew/types_extensions')->load($this->_pageSize, $this->_pageNum, $this->_sortDir, $this->_filterField);
|
206 |
$this->_sendResponse($collection);
|
207 |
} catch(Exception $e) {
|
208 |
+
if($e->getCode() != 401) {
|
209 |
print_r($e);
|
210 |
}
|
211 |
$this->_helper->logException($e, 'extensions');
|
219 |
$collection = Mage::getModel('glew/types_refundItems')->load($this->_pageSize, $this->_pageNum, $this->_startDate, $this->_endDate, $this->_sortDir, $this->_filterField);
|
220 |
$this->_sendResponse($collection);
|
221 |
} catch(Exception $e) {
|
222 |
+
if($e->getCode() != 401) {
|
223 |
print_r($e);
|
224 |
}
|
225 |
$this->_helper->logException($e, 'refund items');
|
233 |
$collection = Mage::getModel('glew/types_refunds')->load($this->_pageSize, $this->_pageNum, $this->_startDate, $this->_endDate, $this->_sortDir, $this->_filterField);
|
234 |
$this->_sendResponse($collection);
|
235 |
} catch(Exception $e) {
|
236 |
+
if($e->getCode() != 401) {
|
237 |
print_r($e);
|
238 |
}
|
239 |
$this->_helper->logException($e, 'refunds');
|
254 |
return true;
|
255 |
}
|
256 |
|
257 |
+
$token = $this->_config['security_token'];
|
|
|
|
|
|
|
|
|
|
|
258 |
|
259 |
$authToken = (isset($_SERVER['HTTP_X_GLEW_TOKEN']) ? $_SERVER['HTTP_X_GLEW_TOKEN'] : $_SERVER['X_GLEW_TOKEN']);
|
260 |
|
271 |
private function _reject()
|
272 |
{
|
273 |
$this->getResponse()->setHttpResponseCode(401)->setBody('Invalid security token or module disabled');
|
274 |
+
throw new Exception('Invalid security token or module disabled', 401);
|
275 |
}
|
276 |
|
277 |
}
|
app/code/community/Glew/Service/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Glew_Service>
|
5 |
-
<version>1.0.
|
6 |
<depends>
|
7 |
<Mage_Shipping />
|
8 |
</depends>
|
@@ -26,7 +26,7 @@
|
|
26 |
</connection>
|
27 |
<setup>
|
28 |
<module>Glew_Service</module>
|
29 |
-
<class>
|
30 |
</setup>
|
31 |
</glew_setup>
|
32 |
<glew_read>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Glew_Service>
|
5 |
+
<version>1.0.11</version>
|
6 |
<depends>
|
7 |
<Mage_Shipping />
|
8 |
</depends>
|
26 |
</connection>
|
27 |
<setup>
|
28 |
<module>Glew_Service</module>
|
29 |
+
<class>Glew_Service_Model_Resource_Setup</class>
|
30 |
</setup>
|
31 |
</glew_setup>
|
32 |
<glew_read>
|
app/code/community/Glew/Service/sql/glew_setup/mysql4-install-0.0.2.php
DELETED
@@ -1,7 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
$installer = $this;
|
4 |
-
|
5 |
-
$installer->startSetup();
|
6 |
-
|
7 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Glew/Service/sql/glew_setup/mysql4-install-1.0.0.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$installer = $this;
|
3 |
+
|
4 |
+
$installer->startSetup();
|
5 |
+
|
6 |
+
$hostname = version_compare(phpversion(),'5.3','>=') ? gethostname() : php_uname('n');
|
7 |
+
$prefix = md5($hostname);
|
8 |
+
$token = sha1(uniqid($prefix, true) . rand().microtime());
|
9 |
+
$installer->setConfigData('glew_settings/general/security_token', $token);
|
10 |
+
|
11 |
+
$installer->endSetup();
|
package.xml
CHANGED
@@ -1,29 +1,32 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Glew</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license>OSL</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>Glew provides reporting, insights and predictive tools that enable growth and drive profitability.</summary>
|
10 |
-
<description>
|
11 |

|
12 |
Glew empowers you with the ability to measure:
|
13 |

|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
-
|
21 |
-
-
|
22 |
-
|
|
|
|
|
|
|
23 |
<authors><author><name>Glew</name><user>glewio</user><email>jed.young@glew.io</email></author></authors>
|
24 |
-
<date>2015-
|
25 |
-
<time>
|
26 |
-
<contents><target name="magecommunity"><dir name="Glew"><dir name="Service"><dir name="Block"><dir name="Adminhtml"><dir name="Widget"><dir name="Info"><file name="Info.php" hash="cb7f32c9a9d9032d9af801834e4ed5af"/></dir></dir></dir><file name="SecretKey.php" hash="
|
27 |
<compatible/>
|
28 |
-
<dependencies><required><php><min>5.
|
29 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Glew</name>
|
4 |
+
<version>1.0.10</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>OSL</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>Glew provides the world of ecommerce with reporting, insights and predictive tools that enable growth and drive profitability.</summary>
|
10 |
+
<description>Glew translates data into decisions. Glew provides a comprehensive view of your store’s data, bringing together information that is difficult to collect, combine and analyze. This means you can understand key performance indicators across your business and maximize your store’s profitability. We know you want to keep growing; Glew wants to help get you there.
|
11 |

|
12 |
Glew empowers you with the ability to measure:
|
13 |

|
14 |
+
Customer Acquisition Cost
|
15 |
+
Lifetime Value of a customer
|
16 |
+
Profit Margin after advertising expenses
|
17 |
+
Customer Purchase Frequency
|
18 |
+
Lifetime-Value-based ROAS instead of transaction-based ROAS
|
19 |
+
Value of your At Risk and Lost customers
|
20 |
+
Trending, real-time store performance on a daily, weekly, and yearly, basis.
|
21 |
+
Supports multi-store configurations
|
22 |
+
And more!
|
23 |
+
</description>
|
24 |
+
<notes>-Bug Fixes
|
25 |
+
-Multi-store support</notes>
|
26 |
<authors><author><name>Glew</name><user>glewio</user><email>jed.young@glew.io</email></author></authors>
|
27 |
+
<date>2015-11-09</date>
|
28 |
+
<time>16:12:56</time>
|
29 |
+
<contents><target name="magecommunity"><dir name="Glew"><dir name="Service"><dir name="Block"><dir name="Adminhtml"><dir name="Widget"><dir name="Info"><file name="Info.php" hash="cb7f32c9a9d9032d9af801834e4ed5af"/></dir></dir></dir><file name="SecretKey.php" hash="244e68e058d731d96f284a9e9a0bf13a"/></dir><dir name="Helper"><file name="Data.php" hash="e1bcfc59c84b1647949465613a0dd4b4"/></dir><dir name="Model"><file name="Glew.php" hash="e665b255ac5983b937eb60febd4a94bf"/><dir name="Resource"><file name="Setup.php" hash="1608ab53c5846ff80b1413693ad2657e"/></dir><dir name="Types"><file name="AbandonedCart.php" hash="ca99b85c3b2b93795013e1929a0d3613"/><file name="AbandonedCarts.php" hash="05ab68ee8093f149c1ebe7268e0eaf1f"/><file name="Address.php" hash="dac4e96501d687ce8c84ddfcc18a8327"/><file name="Categories.php" hash="7f3bb262405c9a9032688093ba6187aa"/><file name="Category.php" hash="a75878be202411265d91a20dd4afa457"/><file name="Customer.php" hash="e1f2058d9358d89a48715f151ab45755"/><file name="Customers.php" hash="656c31b938429d54c2dc4b8c6d7cb259"/><file name="Extension.php" hash="3a0bc967154cfd1ac5e9534ae96921fc"/><file name="Extensions.php" hash="4982616cd7bb0e5770b692420b8bb6cf"/><file name="Inventory.php" hash="4a6442574e2c4c640a1c88e4ca6b87fb"/><file name="InventoryItem.php" hash="01403ce6dd1f0042654d0c8f0bb18e7a"/><file name="Order.php" hash="f17622408310699e6cbccbb4b02e1ac3"/><file name="OrderItem.php" hash="26158c6d23d695ed6cd377bdd12f544f"/><file name="OrderItems.php" hash="3d63cc89cdcb79632183eca0a2c7bd82"/><file name="Orders.php" hash="8f215ef68dfa393acfb4a5380d111f75"/><file name="Product.php" hash="188167c24400632bbd848f406d671125"/><file name="ProductAlert.php" hash="e7ca7668907dad5547d80ad581519e78"/><file name="ProductAlerts.php" hash="767c8c527156a11ab376292c10c8fd5d"/><file name="Products.php" hash="e6890059117a05d6d1006c13ddf15855"/><file name="Refund.php" hash="1b79b89a2ac66cc0dfb05e1f3100f98c"/><file name="RefundItem.php" hash="1d43007ec2bb990eb08b8d0a2812f4ca"/><file name="RefundItems.php" hash="7b7511e30194b13db1f8671027fe913a"/><file name="Refunds.php" hash="1073e14c4e82f00d0f25eb4dcff48669"/><file name="Store.php" hash="455923168b5d2550af6b862d776db3f2"/><file name="Stores.php" hash="5d057d09db03554807d763d29ade16e9"/><file name="Subscriber.php" hash="727153725fc7be3fd093422d6a67dfa1"/><file name="Subscribers.php" hash="a17ea2cc95f206989fd0b3612fd9f9bb"/></dir></dir><dir name="controllers"><file name="ModuleController.php" hash="42ecffa3a91ca7bc04ceeb920834b8a4"/></dir><dir name="etc"><file name="adminhtml.xml" hash="d2d95c59dc81f92df0ed6adaba801a52"/><file name="config.xml" hash="255d6921037341ff60757ed263ddd354"/><file name="system.xml" hash="07aa4da88108940bf267cb2abb854eab"/></dir><dir name="sql"><dir name="glew_setup"><file name="mysql4-install-1.0.0.php" hash="d515369cd1867cf970f27352d927e402"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Glew_Service.xml" hash="db2470cc1c1c36b01cea61416a3f6f37"/></dir></target></contents>
|
30 |
<compatible/>
|
31 |
+
<dependencies><required><php><min>5.3.0</min><max>9.0.0</max></php><package><name>Glew</name><channel>community</channel><min>1.5</min><max>1.9</max></package><extension><name>Core</name><min>5.0</min><max>7.0</max></extension></required></dependencies>
|
32 |
</package>
|