Version Notes
Started
Download this release
Release Info
Developer | Magento Core Team |
Extension | Dexxtz_Store_maintenance |
Version | 1.1.2 |
Comparing to | |
See all releases |
Code changes from version 1.1.1 to 1.1.2
- app/code/community/Dexxtz/Storemaintenance/Block/Enddate.php +0 -0
- app/code/community/Dexxtz/Storemaintenance/Block/Ip.php +0 -0
- app/code/community/Dexxtz/Storemaintenance/Block/Ipgrid.php +0 -0
- app/code/community/Dexxtz/Storemaintenance/Block/System/Config/Source/Enddate.php +33 -0
- app/code/community/Dexxtz/Storemaintenance/Block/System/Config/Source/Ip.php +19 -0
- app/code/community/Dexxtz/Storemaintenance/Block/System/Config/Source/Ipgrid.php +26 -0
- app/code/community/Dexxtz/Storemaintenance/Helper/Data.php +29 -1
- app/code/community/Dexxtz/Storemaintenance/Model/Blockstatic.php +0 -0
- app/code/community/Dexxtz/Storemaintenance/Model/Observer.php +7 -24
- app/code/community/Dexxtz/Storemaintenance/Model/System/Config/Source/Blockstatic.php +30 -0
- app/code/community/Dexxtz/Storemaintenance/etc/config.xml +13 -19
- app/code/community/Dexxtz/Storemaintenance/etc/system.xml +4 -4
- app/design/frontend/base/default/template/dexxtz/{store_maintenance.phtml → storemaintenance/maintenance.phtml} +2 -3
- app/etc/modules/Dexxtz_Storemaintenance.xml +0 -0
- app/locale/en_US/Dexxtz_Storemaintenance.csv +1 -1
- app/locale/pt_BR/Dexxtz_Storemaintenance.csv +0 -0
- package.xml +9 -65
app/code/community/Dexxtz/Storemaintenance/Block/Enddate.php
CHANGED
File without changes
|
app/code/community/Dexxtz/Storemaintenance/Block/Ip.php
CHANGED
File without changes
|
app/code/community/Dexxtz/Storemaintenance/Block/Ipgrid.php
CHANGED
File without changes
|
app/code/community/Dexxtz/Storemaintenance/Block/System/Config/Source/Enddate.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Copyright [2014] [Dexxtz]
|
5 |
+
*
|
6 |
+
* @package Dexxtz_StoreMaintenance
|
7 |
+
* @author Dexxtz
|
8 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0
|
9 |
+
*/
|
10 |
+
|
11 |
+
class Dexxtz_Storemaintenance_Block_System_Config_Source_Enddate extends Mage_Adminhtml_Block_System_Config_Form_Field
|
12 |
+
{
|
13 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
14 |
+
{
|
15 |
+
$date = new Varien_Data_Form_Element_Date;
|
16 |
+
$format = 'MM/d/y';
|
17 |
+
|
18 |
+
$data = array(
|
19 |
+
'name' => $element->getName(),
|
20 |
+
'html_id' => $element->getId(),
|
21 |
+
'image' => $this->getSkinUrl('images/grid-cal.gif'),
|
22 |
+
);
|
23 |
+
|
24 |
+
$date->setData($data);
|
25 |
+
$date->setValue($element->getValue(), $format);
|
26 |
+
$date->setFormat($format);
|
27 |
+
|
28 |
+
//$date->setClass($element->getFieldConfig()->validate->asArray());
|
29 |
+
$date->setForm($element->getForm());
|
30 |
+
|
31 |
+
return $date->getElementHtml();
|
32 |
+
}
|
33 |
+
}
|
app/code/community/Dexxtz/Storemaintenance/Block/System/Config/Source/Ip.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Copyright [2014] [Dexxtz]
|
5 |
+
*
|
6 |
+
* @package Dexxtz_StoreMaintenance
|
7 |
+
* @author Dexxtz
|
8 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0
|
9 |
+
*/
|
10 |
+
|
11 |
+
class Dexxtz_Storemaintenance_Block_System_Config_Source_Ip extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
|
12 |
+
{
|
13 |
+
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
14 |
+
{
|
15 |
+
$ipAdress = $_SERVER['REMOTE_ADDR'];
|
16 |
+
|
17 |
+
return $ipAdress;
|
18 |
+
}
|
19 |
+
}
|
app/code/community/Dexxtz/Storemaintenance/Block/System/Config/Source/Ipgrid.php
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Copyright [2014] [Dexxtz]
|
5 |
+
*
|
6 |
+
* @package Dexxtz_StoreMaintenance
|
7 |
+
* @author Dexxtz
|
8 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0
|
9 |
+
*/
|
10 |
+
|
11 |
+
class Dexxtz_Storemaintenance_Block_System_Config_Source_Ipgrid extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
|
12 |
+
{
|
13 |
+
protected $_addAfter = false;
|
14 |
+
|
15 |
+
public function __construct()
|
16 |
+
{
|
17 |
+
$this->addColumn('ip_address', array(
|
18 |
+
'label' => Mage::helper('storemaintenance')->__('IP Address'),
|
19 |
+
'style' => 'width:120px',
|
20 |
+
));
|
21 |
+
|
22 |
+
$this->_addButtonLabel = Mage::helper('storemaintenance')->__('add IP');
|
23 |
+
|
24 |
+
parent::__construct();
|
25 |
+
}
|
26 |
+
}
|
app/code/community/Dexxtz/Storemaintenance/Helper/Data.php
CHANGED
@@ -10,5 +10,33 @@
|
|
10 |
|
11 |
class Dexxtz_Storemaintenance_Helper_Data extends Mage_Core_Helper_Abstract
|
12 |
{
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
}
|
10 |
|
11 |
class Dexxtz_Storemaintenance_Helper_Data extends Mage_Core_Helper_Abstract
|
12 |
{
|
13 |
+
public function getIpsArray()
|
14 |
+
{
|
15 |
+
$ips = unserialize(Mage::getStoreConfig('storemaintenance/dexxtz/ip_grid'));
|
16 |
+
|
17 |
+
return $ips;
|
18 |
+
}
|
19 |
+
|
20 |
+
public function getActivateLog()
|
21 |
+
{
|
22 |
+
$log = Mage::getStoreConfig('storemaintenance/dexxtz/activate_log');
|
23 |
+
|
24 |
+
return $log;
|
25 |
+
}
|
26 |
+
|
27 |
+
public function getArchiveLog()
|
28 |
+
{
|
29 |
+
$archive = Mage::getStoreConfig('storemaintenance/dexxtz/archive_log');
|
30 |
+
|
31 |
+
return $archive;
|
32 |
+
}
|
33 |
+
|
34 |
+
public function getEndDate()
|
35 |
+
{
|
36 |
+
$date = Mage::getStoreConfig('storemaintenance/dexxtz/end_date');
|
37 |
+
|
38 |
+
return $date;
|
39 |
+
|
40 |
+
}
|
41 |
+
|
42 |
}
|
app/code/community/Dexxtz/Storemaintenance/Model/Blockstatic.php
CHANGED
File without changes
|
app/code/community/Dexxtz/Storemaintenance/Model/Observer.php
CHANGED
@@ -12,30 +12,26 @@ class Dexxtz_Storemaintenance_Model_Observer
|
|
12 |
{
|
13 |
public function initControllerStoremaintenance($request)
|
14 |
{
|
15 |
-
|
16 |
date_default_timezone_set(Mage::getStoreConfig('general/locale/timezone'));
|
17 |
|
18 |
$url = Mage::helper('core/url')->getCurrentUrl();
|
19 |
$adminArea = 0;
|
20 |
|
21 |
-
// checks whether the current page belongs to the administrator
|
22 |
if (strpos($url, '/admin') || strpos($url, '/adminhtml') || strpos($url, '/downloader')) {
|
23 |
$adminArea = 1;
|
24 |
}
|
25 |
|
26 |
-
// Performs if not is administrative area
|
27 |
if ($adminArea == 0) {
|
28 |
|
29 |
$storeId = Mage::app()->getStore()->getStoreId();
|
30 |
$isEnabled = Mage::getStoreConfig('storemaintenance/dexxtz/activate',$storeId);
|
31 |
|
32 |
-
// verifies if the module is enabled
|
33 |
if ($isEnabled == 1) {
|
34 |
$allowedIPs = Mage::getStoreConfig('storemaintenance/dexxtz/allowedIPs',$storeId);
|
35 |
$allowedIPs = preg_replace('/ /', '', $allowedIPs);
|
36 |
-
$array =
|
37 |
|
38 |
-
// assembles an array with informed ips
|
39 |
foreach ($array as $key => $value) {
|
40 |
$IPs[] = $value['ip_address'];
|
41 |
}
|
@@ -44,45 +40,35 @@ class Dexxtz_Storemaintenance_Model_Observer
|
|
44 |
$allowForAdmin = Mage::getStoreConfig('storemaintenance/dexxtz/activate_admin',$storeId);
|
45 |
$adminIp = null;
|
46 |
|
47 |
-
// verifies if the administrator can view the frontend
|
48 |
if ($allowForAdmin == 1) {
|
49 |
Mage::getSingleton('core/session', array('name' => 'adminhtml'));
|
50 |
$adminSession = Mage::getSingleton('admin/session');
|
51 |
|
52 |
-
// checks if the admin is logged in and capture your ip
|
53 |
if ($adminSession->isLoggedIn()) {
|
54 |
$adminIp = $adminSession['_session_validator_data']['remote_addr'];
|
55 |
}
|
56 |
}
|
57 |
|
58 |
-
$endDate =
|
59 |
$checkDate = 0;
|
60 |
|
61 |
-
// Checks if a date was set for the end of maintenance
|
62 |
if ($endDate) {
|
63 |
$timestamp_endDate = strtotime($endDate);
|
64 |
$currentDate = date('m/d/Y');
|
65 |
$timestamp_currentDate = strtotime($currentDate);
|
66 |
-
|
67 |
-
// checks whether the current date is greater than the date specified in the module
|
68 |
if ($timestamp_currentDate > $timestamp_endDate) {
|
69 |
$checkDate = 1;
|
70 |
}
|
71 |
}
|
72 |
|
73 |
-
// checks if the ip current is different from ip of admin logged
|
74 |
if ($currentIP != $adminIp) {
|
75 |
-
|
76 |
-
// checks if the ip can access or if the date will access
|
77 |
if (!in_array($currentIP, $IPs) && $checkDate == 0) {
|
78 |
-
|
79 |
-
|
80 |
-
$html = Mage::getSingleton('core/layout')->createBlock('core/template')->setTemplate('dexxtz/store_maintenance.phtml')->toHtml();
|
81 |
-
$activate_log = Mage::getStoreConfig('storemaintenance/dexxtz/activate_log');
|
82 |
|
83 |
-
// create log
|
84 |
if ($activate_log == 1) {
|
85 |
-
$archive_log =
|
86 |
$file = ($archive_log == '') ? 'MaintenanceLog.txt' : $archive_log;
|
87 |
$date = date('m/d/Y h:i A');
|
88 |
$urlBase = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
|
@@ -91,11 +77,9 @@ class Dexxtz_Storemaintenance_Model_Observer
|
|
91 |
$accessedArea = ($accessedArea == '') ? 'home' : $accessedArea;
|
92 |
$log = 'array("Date" => "' . $date . '", "IP" => "' . $currentIP . '", "Accessed Area" => "' . $accessedArea . '")' . PHP_EOL;
|
93 |
|
94 |
-
// adds a new line to the log file
|
95 |
file_put_contents($file, $log, FILE_APPEND);
|
96 |
}
|
97 |
|
98 |
-
// mounts the display of the page of maintenance on page current
|
99 |
if ('' !== $html) {
|
100 |
Mage::getSingleton('core/session', array('name' => 'front'));
|
101 |
$response = $request->getEvent()->getFront()->getResponse();
|
@@ -107,7 +91,6 @@ class Dexxtz_Storemaintenance_Model_Observer
|
|
107 |
$response->outputBody();
|
108 |
}
|
109 |
|
110 |
-
// break page display
|
111 |
exit();
|
112 |
}
|
113 |
}
|
12 |
{
|
13 |
public function initControllerStoremaintenance($request)
|
14 |
{
|
15 |
+
$helper = Mage::helper('storemaintenance');
|
16 |
date_default_timezone_set(Mage::getStoreConfig('general/locale/timezone'));
|
17 |
|
18 |
$url = Mage::helper('core/url')->getCurrentUrl();
|
19 |
$adminArea = 0;
|
20 |
|
|
|
21 |
if (strpos($url, '/admin') || strpos($url, '/adminhtml') || strpos($url, '/downloader')) {
|
22 |
$adminArea = 1;
|
23 |
}
|
24 |
|
|
|
25 |
if ($adminArea == 0) {
|
26 |
|
27 |
$storeId = Mage::app()->getStore()->getStoreId();
|
28 |
$isEnabled = Mage::getStoreConfig('storemaintenance/dexxtz/activate',$storeId);
|
29 |
|
|
|
30 |
if ($isEnabled == 1) {
|
31 |
$allowedIPs = Mage::getStoreConfig('storemaintenance/dexxtz/allowedIPs',$storeId);
|
32 |
$allowedIPs = preg_replace('/ /', '', $allowedIPs);
|
33 |
+
$array = $helper->getIpsArray();
|
34 |
|
|
|
35 |
foreach ($array as $key => $value) {
|
36 |
$IPs[] = $value['ip_address'];
|
37 |
}
|
40 |
$allowForAdmin = Mage::getStoreConfig('storemaintenance/dexxtz/activate_admin',$storeId);
|
41 |
$adminIp = null;
|
42 |
|
|
|
43 |
if ($allowForAdmin == 1) {
|
44 |
Mage::getSingleton('core/session', array('name' => 'adminhtml'));
|
45 |
$adminSession = Mage::getSingleton('admin/session');
|
46 |
|
|
|
47 |
if ($adminSession->isLoggedIn()) {
|
48 |
$adminIp = $adminSession['_session_validator_data']['remote_addr'];
|
49 |
}
|
50 |
}
|
51 |
|
52 |
+
$endDate = $helper->getEndDate();
|
53 |
$checkDate = 0;
|
54 |
|
|
|
55 |
if ($endDate) {
|
56 |
$timestamp_endDate = strtotime($endDate);
|
57 |
$currentDate = date('m/d/Y');
|
58 |
$timestamp_currentDate = strtotime($currentDate);
|
59 |
+
|
|
|
60 |
if ($timestamp_currentDate > $timestamp_endDate) {
|
61 |
$checkDate = 1;
|
62 |
}
|
63 |
}
|
64 |
|
|
|
65 |
if ($currentIP != $adminIp) {
|
|
|
|
|
66 |
if (!in_array($currentIP, $IPs) && $checkDate == 0) {
|
67 |
+
$html = Mage::getSingleton('core/layout')->createBlock('core/template')->setTemplate('dexxtz/storemaintenance/maintenance.phtml')->toHtml();
|
68 |
+
$activate_log = $helper->getActivateLog();
|
|
|
|
|
69 |
|
|
|
70 |
if ($activate_log == 1) {
|
71 |
+
$archive_log = $helper->getArchiveLog();
|
72 |
$file = ($archive_log == '') ? 'MaintenanceLog.txt' : $archive_log;
|
73 |
$date = date('m/d/Y h:i A');
|
74 |
$urlBase = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
|
77 |
$accessedArea = ($accessedArea == '') ? 'home' : $accessedArea;
|
78 |
$log = 'array("Date" => "' . $date . '", "IP" => "' . $currentIP . '", "Accessed Area" => "' . $accessedArea . '")' . PHP_EOL;
|
79 |
|
|
|
80 |
file_put_contents($file, $log, FILE_APPEND);
|
81 |
}
|
82 |
|
|
|
83 |
if ('' !== $html) {
|
84 |
Mage::getSingleton('core/session', array('name' => 'front'));
|
85 |
$response = $request->getEvent()->getFront()->getResponse();
|
91 |
$response->outputBody();
|
92 |
}
|
93 |
|
|
|
94 |
exit();
|
95 |
}
|
96 |
}
|
app/code/community/Dexxtz/Storemaintenance/Model/System/Config/Source/Blockstatic.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Copyright [2014] [Dexxtz]
|
5 |
+
*
|
6 |
+
* @package Dexxtz_StoreMaintenance
|
7 |
+
* @author Dexxtz
|
8 |
+
* @license http://www.apache.org/licenses/LICENSE-2.0
|
9 |
+
*/
|
10 |
+
|
11 |
+
class Dexxtz_Storemaintenance_Model_System_Config_Source_Blockstatic
|
12 |
+
{
|
13 |
+
protected $_options;
|
14 |
+
public function toOptionArray()
|
15 |
+
{
|
16 |
+
if(!$this -> _options){
|
17 |
+
$this -> _options = array(
|
18 |
+
array(
|
19 |
+
'value' => 0,
|
20 |
+
'label' => Mage::helper('catalog')->__('Please select one static block ...'),
|
21 |
+
)
|
22 |
+
);
|
23 |
+
|
24 |
+
$options = Mage::getResourceModel('cms/block_collection') -> load() -> toOptionArray();
|
25 |
+
$this -> _options = array_merge($this -> _options, $options);
|
26 |
+
}
|
27 |
+
|
28 |
+
return $this->_options;
|
29 |
+
}
|
30 |
+
}
|
app/code/community/Dexxtz/Storemaintenance/etc/config.xml
CHANGED
@@ -48,22 +48,16 @@
|
|
48 |
<adminhtml>
|
49 |
<acl>
|
50 |
<resources>
|
51 |
-
<all>
|
52 |
-
<title>Allow Everything</title>
|
53 |
-
</all>
|
54 |
<admin>
|
55 |
<children>
|
56 |
-
<Dexxtz_Storemaintenance>
|
57 |
-
<title>Storemaintenance Module</title>
|
58 |
-
<sort_order>10</sort_order>
|
59 |
-
</Dexxtz_Storemaintenance>
|
60 |
<system>
|
61 |
<children>
|
62 |
<config>
|
63 |
<children>
|
64 |
-
<
|
65 |
-
<title>Storemaintenance</title>
|
66 |
-
|
|
|
67 |
</children>
|
68 |
</config>
|
69 |
</children>
|
@@ -82,12 +76,7 @@
|
|
82 |
</modules>
|
83 |
</translate>
|
84 |
</adminhtml>
|
85 |
-
<global>
|
86 |
-
<models>
|
87 |
-
<storemaintenance>
|
88 |
-
<class>Dexxtz_Storemaintenance_Model</class>
|
89 |
-
</storemaintenance>
|
90 |
-
</models>
|
91 |
<resources>
|
92 |
<dexxtz_storemaintenance_setup>
|
93 |
<setup>
|
@@ -99,10 +88,15 @@
|
|
99 |
</dexxtz_storemaintenance_setup>
|
100 |
</resources>
|
101 |
<blocks>
|
102 |
-
<
|
103 |
<class>Dexxtz_Storemaintenance_Block</class>
|
104 |
-
</
|
105 |
</blocks>
|
|
|
|
|
|
|
|
|
|
|
106 |
<helpers>
|
107 |
<storemaintenance>
|
108 |
<class>Dexxtz_Storemaintenance_Helper</class>
|
@@ -113,7 +107,7 @@
|
|
113 |
<observers>
|
114 |
<storemaintenance>
|
115 |
<type>singleton</type>
|
116 |
-
<class>
|
117 |
<method>initControllerStoremaintenance</method>
|
118 |
</storemaintenance>
|
119 |
</observers>
|
48 |
<adminhtml>
|
49 |
<acl>
|
50 |
<resources>
|
|
|
|
|
|
|
51 |
<admin>
|
52 |
<children>
|
|
|
|
|
|
|
|
|
53 |
<system>
|
54 |
<children>
|
55 |
<config>
|
56 |
<children>
|
57 |
+
<dexxtz_storemainteance translate="title" module="storemainteance">
|
58 |
+
<title>Dexxtz Storemaintenance</title>
|
59 |
+
<sort_order>50</sort_order>
|
60 |
+
</dexxtz_storemainteance>
|
61 |
</children>
|
62 |
</config>
|
63 |
</children>
|
76 |
</modules>
|
77 |
</translate>
|
78 |
</adminhtml>
|
79 |
+
<global>
|
|
|
|
|
|
|
|
|
|
|
80 |
<resources>
|
81 |
<dexxtz_storemaintenance_setup>
|
82 |
<setup>
|
88 |
</dexxtz_storemaintenance_setup>
|
89 |
</resources>
|
90 |
<blocks>
|
91 |
+
<dexxtz_storemaintenance>
|
92 |
<class>Dexxtz_Storemaintenance_Block</class>
|
93 |
+
</dexxtz_storemaintenance>
|
94 |
</blocks>
|
95 |
+
<models>
|
96 |
+
<dexxtz_storemaintenance>
|
97 |
+
<class>Dexxtz_Storemaintenance_Model</class>
|
98 |
+
</dexxtz_storemaintenance>
|
99 |
+
</models>
|
100 |
<helpers>
|
101 |
<storemaintenance>
|
102 |
<class>Dexxtz_Storemaintenance_Helper</class>
|
107 |
<observers>
|
108 |
<storemaintenance>
|
109 |
<type>singleton</type>
|
110 |
+
<class>dexxtz_storemaintenance/observer</class>
|
111 |
<method>initControllerStoremaintenance</method>
|
112 |
</storemaintenance>
|
113 |
</observers>
|
app/code/community/Dexxtz/Storemaintenance/etc/system.xml
CHANGED
@@ -65,7 +65,7 @@
|
|
65 |
<label>Select the static block</label>
|
66 |
<comment>It is the maintenance page to be displayed</comment>
|
67 |
<frontend_type>select</frontend_type>
|
68 |
-
<source_model>
|
69 |
<sort_order>40</sort_order>
|
70 |
<show_in_default>1</show_in_default>
|
71 |
<show_in_website>0</show_in_website>
|
@@ -85,7 +85,7 @@
|
|
85 |
<label>End date to be accessed</label>
|
86 |
<comment>m/d/Y - After the date the frontend can be viewed</comment>
|
87 |
<frontend_type>text</frontend_type>
|
88 |
-
<frontend_model>
|
89 |
<sort_order>60</sort_order>
|
90 |
<show_in_default>1</show_in_default>
|
91 |
<show_in_website>1</show_in_website>
|
@@ -95,7 +95,7 @@
|
|
95 |
<ip_current translate="label">
|
96 |
<label>Your current IP is</label>
|
97 |
<frontend_type>label</frontend_type>
|
98 |
-
<frontend_model>
|
99 |
<sort_order>70</sort_order>
|
100 |
<show_in_default>1</show_in_default>
|
101 |
<show_in_website>1</show_in_website>
|
@@ -104,7 +104,7 @@
|
|
104 |
<ip_grid translate="label">
|
105 |
<label>IP Adresses</label>
|
106 |
<comment>IP addresses allowed pair to access the frontend</comment>
|
107 |
-
<frontend_model>
|
108 |
<backend_model>adminhtml/system_config_backend_serialized_array</backend_model>
|
109 |
<sort_order>80</sort_order>
|
110 |
<show_in_default>1</show_in_default>
|
65 |
<label>Select the static block</label>
|
66 |
<comment>It is the maintenance page to be displayed</comment>
|
67 |
<frontend_type>select</frontend_type>
|
68 |
+
<source_model>dexxtz_storemaintenance/system_config_source_blockstatic</source_model>
|
69 |
<sort_order>40</sort_order>
|
70 |
<show_in_default>1</show_in_default>
|
71 |
<show_in_website>0</show_in_website>
|
85 |
<label>End date to be accessed</label>
|
86 |
<comment>m/d/Y - After the date the frontend can be viewed</comment>
|
87 |
<frontend_type>text</frontend_type>
|
88 |
+
<frontend_model>dexxtz_storemaintenance/system_config_source_enddate</frontend_model>
|
89 |
<sort_order>60</sort_order>
|
90 |
<show_in_default>1</show_in_default>
|
91 |
<show_in_website>1</show_in_website>
|
95 |
<ip_current translate="label">
|
96 |
<label>Your current IP is</label>
|
97 |
<frontend_type>label</frontend_type>
|
98 |
+
<frontend_model>dexxtz_storemaintenance/system_config_source_ip</frontend_model>
|
99 |
<sort_order>70</sort_order>
|
100 |
<show_in_default>1</show_in_default>
|
101 |
<show_in_website>1</show_in_website>
|
104 |
<ip_grid translate="label">
|
105 |
<label>IP Adresses</label>
|
106 |
<comment>IP addresses allowed pair to access the frontend</comment>
|
107 |
+
<frontend_model>dexxtz_storemaintenance/system_config_source_ipgrid</frontend_model>
|
108 |
<backend_model>adminhtml/system_config_backend_serialized_array</backend_model>
|
109 |
<sort_order>80</sort_order>
|
110 |
<show_in_default>1</show_in_default>
|
app/design/frontend/base/default/template/dexxtz/{store_maintenance.phtml → storemaintenance/maintenance.phtml}
RENAMED
@@ -28,10 +28,9 @@ $css = Mage::getStoreConfig('storemaintenance/dexxtz/css');
|
|
28 |
</head>
|
29 |
<body>
|
30 |
<?php
|
31 |
-
|
32 |
$blockStatic = Mage::getStoreConfig('storemaintenance/dexxtz/block_static');
|
33 |
-
|
34 |
-
//displays the contents of the static block
|
35 |
echo Mage::getSingleton('core/layout')->createBlock('cms/block')->setBlockId($blockStatic)->toHtml() . "\n";
|
36 |
?>
|
37 |
</body>
|
28 |
</head>
|
29 |
<body>
|
30 |
<?php
|
31 |
+
|
32 |
$blockStatic = Mage::getStoreConfig('storemaintenance/dexxtz/block_static');
|
33 |
+
|
|
|
34 |
echo Mage::getSingleton('core/layout')->createBlock('cms/block')->setBlockId($blockStatic)->toHtml() . "\n";
|
35 |
?>
|
36 |
</body>
|
app/etc/modules/Dexxtz_Storemaintenance.xml
CHANGED
File without changes
|
app/locale/en_US/Dexxtz_Storemaintenance.csv
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
"Title of page","Title of page"
|
6 |
"Will be added to the html title tag","Will be added to the html title tag"
|
7 |
"CSS","CSS"
|
8 |
-
"Example: css/styles.css","
|
9 |
"Store Maintenance","Store Maintenance"
|
10 |
"Select the static block","Select the static block"
|
11 |
"It is the maintenance page to be displayed","It is the maintenance page to be displayed"
|
5 |
"Title of page","Title of page"
|
6 |
"Will be added to the html title tag","Will be added to the html title tag"
|
7 |
"CSS","CSS"
|
8 |
+
"Example: css/styles.css","Example: css/styles.css"
|
9 |
"Store Maintenance","Store Maintenance"
|
10 |
"Select the static block","Select the static block"
|
11 |
"It is the maintenance page to be displayed","It is the maintenance page to be displayed"
|
app/locale/pt_BR/Dexxtz_Storemaintenance.csv
CHANGED
File without changes
|
package.xml
CHANGED
@@ -1,74 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Dexxtz_Store_maintenance</name>
|
4 |
-
<version>1.1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/apachepl.php">Apache Software License</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>
|
10 |
-
<description
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
Seus clientes não vão te atrapalhar ou visualizar erros em sua loja.<br />
|
17 |
-
O módulo armazena logs de acesso, controla o acesso por data, ip ou por usuário administrador.</description>
|
18 |
-
<notes>Update / Atualização</notes>
|
19 |
-
<authors><author><name>Dexxtz</name><user>Dexxtz</user><email>dexxtz@gmail.com</email></author></authors>
|
20 |
-
<date>2014-08-22</date>
|
21 |
-
<time>12:00:00</time>
|
22 |
-
<contents>
|
23 |
-
<target name="magecommunity">
|
24 |
-
<dir name="Dexxtz">
|
25 |
-
<dir name="Storemaintenance">
|
26 |
-
<dir name="Block">
|
27 |
-
<file name="Enddate.php" hash="60bd71dace9bfa6cdd14f09e88f72634"/>
|
28 |
-
<file name="Ip.php" hash="818c18d5fa9c6526a46d699f1b1a89e9"/>
|
29 |
-
<file name="Ipgrid.php" hash="0f29268d966d16d6e749d8a0a1c2fa51"/>
|
30 |
-
</dir>
|
31 |
-
<dir name="Helper">
|
32 |
-
<file name="Data.php" hash="ff90181c672edbcbf79f6adbcef70422"/>
|
33 |
-
</dir>
|
34 |
-
<dir name="Model">
|
35 |
-
<file name="Blockstatic.php" hash="351a05ac0c594f04a6e75d3e6c646dab"/>
|
36 |
-
<file name="Observer.php" hash="cf718b26a3bfae1a032b22ba8c8f080d"/>
|
37 |
-
</dir>
|
38 |
-
<dir name="etc">
|
39 |
-
<file name="config.xml" hash="a4fe892a7d32c508f00360a617d8cf0b"/>
|
40 |
-
<file name="system.xml" hash="e1e8266f5e9c634bb24f45d508793fc4"/>
|
41 |
-
</dir>
|
42 |
-
</dir>
|
43 |
-
</dir>
|
44 |
-
</target>
|
45 |
-
<target name="mageetc">
|
46 |
-
<dir name="modules">
|
47 |
-
<file name="Dexxtz_Storemaintenance.xml" hash="deba2af2c0241c2500b48bc810909d35"/>
|
48 |
-
</dir>
|
49 |
-
</target>
|
50 |
-
<target name="magedesign">
|
51 |
-
<dir name="frontend">
|
52 |
-
<dir name="base">
|
53 |
-
<dir name="default">
|
54 |
-
<dir name="template">
|
55 |
-
<dir name="dexxtz">
|
56 |
-
<file name="store_maintenance.phtml" hash="ceab1b82db46bf62fbe674c6cf95ca72"/>
|
57 |
-
</dir>
|
58 |
-
</dir>
|
59 |
-
</dir>
|
60 |
-
</dir>
|
61 |
-
</dir>
|
62 |
-
</target>
|
63 |
-
<target name="magelocale">
|
64 |
-
<dir name="pt_BR">
|
65 |
-
<file name="Dexxtz_Storemaintenance.csv" hash="6b93ceaef205970438d41dc3b7860b88"/>
|
66 |
-
</dir>
|
67 |
-
<dir name="en_US">
|
68 |
-
<file name="Dexxtz_Storemaintenance.csv" hash="6b93ceaef205970438d41dc3b7860b88"/>
|
69 |
-
</dir>
|
70 |
-
</target>
|
71 |
-
</contents>
|
72 |
<compatible/>
|
73 |
-
<dependencies
|
74 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Dexxtz_Store_maintenance</name>
|
4 |
+
<version>1.1.2</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/apachepl.php">Apache Software License</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>List of email of customers</summary>
|
10 |
+
<description>Easily list the emails of your customers, with filter and export to csv</description>
|
11 |
+
<notes>Started</notes>
|
12 |
+
<authors><author><name>Décio Mattos</name><user>auto-converted</user><email>dexxtz@gmail.com</email></author></authors>
|
13 |
+
<date>2014-10-31</date>
|
14 |
+
<time>20:15:25</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Dexxtz"><dir name="Storemaintenance"><dir name="Block"><dir name="System"><dir name="Config"><dir name="Source"><file name="Enddate.php" hash="c3d12452231e04dd85f0950d887df74b"/><file name="Ip.php" hash="1b9b9487a5120e92f59b56563cc270cd"/><file name="Ipgrid.php" hash="b91529a03aaac0af805795fe42cd8a09"/></dir></dir></dir><file name="Enddate.php" hash="60bd71dace9bfa6cdd14f09e88f72634"/><file name="Ip.php" hash="818c18d5fa9c6526a46d699f1b1a89e9"/><file name="Ipgrid.php" hash="0f29268d966d16d6e749d8a0a1c2fa51"/></dir><dir name="Helper"><file name="Data.php" hash="d8407c911a4fe87ee62bf768201924dd"/></dir><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><file name="Blockstatic.php" hash="c74e25bc360f65209d3284b2c0538c4f"/></dir></dir></dir><file name="Blockstatic.php" hash="351a05ac0c594f04a6e75d3e6c646dab"/><file name="Observer.php" hash="0b7233d5df1f3e2fef335040d2322885"/></dir><dir name="etc"><file name="config.xml" hash="4b7394f3ba189323986aa6a9aa409f33"/><file name="system.xml" hash="06ae20fa9ac70ecea019233e373ae781"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Dexxtz_Storemaintenance.xml" hash="deba2af2c0241c2500b48bc810909d35"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="dexxtz"><dir name="storemaintenance"><file name="maintenance.phtml" hash="a9a3f31955a8d06392520c6078702888"/></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="pt_BR"><file name="Dexxtz_Storemaintenance.csv" hash="df613bf2246c3626ee2c128bc721cc70"/></dir><dir name="en_US"><file name="Dexxtz_Storemaintenance.csv" hash="924cf37f56b8be245f8b460706acdbf5"/></dir></target></contents>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
<compatible/>
|
17 |
+
<dependencies/>
|
18 |
</package>
|