BlockThatProxy - Version 1.1

Version Notes

First release of the BlockThatProxy.com extension. This includes the script from www.blockthatproxy.com that sends out email warnings if a proxy or blacklisted IP is detected.

Download this release

Release Info

Developer Magento Core Team
Extension BlockThatProxy
Version 1.1
Comparing to
See all releases


Code changes from version 1.0 to 1.1

app/code/local/BlockThatProxy/Proxy/Adminhtml/Block/Page.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class BlockThatProxy_Proxy_Adminhtml_Block_Page extends Mage_Adminhtml_Block_Template
4
+ {
5
+ public function __construct()
6
+ {
7
+ parent::__construct();
8
+ // get the original theme
9
+ $origTheme = Mage::getDesign()->getTheme('default');
10
+ }
11
+ }
app/code/local/BlockThatProxy/Proxy/Adminhtml/Block/System/Config/Edit.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class BlockThatProxy_Proxy_Adminhtml_Block_System_Config_Edit extends Mage_Adminhtml_Block_System_Config_Edit
3
+ {
4
+ const DEFAULT_SECTION_BLOCK = 'adminhtml/system_config_form';
5
+
6
+ protected $_section;
7
+
8
+ public function __construct()
9
+ {
10
+ parent::__construct();
11
+ $this->setTemplate('system/config/edit.phtml');
12
+
13
+ $sectionCode = $this->getRequest()->getParam('section');
14
+ $sections = Mage::getSingleton('adminhtml/config')->getSections();
15
+
16
+ $this->_section = $sections->$sectionCode;
17
+
18
+ $this->setTitle((string)$this->_section->label);
19
+ }
20
+
21
+ protected function _prepareLayout()
22
+ {
23
+ $this->setChild('save_button',
24
+ $this->getLayout()->createBlock('adminhtml/widget_button')
25
+ ->setData(array(
26
+ 'label' => Mage::helper('adminhtml')->__('Save Config'),
27
+ 'onclick' => 'configForm.submit()',
28
+ 'class' => 'save',
29
+ ))
30
+ );
31
+
32
+ return parent::_prepareLayout();
33
+ }
34
+
35
+ public function getSaveButtonHtml()
36
+ {
37
+ return $this->getChildHtml('save_button');
38
+ }
39
+
40
+ public function getSaveUrl()
41
+ {
42
+ return $this->getUrl('*/*/save', array('_current' => true));
43
+ }
44
+
45
+ public function initForm()
46
+ {
47
+ $blockName = (string)$this->_section->frontend_model;
48
+ if (empty($blockName)) {
49
+ $blockName = self::DEFAULT_SECTION_BLOCK;
50
+ }
51
+ $this->setChild('form',
52
+ $this->getLayout()
53
+ ->createBlock($blockName)
54
+ ->initForm()
55
+ );
56
+ return $this;
57
+ }
58
+
59
+ }
app/code/local/BlockThatProxy/Proxy/Block/Feed.php ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class BlockThatProxy_Proxy_Block_Feed extends Mage_Core_Block_Template
3
+ {
4
+ public function retrieveFeed($orderId)
5
+ {
6
+
7
+ $ip=$_SERVER['REMOTE_ADDR'];
8
+ //$returnvalue=$this->check4proxy($data[0]['value']);
9
+ $XML_hashKey= 'Proxy/feed/blockthatproxy_hashkey';
10
+ $XML_bodyMess='Proxy/feed/blockthatproxy_message';
11
+ $XML_bodySub='Proxy/feed/blockthatproxy_subject';
12
+ $XML_PATH_EMAIL_RECIPIENT = 'Proxy/feed/blockthatproxy_toemail';
13
+ $XML_PATH_EMAIL_SENDER = 'Proxy/feed/blockthatproxy_fromemail';
14
+ /***************************************************************/
15
+
16
+ $senderemail=Mage::getStoreConfig($XML_PATH_EMAIL_SENDER);
17
+ $Recieveremail=Mage::getStoreConfig($XML_PATH_EMAIL_RECIPIENT);
18
+
19
+ $bodyMess=Mage::getStoreConfig($XML_bodyMess);
20
+ $mailSub=Mage::getStoreConfig($XML_bodySub);
21
+ $hashKey=Mage::getStoreConfig($XML_hashKey);
22
+
23
+ $bodyMess=str_replace("[ORDERID]",$orderId,$bodyMess);
24
+
25
+ $bodyMess=str_replace("[IP]",$ip,$bodyMess);
26
+
27
+
28
+ /**************************************************************/
29
+
30
+ $returnvalue=$this->check4proxy($hashKey);
31
+
32
+ if($returnvalue==true)
33
+ {
34
+
35
+ $mail = new Zend_Mail();
36
+ $mail->setBodyText($bodyMess);
37
+
38
+ $mail->setFrom($senderemail);
39
+
40
+ $mail->addTo($Recieveremail, 'BlockThatProxy');
41
+ $mail->setSubject($mailSub);
42
+ try {
43
+ $mail->send();
44
+ }
45
+ catch(Exception $ex) {
46
+ Mage::getSingleton('core/session')->addError('Unable to send email.');
47
+
48
+ }
49
+ }
50
+
51
+ }
52
+ function check4proxy($hash)
53
+ {
54
+ $headers = array();
55
+ foreach(array_keys($_SERVER) as $skey){
56
+ $headers[$skey] = $_SERVER[$skey];
57
+ }
58
+ $header_str='';
59
+ foreach ($headers as $header => $value)
60
+ {
61
+
62
+ if ($header == "REMOTE_ADDR")
63
+ {
64
+ $ip = "ip=".$value;
65
+ }
66
+ $header_str .= $header."=".$value."~\n";
67
+ }
68
+ $post_string = "data=".urlencode($header_str)."&".$ip."&hash=".$hash;
69
+
70
+ $ch = curl_init();
71
+ curl_setopt($ch, CURLOPT_URL, "http://www.blockthatproxy.com/detect.aspx");
72
+ curl_setopt($ch, CURLOPT_POST, 1);
73
+ curl_setopt($ch, CURLOPT_POSTFIELDS, $post_string);
74
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
75
+ curl_setopt($ch, CURLOPT_USERAGENT, "");
76
+ curl_setopt($ch, CURLOPT_TIMEOUT, 15);
77
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
78
+ curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
79
+ curl_setopt($ch, CURLOPT_HEADER, true);
80
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
81
+ $contents = curl_exec($ch);
82
+ curl_close($ch);
83
+
84
+ $proxy_level = intval(substr($contents, -2));
85
+ echo $proxy_level;
86
+ if ($proxy_level > 3)
87
+ return true;
88
+ else
89
+ return false;
90
+ }
91
+
92
+
93
+
94
+ }
app/code/local/BlockThatProxy/Proxy/Block/Index.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class BlockThatProxy_Proxy_Block_Index extends Mage_Core_Block_Template{
3
+
4
+ protected function _gethashkey()
5
+ {
6
+
7
+
8
+ $sql = "SELECT * FROM core_config_data WHERE path='Proxy/feed/blockthatproxy_hashkey'";
9
+ $data = Mage::getSingleton('core/resource') ->getConnection('core_read')->fetchAll($sql);
10
+ print_r($data);
11
+
12
+
13
+ /*if (!$this->getData('product') instanceof Mage_Catalog_Model_Product) {
14
+
15
+
16
+ $hashkey = Mage::getModel('proxy/proxy')->load();
17
+
18
+
19
+ }*/
20
+ return $hashkey;
21
+ }
22
+
23
+
24
+
25
+
26
+ }
app/code/local/BlockThatProxy/Proxy/Block/left.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class BlockThatProxy_Proxy_Block_left extends Mage_Core_Block_Template{
3
+
4
+
5
+
6
+
7
+
8
+ }
app/code/local/BlockThatProxy/Proxy/Helper/Data.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+
3
+ class BlockThatProxy_Proxy_Helper_Data extends Mage_Core_Helper_Abstract
4
+ {
5
+ }
app/code/local/BlockThatProxy/Proxy/Model/Feed.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class BlockThatProxy_Proxy_Model_Feed extends Mage_Core_Model_Abstract
4
+ {
5
+ protected $_model = NULL;
6
+
7
+ protected function _construct()
8
+ {
9
+ $this->_model = 'Proxy/feed';
10
+ $this->_init($this->_model);
11
+ }
12
+
13
+ /**
14
+ * A simple delete all method.
15
+ */
16
+ public function deleteAll()
17
+ {
18
+ // note that the item couldn't be deleted.
19
+ Mage::log(
20
+ "Attempting to clear the cache",
21
+ Zend_Log::INFO
22
+ );
23
+
24
+ $collection = Mage::getModel('Proxy/feed')->getCollection();
25
+
26
+ foreach ($collection as $ProxyItem) {
27
+ try {
28
+ $ProxyItem->delete();
29
+ } catch (Exception $e) {
30
+ Mage::log(
31
+ sprintf("Couldn't delete record. [%s]", var_export($_item, TRUE)),
32
+ Zend_Log::ERR
33
+ );
34
+ }
35
+ }
36
+ }
37
+ }
app/code/local/BlockThatProxy/Proxy/Model/MySql14/Proxy.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class BlockIP_Proxy_Model_Mysql4_Proxy extends Mage_Core_Model_Mysql4_Abstract
4
+
5
+ {
6
+
7
+ public function _construct()
8
+
9
+ {
10
+
11
+ $this->_init('proxy/proxy', 'proxy_id');
12
+
13
+ }
14
+
15
+ }
app/code/local/BlockThatProxy/Proxy/Model/MySql14/Proxy/Collection.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class BlockIP_Proxy_Model_Mysql4_Proxy_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
+
5
+ {
6
+
7
+ public function _construct()
8
+
9
+ {
10
+
11
+ //parent::__construct();
12
+
13
+ $this->_init('proxy/proxy');
14
+
15
+ }
16
+
17
+ }
app/code/local/BlockThatProxy/Proxy/Model/Mysql4/Feed.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class BlockThatProxy_Proxy_Model_Mysql4_Feed extends Mage_Core_Model_Mysql4_Abstract
4
+ {
5
+ protected function _construct()
6
+ {
7
+ $this->_init('Proxy/feed', 'item_id');
8
+ }
9
+ }
app/code/local/BlockThatProxy/Proxy/Model/Mysql4/Feed/Collection.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class BlockThatProxy_Proxy_Model_Mysql4_Feed_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
+ {
5
+ protected function _construct()
6
+ {
7
+ parent::_construct();
8
+ $this->_init('Proxy/feed');
9
+ }
10
+
11
+ }
app/code/local/BlockThatProxy/Proxy/Model/Observer.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ Zend_Loader::loadClass('Zend_Service_Flickr');
4
+
5
+ class BlockThatProxy_Proxy_Model_Observer
6
+ {
7
+ protected $_flickrApiKey = NULL;
8
+ protected $_userEmailAddress = NULL;
9
+
10
+ public function __construct()
11
+ {
12
+ // the flickr api key from the module config
13
+ $this->_flickrApiKey = Mage::getStoreConfig('Proxy/feed/blockthatproxy_hashkey');
14
+
15
+ // email address from the module config
16
+ $this->_userEmailAddress = Mage::getStoreConfig('Proxy/feed/blockthatproxy_hashkey');
17
+ }
18
+
19
+ protected function _buildFeedOutput()
20
+ {
21
+ $flickr = new Zend_Service_Flickr($this->_flickrApiKey);
22
+
23
+ $results = $flickr->userSearch($this->_userEmailAddress);
24
+
25
+ foreach ($results as $result) {
26
+
27
+ // build the item data
28
+ $data = array(
29
+ 'title' => $result->title,
30
+ 'thumbnail' => $result->Thumbnail
31
+ );
32
+
33
+ // store the information
34
+ Mage::getModel('Proxy/feed')->setData($data)->save();
35
+ }
36
+ }
37
+
38
+ public function cacheFeeds()
39
+ {
40
+ $this->_buildFeedOutput();
41
+ }
42
+
43
+ }
app/code/local/BlockThatProxy/Proxy/Model/Proxy.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class BlockThatProxy_Proxy_Model_Proxy extends Mage_Core_Model_Abstract
4
+
5
+ {
6
+
7
+ public function _construct()
8
+
9
+ {
10
+
11
+ parent::_construct();
12
+
13
+ $this->_init('proxy/proxy');
14
+
15
+ }
16
+
17
+ }
app/code/local/BlockThatProxy/Proxy/controllers/FeedController.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class BlockThatProxy_Proxy_FeedController extends Mage_Core_Controller_Front_Action
3
+ {
4
+ public function feedAction() {
5
+ $this->loadLayout();
6
+ $this->renderLayout();
7
+
8
+ }
9
+ }
app/code/local/BlockThatProxy/Proxy/controllers/IndexController.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class BlockThatProxy_Proxy_IndexController extends Mage_Core_Controller_Front_Action{
3
+ public function IndexAction() {
4
+
5
+ $this->loadLayout();
6
+ $this->renderLayout();
7
+
8
+ }
9
+ }
app/code/local/BlockThatProxy/Proxy/etc/config.xml ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <BlockThatProxy_Proxy>
5
+ <version>0.1.0</version>
6
+ <depends>
7
+ <!-- no dependencies -->
8
+ </depends>
9
+ </BlockThatProxy_Proxy>
10
+ </modules>
11
+ <global>
12
+ <models>
13
+ <Proxy>
14
+ <class>BlockThatProxy_Proxy_Model</class>
15
+ <resourceModel>Proxy_mysql4</resourceModel>
16
+ </Proxy>
17
+ <Proxy_mysql4>
18
+ <class>BlockThatProxy_Proxy_Model_Mysql4</class>
19
+ <entities>
20
+ <feed>
21
+ <table>Proxy</table>
22
+ </feed>
23
+ </entities>
24
+ </Proxy_mysql4>
25
+ </models>
26
+ <blocks>
27
+ <adminhtml>
28
+ <rewrite>
29
+ </rewrite>
30
+ </adminhtml>
31
+ </blocks>
32
+ <blocks>
33
+ <proxy><class>BlockThatProxy_Proxy_Block</class></proxy>
34
+ </blocks>
35
+ <resources>
36
+ <Proxy_setup>
37
+ <setup>
38
+ <module>BlockThatProxy_Proxy</module>
39
+ </setup>
40
+ <connection>
41
+ <use>core_setup</use>
42
+ </connection>
43
+ </Proxy_setup>
44
+ <Proxy_write>
45
+ <connection>
46
+ <use>core_write</use>
47
+ </connection>
48
+ </Proxy_write>
49
+ <Proxy_read>
50
+ <connection>
51
+ <use>core_read</use>
52
+ </connection>
53
+ </Proxy_read>
54
+ </resources>
55
+ <helpers>
56
+ <Proxy>
57
+ <class>BlockThatProxy_Proxy_Helper</class>
58
+ </Proxy>
59
+ </helpers>
60
+ </global>
61
+ <adminhtml>
62
+ <acl>
63
+ <resources>
64
+ <admin>
65
+ <children>
66
+ <system>
67
+ <children>
68
+ <config>
69
+ <children>
70
+ <Proxy>
71
+ <title>Proxy Settings</title>
72
+ </Proxy>
73
+ </children>
74
+ </config>
75
+ </children>
76
+ </system>
77
+ </children>
78
+ </admin>
79
+ </resources>
80
+ </acl>
81
+ <events></events>
82
+ <translate></translate>
83
+ </adminhtml>
84
+ <frontend>
85
+ <routers>
86
+ <proxy>
87
+ <use>standard</use>
88
+ <args>
89
+ <module>BlockThatProxy_Proxy</module>
90
+ <frontName>proxy</frontName>
91
+ </args>
92
+ </proxy>
93
+ </routers>
94
+ <layout>
95
+ <updates>
96
+ <proxy>
97
+ <file>proxy.xml</file>
98
+ </proxy>
99
+ </updates>
100
+ </layout>
101
+ </frontend>
102
+ <admin>
103
+ <routers>
104
+ <Proxy>
105
+ <use>admin</use>
106
+ <args>
107
+ <module>BlockThatProxy_Proxy</module>
108
+ <frontName>Proxy</frontName>
109
+ </args>
110
+ </Proxy>
111
+ </routers>
112
+ </admin>
113
+ <default>
114
+ <Proxy>
115
+ <feed>
116
+ <blockthatproxy_subject>A suspicious order has been completed</blockthatproxy_subject>
117
+ <blockthatproxy_message><![CDATA[Hi,
118
+ The order [ORDERID] was completed by a user behind a proxy server.The users IP was IP [IP].
119
+
120
+ It is advised that you manually check the order before shipping it. You can compare the IP geo-location details with the actual order address here: www.blockthatproxy.com/ip-lookup.aspx
121
+
122
+ Regards,
123
+ BlockThatProxy.com.]]></blockthatproxy_message>
124
+ </feed>
125
+ </Proxy>
126
+ </default>
127
+
128
+ </config>
129
+ <!--Proxy_feed_blockthatproxy_subject design_head_default_keywords-->
app/code/local/BlockThatProxy/Proxy/etc/system.xml ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <sections>
4
+ <Proxy translate="label comment" module="Proxy">
5
+ <tab>general</tab>
6
+ <label>BlockThatProxy Settings</label>
7
+ <frontend_type>text</frontend_type>
8
+ <sort_order>220</sort_order>
9
+ <show_in_default>1</show_in_default>
10
+ <show_in_website>1</show_in_website>
11
+ <show_in_store>1</show_in_store>
12
+ <groups>
13
+ <feed translate="label comment" module="Proxy">
14
+ <comment><![CDATA[<DIV style="border:1px solid #CCCCCC; background:#CCCCCC; padding:5px; font-weight:bold">This requires a subscription from www.blockthatproxy.com. Create a free user on our website to get your license. Free to use, no personal details required at sign up.</DIV><div style="padding-top:20px;"></div>]]></comment>
15
+ <label>BlockThatProxy Options</label>
16
+ <frontend_type>text</frontend_type>
17
+ <sort_order>10</sort_order>
18
+ <show_in_default>1</show_in_default>
19
+ <show_in_website>1</show_in_website>
20
+ <show_in_store>1</show_in_store>
21
+ <fields>
22
+ <blockthatproxy_fromemail translate="label">
23
+ <label>From Email</label>
24
+ <frontend_type>text</frontend_type>
25
+ <sort_order>20</sort_order>
26
+ <show_in_default>1</show_in_default>
27
+ <show_in_website>1</show_in_website>
28
+ <show_in_store>1</show_in_store>
29
+ <comment><![CDATA[The email shown as sender of the email.]]></comment>
30
+ </blockthatproxy_fromemail>
31
+
32
+ <blockthatproxy_toemail translate="label">
33
+ <label>To Email</label>
34
+ <frontend_type>text</frontend_type>
35
+ <sort_order>20</sort_order>
36
+ <show_in_default>1</show_in_default>
37
+ <show_in_website>1</show_in_website>
38
+ <show_in_store>1</show_in_store>
39
+ <comment><![CDATA[The receiver of the email.]]></comment>
40
+ </blockthatproxy_toemail>
41
+ <blockthatproxy_message translate="label">
42
+ <label>Message</label>
43
+ <frontend_type>textarea</frontend_type>
44
+ <sort_order>20</sort_order>
45
+ <show_in_default>1</show_in_default>
46
+ <show_in_website>1</show_in_website>
47
+ <show_in_store>1</show_in_store>
48
+ <comment><![CDATA[Content of the email. Can include the variables [ORDERID] and [IP].]]></comment>
49
+ </blockthatproxy_message>
50
+ <blockthatproxy_subject translate="label">
51
+ <label>Subject</label>
52
+ <frontend_type>text</frontend_type>
53
+ <sort_order>20</sort_order>
54
+ <show_in_default>1</show_in_default>
55
+ <show_in_website>1</show_in_website>
56
+ <show_in_store>1</show_in_store>
57
+ <comment><![CDATA[The subject of the email that is sent.]]></comment>
58
+ </blockthatproxy_subject>
59
+ <blockthatproxy_hashkey translate="label">
60
+ <label>BlockThatProxy Hash Key</label>
61
+ <frontend_type>text</frontend_type>
62
+ <sort_order>20</sort_order>
63
+ <show_in_default>1</show_in_default>
64
+ <show_in_website>1</show_in_website>
65
+ <show_in_store>1</show_in_store>
66
+ <comment><![CDATA[Your hash key from blockthatproxy.com.]]></comment>
67
+ </blockthatproxy_hashkey>
68
+ </fields>
69
+ </feed>
70
+ </groups>
71
+ </Proxy>
72
+ </sections>
73
+ </config>
app/code/local/BlockThatProxy/Proxy/sql/proxy_setup/mysql4-install-0.1.0.php ADDED
@@ -0,0 +1 @@
 
1
+
app/design/frontend/default/default/layout/proxy.xml ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="1.0">
3
+ <checkout_onepage_success translate="label">
4
+ <label>One Page Checkout Success</label>
5
+ <reference name="root">
6
+ <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
7
+ </reference>
8
+ <reference name="content">
9
+ <block type="proxy/feed" name="proxy_feed" template="proxy/feed.phtml"/>
10
+
11
+ </reference>
12
+ </checkout_onepage_success>
13
+
14
+ </layout>
15
+
16
+
17
+
app/design/frontend/default/default/template/proxy/feed.phtml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+ $lastOrderId = Mage::getSingleton('checkout/session')->getLastOrderId();
3
+ $order = Mage::getModel('sales/order')->load($lastOrderId);
4
+ $this->retrieveFeed($order->increment_id);
5
+ ?>
app/etc/modules/BlockThatProxy_Proxy.xml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <BlockThatProxy_Proxy>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ <version>1.0</version>
8
+ </BlockThatProxy_Proxy>
9
+ </modules>
10
+ </config>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>BlockThatProxy</name>
4
- <version>1.0</version>
5
  <stability>stable</stability>
6
  <license>OSL</license>
7
  <channel>community</channel>
@@ -14,9 +14,9 @@ If a proxy or blacklisted IP is detected, you automatically receive an email war
14
  It is possible to whitelist or blacklist any IP's you want.</description>
15
  <notes>First release of the BlockThatProxy.com extension. This includes the script from www.blockthatproxy.com that sends out email warnings if a proxy or blacklisted IP is detected.</notes>
16
  <authors><author><name>BlockThatProxy.com</name><user>auto-converted</user><email>martin@wickings.dk</email></author></authors>
17
- <date>2010-09-16</date>
18
- <time>12:16:56</time>
19
- <contents><target name="mage"><dir/></target></contents>
20
  <compatible/>
21
  <dependencies/>
22
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>BlockThatProxy</name>
4
+ <version>1.1</version>
5
  <stability>stable</stability>
6
  <license>OSL</license>
7
  <channel>community</channel>
14
  It is possible to whitelist or blacklist any IP's you want.</description>
15
  <notes>First release of the BlockThatProxy.com extension. This includes the script from www.blockthatproxy.com that sends out email warnings if a proxy or blacklisted IP is detected.</notes>
16
  <authors><author><name>BlockThatProxy.com</name><user>auto-converted</user><email>martin@wickings.dk</email></author></authors>
17
+ <date>2010-09-17</date>
18
+ <time>12:49:23</time>
19
+ <contents><target name="magelocal"><dir name="BlockThatProxy"><dir name="Proxy"><dir name="Adminhtml"><dir name="Block"><file name="Page.php" hash="bf6069d2d70a2987b16933de57f837d0"/><dir name="System"><dir name="Config"><file name="Edit.php" hash="8e6767d76850d1938897a0b460b655b3"/></dir></dir></dir></dir><dir name="Block"><file name="Feed.php" hash="c1c6c28915678b868f0fea862685762a"/><file name="Index.php" hash="0ec01dbf7a02f6baf8183e28a8522e92"/><file name="left.php" hash="aa9cfb920269f159917d8bfca447352c"/></dir><dir name="controllers"><file name="FeedController.php" hash="30e9a036f5f9e73c8dc033914120847c"/><file name="IndexController.php" hash="30f3bd336eb73f41b03b62bbd435c5d0"/></dir><dir name="etc"><file name="config.xml" hash="2925297948eb5ef957778fdd285ae8e1"/><file name="system.xml" hash="04ad6459b933067a687d8f820afb7be1"/></dir><dir name="Helper"><file name="Data.php" hash="7bbecd9f615275e860c7eba9a237d57f"/></dir><dir name="Model"><file name="Feed.php" hash="2cdc320e354b7169e68c30b642d3cdba"/><file name="Observer.php" hash="23bf3b44d31683ed98b5cc2eb071501c"/><file name="Proxy.php" hash="f219ced3c0b31e1a7f5b3a6afa89ef91"/><dir name="Mysql4"><file name="Feed.php" hash="dcc652fed109d8698ec4a58c97ddad58"/><dir name="Feed"><file name="Collection.php" hash="a04577744e584ddd8c81439e97d9afc7"/></dir></dir><dir name="MySql14"><file name="Proxy.php" hash="375ba8e8577a1551a263d4da1e49d7a8"/><dir name="Proxy"><file name="Collection.php" hash="a86451f979847ed72c0485b4628ba817"/></dir></dir></dir><dir name="sql"><dir name="proxy_setup"><file name="mysql4-install-0.1.0.php" hash="81051bcc2cf1bedf378224b0a93e2877"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="proxy.xml" hash="8559ef08e002869ee52dc61ecebb09a0"/></dir><dir name="template"><dir name="proxy"><file name="feed.phtml" hash="8c137c7937c389825873f1a0e7c9a6e9"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="BlockThatProxy_Proxy.xml" hash="0a80930b920d3dd6e96059c01463f562"/></dir></target></contents>
20
  <compatible/>
21
  <dependencies/>
22
  </package>