Version Notes
Download this release
Release Info
| Developer | Wyomind |
| Extension | Wyomind_OrdersEraser |
| Version | 4.0.7 |
| Comparing to | |
| See all releases | |
Code changes from version 4.0.6 to 4.0.7
- app/code/community/Wyomind/Orderseraser/Model/Observer.php +14 -7
- app/code/community/Wyomind/Orderseraser/Model/Orderseraser.php +7 -4
- app/code/community/Wyomind/Orderseraser/controllers/Adminhtml/OrderseraserController.php +12 -8
- app/code/community/Wyomind/Orderseraser/etc/config.xml +1 -1
- app/code/community/Wyomind/Orderseraser/etc/system.xml +0 -0
- app/code/local/Wyomind/Notificationmanager/Helper/Data.php +0 -7
- app/code/local/Wyomind/Notificationmanager/Model/Adminhtml/System/Config/Form/Field/Extensions.php +0 -70
- app/code/local/Wyomind/Notificationmanager/Model/Adminhtml/System/Config/Form/Field/Link.php +0 -12
- app/code/local/Wyomind/Notificationmanager/Model/Observer.php +0 -134
- app/code/local/Wyomind/Notificationmanager/Model/Resource/Setup.php +0 -41
- app/code/local/Wyomind/Notificationmanager/etc/adminhtml.xml +0 -50
- app/code/local/Wyomind/Notificationmanager/etc/config.xml +0 -79
- app/code/local/Wyomind/Notificationmanager/etc/system.xml +0 -55
- app/etc/modules/Wyomind_Notificationmanager.xml +0 -15
- app/etc/modules/Wyomind_Orderseraser.xml +0 -0
- package.xml +9 -9
app/code/community/Wyomind/Orderseraser/Model/Observer.php
CHANGED
|
@@ -1,8 +1,10 @@
|
|
| 1 |
<?php
|
| 2 |
|
| 3 |
-
class Wyomind_Orderseraser_Model_Observer
|
|
|
|
| 4 |
|
| 5 |
-
public function addActionColumn(Varien_Event_Observer $observer)
|
|
|
|
| 6 |
|
| 7 |
$block = $observer->getEvent()->getBlock();
|
| 8 |
$this->_block = $block;
|
|
@@ -21,7 +23,8 @@ class Wyomind_Orderseraser_Model_Observer {
|
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
-
$block->addColumnAfter(
|
|
|
|
| 25 |
'header' => Mage::helper('sales')->__('Delete'),
|
| 26 |
'width' => '50px',
|
| 27 |
'type' => 'action',
|
|
@@ -30,14 +33,16 @@ class Wyomind_Orderseraser_Model_Observer {
|
|
| 30 |
'filter' => false,
|
| 31 |
'sortable' => false,
|
| 32 |
'is_system' => true,
|
| 33 |
-
|
|
|
|
| 34 |
}
|
| 35 |
}
|
| 36 |
|
| 37 |
return $observer;
|
| 38 |
}
|
| 39 |
|
| 40 |
-
public function addMassAction($observer)
|
|
|
|
| 41 |
|
| 42 |
$block = $observer->getEvent()->getBlock();
|
| 43 |
$this->_block = $block;
|
|
@@ -45,10 +50,12 @@ class Wyomind_Orderseraser_Model_Observer {
|
|
| 45 |
&& $block->getRequest()->getControllerName() == 'sales_order') {
|
| 46 |
|
| 47 |
|
| 48 |
-
$block->addItem(
|
|
|
|
| 49 |
'label' => Mage::helper('sales')->__('Delete'),
|
| 50 |
'url' => $block->getUrl('*/orderseraser/massdelete'),
|
| 51 |
-
|
|
|
|
| 52 |
}
|
| 53 |
}
|
| 54 |
|
| 1 |
<?php
|
| 2 |
|
| 3 |
+
class Wyomind_Orderseraser_Model_Observer
|
| 4 |
+
{
|
| 5 |
|
| 6 |
+
public function addActionColumn(Varien_Event_Observer $observer)
|
| 7 |
+
{
|
| 8 |
|
| 9 |
$block = $observer->getEvent()->getBlock();
|
| 10 |
$this->_block = $block;
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
+
$block->addColumnAfter(
|
| 27 |
+
'Delete', array(
|
| 28 |
'header' => Mage::helper('sales')->__('Delete'),
|
| 29 |
'width' => '50px',
|
| 30 |
'type' => 'action',
|
| 33 |
'filter' => false,
|
| 34 |
'sortable' => false,
|
| 35 |
'is_system' => true,
|
| 36 |
+
), 'status'
|
| 37 |
+
);
|
| 38 |
}
|
| 39 |
}
|
| 40 |
|
| 41 |
return $observer;
|
| 42 |
}
|
| 43 |
|
| 44 |
+
public function addMassAction($observer)
|
| 45 |
+
{
|
| 46 |
|
| 47 |
$block = $observer->getEvent()->getBlock();
|
| 48 |
$this->_block = $block;
|
| 50 |
&& $block->getRequest()->getControllerName() == 'sales_order') {
|
| 51 |
|
| 52 |
|
| 53 |
+
$block->addItem(
|
| 54 |
+
'delete_order', array(
|
| 55 |
'label' => Mage::helper('sales')->__('Delete'),
|
| 56 |
'url' => $block->getUrl('*/orderseraser/massdelete'),
|
| 57 |
+
)
|
| 58 |
+
);
|
| 59 |
}
|
| 60 |
}
|
| 61 |
|
app/code/community/Wyomind/Orderseraser/Model/Orderseraser.php
CHANGED
|
@@ -1,9 +1,11 @@
|
|
| 1 |
<?php
|
| 2 |
|
| 3 |
|
| 4 |
-
class Wyomind_Orderseraser_Model_Orderseraser extends Varien_Object
|
|
|
|
| 5 |
|
| 6 |
-
public function _erase1($orderId)
|
|
|
|
| 7 |
|
| 8 |
$resource = Mage::getSingleton('core/resource');
|
| 9 |
$delete = $resource->getConnection('core_read');
|
|
@@ -28,7 +30,8 @@ class Wyomind_Orderseraser_Model_Orderseraser extends Varien_Object {
|
|
| 28 |
|
| 29 |
return true;
|
| 30 |
}
|
| 31 |
-
|
|
|
|
| 32 |
|
| 33 |
$resource = Mage::getSingleton('core/resource');
|
| 34 |
$delete = $resource->getConnection('core_read');
|
|
@@ -37,7 +40,7 @@ class Wyomind_Orderseraser_Model_Orderseraser extends Varien_Object {
|
|
| 37 |
|
| 38 |
|
| 39 |
$sql = "DELETE FROM " . $tableSfo . " WHERE entity_id = " . $orderId . ";";
|
| 40 |
-
|
| 41 |
$delete->query($sql);
|
| 42 |
$sql = "DELETE FROM " . $tableSfog . " WHERE entity_id = " . $orderId . ";";
|
| 43 |
$delete->query($sql);
|
| 1 |
<?php
|
| 2 |
|
| 3 |
|
| 4 |
+
class Wyomind_Orderseraser_Model_Orderseraser extends Varien_Object
|
| 5 |
+
{
|
| 6 |
|
| 7 |
+
public function _erase1($orderId)
|
| 8 |
+
{
|
| 9 |
|
| 10 |
$resource = Mage::getSingleton('core/resource');
|
| 11 |
$delete = $resource->getConnection('core_read');
|
| 30 |
|
| 31 |
return true;
|
| 32 |
}
|
| 33 |
+
public function _erase2($orderId)
|
| 34 |
+
{
|
| 35 |
|
| 36 |
$resource = Mage::getSingleton('core/resource');
|
| 37 |
$delete = $resource->getConnection('core_read');
|
| 40 |
|
| 41 |
|
| 42 |
$sql = "DELETE FROM " . $tableSfo . " WHERE entity_id = " . $orderId . ";";
|
| 43 |
+
|
| 44 |
$delete->query($sql);
|
| 45 |
$sql = "DELETE FROM " . $tableSfog . " WHERE entity_id = " . $orderId . ";";
|
| 46 |
$delete->query($sql);
|
app/code/community/Wyomind/Orderseraser/controllers/Adminhtml/OrderseraserController.php
CHANGED
|
@@ -1,14 +1,17 @@
|
|
| 1 |
<?php
|
| 2 |
|
| 3 |
-
class Wyomind_Orderseraser_Adminhtml_OrderseraserController extends Mage_Adminhtml_Controller_Action
|
|
|
|
| 4 |
|
| 5 |
-
public function getVersion()
|
|
|
|
| 6 |
return substr(Mage::getVersion(), 0, 3);
|
| 7 |
}
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
-
public function massDeleteAction()
|
|
|
|
| 12 |
|
| 13 |
$orderIds = $this->getRequest()->getPost('order_ids', array());
|
| 14 |
$countDeleteOrder = 0;
|
|
@@ -28,20 +31,21 @@ class Wyomind_Orderseraser_Adminhtml_OrderseraserController extends Mage_Adminht
|
|
| 28 |
|
| 29 |
}
|
| 30 |
|
| 31 |
-
public function deleteAction()
|
|
|
|
| 32 |
|
| 33 |
if ($orderId = $this->getRequest()->getParam('order_id')) {
|
| 34 |
-
|
| 35 |
try {
|
| 36 |
|
| 37 |
if (version_compare(Mage::getVersion(), '1.3.0', '<='))
|
| 38 |
Mage::getModel('orderseraser/orderseraser')->_erase1($orderId);
|
| 39 |
else
|
| 40 |
-
|
| 41 |
-
|
| 42 |
|
| 43 |
$this->_getSession()->addSuccess(
|
| 44 |
-
|
| 45 |
);
|
| 46 |
} catch (Mage_Core_Exception $e) {
|
| 47 |
$this->_getSession()->addError($e->getMessage());
|
| 1 |
<?php
|
| 2 |
|
| 3 |
+
class Wyomind_Orderseraser_Adminhtml_OrderseraserController extends Mage_Adminhtml_Controller_Action
|
| 4 |
+
{
|
| 5 |
|
| 6 |
+
public function getVersion()
|
| 7 |
+
{
|
| 8 |
return substr(Mage::getVersion(), 0, 3);
|
| 9 |
}
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
+
public function massDeleteAction()
|
| 14 |
+
{
|
| 15 |
|
| 16 |
$orderIds = $this->getRequest()->getPost('order_ids', array());
|
| 17 |
$countDeleteOrder = 0;
|
| 31 |
|
| 32 |
}
|
| 33 |
|
| 34 |
+
public function deleteAction()
|
| 35 |
+
{
|
| 36 |
|
| 37 |
if ($orderId = $this->getRequest()->getParam('order_id')) {
|
| 38 |
+
|
| 39 |
try {
|
| 40 |
|
| 41 |
if (version_compare(Mage::getVersion(), '1.3.0', '<='))
|
| 42 |
Mage::getModel('orderseraser/orderseraser')->_erase1($orderId);
|
| 43 |
else
|
| 44 |
+
|
| 45 |
+
Mage::getModel('orderseraser/orderseraser')->_erase2($orderId);
|
| 46 |
|
| 47 |
$this->_getSession()->addSuccess(
|
| 48 |
+
$this->__('Order was successfully deleted.')
|
| 49 |
);
|
| 50 |
} catch (Mage_Core_Exception $e) {
|
| 51 |
$this->_getSession()->addError($e->getMessage());
|
app/code/community/Wyomind/Orderseraser/etc/config.xml
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
<config>
|
| 5 |
<modules>
|
| 6 |
<Wyomind_Orderseraser>
|
| 7 |
-
<version>4.0.
|
| 8 |
</Wyomind_Orderseraser>
|
| 9 |
</modules>
|
| 10 |
<default>
|
| 4 |
<config>
|
| 5 |
<modules>
|
| 6 |
<Wyomind_Orderseraser>
|
| 7 |
+
<version>4.0.7</version>
|
| 8 |
</Wyomind_Orderseraser>
|
| 9 |
</modules>
|
| 10 |
<default>
|
app/code/community/Wyomind/Orderseraser/etc/system.xml
CHANGED
|
File without changes
|
app/code/local/Wyomind/Notificationmanager/Helper/Data.php
DELETED
|
@@ -1,7 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
class Wyomind_Notificationmanager_Helper_Data extends Mage_Core_Helper_Data
|
| 4 |
-
{
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Wyomind/Notificationmanager/Model/Adminhtml/System/Config/Form/Field/Extensions.php
DELETED
|
@@ -1,70 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
class Wyomind_Notificationmanager_Model_Adminhtml_System_Config_Form_Field_Extensions {
|
| 4 |
-
|
| 5 |
-
public function XML2Array($xml) {
|
| 6 |
-
$newArray = array();
|
| 7 |
-
$array = (array) $xml;
|
| 8 |
-
foreach ($array as $key => $value) {
|
| 9 |
-
$value = (array) $value;
|
| 10 |
-
if (isset($value [0])) {
|
| 11 |
-
$newArray [$key] = trim($value [0]);
|
| 12 |
-
} else {
|
| 13 |
-
$newArray [$key] = $this->XML2Array($value, true);
|
| 14 |
-
}
|
| 15 |
-
}
|
| 16 |
-
return $newArray;
|
| 17 |
-
}
|
| 18 |
-
|
| 19 |
-
public function toOptionArray() {
|
| 20 |
-
$dir = "app/code/local/Wyomind/";
|
| 21 |
-
$ret = array();
|
| 22 |
-
if (is_dir($dir)) {
|
| 23 |
-
if (($dh = opendir($dir)) != false) {
|
| 24 |
-
while (($file = readdir($dh)) !== false) {
|
| 25 |
-
if (is_dir($dir . $file) && $file != "." && $file != ".." && $file != "Notificationmanager") {
|
| 26 |
-
if (is_file($dir . $file . '/etc/system.xml')) {
|
| 27 |
-
$xml = simplexml_load_file($dir . $file . '/etc/system.xml');
|
| 28 |
-
$namespace = strtolower($file);
|
| 29 |
-
$label = $this->XML2Array($xml);
|
| 30 |
-
$label = $label['sections'][$namespace]['label'];
|
| 31 |
-
|
| 32 |
-
$enabled = Mage::getConfig()->getModuleConfig('Wyomind_' . ucfirst($namespace))->is('active', 'true');
|
| 33 |
-
|
| 34 |
-
if ($enabled)
|
| 35 |
-
$ret[] = array('label' => $label, 'value' => $file);
|
| 36 |
-
}
|
| 37 |
-
}
|
| 38 |
-
}
|
| 39 |
-
closedir($dh);
|
| 40 |
-
}
|
| 41 |
-
}
|
| 42 |
-
|
| 43 |
-
$dir = "app/code/community/Wyomind/";
|
| 44 |
-
if (is_dir($dir)) {
|
| 45 |
-
if (($dh = opendir($dir)) != false) {
|
| 46 |
-
while (($file = readdir($dh)) !== false) {
|
| 47 |
-
if (is_dir($dir . $file) && $file != "." && $file != "..") {
|
| 48 |
-
if (is_file($dir . $file . '/etc/system.xml')) {
|
| 49 |
-
$xml = simplexml_load_file($dir . $file . '/etc/system.xml');
|
| 50 |
-
$namespace = strtolower($file);
|
| 51 |
-
$label = $this->XML2Array($xml);
|
| 52 |
-
if (isset($label['sections'][$namespace])) {
|
| 53 |
-
$label = $label['sections'][$namespace]['label'];
|
| 54 |
-
|
| 55 |
-
$enabled = Mage::getConfig()->getModuleConfig('Wyomind_' . ucfirst($namespace))->is('active', 'true');
|
| 56 |
-
if ($label == null)
|
| 57 |
-
$label = ucfirst($namespace);
|
| 58 |
-
if ($enabled)
|
| 59 |
-
$ret[] = array('label' => $label, 'value' => $file);
|
| 60 |
-
}
|
| 61 |
-
}
|
| 62 |
-
}
|
| 63 |
-
}
|
| 64 |
-
closedir($dh);
|
| 65 |
-
}
|
| 66 |
-
}
|
| 67 |
-
return $ret;
|
| 68 |
-
}
|
| 69 |
-
|
| 70 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Wyomind/Notificationmanager/Model/Adminhtml/System/Config/Form/Field/Link.php
DELETED
|
@@ -1,12 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
class Wyomind_Notificationmanager_Model_Adminhtml_System_Config_Form_Field_Link extends Mage_Adminhtml_Block_System_Config_Form_Field {
|
| 4 |
-
|
| 5 |
-
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
|
| 6 |
-
|
| 7 |
-
$html = '<a id="' . $element->getHtmlId() . '" ' . $element->serialize($element->getHtmlAttributes()) . '>' . $element->getEscapedValue() . "</a>\n";
|
| 8 |
-
$html.= $element->getAfterElementHtml();
|
| 9 |
-
return $html;
|
| 10 |
-
}
|
| 11 |
-
|
| 12 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Wyomind/Notificationmanager/Model/Observer.php
DELETED
|
@@ -1,134 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
class Wyomind_Notificationmanager_FeedReader extends Mage_AdminNotification_Model_Feed {
|
| 4 |
-
|
| 5 |
-
public function getFeedUrl() {
|
| 6 |
-
|
| 7 |
-
Mage::getSingleton('admin/session')->getData();
|
| 8 |
-
$url = Mage::getStoreConfig("web/secure/base_url");
|
| 9 |
-
$version = Mage::getConfig()->getNode("modules/Wyomind_Notificationmanager")->version;
|
| 10 |
-
|
| 11 |
-
$lastcheck = $this->getLastUpdate();
|
| 12 |
-
|
| 13 |
-
$rss_url = 'rss.wyomind.com';
|
| 14 |
-
|
| 15 |
-
return "http://$rss_url/?domain=$url&version=$version&lastcheck=$lastcheck&now=" . time();
|
| 16 |
-
}
|
| 17 |
-
|
| 18 |
-
public function getLastUpdate() {
|
| 19 |
-
return Mage::getStoreConfig("notificationmanager/notificationmanager/lastcheck");
|
| 20 |
-
}
|
| 21 |
-
|
| 22 |
-
public function setLastUpdate() {
|
| 23 |
-
Mage::getConfig()->saveConfig("notificationmanager/notificationmanager/lastcheck", time(), "default", "0");
|
| 24 |
-
Mage::getConfig()->cleanCache();
|
| 25 |
-
return $this;
|
| 26 |
-
}
|
| 27 |
-
|
| 28 |
-
}
|
| 29 |
-
|
| 30 |
-
class Wyomind_Notificationmanager_Item {
|
| 31 |
-
|
| 32 |
-
const SEVERITY_CRITICAL = 1;
|
| 33 |
-
const SEVERITY_MAJOR = 2;
|
| 34 |
-
const SEVERITY_MINOR = 3;
|
| 35 |
-
const SEVERITY_NOTICE = 4;
|
| 36 |
-
|
| 37 |
-
var $pubDate = 0;
|
| 38 |
-
var $title = "";
|
| 39 |
-
var $description = "";
|
| 40 |
-
var $severity = Wyomind_Notificationmanager_Item::SEVERITY_NOTICE;
|
| 41 |
-
var $link = "";
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
public function setPubDate($date) {
|
| 45 |
-
$this->pubDate = $date;
|
| 46 |
-
}
|
| 47 |
-
|
| 48 |
-
public function setTitle($title) {
|
| 49 |
-
$this->title = $title;
|
| 50 |
-
}
|
| 51 |
-
|
| 52 |
-
public function setDescription($desc) {
|
| 53 |
-
$this->description = $desc;
|
| 54 |
-
}
|
| 55 |
-
|
| 56 |
-
public function setSeverity($sev) {
|
| 57 |
-
$this->severity = $sev;
|
| 58 |
-
}
|
| 59 |
-
|
| 60 |
-
public function setLink($link) {
|
| 61 |
-
$this->link = $link;
|
| 62 |
-
}
|
| 63 |
-
|
| 64 |
-
public function getPubDate() {
|
| 65 |
-
return $this->pubDate;
|
| 66 |
-
}
|
| 67 |
-
|
| 68 |
-
public function getDescription() {
|
| 69 |
-
return $this->description;
|
| 70 |
-
}
|
| 71 |
-
|
| 72 |
-
public function getTitle() {
|
| 73 |
-
return $this->title;
|
| 74 |
-
}
|
| 75 |
-
|
| 76 |
-
public function getSeverity() {
|
| 77 |
-
return $this->severity;
|
| 78 |
-
}
|
| 79 |
-
|
| 80 |
-
public function getLink() {
|
| 81 |
-
return $this->link;
|
| 82 |
-
}
|
| 83 |
-
|
| 84 |
-
public function toNotifier() {
|
| 85 |
-
$notify = Mage::getModel('adminnotification/inbox');
|
| 86 |
-
$notify->setUrl($this->getLink());
|
| 87 |
-
$notify->setDescription($this->getDescription());
|
| 88 |
-
$notify->setTitle($this->getTitle());
|
| 89 |
-
$notify->setSeverity($this->getSeverity());
|
| 90 |
-
$notify->setDateAdded($this->getPubDate());
|
| 91 |
-
$notify->save();
|
| 92 |
-
}
|
| 93 |
-
|
| 94 |
-
}
|
| 95 |
-
|
| 96 |
-
class Wyomind_Notificationmanager_Model_Observer {
|
| 97 |
-
|
| 98 |
-
public function observe($user) {
|
| 99 |
-
|
| 100 |
-
$model = new Wyomind_Notificationmanager_FeedReader();
|
| 101 |
-
|
| 102 |
-
$date = $model->getLastUpdate();
|
| 103 |
-
|
| 104 |
-
if (time() - $date > 24 * 60 * 60 || Mage::getStoreConfig("notificationmanager/notificationmanager/action_required") == 1) {
|
| 105 |
-
Mage::getConfig()->saveConfig("notificationmanager/notificationmanager/action_required", "0", "default", "0");
|
| 106 |
-
$exts = Mage::getStoreConfig("notificationmanager/notificationmanager/extensions");
|
| 107 |
-
$exts = $exts != null ? explode(',', $exts) : array();
|
| 108 |
-
if ($date != "") {
|
| 109 |
-
//$model->checkUpdate();
|
| 110 |
-
$rss = $model->getFeedData();
|
| 111 |
-
if ($rss != NULL) {
|
| 112 |
-
$items = $rss->xpath('/rss/channel/item');
|
| 113 |
-
if ($items) {
|
| 114 |
-
foreach ($items as $item) {
|
| 115 |
-
$infos = $item->children();
|
| 116 |
-
$notification = new Wyomind_Notificationmanager_Item();
|
| 117 |
-
$notification->setTitle($infos->title);
|
| 118 |
-
$notification->setLink($infos->link);
|
| 119 |
-
$notification->setSeverity($infos->severity);
|
| 120 |
-
$notification->setDescription($infos->description);
|
| 121 |
-
$notification->setPubDate(date('Y-m-d H:i:s', (int) $infos->pubDate));
|
| 122 |
-
|
| 123 |
-
if ($infos->identifier == "Global" || (in_array($infos->identifier, $exts) && Mage::getConfig()->getModuleConfig('Wyomind_' . $infos->identifier)->is('active', 'true'))) {
|
| 124 |
-
$notification->toNotifier();
|
| 125 |
-
}
|
| 126 |
-
}
|
| 127 |
-
}
|
| 128 |
-
}
|
| 129 |
-
}
|
| 130 |
-
$model->setLastUpdate();
|
| 131 |
-
}
|
| 132 |
-
}
|
| 133 |
-
|
| 134 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Wyomind/Notificationmanager/Model/Resource/Setup.php
DELETED
|
@@ -1,41 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
|
| 3 |
-
class Wyomind_Notificationmanager_Model_Resource_Setup extends Mage_Core_Model_Resource_Setup
|
| 4 |
-
{
|
| 5 |
-
public function applyUpdates()
|
| 6 |
-
{
|
| 7 |
-
if (!Mage::isInstalled()) {
|
| 8 |
-
$dir = "app/code/local/Wyomind/";
|
| 9 |
-
$ret = array();
|
| 10 |
-
if (is_dir($dir)) {
|
| 11 |
-
if (($dh = opendir($dir)) != false) {
|
| 12 |
-
while (($file = readdir($dh)) !== false) {
|
| 13 |
-
if (is_dir($dir.$file) && $file != "." && $file != "..") {
|
| 14 |
-
$enabled = Mage::getConfig()->getModuleConfig('Wyomind_'.ucfirst($namespace = strtolower($file)))->is('active', 'true');
|
| 15 |
-
if ($enabled)
|
| 16 |
-
$ret[] = $file;
|
| 17 |
-
}
|
| 18 |
-
}
|
| 19 |
-
closedir($dh);
|
| 20 |
-
}
|
| 21 |
-
}
|
| 22 |
-
$dir = "app/code/community/Wyomind/";
|
| 23 |
-
if (is_dir($dir)) {
|
| 24 |
-
if (($dh = opendir($dir)) != false) {
|
| 25 |
-
while (($file = readdir($dh)) !== false) {
|
| 26 |
-
if (is_dir($dir.$file) && $file != "." && $file != "..") {
|
| 27 |
-
$enabled = Mage::getConfig()->getModuleConfig('Wyomind_'.ucfirst($namespace = strtolower($file)))->is('active', 'true');
|
| 28 |
-
if ($enabled)
|
| 29 |
-
$ret[] = $file;
|
| 30 |
-
}
|
| 31 |
-
}
|
| 32 |
-
closedir($dh);
|
| 33 |
-
}
|
| 34 |
-
}
|
| 35 |
-
Mage::getConfig()->saveConfig("notificationmanager/notificationmanager/extensions",implode(',',$ret), "default", "0");
|
| 36 |
-
Mage::getConfig()->cleanCache();
|
| 37 |
-
}
|
| 38 |
-
|
| 39 |
-
return parent::applyUpdates();
|
| 40 |
-
}
|
| 41 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Wyomind/Notificationmanager/etc/adminhtml.xml
DELETED
|
@@ -1,50 +0,0 @@
|
|
| 1 |
-
<?xml version="1.0"?>
|
| 2 |
-
<config>
|
| 3 |
-
|
| 4 |
-
<acl>
|
| 5 |
-
<resources>
|
| 6 |
-
<admin>
|
| 7 |
-
<children>
|
| 8 |
-
<catalog>
|
| 9 |
-
<children>
|
| 10 |
-
<notificationmanager translate="title" module="notificationmanager">
|
| 11 |
-
<title>Notification manager</title>
|
| 12 |
-
</notificationmanager>
|
| 13 |
-
</children>
|
| 14 |
-
</catalog>
|
| 15 |
-
<system>
|
| 16 |
-
<children>
|
| 17 |
-
<config>
|
| 18 |
-
<children>
|
| 19 |
-
<notificationmanager>
|
| 20 |
-
<title>Notification manager</title>
|
| 21 |
-
</notificationmanager>
|
| 22 |
-
</children>
|
| 23 |
-
</config>
|
| 24 |
-
</children>
|
| 25 |
-
</system>
|
| 26 |
-
</children>
|
| 27 |
-
</admin>
|
| 28 |
-
</resources>
|
| 29 |
-
</acl>
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
<translate>
|
| 34 |
-
<modules>
|
| 35 |
-
<Wyomind_Notificationmanager>
|
| 36 |
-
<files>
|
| 37 |
-
<default>Wyomind_Notificationmanager.csv</default>
|
| 38 |
-
</files>
|
| 39 |
-
</Wyomind_Notificationmanager>
|
| 40 |
-
</modules>
|
| 41 |
-
</translate>
|
| 42 |
-
<layout>
|
| 43 |
-
<updates>
|
| 44 |
-
<notificationmanager>
|
| 45 |
-
<file>notificationmanager.xml</file>
|
| 46 |
-
</notificationmanager>
|
| 47 |
-
</updates>
|
| 48 |
-
</layout>
|
| 49 |
-
|
| 50 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Wyomind/Notificationmanager/etc/config.xml
DELETED
|
@@ -1,79 +0,0 @@
|
|
| 1 |
-
<?xml version="1.0"?>
|
| 2 |
-
<!--
|
| 3 |
-
/**
|
| 4 |
-
* @category Wyomind
|
| 5 |
-
* @package Wyomind_Notificationmanager
|
| 6 |
-
* @license http://Wyomind.com
|
| 7 |
-
*/
|
| 8 |
-
-->
|
| 9 |
-
<config>
|
| 10 |
-
<modules>
|
| 11 |
-
<Wyomind_Notificationmanager>
|
| 12 |
-
<version>2.0.1</version>
|
| 13 |
-
</Wyomind_Notificationmanager>
|
| 14 |
-
</modules>
|
| 15 |
-
<default>
|
| 16 |
-
<notificationmanager>
|
| 17 |
-
<notificationmanager>
|
| 18 |
-
<version>2.0.1</version>
|
| 19 |
-
<action_required>1</action_required>
|
| 20 |
-
</notificationmanager>
|
| 21 |
-
</notificationmanager>
|
| 22 |
-
</default>
|
| 23 |
-
<frontend>
|
| 24 |
-
<routers>
|
| 25 |
-
<notificationmanager>
|
| 26 |
-
<use>standard</use>
|
| 27 |
-
<args>
|
| 28 |
-
<module>Wyomind_Notificationmanager</module>
|
| 29 |
-
<frontName>notificationmanager</frontName>
|
| 30 |
-
</args>
|
| 31 |
-
</notificationmanager>
|
| 32 |
-
</routers>
|
| 33 |
-
</frontend>
|
| 34 |
-
|
| 35 |
-
<global>
|
| 36 |
-
<resources>
|
| 37 |
-
<notificationmanager_setup>
|
| 38 |
-
<setup>
|
| 39 |
-
<module>Wyomind_Notificationmanager</module>
|
| 40 |
-
<class>Wyomind_Notificationmanager_Model_Resource_Setup</class>
|
| 41 |
-
</setup>
|
| 42 |
-
<connection>
|
| 43 |
-
<use>core_setup</use>
|
| 44 |
-
</connection>
|
| 45 |
-
</notificationmanager_setup>
|
| 46 |
-
<notificationmanager_write>
|
| 47 |
-
<connection>
|
| 48 |
-
<use>core_write</use>
|
| 49 |
-
</connection>
|
| 50 |
-
</notificationmanager_write>
|
| 51 |
-
<notificationmanager_read>
|
| 52 |
-
<connection>
|
| 53 |
-
<use>core_read</use>
|
| 54 |
-
</connection>
|
| 55 |
-
</notificationmanager_read>
|
| 56 |
-
</resources>
|
| 57 |
-
<helpers>
|
| 58 |
-
<notificationmanager>
|
| 59 |
-
<class>Wyomind_Notificationmanager_Helper</class>
|
| 60 |
-
</notificationmanager>
|
| 61 |
-
</helpers>
|
| 62 |
-
<models>
|
| 63 |
-
<notificationmanager>
|
| 64 |
-
<class>Wyomind_Notificationmanager_Model</class>
|
| 65 |
-
</notificationmanager>
|
| 66 |
-
</models>
|
| 67 |
-
<events>
|
| 68 |
-
<admin_session_user_login_success>
|
| 69 |
-
<observers>
|
| 70 |
-
<wyomind_notificationmanager_observer>
|
| 71 |
-
<type>singleton</type>
|
| 72 |
-
<class>notificationmanager/observer</class>
|
| 73 |
-
<method>observe</method>
|
| 74 |
-
</wyomind_notificationmanager_observer>
|
| 75 |
-
</observers>
|
| 76 |
-
</admin_session_user_login_success>
|
| 77 |
-
</events>
|
| 78 |
-
</global>
|
| 79 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Wyomind/Notificationmanager/etc/system.xml
DELETED
|
@@ -1,55 +0,0 @@
|
|
| 1 |
-
<?xml version="1.0"?>
|
| 2 |
-
<config>
|
| 3 |
-
<tabs>
|
| 4 |
-
<WYOMIND translate="label">
|
| 5 |
-
<label>WYOMIND</label>
|
| 6 |
-
<sort_order>1000000</sort_order>
|
| 7 |
-
</WYOMIND>
|
| 8 |
-
</tabs>
|
| 9 |
-
<sections>
|
| 10 |
-
<notificationmanager translate="label">
|
| 11 |
-
<label>Notification Manager</label>
|
| 12 |
-
<tab>WYOMIND</tab>
|
| 13 |
-
<frontend_type>text</frontend_type>
|
| 14 |
-
<sort_order>999</sort_order>
|
| 15 |
-
<show_in_default>1</show_in_default>
|
| 16 |
-
<show_in_website>1</show_in_website>
|
| 17 |
-
<show_in_store>1</show_in_store>
|
| 18 |
-
<groups>
|
| 19 |
-
<notificationmanager translate="label">
|
| 20 |
-
<label>Notification Manager</label>
|
| 21 |
-
<frontend_type>text</frontend_type>
|
| 22 |
-
<sort_order>100</sort_order>
|
| 23 |
-
<show_in_default>1</show_in_default>
|
| 24 |
-
<show_in_website>1</show_in_website>
|
| 25 |
-
<show_in_store>1</show_in_store>
|
| 26 |
-
<fields>
|
| 27 |
-
<version translate="label comment">
|
| 28 |
-
<label>Version</label>
|
| 29 |
-
<frontend_type>text</frontend_type>
|
| 30 |
-
<frontend_model>Wyomind_Notificationmanager_Model_Adminhtml_System_Config_Form_Field_Link</frontend_model>
|
| 31 |
-
<sort_order>2</sort_order>
|
| 32 |
-
<show_in_default>1</show_in_default>
|
| 33 |
-
<show_in_website>0</show_in_website>
|
| 34 |
-
<show_in_store>0</show_in_store>
|
| 35 |
-
</version>
|
| 36 |
-
<extensions translate="label comment">
|
| 37 |
-
<label>Receive notifications for</label>
|
| 38 |
-
<frontend_type>multiselect</frontend_type>
|
| 39 |
-
<source_model>notificationmanager/adminhtml_system_config_form_field_extensions</source_model>
|
| 40 |
-
<sort_order>3</sort_order>
|
| 41 |
-
<show_in_default>1</show_in_default>
|
| 42 |
-
<show_in_website>0</show_in_website>
|
| 43 |
-
<show_in_store>0</show_in_store>
|
| 44 |
-
</extensions>
|
| 45 |
-
|
| 46 |
-
</fields>
|
| 47 |
-
</notificationmanager>
|
| 48 |
-
</groups>
|
| 49 |
-
</notificationmanager>
|
| 50 |
-
</sections>
|
| 51 |
-
</config>
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/etc/modules/Wyomind_Notificationmanager.xml
DELETED
|
@@ -1,15 +0,0 @@
|
|
| 1 |
-
<?xml version="1.0"?>
|
| 2 |
-
<!--
|
| 3 |
-
/**
|
| 4 |
-
* @package
|
| 5 |
-
*/
|
| 6 |
-
-->
|
| 7 |
-
<config>
|
| 8 |
-
<modules>
|
| 9 |
-
<Wyomind_Notificationmanager>
|
| 10 |
-
<active>true</active>
|
| 11 |
-
<codePool>local</codePool>
|
| 12 |
-
<version>2.0.0</version>
|
| 13 |
-
</Wyomind_Notificationmanager>
|
| 14 |
-
</modules>
|
| 15 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/etc/modules/Wyomind_Orderseraser.xml
CHANGED
|
File without changes
|
package.xml
CHANGED
|
@@ -1,18 +1,18 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Wyomind_OrdersEraser</name>
|
| 4 |
-
<version>4.0.
|
| 5 |
<stability>stable</stability>
|
| 6 |
-
<license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
-
<summary>
|
| 10 |
-
<description>
|
| 11 |
-
<notes
|
| 12 |
-
<authors><author><name>Wyomind</name><user>
|
| 13 |
-
<date>2016-09-
|
| 14 |
-
<time>
|
| 15 |
-
<contents><target name="magecommunity"><dir
|
| 16 |
<compatible/>
|
| 17 |
<dependencies><required><php><min>5.0.0</min><max>8.0.0</max></php></required></dependencies>
|
| 18 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Wyomind_OrdersEraser</name>
|
| 4 |
+
<version>4.0.7</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
+
<license>Commercial</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
+
<summary>Wyomind Ordereraser extension</summary>
|
| 10 |
+
<description>Wyomind Ordereraser extension</description>
|
| 11 |
+
<notes></notes>
|
| 12 |
+
<authors><author><name>Wyomind</name><user>Ordereraser</user><email>contact@wyomind.com</email></author></authors>
|
| 13 |
+
<date>2016-09-03</date>
|
| 14 |
+
<time>10:09:06</time>
|
| 15 |
+
<contents><target name="magecommunity"><dir name="Wyomind"><dir name="Orderseraser"><dir name="Model"><file name="Observer.php" hash="3502ba12ec9db93bcf2edab9d157569d"/><file name="Orderseraser.php" hash="5086b04113bcf87e8f94aff5ea066455"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="OrderseraserController.php" hash="98a8eb52d70299022078e10eee28d66a"/></dir></dir><dir name="etc"><file name="config.xml" hash="3f25b6b7370da48e1fedf7be48c9f0d9"/><file name="system.xml" hash="8d37d12b5d8c5673eff53db06569ae8d"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Wyomind_Orderseraser.xml" hash="21f24202ef69e71be030f0ebd62ab7f2"/></dir></target></contents>
|
| 16 |
<compatible/>
|
| 17 |
<dependencies><required><php><min>5.0.0</min><max>8.0.0</max></php></required></dependencies>
|
| 18 |
</package>
|
