I'm working on a MassAction plugin for Sales/Order using Observer. I cant get the controller route to work.
Here is my etc/config.xml
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<Clubcard_Compressfiles>
<version>1.0.0</version>
</Clubcard_Compressfiles>
</modules>
<adminhtml>
<events>
<adminhtml_block_html_before>
<observers>
<Clubcard_Compressfiles_Model_Observer>
<type>singleton</type>
<class>Clubcard_Compressfiles_Model_Observer</class>
<method>compressfiles</method>
</Clubcard_Compressfiles_Model_Observer>
</observers>
</adminhtml_block_html_before>
</events>
</adminhtml>
<admin>
<routers>
<compress>
<use>admin</use>
<args>
<module>Clubcard_Compressfiles</module>
<frontName>compress</frontName>
</args>
</compress>
</routers>
</admin>
</config>
my folder structure:
- Compressfiles
-- Model / Observer.php
-- Controller / IndexController.php
-- etc / config.xml
Here is my controller - this is where I dont understand how to get the controller URL:
<?php
require_once 'Mage/Adminhtml/controllers/Sales/OrderController.php';
class Clubcard_CompressFiles_Sales_IndexController extends Mage_Adminhtml_Sales_OrderController {
protected function _construct()
{
Mage::log("COMPRESS");
die('it works');
}
public function indexAction() {
Mage::log("COMPRESS");
echo "test2";
}
public function compressAction() {
Mage::log("COMPRESS");
echo "test2";
}
}
?>
No comments:
Post a Comment