Netgo_Cod - Version 1.0.2

Version Notes

Second Preview Release

Download this release

Release Info

Developer NetGo
Extension Netgo_Cod
Version 1.0.2
Comparing to
See all releases


Code changes from version 1.0.1 to 1.0.2

Files changed (27) hide show
  1. app/code/community/Netgo/Cod/controllers/CodController.php +40 -40
  2. app/code/community/Netgo/Cod/etc/config.xml +118 -118
  3. app/code/community/Netgo/Socialfeeds/Block/Adminhtml/Socialfeed.php +42 -0
  4. app/code/community/Netgo/Socialfeeds/Block/Adminhtml/Socialfeed/Edit.php +82 -0
  5. app/code/community/Netgo/Socialfeeds/Block/Adminhtml/Socialfeed/Edit/Form.php +52 -0
  6. app/code/community/Netgo/Socialfeeds/Block/Adminhtml/Socialfeed/Edit/Tab/Form.php +95 -0
  7. app/code/community/Netgo/Socialfeeds/Block/Adminhtml/Socialfeed/Edit/Tabs.php +74 -0
  8. app/code/community/Netgo/Socialfeeds/Block/Adminhtml/Socialfeed/Grid.php +206 -0
  9. app/code/community/Netgo/Socialfeeds/Block/Socialfeed/List.php +72 -0
  10. app/code/community/Netgo/Socialfeeds/Block/Socialfeed/Socialfeeds.php +129 -0
  11. app/code/community/Netgo/Socialfeeds/Block/Socialfeed/View.php +37 -0
  12. app/code/community/Netgo/Socialfeeds/Controller/Adminhtml/Socialfeeds.php +60 -0
  13. app/code/community/Netgo/Socialfeeds/Controller/Router.php +114 -0
  14. app/code/community/Netgo/Socialfeeds/Helper/Data.php +45 -0
  15. app/code/community/Netgo/Socialfeeds/Helper/Socialfeed.php +100 -0
  16. app/code/community/Netgo/Socialfeeds/Model/Resource/Setup.php +26 -0
  17. app/code/community/Netgo/Socialfeeds/Model/Resource/Socialfeed.php +180 -0
  18. app/code/community/Netgo/Socialfeeds/Model/Resource/Socialfeed/Collection.php +84 -0
  19. app/code/community/Netgo/Socialfeeds/Model/Socialfeed.php +141 -0
  20. app/code/community/Netgo/Socialfeeds/controllers/Adminhtml/Socialfeeds/SocialfeedController.php +328 -0
  21. app/code/community/Netgo/Socialfeeds/controllers/SocialfeedController.php +139 -0
  22. app/code/community/Netgo/Socialfeeds/etc/adminhtml.xml +61 -0
  23. app/code/community/Netgo/Socialfeeds/etc/config.xml +132 -0
  24. app/code/community/Netgo/Socialfeeds/etc/system.xml +250 -0
  25. app/code/community/Netgo/Socialfeeds/sql/netgo_socialfeeds_setup/install-1.0.0.php +74 -0
  26. media/cod/file/MerchantSkus.csv +6 -0
  27. package.xml +5 -14
app/code/community/Netgo/Cod/controllers/CodController.php CHANGED
@@ -1,40 +1,40 @@
1
- <?php
2
- /***************************************
3
- *** Cash On Delivery ***
4
- ***************************************
5
- *
6
- * @copyright Copyright (c) 2015
7
- * @company NetAttingo Technologies
8
- * @package Netgo_Cod
9
- * @author NetGo
10
- * @dev netattingomails@gmail.com
11
- *
12
- */
13
- class Netgo_Cod_CodController extends Mage_Core_Controller_Front_Action
14
- {
15
- /**
16
- * view cod action
17
- *
18
- * @access public
19
- * @return void
20
- * @author NetGo
21
- */
22
- public function checkAction()
23
- {
24
- $msgData = Mage::helper('netgo_cod')->getConfigData();
25
-
26
- $cod = $this->getRequest()->getPost('zipcode');
27
- $codObj = Mage::getModel('netgo_cod/cod')->getCollection()->addFieldToFilter('zipcode', trim($cod));
28
- $codData = $codObj->getData();
29
-
30
- if($codData[0]['zipcode'] != ''){
31
- echo '<span class="cod-suc">'.$msgData['suc_msg'];
32
- if($codData[0]['days'] != ''){
33
- echo ' within '.$codData[0]['days'].' days ';
34
- }
35
- echo '.</span>';
36
- }else{
37
- echo '<span class="cod-error">'.$msgData['err_msg'].'</span>';
38
- }
39
- }
40
- }
1
+ <?php
2
+ /***************************************
3
+ *** Cash On Delivery ***
4
+ ***************************************
5
+ *
6
+ * @copyright Copyright (c) 2015
7
+ * @company NetAttingo Technologies
8
+ * @package Netgo_Cod
9
+ * @author NetGo
10
+ * @dev netattingomails@gmail.com
11
+ *
12
+ */
13
+ class Netgo_Cod_CodController extends Mage_Core_Controller_Front_Action
14
+ {
15
+ /**
16
+ * view cod action
17
+ *
18
+ * @access public
19
+ * @return void
20
+ * @author NetGo
21
+ */
22
+ public function checkAction()
23
+ {
24
+ $msgData = Mage::helper('netgo_cod')->getConfigData();
25
+
26
+ $cod = $this->getRequest()->getPost('zipcode');
27
+ $codObj = Mage::getModel('netgo_cod/cod')->getCollection()->addFieldToFilter('zipcode', trim($cod));
28
+ $codData = $codObj->getData();
29
+
30
+ if($codData[0]['zipcode'] != '' && $codData[0]['status'] != 0){
31
+ echo '<span class="cod-suc">'.$msgData['suc_msg'];
32
+ if($codData[0]['days'] != ''){
33
+ echo ' within '.$codData[0]['days'].' days ';
34
+ }
35
+ echo '.</span>';
36
+ }else{
37
+ echo '<span class="cod-error">'.$msgData['err_msg'].'</span>';
38
+ }
39
+ }
40
+ }
app/code/community/Netgo/Cod/etc/config.xml CHANGED
@@ -1,118 +1,118 @@
1
- <?xml version="1.0"?>
2
- <!--
3
- /***************************************
4
- *** Cash On Delivery ***
5
- ***************************************
6
- *
7
- * @copyright Copyright (c) 2015
8
- * @company NetAttingo Technologies
9
- * @package Netgo_Cod
10
- * @author NetGo
11
- * @dev netattingomails@gmail.com
12
- *
13
- */
14
- -->
15
- <config>
16
- <modules>
17
- <Netgo_Cod>
18
- <version>1.0.0</version>
19
- </Netgo_Cod>
20
- </modules>
21
- <global>
22
- <resources>
23
- <netgo_cod_setup>
24
- <setup>
25
- <module>Netgo_Cod</module>
26
- <class>Netgo_Cod_Model_Resource_Setup</class>
27
- </setup>
28
- </netgo_cod_setup>
29
- </resources>
30
- <blocks>
31
- <netgo_cod>
32
- <class>Netgo_Cod_Block</class>
33
- </netgo_cod>
34
- </blocks>
35
- <helpers>
36
- <netgo_cod>
37
- <class>Netgo_Cod_Helper</class>
38
- </netgo_cod>
39
- </helpers>
40
- <models>
41
- <netgo_cod>
42
- <class>Netgo_Cod_Model</class>
43
- <resourceModel>netgo_cod_resource</resourceModel>
44
- </netgo_cod>
45
- <netgo_cod_resource>
46
- <class>Netgo_Cod_Model_Resource</class>
47
- <entities>
48
- <cod>
49
- <table>netgo_cod_cod</table>
50
- </cod>
51
- </entities>
52
- </netgo_cod_resource>
53
- </models>
54
- </global>
55
- <adminhtml>
56
- <layout>
57
- <updates>
58
- <netgo_cod>
59
- <file>netgo_cod.xml</file>
60
- </netgo_cod>
61
- </updates>
62
- </layout>
63
- <translate>
64
- <modules>
65
- <Netgo_Cod>
66
- <files>
67
- <default>Netgo_Cod.csv</default>
68
- </files>
69
- </Netgo_Cod>
70
- </modules>
71
- </translate>
72
- </adminhtml>
73
- <admin>
74
- <routers>
75
- <adminhtml>
76
- <args>
77
- <modules>
78
- <Netgo_Cod before="Mage_Adminhtml">Netgo_Cod_Adminhtml</Netgo_Cod>
79
- </modules>
80
- </args>
81
- </adminhtml>
82
- </routers>
83
- </admin>
84
- <frontend>
85
- <routers>
86
- <netgo_cod>
87
- <use>standard</use>
88
- <args>
89
- <module>Netgo_Cod</module>
90
- <frontName>netgo</frontName>
91
- </args>
92
- </netgo_cod>
93
- </routers>
94
- <layout>
95
- <updates>
96
- <netgo_cod>
97
- <file>netgo_cod.xml</file>
98
- </netgo_cod>
99
- </updates>
100
- </layout>
101
- <translate>
102
- <modules>
103
- <Netgo_Cod>
104
- <files>
105
- <default>Netgo_Cod.csv</default>
106
- </files>
107
- </Netgo_Cod>
108
- </modules>
109
- </translate>
110
- </frontend>
111
- <default>
112
- <netgo_cod>
113
- <cod>
114
- <breadcrumbs>1</breadcrumbs>
115
- </cod>
116
- </netgo_cod>
117
- </default>
118
- </config>
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /***************************************
4
+ *** Cash On Delivery ***
5
+ ***************************************
6
+ *
7
+ * @copyright Copyright (c) 2015
8
+ * @company NetAttingo Technologies
9
+ * @package Netgo_Cod
10
+ * @author NetGo
11
+ * @dev netattingomails@gmail.com
12
+ *
13
+ */
14
+ -->
15
+ <config>
16
+ <modules>
17
+ <Netgo_Cod>
18
+ <version>1.0.2</version>
19
+ </Netgo_Cod>
20
+ </modules>
21
+ <global>
22
+ <resources>
23
+ <netgo_cod_setup>
24
+ <setup>
25
+ <module>Netgo_Cod</module>
26
+ <class>Netgo_Cod_Model_Resource_Setup</class>
27
+ </setup>
28
+ </netgo_cod_setup>
29
+ </resources>
30
+ <blocks>
31
+ <netgo_cod>
32
+ <class>Netgo_Cod_Block</class>
33
+ </netgo_cod>
34
+ </blocks>
35
+ <helpers>
36
+ <netgo_cod>
37
+ <class>Netgo_Cod_Helper</class>
38
+ </netgo_cod>
39
+ </helpers>
40
+ <models>
41
+ <netgo_cod>
42
+ <class>Netgo_Cod_Model</class>
43
+ <resourceModel>netgo_cod_resource</resourceModel>
44
+ </netgo_cod>
45
+ <netgo_cod_resource>
46
+ <class>Netgo_Cod_Model_Resource</class>
47
+ <entities>
48
+ <cod>
49
+ <table>netgo_cod_cod</table>
50
+ </cod>
51
+ </entities>
52
+ </netgo_cod_resource>
53
+ </models>
54
+ </global>
55
+ <adminhtml>
56
+ <layout>
57
+ <updates>
58
+ <netgo_cod>
59
+ <file>netgo_cod.xml</file>
60
+ </netgo_cod>
61
+ </updates>
62
+ </layout>
63
+ <translate>
64
+ <modules>
65
+ <Netgo_Cod>
66
+ <files>
67
+ <default>Netgo_Cod.csv</default>
68
+ </files>
69
+ </Netgo_Cod>
70
+ </modules>
71
+ </translate>
72
+ </adminhtml>
73
+ <admin>
74
+ <routers>
75
+ <adminhtml>
76
+ <args>
77
+ <modules>
78
+ <Netgo_Cod before="Mage_Adminhtml">Netgo_Cod_Adminhtml</Netgo_Cod>
79
+ </modules>
80
+ </args>
81
+ </adminhtml>
82
+ </routers>
83
+ </admin>
84
+ <frontend>
85
+ <routers>
86
+ <netgo_cod>
87
+ <use>standard</use>
88
+ <args>
89
+ <module>Netgo_Cod</module>
90
+ <frontName>netgo</frontName>
91
+ </args>
92
+ </netgo_cod>
93
+ </routers>
94
+ <layout>
95
+ <updates>
96
+ <netgo_cod>
97
+ <file>netgo_cod.xml</file>
98
+ </netgo_cod>
99
+ </updates>
100
+ </layout>
101
+ <translate>
102
+ <modules>
103
+ <Netgo_Cod>
104
+ <files>
105
+ <default>Netgo_Cod.csv</default>
106
+ </files>
107
+ </Netgo_Cod>
108
+ </modules>
109
+ </translate>
110
+ </frontend>
111
+ <default>
112
+ <netgo_cod>
113
+ <cod>
114
+ <breadcrumbs>1</breadcrumbs>
115
+ </cod>
116
+ </netgo_cod>
117
+ </default>
118
+ </config>
app/code/community/Netgo/Socialfeeds/Block/Adminhtml/Socialfeed.php ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed admin block
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_Block_Adminhtml_Socialfeed extends Mage_Adminhtml_Block_Widget_Grid_Container
25
+ {
26
+ /**
27
+ * constructor
28
+ *
29
+ * @access public
30
+ * @return void
31
+ * @author Ultimate Module Creator
32
+ */
33
+ public function __construct()
34
+ {
35
+ $this->_controller = 'adminhtml_socialfeed';
36
+ $this->_blockGroup = 'netgo_socialfeeds';
37
+ parent::__construct();
38
+ $this->_headerText = Mage::helper('netgo_socialfeeds')->__('Socialfeed');
39
+ $this->_updateButton('add', 'label', Mage::helper('netgo_socialfeeds')->__('Add Socialfeed'));
40
+
41
+ }
42
+ }
app/code/community/Netgo/Socialfeeds/Block/Adminhtml/Socialfeed/Edit.php ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed admin edit form
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_Block_Adminhtml_Socialfeed_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
25
+ {
26
+ /**
27
+ * constructor
28
+ *
29
+ * @access public
30
+ * @return void
31
+ * @author Ultimate Module Creator
32
+ */
33
+ public function __construct()
34
+ {
35
+ parent::__construct();
36
+ $this->_blockGroup = 'netgo_socialfeeds';
37
+ $this->_controller = 'adminhtml_socialfeed';
38
+ $this->_updateButton(
39
+ 'save',
40
+ 'label',
41
+ Mage::helper('netgo_socialfeeds')->__('Save Socialfeed')
42
+ );
43
+ $this->_updateButton(
44
+ 'delete',
45
+ 'label',
46
+ Mage::helper('netgo_socialfeeds')->__('Delete Socialfeed')
47
+ );
48
+ $this->_addButton(
49
+ 'saveandcontinue',
50
+ array(
51
+ 'label' => Mage::helper('netgo_socialfeeds')->__('Save And Continue Edit'),
52
+ 'onclick' => 'saveAndContinueEdit()',
53
+ 'class' => 'save',
54
+ ),
55
+ -100
56
+ );
57
+ $this->_formScripts[] = "
58
+ function saveAndContinueEdit() {
59
+ editForm.submit($('edit_form').action+'back/edit/');
60
+ }
61
+ ";
62
+ }
63
+
64
+ /**
65
+ * get the edit form header
66
+ *
67
+ * @access public
68
+ * @return string
69
+ * @author Ultimate Module Creator
70
+ */
71
+ public function getHeaderText()
72
+ {
73
+ if (Mage::registry('current_socialfeed') && Mage::registry('current_socialfeed')->getId()) {
74
+ return Mage::helper('netgo_socialfeeds')->__(
75
+ "Edit Socialfeed '%s'",
76
+ $this->escapeHtml(Mage::registry('current_socialfeed')->getSocialfeedsStatus())
77
+ );
78
+ } else {
79
+ return Mage::helper('netgo_socialfeeds')->__('Add Socialfeed');
80
+ }
81
+ }
82
+ }
app/code/community/Netgo/Socialfeeds/Block/Adminhtml/Socialfeed/Edit/Form.php ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed edit form
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_Block_Adminhtml_Socialfeed_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
25
+ {
26
+ /**
27
+ * prepare form
28
+ *
29
+ * @access protected
30
+ * @return Netgo_Socialfeeds_Block_Adminhtml_Socialfeed_Edit_Form
31
+ * @author Ultimate Module Creator
32
+ */
33
+ protected function _prepareForm()
34
+ {
35
+ $form = new Varien_Data_Form(
36
+ array(
37
+ 'id' => 'edit_form',
38
+ 'action' => $this->getUrl(
39
+ '*/*/save',
40
+ array(
41
+ 'id' => $this->getRequest()->getParam('id')
42
+ )
43
+ ),
44
+ 'method' => 'post',
45
+ 'enctype' => 'multipart/form-data'
46
+ )
47
+ );
48
+ $form->setUseContainer(true);
49
+ $this->setForm($form);
50
+ return parent::_prepareForm();
51
+ }
52
+ }
app/code/community/Netgo/Socialfeeds/Block/Adminhtml/Socialfeed/Edit/Tab/Form.php ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed edit form tab
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_Block_Adminhtml_Socialfeed_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form
25
+ {
26
+ /**
27
+ * prepare the form
28
+ *
29
+ * @access protected
30
+ * @return Netgo_Socialfeeds_Block_Adminhtml_Socialfeed_Edit_Tab_Form
31
+ * @author Ultimate Module Creator
32
+ */
33
+ protected function _prepareForm()
34
+ {
35
+ $form = new Varien_Data_Form();
36
+ $form->setHtmlIdPrefix('socialfeed_');
37
+ $form->setFieldNameSuffix('socialfeed');
38
+ $this->setForm($form);
39
+ $fieldset = $form->addFieldset(
40
+ 'socialfeed_form',
41
+ array('legend' => Mage::helper('netgo_socialfeeds')->__('Socialfeed'))
42
+ );
43
+
44
+ $fieldset->addField(
45
+ 'socialfeeds_status',
46
+ 'text',
47
+ array(
48
+ 'label' => Mage::helper('netgo_socialfeeds')->__('Socialfeeds Status'),
49
+ 'name' => 'socialfeeds_status',
50
+ 'required' => true,
51
+ 'class' => 'required-entry',
52
+
53
+ )
54
+ );
55
+ $fieldset->addField(
56
+ 'url_key',
57
+ 'text',
58
+ array(
59
+ 'label' => Mage::helper('netgo_socialfeeds')->__('Url key'),
60
+ 'name' => 'url_key',
61
+ 'note' => Mage::helper('netgo_socialfeeds')->__('Relative to Website Base URL')
62
+ )
63
+ );
64
+ $fieldset->addField(
65
+ 'status',
66
+ 'select',
67
+ array(
68
+ 'label' => Mage::helper('netgo_socialfeeds')->__('Status'),
69
+ 'name' => 'status',
70
+ 'values' => array(
71
+ array(
72
+ 'value' => 1,
73
+ 'label' => Mage::helper('netgo_socialfeeds')->__('Enabled'),
74
+ ),
75
+ array(
76
+ 'value' => 0,
77
+ 'label' => Mage::helper('netgo_socialfeeds')->__('Disabled'),
78
+ ),
79
+ ),
80
+ )
81
+ );
82
+ $formValues = Mage::registry('current_socialfeed')->getDefaultValues();
83
+ if (!is_array($formValues)) {
84
+ $formValues = array();
85
+ }
86
+ if (Mage::getSingleton('adminhtml/session')->getSocialfeedData()) {
87
+ $formValues = array_merge($formValues, Mage::getSingleton('adminhtml/session')->getSocialfeedData());
88
+ Mage::getSingleton('adminhtml/session')->setSocialfeedData(null);
89
+ } elseif (Mage::registry('current_socialfeed')) {
90
+ $formValues = array_merge($formValues, Mage::registry('current_socialfeed')->getData());
91
+ }
92
+ $form->setValues($formValues);
93
+ return parent::_prepareForm();
94
+ }
95
+ }
app/code/community/Netgo/Socialfeeds/Block/Adminhtml/Socialfeed/Edit/Tabs.php ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed admin edit tabs
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_Block_Adminhtml_Socialfeed_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
25
+ {
26
+ /**
27
+ * Initialize Tabs
28
+ *
29
+ * @access public
30
+ * @author Ultimate Module Creator
31
+ */
32
+ public function __construct()
33
+ {
34
+ parent::__construct();
35
+ $this->setId('socialfeed_tabs');
36
+ $this->setDestElementId('edit_form');
37
+ $this->setTitle(Mage::helper('netgo_socialfeeds')->__('Socialfeed'));
38
+ }
39
+
40
+ /**
41
+ * before render html
42
+ *
43
+ * @access protected
44
+ * @return Netgo_Socialfeeds_Block_Adminhtml_Socialfeed_Edit_Tabs
45
+ * @author Ultimate Module Creator
46
+ */
47
+ protected function _beforeToHtml()
48
+ {
49
+ $this->addTab(
50
+ 'form_socialfeed',
51
+ array(
52
+ 'label' => Mage::helper('netgo_socialfeeds')->__('Socialfeed'),
53
+ 'title' => Mage::helper('netgo_socialfeeds')->__('Socialfeed'),
54
+ 'content' => $this->getLayout()->createBlock(
55
+ 'netgo_socialfeeds/adminhtml_socialfeed_edit_tab_form'
56
+ )
57
+ ->toHtml(),
58
+ )
59
+ );
60
+ return parent::_beforeToHtml();
61
+ }
62
+
63
+ /**
64
+ * Retrieve socialfeed entity
65
+ *
66
+ * @access public
67
+ * @return Netgo_Socialfeeds_Model_Socialfeed
68
+ * @author Ultimate Module Creator
69
+ */
70
+ public function getSocialfeed()
71
+ {
72
+ return Mage::registry('current_socialfeed');
73
+ }
74
+ }
app/code/community/Netgo/Socialfeeds/Block/Adminhtml/Socialfeed/Grid.php ADDED
@@ -0,0 +1,206 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed admin grid block
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_Block_Adminhtml_Socialfeed_Grid extends Mage_Adminhtml_Block_Widget_Grid
25
+ {
26
+ /**
27
+ * constructor
28
+ *
29
+ * @access public
30
+ * @author Ultimate Module Creator
31
+ */
32
+ public function __construct()
33
+ {
34
+ parent::__construct();
35
+ $this->setId('socialfeedGrid');
36
+ $this->setDefaultSort('entity_id');
37
+ $this->setDefaultDir('ASC');
38
+ $this->setSaveParametersInSession(true);
39
+ $this->setUseAjax(true);
40
+ }
41
+
42
+ /**
43
+ * prepare collection
44
+ *
45
+ * @access protected
46
+ * @return Netgo_Socialfeeds_Block_Adminhtml_Socialfeed_Grid
47
+ * @author Ultimate Module Creator
48
+ */
49
+ protected function _prepareCollection()
50
+ {
51
+ $collection = Mage::getModel('netgo_socialfeeds/socialfeed')
52
+ ->getCollection();
53
+
54
+ $this->setCollection($collection);
55
+ return parent::_prepareCollection();
56
+ }
57
+
58
+ /**
59
+ * prepare grid collection
60
+ *
61
+ * @access protected
62
+ * @return Netgo_Socialfeeds_Block_Adminhtml_Socialfeed_Grid
63
+ * @author Ultimate Module Creator
64
+ */
65
+ protected function _prepareColumns()
66
+ {
67
+ $this->addColumn(
68
+ 'entity_id',
69
+ array(
70
+ 'header' => Mage::helper('netgo_socialfeeds')->__('Id'),
71
+ 'index' => 'entity_id',
72
+ 'type' => 'number'
73
+ )
74
+ );
75
+ $this->addColumn(
76
+ 'socialfeeds_status',
77
+ array(
78
+ 'header' => Mage::helper('netgo_socialfeeds')->__('Socialfeeds Status'),
79
+ 'align' => 'left',
80
+ 'index' => 'socialfeeds_status',
81
+ )
82
+ );
83
+
84
+ $this->addColumn(
85
+ 'status',
86
+ array(
87
+ 'header' => Mage::helper('netgo_socialfeeds')->__('Status'),
88
+ 'index' => 'status',
89
+ 'type' => 'options',
90
+ 'options' => array(
91
+ '1' => Mage::helper('netgo_socialfeeds')->__('Enabled'),
92
+ '0' => Mage::helper('netgo_socialfeeds')->__('Disabled'),
93
+ )
94
+ )
95
+ );
96
+ $this->addColumn(
97
+ 'url_key',
98
+ array(
99
+ 'header' => Mage::helper('netgo_socialfeeds')->__('URL key'),
100
+ 'index' => 'url_key',
101
+ )
102
+ );
103
+ $this->addColumn(
104
+ 'action',
105
+ array(
106
+ 'header' => Mage::helper('netgo_socialfeeds')->__('Action'),
107
+ 'width' => '100',
108
+ 'type' => 'action',
109
+ 'getter' => 'getId',
110
+ 'actions' => array(
111
+ array(
112
+ 'caption' => Mage::helper('netgo_socialfeeds')->__('Edit'),
113
+ 'url' => array('base'=> '*/*/edit'),
114
+ 'field' => 'id'
115
+ )
116
+ ),
117
+ 'filter' => false,
118
+ 'is_system' => true,
119
+ 'sortable' => false,
120
+ )
121
+ );
122
+ $this->addExportType('*/*/exportCsv', Mage::helper('netgo_socialfeeds')->__('CSV'));
123
+ $this->addExportType('*/*/exportExcel', Mage::helper('netgo_socialfeeds')->__('Excel'));
124
+ $this->addExportType('*/*/exportXml', Mage::helper('netgo_socialfeeds')->__('XML'));
125
+ return parent::_prepareColumns();
126
+ }
127
+
128
+ /**
129
+ * prepare mass action
130
+ *
131
+ * @access protected
132
+ * @return Netgo_Socialfeeds_Block_Adminhtml_Socialfeed_Grid
133
+ * @author Ultimate Module Creator
134
+ */
135
+ protected function _prepareMassaction()
136
+ {
137
+ $this->setMassactionIdField('entity_id');
138
+ $this->getMassactionBlock()->setFormFieldName('socialfeed');
139
+ $this->getMassactionBlock()->addItem(
140
+ 'delete',
141
+ array(
142
+ 'label'=> Mage::helper('netgo_socialfeeds')->__('Delete'),
143
+ 'url' => $this->getUrl('*/*/massDelete'),
144
+ 'confirm' => Mage::helper('netgo_socialfeeds')->__('Are you sure?')
145
+ )
146
+ );
147
+ $this->getMassactionBlock()->addItem(
148
+ 'status',
149
+ array(
150
+ 'label' => Mage::helper('netgo_socialfeeds')->__('Change status'),
151
+ 'url' => $this->getUrl('*/*/massStatus', array('_current'=>true)),
152
+ 'additional' => array(
153
+ 'status' => array(
154
+ 'name' => 'status',
155
+ 'type' => 'select',
156
+ 'class' => 'required-entry',
157
+ 'label' => Mage::helper('netgo_socialfeeds')->__('Status'),
158
+ 'values' => array(
159
+ '1' => Mage::helper('netgo_socialfeeds')->__('Enabled'),
160
+ '0' => Mage::helper('netgo_socialfeeds')->__('Disabled'),
161
+ )
162
+ )
163
+ )
164
+ )
165
+ );
166
+ return $this;
167
+ }
168
+
169
+ /**
170
+ * get the row url
171
+ *
172
+ * @access public
173
+ * @param Netgo_Socialfeeds_Model_Socialfeed
174
+ * @return string
175
+ * @author Ultimate Module Creator
176
+ */
177
+ public function getRowUrl($row)
178
+ {
179
+ return $this->getUrl('*/*/edit', array('id' => $row->getId()));
180
+ }
181
+
182
+ /**
183
+ * get the grid url
184
+ *
185
+ * @access public
186
+ * @return string
187
+ * @author Ultimate Module Creator
188
+ */
189
+ public function getGridUrl()
190
+ {
191
+ return $this->getUrl('*/*/grid', array('_current'=>true));
192
+ }
193
+
194
+ /**
195
+ * after collection load
196
+ *
197
+ * @access protected
198
+ * @return Netgo_Socialfeeds_Block_Adminhtml_Socialfeed_Grid
199
+ * @author Ultimate Module Creator
200
+ */
201
+ protected function _afterLoadCollection()
202
+ {
203
+ $this->getCollection()->walk('afterLoad');
204
+ parent::_afterLoadCollection();
205
+ }
206
+ }
app/code/community/Netgo/Socialfeeds/Block/Socialfeed/List.php ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed list block
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_Block_Socialfeed_List extends Mage_Core_Block_Template
25
+ {
26
+ /**
27
+ * initialize
28
+ *
29
+ * @access public
30
+ * @author Ultimate Module Creator
31
+ */
32
+ public function __construct()
33
+ {
34
+ parent::__construct();
35
+ $socialfeeds = Mage::getResourceModel('netgo_socialfeeds/socialfeed_collection')
36
+ ->addFieldToFilter('status', 1);
37
+ $socialfeeds->setOrder('socialfeeds_status', 'asc');
38
+ $this->setSocialfeeds($socialfeeds);
39
+ }
40
+
41
+ /**
42
+ * prepare the layout
43
+ *
44
+ * @access protected
45
+ * @return Netgo_Socialfeeds_Block_Socialfeed_List
46
+ * @author Ultimate Module Creator
47
+ */
48
+ protected function _prepareLayout()
49
+ {
50
+ parent::_prepareLayout();
51
+ $pager = $this->getLayout()->createBlock(
52
+ 'page/html_pager',
53
+ 'netgo_socialfeeds.socialfeed.html.pager'
54
+ )
55
+ ->setCollection($this->getSocialfeeds());
56
+ $this->setChild('pager', $pager);
57
+ $this->getSocialfeeds()->load();
58
+ return $this;
59
+ }
60
+
61
+ /**
62
+ * get the pager html
63
+ *
64
+ * @access public
65
+ * @return string
66
+ * @author Ultimate Module Creator
67
+ */
68
+ public function getPagerHtml()
69
+ {
70
+ return $this->getChildHtml('pager');
71
+ }
72
+ }
app/code/community/Netgo/Socialfeeds/Block/Socialfeed/Socialfeeds.php ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed view block
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ $lib_path = Mage::getBaseDir('lib');
25
+ require_once $lib_path."/Socialfeeds/fb/facebook.php";
26
+ require_once $lib_path."/Socialfeeds/tw/twitter.php";
27
+ require_once $lib_path."/Socialfeeds/in/instagram.php";
28
+ require_once $lib_path."/Socialfeeds/pi/pinterest.php";
29
+ require_once $lib_path."/Socialfeeds/yt/youtube.php";
30
+
31
+ class Netgo_Socialfeeds_Block_Socialfeed_Socialfeeds extends Mage_Core_Block_Template
32
+ {
33
+
34
+ /**
35
+ * get the url to the socialfeeds list page
36
+ *
37
+ * @access public
38
+ * @return string
39
+ * @author Ultimate Module Creator
40
+ */
41
+ public function _construct()
42
+ {
43
+ $_helper = Mage::helper('netgo_socialfeeds/socialfeed');
44
+ if(!$_helper->getCheckMod()){
45
+ return;
46
+ }
47
+ }
48
+
49
+ /**
50
+ * get the current socialfeed
51
+ *
52
+ * @access public
53
+ * @return mixed (Netgo_Socialfeeds_Model_Socialfeed|null)
54
+ * @author Ultimate Module Creator
55
+ */
56
+ public function getCurrentSocialfeed()
57
+ {
58
+ return Mage::registry('current_socialfeed');
59
+ }
60
+
61
+ /**
62
+ * Set the facebook credentials
63
+ */
64
+ public function initFB(){
65
+ $config = array();
66
+ $pageid = trim(Mage::getStoreConfig('netgo_socialfeeds/fb_socialfeed/fb_page_id'));
67
+ $config['appId'] = trim(Mage::getStoreConfig('netgo_socialfeeds/fb_socialfeed/fb_app_id'));
68
+ $config['secret'] = trim(Mage::getStoreConfig('netgo_socialfeeds/fb_socialfeed/fb_secret_key'));
69
+ $config['fileUpload'] = true;
70
+ if($config['appId'] != '' && $config['secret'] != '' && $pageid != ''){
71
+ return new Facebook($config);
72
+ }
73
+ }
74
+
75
+ /**
76
+ * Set the twitter credentials
77
+ */
78
+ public function initTW(){
79
+
80
+ $config = array(
81
+ 'oauth_access_token' => trim(Mage::getStoreConfig('netgo_socialfeeds/tw_socialfeed/tw_access_token')),
82
+ 'oauth_access_token_secret' => trim(Mage::getStoreConfig('netgo_socialfeeds/tw_socialfeed/tw_access_token_secret')),
83
+ 'consumer_key' => trim(Mage::getStoreConfig('netgo_socialfeeds/tw_socialfeed/tw_consumer_key')),
84
+ 'consumer_secret' => trim(Mage::getStoreConfig('netgo_socialfeeds/tw_socialfeed/tw_consumer_secret')),
85
+ );
86
+ $sc_name = trim(Mage::getStoreConfig('netgo_socialfeeds/tw_socialfeed/tw_screen_name'));
87
+ $url = 'https://api.twitter.com/1.1/statuses/user_timeline.json';
88
+ $getfield = '?screen_name='.$sc_name;
89
+ $requestMethod = 'GET';
90
+ $twitter = new TwitterAPIExchange($config);
91
+ $response = $twitter->setGetfield($getfield)->buildOauth($url, $requestMethod)->performRequest();
92
+ if($config['oauth_access_token'] != '' && $config['oauth_access_token_secret'] != '' && $config['consumer_key'] != '' && $config['consumer_secret'] != '' && $sc_name != ''){
93
+ return $response;
94
+ }
95
+ }
96
+
97
+ /**
98
+ * Set the instagram credentials
99
+ */
100
+ public function initIN(){
101
+
102
+ $user_id = trim(Mage::getStoreConfig('netgo_socialfeeds/ins_socialfeed/ins_user_id'));
103
+ $access_token = trim(Mage::getStoreConfig('netgo_socialfeeds/ins_socialfeed/ins_access_token'));
104
+ $response = fetchData("https://api.instagram.com/v1/users/".$user_id."/media/recent/?access_token=".$access_token);
105
+ return $response;
106
+ }
107
+
108
+ /**
109
+ * Set the pinterest credentials
110
+ */
111
+ public function initPI(){
112
+
113
+ $user_name = trim(Mage::getStoreConfig('netgo_socialfeeds/pi_socialfeed/ins_user_name'));
114
+ $response = getPinterest($user_name);
115
+ return $response;
116
+ }
117
+
118
+ /**
119
+ * Get the youtube video
120
+ */
121
+ public function initYT(){
122
+ $video_url = trim(Mage::getStoreConfig('netgo_socialfeeds/yt_socialfeed/yt_url'));
123
+ $response = '';
124
+ if($video_url != ''){
125
+ $response = getVideo($video_url);
126
+ }
127
+ return $response;
128
+ }
129
+ }
app/code/community/Netgo/Socialfeeds/Block/Socialfeed/View.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed view block
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_Block_Socialfeed_View extends Mage_Core_Block_Template
25
+ {
26
+ /**
27
+ * get the current socialfeed
28
+ *
29
+ * @access public
30
+ * @return mixed (Netgo_Socialfeeds_Model_Socialfeed|null)
31
+ * @author Ultimate Module Creator
32
+ */
33
+ public function getCurrentSocialfeed()
34
+ {
35
+ return Mage::registry('current_socialfeed');
36
+ }
37
+ }
app/code/community/Netgo/Socialfeeds/Controller/Adminhtml/Socialfeeds.php ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * module base admin controller
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_Controller_Adminhtml_Socialfeeds extends Mage_Adminhtml_Controller_Action
25
+ {
26
+ /**
27
+ * upload file and get the uploaded name
28
+ *
29
+ * @access public
30
+ * @param string $input
31
+ * @param string $destinationFolder
32
+ * @param array $data
33
+ * @return string
34
+ * @author Ultimate Module Creator
35
+ */
36
+ protected function _uploadAndGetName($input, $destinationFolder, $data)
37
+ {
38
+ try {
39
+ if (isset($data[$input]['delete'])) {
40
+ return '';
41
+ } else {
42
+ $uploader = new Varien_File_Uploader($input);
43
+ $uploader->setAllowRenameFiles(true);
44
+ $uploader->setFilesDispersion(true);
45
+ $uploader->setAllowCreateFolders(true);
46
+ $result = $uploader->save($destinationFolder);
47
+ return $result['file'];
48
+ }
49
+ } catch (Exception $e) {
50
+ if ($e->getCode() != Varien_File_Uploader::TMP_NAME_EMPTY) {
51
+ throw $e;
52
+ } else {
53
+ if (isset($data[$input]['value'])) {
54
+ return $data[$input]['value'];
55
+ }
56
+ }
57
+ }
58
+ return '';
59
+ }
60
+ }
app/code/community/Netgo/Socialfeeds/Controller/Router.php ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Router
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_Controller_Router extends Mage_Core_Controller_Varien_Router_Abstract
25
+ {
26
+ /**
27
+ * init routes
28
+ *
29
+ * @access public
30
+ * @param Varien_Event_Observer $observer
31
+ * @return Netgo_Socialfeeds_Controller_Router
32
+ * @author Ultimate Module Creator
33
+ */
34
+ public function initControllerRouters($observer)
35
+ {
36
+ $front = $observer->getEvent()->getFront();
37
+ $front->addRouter('netgo_socialfeeds', $this);
38
+ return $this;
39
+ }
40
+
41
+ /**
42
+ * Validate and match entities and modify request
43
+ *
44
+ * @access public
45
+ * @param Zend_Controller_Request_Http $request
46
+ * @return bool
47
+ * @author Ultimate Module Creator
48
+ */
49
+ public function match(Zend_Controller_Request_Http $request)
50
+ {
51
+ if (!Mage::isInstalled()) {
52
+ Mage::app()->getFrontController()->getResponse()
53
+ ->setRedirect(Mage::getUrl('install'))
54
+ ->sendResponse();
55
+ exit;
56
+ }
57
+ $urlKey = trim($request->getPathInfo(), '/');
58
+ $check = array();
59
+ $check['socialfeed'] = new Varien_Object(
60
+ array(
61
+ 'prefix' => Mage::getStoreConfig('netgo_socialfeeds/socialfeed/url_prefix'),
62
+ 'suffix' => Mage::getStoreConfig('netgo_socialfeeds/socialfeed/url_suffix'),
63
+ 'list_key' => Mage::getStoreConfig('netgo_socialfeeds/socialfeed/url_rewrite_list'),
64
+ 'list_action' => 'index',
65
+ 'model' =>'netgo_socialfeeds/socialfeed',
66
+ 'controller' => 'socialfeed',
67
+ 'action' => 'view',
68
+ 'param' => 'id',
69
+ 'check_path' => 0
70
+ )
71
+ );
72
+ foreach ($check as $key=>$settings) {
73
+ if ($settings->getListKey()) {
74
+ if ($urlKey == $settings->getListKey()) {
75
+ $request->setModuleName('netgo_social feeds')
76
+ ->setControllerName($settings->getController())
77
+ ->setActionName($settings->getListAction());
78
+ $request->setAlias(
79
+ Mage_Core_Model_Url_Rewrite::REWRITE_REQUEST_PATH_ALIAS,
80
+ $urlKey
81
+ );
82
+ return true;
83
+ }
84
+ }
85
+ if ($settings['prefix']) {
86
+ $parts = explode('/', $urlKey);
87
+ if ($parts[0] != $settings['prefix'] || count($parts) != 2) {
88
+ continue;
89
+ }
90
+ $urlKey = $parts[1];
91
+ }
92
+ if ($settings['suffix']) {
93
+ $urlKey = substr($urlKey, 0, -strlen($settings['suffix']) - 1);
94
+ }
95
+ $model = Mage::getModel($settings->getModel());
96
+ $id = $model->checkUrlKey($urlKey, Mage::app()->getStore()->getId());
97
+ if ($id) {
98
+ if ($settings->getCheckPath() && !$model->load($id)->getStatusPath()) {
99
+ continue;
100
+ }
101
+ $request->setModuleName('netgo_social feeds')
102
+ ->setControllerName($settings->getController())
103
+ ->setActionName($settings->getAction())
104
+ ->setParam($settings->getParam(), $id);
105
+ $request->setAlias(
106
+ Mage_Core_Model_Url_Rewrite::REWRITE_REQUEST_PATH_ALIAS,
107
+ $urlKey
108
+ );
109
+ return true;
110
+ }
111
+ }
112
+ return false;
113
+ }
114
+ }
app/code/community/Netgo/Socialfeeds/Helper/Data.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeeds default helper
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_Helper_Data extends Mage_Core_Helper_Abstract
25
+ {
26
+ /**
27
+ * convert array to options
28
+ *
29
+ * @access public
30
+ * @param $options
31
+ * @return array
32
+ * @author Ultimate Module Creator
33
+ */
34
+ public function convertOptions($options)
35
+ {
36
+ $converted = array();
37
+ foreach ($options as $option) {
38
+ if (isset($option['value']) && !is_array($option['value']) &&
39
+ isset($option['label']) && !is_array($option['label'])) {
40
+ $converted[$option['value']] = $option['label'];
41
+ }
42
+ }
43
+ return $converted;
44
+ }
45
+ }
app/code/community/Netgo/Socialfeeds/Helper/Socialfeed.php ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed helper
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+
25
+
26
+ class Netgo_Socialfeeds_Helper_Socialfeed extends Mage_Core_Helper_Abstract
27
+ {
28
+
29
+ /**
30
+ * check if breadcrumbs can be used
31
+ *
32
+ * @access public
33
+ * @return bool
34
+ * @author Ultimate Module Creator
35
+ */
36
+ public function getCheckMod()
37
+ {
38
+ return Mage::getStoreConfigFlag('netgo_socialfeeds/socialfeed/mod_status');
39
+ }
40
+
41
+ /**
42
+ * check if breadcrumbs can be used
43
+ *
44
+ * @access public
45
+ * @return bool
46
+ * @author Ultimate Module Creator
47
+ */
48
+ public function getCheckFB()
49
+ {
50
+ return Mage::getStoreConfigFlag('netgo_socialfeeds/fb_socialfeed/fb_status');
51
+ }
52
+
53
+ /**
54
+ * check if breadcrumbs can be used
55
+ *
56
+ * @access public
57
+ * @return bool
58
+ * @author Ultimate Module Creator
59
+ */
60
+ public function getCheckTW()
61
+ {
62
+ return Mage::getStoreConfigFlag('netgo_socialfeeds/tw_socialfeed/tw_status');
63
+ }
64
+
65
+ /**
66
+ * check if breadcrumbs can be used
67
+ *
68
+ * @access public
69
+ * @return bool
70
+ * @author Ultimate Module Creator
71
+ */
72
+ public function getCheckIN()
73
+ {
74
+ return Mage::getStoreConfigFlag('netgo_socialfeeds/ins_socialfeed/ins_status');
75
+ }
76
+
77
+ /**
78
+ * check if breadcrumbs can be used
79
+ *
80
+ * @access public
81
+ * @return bool
82
+ * @author Ultimate Module Creator
83
+ */
84
+ public function getCheckPI()
85
+ {
86
+ return Mage::getStoreConfigFlag('netgo_socialfeeds/pi_socialfeed/pi_status');
87
+ }
88
+
89
+ /**
90
+ * check if breadcrumbs can be used
91
+ *
92
+ * @access public
93
+ * @return bool
94
+ * @author Ultimate Module Creator
95
+ */
96
+ public function getCheckYT()
97
+ {
98
+ return Mage::getStoreConfigFlag('netgo_socialfeeds/yt_socialfeed/yt_status');
99
+ }
100
+ }
app/code/community/Netgo/Socialfeeds/Model/Resource/Setup.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeeds setup
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_Model_Resource_Setup extends Mage_Core_Model_Resource_Setup
25
+ {
26
+ }
app/code/community/Netgo/Socialfeeds/Model/Resource/Socialfeed.php ADDED
@@ -0,0 +1,180 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed resource model
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_Model_Resource_Socialfeed extends Mage_Core_Model_Resource_Db_Abstract
25
+ {
26
+
27
+ /**
28
+ * constructor
29
+ *
30
+ * @access public
31
+ * @author Ultimate Module Creator
32
+ */
33
+ public function _construct()
34
+ {
35
+ $this->_init('netgo_socialfeeds/socialfeed', 'entity_id');
36
+ }
37
+
38
+ /**
39
+ * check url key
40
+ *
41
+ * @access public
42
+ * @param string $urlKey
43
+ * @param int $storeId
44
+ * @param bool $active
45
+ * @return mixed
46
+ * @author Ultimate Module Creator
47
+ */
48
+ public function checkUrlKey($urlKey, $storeId, $active = true)
49
+ {
50
+ $stores = array(Mage_Core_Model_App::ADMIN_STORE_ID, $storeId);
51
+ $select = $this->_initCheckUrlKeySelect($urlKey, $stores);
52
+ if ($active) {
53
+ $select->where('e.status = ?', $active);
54
+ }
55
+ $select->reset(Zend_Db_Select::COLUMNS)
56
+ ->columns('e.entity_id')
57
+ ->limit(1);
58
+
59
+ return $this->_getReadAdapter()->fetchOne($select);
60
+ }
61
+
62
+ /**
63
+ * Check for unique URL key
64
+ *
65
+ * @access public
66
+ * @param Mage_Core_Model_Abstract $object
67
+ * @return bool
68
+ * @author Ultimate Module Creator
69
+ */
70
+ public function getIsUniqueUrlKey(Mage_Core_Model_Abstract $object)
71
+ {
72
+ if (Mage::app()->isSingleStoreMode() || !$object->hasStores()) {
73
+ $stores = array(Mage_Core_Model_App::ADMIN_STORE_ID);
74
+ } else {
75
+ $stores = (array)$object->getData('stores');
76
+ }
77
+ $select = $this->_initCheckUrlKeySelect($object->getData('url_key'), $stores);
78
+ if ($object->getId()) {
79
+ $select->where('e.entity_id <> ?', $object->getId());
80
+ }
81
+ if ($this->_getWriteAdapter()->fetchRow($select)) {
82
+ return false;
83
+ }
84
+ return true;
85
+ }
86
+
87
+ /**
88
+ * Check if the URL key is numeric
89
+ *
90
+ * @access public
91
+ * @param Mage_Core_Model_Abstract $object
92
+ * @return bool
93
+ * @author Ultimate Module Creator
94
+ */
95
+ protected function isNumericUrlKey(Mage_Core_Model_Abstract $object)
96
+ {
97
+ return preg_match('/^[0-9]+$/', $object->getData('url_key'));
98
+ }
99
+
100
+ /**
101
+ * Check if the URL key is valid
102
+ *
103
+ * @access public
104
+ * @param Mage_Core_Model_Abstract $object
105
+ * @return bool
106
+ * @author Ultimate Module Creator
107
+ */
108
+ protected function isValidUrlKey(Mage_Core_Model_Abstract $object)
109
+ {
110
+ return preg_match('/^[a-z0-9][a-z0-9_\/-]+(\.[a-z0-9_-]+)?$/', $object->getData('url_key'));
111
+ }
112
+
113
+ /**
114
+ * format string as url key
115
+ *
116
+ * @access public
117
+ * @param string $str
118
+ * @return string
119
+ * @author Ultimate Module Creator
120
+ */
121
+ public function formatUrlKey($str)
122
+ {
123
+ $urlKey = preg_replace('#[^0-9a-z]+#i', '-', Mage::helper('catalog/product_url')->format($str));
124
+ $urlKey = strtolower($urlKey);
125
+ $urlKey = trim($urlKey, '-');
126
+ return $urlKey;
127
+ }
128
+
129
+ /**
130
+ * init the check select
131
+ *
132
+ * @access protected
133
+ * @param string $urlKey
134
+ * @param array $store
135
+ * @return Zend_Db_Select
136
+ * @author Ultimate Module Creator
137
+ */
138
+ protected function _initCheckUrlKeySelect($urlKey, $store)
139
+ {
140
+ $select = $this->_getReadAdapter()->select()
141
+ ->from(array('e' => $this->getMainTable()))
142
+ ->where('e.url_key = ?', $urlKey);
143
+ return $select;
144
+ }
145
+ /**
146
+ * validate before saving
147
+ *
148
+ * @access protected
149
+ * @param $object
150
+ * @return Netgo_Socialfeeds_Model_Resource_Socialfeed
151
+ * @author Ultimate Module Creator
152
+ */
153
+ protected function _beforeSave(Mage_Core_Model_Abstract $object)
154
+ {
155
+ $urlKey = $object->getData('url_key');
156
+ if ($urlKey == '') {
157
+ $urlKey = $object->getSocialfeedsStatus();
158
+ }
159
+ $urlKey = $this->formatUrlKey($urlKey);
160
+ $validKey = false;
161
+ while (!$validKey) {
162
+ $entityId = $this->checkUrlKey($urlKey, $object->getStoreId(), false);
163
+ if ($entityId == $object->getId() || empty($entityId)) {
164
+ $validKey = true;
165
+ } else {
166
+ $parts = explode('-', $urlKey);
167
+ $last = $parts[count($parts) - 1];
168
+ if (!is_numeric($last)) {
169
+ $urlKey = $urlKey.'-1';
170
+ } else {
171
+ $suffix = '-'.($last + 1);
172
+ unset($parts[count($parts) - 1]);
173
+ $urlKey = implode('-', $parts).$suffix;
174
+ }
175
+ }
176
+ }
177
+ $object->setData('url_key', $urlKey);
178
+ return parent::_beforeSave($object);
179
+ }
180
+ }
app/code/community/Netgo/Socialfeeds/Model/Resource/Socialfeed/Collection.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed collection resource model
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_Model_Resource_Socialfeed_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
25
+ {
26
+ protected $_joinedFields = array();
27
+
28
+ /**
29
+ * constructor
30
+ *
31
+ * @access public
32
+ * @return void
33
+ * @author Ultimate Module Creator
34
+ */
35
+ protected function _construct()
36
+ {
37
+ parent::_construct();
38
+ $this->_init('netgo_socialfeeds/socialfeed');
39
+ }
40
+
41
+ /**
42
+ * get socialfeeds as array
43
+ *
44
+ * @access protected
45
+ * @param string $valueField
46
+ * @param string $labelField
47
+ * @param array $additional
48
+ * @return array
49
+ * @author Ultimate Module Creator
50
+ */
51
+ protected function _toOptionArray($valueField='entity_id', $labelField='socialfeeds_status', $additional=array())
52
+ {
53
+ return parent::_toOptionArray($valueField, $labelField, $additional);
54
+ }
55
+
56
+ /**
57
+ * get options hash
58
+ *
59
+ * @access protected
60
+ * @param string $valueField
61
+ * @param string $labelField
62
+ * @return array
63
+ * @author Ultimate Module Creator
64
+ */
65
+ protected function _toOptionHash($valueField='entity_id', $labelField='socialfeeds_status')
66
+ {
67
+ return parent::_toOptionHash($valueField, $labelField);
68
+ }
69
+
70
+ /**
71
+ * Get SQL for get record count.
72
+ * Extra GROUP BY strip added.
73
+ *
74
+ * @access public
75
+ * @return Varien_Db_Select
76
+ * @author Ultimate Module Creator
77
+ */
78
+ public function getSelectCountSql()
79
+ {
80
+ $countSelect = parent::getSelectCountSql();
81
+ $countSelect->reset(Zend_Db_Select::GROUP);
82
+ return $countSelect;
83
+ }
84
+ }
app/code/community/Netgo/Socialfeeds/Model/Socialfeed.php ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed model
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_Model_Socialfeed extends Mage_Core_Model_Abstract
25
+ {
26
+ /**
27
+ * Entity code.
28
+ * Can be used as part of method name for entity processing
29
+ */
30
+ const ENTITY = 'netgo_socialfeeds_socialfeed';
31
+ const CACHE_TAG = 'netgo_socialfeeds_socialfeed';
32
+
33
+ /**
34
+ * Prefix of model events names
35
+ *
36
+ * @var string
37
+ */
38
+ protected $_eventPrefix = 'netgo_socialfeeds_socialfeed';
39
+
40
+ /**
41
+ * Parameter name in event
42
+ *
43
+ * @var string
44
+ */
45
+ protected $_eventObject = 'socialfeed';
46
+
47
+ /**
48
+ * constructor
49
+ *
50
+ * @access public
51
+ * @return void
52
+ * @author Ultimate Module Creator
53
+ */
54
+ public function _construct()
55
+ {
56
+ parent::_construct();
57
+ $this->_init('netgo_socialfeeds/socialfeed');
58
+ }
59
+
60
+ /**
61
+ * before save socialfeed
62
+ *
63
+ * @access protected
64
+ * @return Netgo_Socialfeeds_Model_Socialfeed
65
+ * @author Ultimate Module Creator
66
+ */
67
+ protected function _beforeSave()
68
+ {
69
+ parent::_beforeSave();
70
+ $now = Mage::getSingleton('core/date')->gmtDate();
71
+ if ($this->isObjectNew()) {
72
+ $this->setCreatedAt($now);
73
+ }
74
+ $this->setUpdatedAt($now);
75
+ return $this;
76
+ }
77
+
78
+ /**
79
+ * get the url to the socialfeed details page
80
+ *
81
+ * @access public
82
+ * @return string
83
+ * @author Ultimate Module Creator
84
+ */
85
+ public function getSocialfeedUrl()
86
+ {
87
+ if ($this->getUrlKey()) {
88
+ $urlKey = '';
89
+ if ($prefix = Mage::getStoreConfig('netgo_socialfeeds/socialfeed/url_prefix')) {
90
+ $urlKey .= $prefix.'/';
91
+ }
92
+ $urlKey .= $this->getUrlKey();
93
+ if ($suffix = Mage::getStoreConfig('netgo_socialfeeds/socialfeed/url_suffix')) {
94
+ $urlKey .= '.'.$suffix;
95
+ }
96
+ return Mage::getUrl('', array('_direct'=>$urlKey));
97
+ }
98
+ return Mage::getUrl('netgo_socialfeeds/socialfeed/view', array('id'=>$this->getId()));
99
+ }
100
+
101
+ /**
102
+ * check URL key
103
+ *
104
+ * @access public
105
+ * @param string $urlKey
106
+ * @param bool $active
107
+ * @return mixed
108
+ * @author Ultimate Module Creator
109
+ */
110
+ public function checkUrlKey($urlKey, $active = true)
111
+ {
112
+ return $this->_getResource()->checkUrlKey($urlKey, $active);
113
+ }
114
+
115
+ /**
116
+ * save socialfeed relation
117
+ *
118
+ * @access public
119
+ * @return Netgo_Socialfeeds_Model_Socialfeed
120
+ * @author Ultimate Module Creator
121
+ */
122
+ protected function _afterSave()
123
+ {
124
+ return parent::_afterSave();
125
+ }
126
+
127
+ /**
128
+ * get default values
129
+ *
130
+ * @access public
131
+ * @return array
132
+ * @author Ultimate Module Creator
133
+ */
134
+ public function getDefaultValues()
135
+ {
136
+ $values = array();
137
+ $values['status'] = 1;
138
+ return $values;
139
+ }
140
+
141
+ }
app/code/community/Netgo/Socialfeeds/controllers/Adminhtml/Socialfeeds/SocialfeedController.php ADDED
@@ -0,0 +1,328 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed admin controller
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_Adminhtml_Socialfeeds_SocialfeedController extends Netgo_Socialfeeds_Controller_Adminhtml_Socialfeeds
25
+ {
26
+ /**
27
+ * init the socialfeed
28
+ *
29
+ * @access protected
30
+ * @return Netgo_Socialfeeds_Model_Socialfeed
31
+ */
32
+ protected function _initSocialfeed()
33
+ {
34
+ $socialfeedId = (int) $this->getRequest()->getParam('id');
35
+ $socialfeed = Mage::getModel('netgo_socialfeeds/socialfeed');
36
+ if ($socialfeedId) {
37
+ $socialfeed->load($socialfeedId);
38
+ }
39
+ Mage::register('current_socialfeed', $socialfeed);
40
+ return $socialfeed;
41
+ }
42
+
43
+ /**
44
+ * default action
45
+ *
46
+ * @access public
47
+ * @return void
48
+ * @author Ultimate Module Creator
49
+ */
50
+ public function indexAction()
51
+ {
52
+ $this->loadLayout();
53
+ $this->_title(Mage::helper('netgo_socialfeeds')->__('Social Feeds'))
54
+ ->_title(Mage::helper('netgo_socialfeeds')->__('Socialfeeds'));
55
+ $this->renderLayout();
56
+ }
57
+
58
+ /**
59
+ * grid action
60
+ *
61
+ * @access public
62
+ * @return void
63
+ * @author Ultimate Module Creator
64
+ */
65
+ public function gridAction()
66
+ {
67
+ $this->loadLayout()->renderLayout();
68
+ }
69
+
70
+ /**
71
+ * edit socialfeed - action
72
+ *
73
+ * @access public
74
+ * @return void
75
+ * @author Ultimate Module Creator
76
+ */
77
+ public function editAction()
78
+ {
79
+ $socialfeedId = $this->getRequest()->getParam('id');
80
+ $socialfeed = $this->_initSocialfeed();
81
+ if ($socialfeedId && !$socialfeed->getId()) {
82
+ $this->_getSession()->addError(
83
+ Mage::helper('netgo_socialfeeds')->__('This socialfeed no longer exists.')
84
+ );
85
+ $this->_redirect('*/*/');
86
+ return;
87
+ }
88
+ $data = Mage::getSingleton('adminhtml/session')->getSocialfeedData(true);
89
+ if (!empty($data)) {
90
+ $socialfeed->setData($data);
91
+ }
92
+ Mage::register('socialfeed_data', $socialfeed);
93
+ $this->loadLayout();
94
+ $this->_title(Mage::helper('netgo_socialfeeds')->__('Social Feeds'))
95
+ ->_title(Mage::helper('netgo_socialfeeds')->__('Socialfeeds'));
96
+ if ($socialfeed->getId()) {
97
+ $this->_title($socialfeed->getSocialfeedsStatus());
98
+ } else {
99
+ $this->_title(Mage::helper('netgo_socialfeeds')->__('Add socialfeed'));
100
+ }
101
+ if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
102
+ $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
103
+ }
104
+ $this->renderLayout();
105
+ }
106
+
107
+ /**
108
+ * new socialfeed action
109
+ *
110
+ * @access public
111
+ * @return void
112
+ * @author Ultimate Module Creator
113
+ */
114
+ public function newAction()
115
+ {
116
+ $this->_forward('edit');
117
+ }
118
+
119
+ /**
120
+ * save socialfeed - action
121
+ *
122
+ * @access public
123
+ * @return void
124
+ * @author Ultimate Module Creator
125
+ */
126
+ public function saveAction()
127
+ {
128
+ if ($data = $this->getRequest()->getPost('socialfeed')) {
129
+ try {
130
+ $socialfeed = $this->_initSocialfeed();
131
+ $socialfeed->addData($data);
132
+ $socialfeed->save();
133
+ Mage::getSingleton('adminhtml/session')->addSuccess(
134
+ Mage::helper('netgo_socialfeeds')->__('Socialfeed was successfully saved')
135
+ );
136
+ Mage::getSingleton('adminhtml/session')->setFormData(false);
137
+ if ($this->getRequest()->getParam('back')) {
138
+ $this->_redirect('*/*/edit', array('id' => $socialfeed->getId()));
139
+ return;
140
+ }
141
+ $this->_redirect('*/*/');
142
+ return;
143
+ } catch (Mage_Core_Exception $e) {
144
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
145
+ Mage::getSingleton('adminhtml/session')->setSocialfeedData($data);
146
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
147
+ return;
148
+ } catch (Exception $e) {
149
+ Mage::logException($e);
150
+ Mage::getSingleton('adminhtml/session')->addError(
151
+ Mage::helper('netgo_socialfeeds')->__('There was a problem saving the socialfeed.')
152
+ );
153
+ Mage::getSingleton('adminhtml/session')->setSocialfeedData($data);
154
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
155
+ return;
156
+ }
157
+ }
158
+ Mage::getSingleton('adminhtml/session')->addError(
159
+ Mage::helper('netgo_socialfeeds')->__('Unable to find socialfeed to save.')
160
+ );
161
+ $this->_redirect('*/*/');
162
+ }
163
+
164
+ /**
165
+ * delete socialfeed - action
166
+ *
167
+ * @access public
168
+ * @return void
169
+ * @author Ultimate Module Creator
170
+ */
171
+ public function deleteAction()
172
+ {
173
+ if ( $this->getRequest()->getParam('id') > 0) {
174
+ try {
175
+ $socialfeed = Mage::getModel('netgo_socialfeeds/socialfeed');
176
+ $socialfeed->setId($this->getRequest()->getParam('id'))->delete();
177
+ Mage::getSingleton('adminhtml/session')->addSuccess(
178
+ Mage::helper('netgo_socialfeeds')->__('Socialfeed was successfully deleted.')
179
+ );
180
+ $this->_redirect('*/*/');
181
+ return;
182
+ } catch (Mage_Core_Exception $e) {
183
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
184
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
185
+ } catch (Exception $e) {
186
+ Mage::getSingleton('adminhtml/session')->addError(
187
+ Mage::helper('netgo_socialfeeds')->__('There was an error deleting socialfeed.')
188
+ );
189
+ $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
190
+ Mage::logException($e);
191
+ return;
192
+ }
193
+ }
194
+ Mage::getSingleton('adminhtml/session')->addError(
195
+ Mage::helper('netgo_socialfeeds')->__('Could not find socialfeed to delete.')
196
+ );
197
+ $this->_redirect('*/*/');
198
+ }
199
+
200
+ /**
201
+ * mass delete socialfeed - action
202
+ *
203
+ * @access public
204
+ * @return void
205
+ * @author Ultimate Module Creator
206
+ */
207
+ public function massDeleteAction()
208
+ {
209
+ $socialfeedIds = $this->getRequest()->getParam('socialfeed');
210
+ if (!is_array($socialfeedIds)) {
211
+ Mage::getSingleton('adminhtml/session')->addError(
212
+ Mage::helper('netgo_socialfeeds')->__('Please select socialfeeds to delete.')
213
+ );
214
+ } else {
215
+ try {
216
+ foreach ($socialfeedIds as $socialfeedId) {
217
+ $socialfeed = Mage::getModel('netgo_socialfeeds/socialfeed');
218
+ $socialfeed->setId($socialfeedId)->delete();
219
+ }
220
+ Mage::getSingleton('adminhtml/session')->addSuccess(
221
+ Mage::helper('netgo_socialfeeds')->__('Total of %d socialfeeds were successfully deleted.', count($socialfeedIds))
222
+ );
223
+ } catch (Mage_Core_Exception $e) {
224
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
225
+ } catch (Exception $e) {
226
+ Mage::getSingleton('adminhtml/session')->addError(
227
+ Mage::helper('netgo_socialfeeds')->__('There was an error deleting socialfeeds.')
228
+ );
229
+ Mage::logException($e);
230
+ }
231
+ }
232
+ $this->_redirect('*/*/index');
233
+ }
234
+
235
+ /**
236
+ * mass status change - action
237
+ *
238
+ * @access public
239
+ * @return void
240
+ * @author Ultimate Module Creator
241
+ */
242
+ public function massStatusAction()
243
+ {
244
+ $socialfeedIds = $this->getRequest()->getParam('socialfeed');
245
+ if (!is_array($socialfeedIds)) {
246
+ Mage::getSingleton('adminhtml/session')->addError(
247
+ Mage::helper('netgo_socialfeeds')->__('Please select socialfeeds.')
248
+ );
249
+ } else {
250
+ try {
251
+ foreach ($socialfeedIds as $socialfeedId) {
252
+ $socialfeed = Mage::getSingleton('netgo_socialfeeds/socialfeed')->load($socialfeedId)
253
+ ->setStatus($this->getRequest()->getParam('status'))
254
+ ->setIsMassupdate(true)
255
+ ->save();
256
+ }
257
+ $this->_getSession()->addSuccess(
258
+ $this->__('Total of %d socialfeeds were successfully updated.', count($socialfeedIds))
259
+ );
260
+ } catch (Mage_Core_Exception $e) {
261
+ Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
262
+ } catch (Exception $e) {
263
+ Mage::getSingleton('adminhtml/session')->addError(
264
+ Mage::helper('netgo_socialfeeds')->__('There was an error updating socialfeeds.')
265
+ );
266
+ Mage::logException($e);
267
+ }
268
+ }
269
+ $this->_redirect('*/*/index');
270
+ }
271
+
272
+ /**
273
+ * export as csv - action
274
+ *
275
+ * @access public
276
+ * @return void
277
+ * @author Ultimate Module Creator
278
+ */
279
+ public function exportCsvAction()
280
+ {
281
+ $fileName = 'socialfeed.csv';
282
+ $content = $this->getLayout()->createBlock('netgo_socialfeeds/adminhtml_socialfeed_grid')
283
+ ->getCsv();
284
+ $this->_prepareDownloadResponse($fileName, $content);
285
+ }
286
+
287
+ /**
288
+ * export as MsExcel - action
289
+ *
290
+ * @access public
291
+ * @return void
292
+ * @author Ultimate Module Creator
293
+ */
294
+ public function exportExcelAction()
295
+ {
296
+ $fileName = 'socialfeed.xls';
297
+ $content = $this->getLayout()->createBlock('netgo_socialfeeds/adminhtml_socialfeed_grid')
298
+ ->getExcelFile();
299
+ $this->_prepareDownloadResponse($fileName, $content);
300
+ }
301
+
302
+ /**
303
+ * export as xml - action
304
+ *
305
+ * @access public
306
+ * @return void
307
+ * @author Ultimate Module Creator
308
+ */
309
+ public function exportXmlAction()
310
+ {
311
+ $fileName = 'socialfeed.xml';
312
+ $content = $this->getLayout()->createBlock('netgo_socialfeeds/adminhtml_socialfeed_grid')
313
+ ->getXml();
314
+ $this->_prepareDownloadResponse($fileName, $content);
315
+ }
316
+
317
+ /**
318
+ * Check if admin has permissions to visit related pages
319
+ *
320
+ * @access protected
321
+ * @return boolean
322
+ * @author Ultimate Module Creator
323
+ */
324
+ protected function _isAllowed()
325
+ {
326
+ return Mage::getSingleton('admin/session')->isAllowed('netgo_socialfeeds/socialfeed');
327
+ }
328
+ }
app/code/community/Netgo/Socialfeeds/controllers/SocialfeedController.php ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeed front contrller
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ class Netgo_Socialfeeds_SocialfeedController extends Mage_Core_Controller_Front_Action
25
+ {
26
+
27
+ /**
28
+ * default action
29
+ *
30
+ * @access public
31
+ * @return void
32
+ * @author Ultimate Module Creator
33
+ */
34
+ public function indexAction()
35
+ {
36
+ $this->loadLayout();
37
+ $this->_initLayoutMessages('catalog/session');
38
+ $this->_initLayoutMessages('customer/session');
39
+ $this->_initLayoutMessages('checkout/session');
40
+ if (Mage::helper('netgo_socialfeeds/socialfeed')->getUseBreadcrumbs()) {
41
+ if ($breadcrumbBlock = $this->getLayout()->getBlock('breadcrumbs')) {
42
+ $breadcrumbBlock->addCrumb(
43
+ 'home',
44
+ array(
45
+ 'label' => Mage::helper('netgo_socialfeeds')->__('Home'),
46
+ 'link' => Mage::getUrl(),
47
+ )
48
+ );
49
+ $breadcrumbBlock->addCrumb(
50
+ 'socialfeeds',
51
+ array(
52
+ 'label' => Mage::helper('netgo_socialfeeds')->__('Socialfeeds'),
53
+ 'link' => '',
54
+ )
55
+ );
56
+ }
57
+ }
58
+ $headBlock = $this->getLayout()->getBlock('head');
59
+ if ($headBlock) {
60
+ $headBlock->addLinkRel('canonical', Mage::helper('netgo_socialfeeds/socialfeed')->getSocialfeedsUrl());
61
+ }
62
+ $this->renderLayout();
63
+ }
64
+
65
+ /**
66
+ * init Socialfeed
67
+ *
68
+ * @access protected
69
+ * @return Netgo_Socialfeeds_Model_Socialfeed
70
+ * @author Ultimate Module Creator
71
+ */
72
+ protected function _initSocialfeed()
73
+ {
74
+ $socialfeedId = $this->getRequest()->getParam('id', 0);
75
+ $socialfeed = Mage::getModel('netgo_socialfeeds/socialfeed')
76
+ ->setStoreId(Mage::app()->getStore()->getId())
77
+ ->load($socialfeedId);
78
+ if (!$socialfeed->getId()) {
79
+ return false;
80
+ } elseif (!$socialfeed->getStatus()) {
81
+ return false;
82
+ }
83
+ return $socialfeed;
84
+ }
85
+
86
+ /**
87
+ * view socialfeed action
88
+ *
89
+ * @access public
90
+ * @return void
91
+ * @author Ultimate Module Creator
92
+ */
93
+ public function viewAction()
94
+ {
95
+ $socialfeed = $this->_initSocialfeed();
96
+ if (!$socialfeed) {
97
+ $this->_forward('no-route');
98
+ return;
99
+ }
100
+ Mage::register('current_socialfeed', $socialfeed);
101
+ $this->loadLayout();
102
+ $this->_initLayoutMessages('catalog/session');
103
+ $this->_initLayoutMessages('customer/session');
104
+ $this->_initLayoutMessages('checkout/session');
105
+ if ($root = $this->getLayout()->getBlock('root')) {
106
+ $root->addBodyClass('socialfeeds-socialfeed socialfeeds-socialfeed' . $socialfeed->getId());
107
+ }
108
+ if (Mage::helper('netgo_socialfeeds/socialfeed')->getUseBreadcrumbs()) {
109
+ if ($breadcrumbBlock = $this->getLayout()->getBlock('breadcrumbs')) {
110
+ $breadcrumbBlock->addCrumb(
111
+ 'home',
112
+ array(
113
+ 'label' => Mage::helper('netgo_socialfeeds')->__('Home'),
114
+ 'link' => Mage::getUrl(),
115
+ )
116
+ );
117
+ $breadcrumbBlock->addCrumb(
118
+ 'socialfeeds',
119
+ array(
120
+ 'label' => Mage::helper('netgo_socialfeeds')->__('Socialfeeds'),
121
+ 'link' => Mage::helper('netgo_socialfeeds/socialfeed')->getSocialfeedsUrl(),
122
+ )
123
+ );
124
+ $breadcrumbBlock->addCrumb(
125
+ 'socialfeed',
126
+ array(
127
+ 'label' => $socialfeed->getSocialfeedsStatus(),
128
+ 'link' => '',
129
+ )
130
+ );
131
+ }
132
+ }
133
+ $headBlock = $this->getLayout()->getBlock('head');
134
+ if ($headBlock) {
135
+ $headBlock->addLinkRel('canonical', $socialfeed->getSocialfeedUrl());
136
+ }
137
+ $this->renderLayout();
138
+ }
139
+ }
app/code/community/Netgo/Socialfeeds/etc/adminhtml.xml ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Netgo_Socialfeeds extension
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the MIT License
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/mit-license.php
12
+ *
13
+ * @category Netgo
14
+ * @package Netgo_Socialfeeds
15
+ * @copyright Copyright (c) 2015
16
+ * @license http://opensource.org/licenses/mit-license.php MIT License
17
+ */
18
+ -->
19
+ <config>
20
+ <acl>
21
+ <resources>
22
+ <admin>
23
+ <children>
24
+ <system>
25
+ <children>
26
+ <config>
27
+ <children>
28
+ <netgo_socialfeeds translate="title" module="netgo_socialfeeds">
29
+ <title>Socialfeeds</title>
30
+ </netgo_socialfeeds>
31
+ </children>
32
+ </config>
33
+ </children>
34
+ </system>
35
+ <netgo_socialfeeds translate="title" module="netgo_socialfeeds">
36
+ <title>Social Feeds</title>
37
+ <children>
38
+ <socialfeed translate="title" module="netgo_socialfeeds">
39
+ <title>Socialfeed</title>
40
+ <sort_order>0</sort_order>
41
+ </socialfeed>
42
+ </children>
43
+ </netgo_socialfeeds>
44
+ </children>
45
+ </admin>
46
+ </resources>
47
+ </acl>
48
+ <menu>
49
+ <netgo_socialfeeds translate="title" module="netgo_socialfeeds">
50
+ <title>Social Feeds</title>
51
+ <sort_order>37</sort_order>
52
+ <children>
53
+ <socialfeed translate="title" module="netgo_socialfeeds">
54
+ <title>Socialfeed</title>
55
+ <action>adminhtml/socialfeeds_socialfeed</action>
56
+ <sort_order>0</sort_order>
57
+ </socialfeed>
58
+ </children>
59
+ </netgo_socialfeeds>
60
+ </menu>
61
+ </config>
app/code/community/Netgo/Socialfeeds/etc/config.xml ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Netgo_Socialfeeds extension
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the MIT License
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/mit-license.php
12
+ *
13
+ * @category Netgo
14
+ * @package Netgo_Socialfeeds
15
+ * @copyright Copyright (c) 2015
16
+ * @license http://opensource.org/licenses/mit-license.php MIT License
17
+ */
18
+ -->
19
+ <config>
20
+ <modules>
21
+ <Netgo_Socialfeeds>
22
+ <version>1.0.1</version>
23
+ </Netgo_Socialfeeds>
24
+ </modules>
25
+ <global>
26
+ <resources>
27
+ <netgo_socialfeeds_setup>
28
+ <setup>
29
+ <module>Netgo_Socialfeeds</module>
30
+ <class>Netgo_Socialfeeds_Model_Resource_Setup</class>
31
+ </setup>
32
+ </netgo_socialfeeds_setup>
33
+ </resources>
34
+ <blocks>
35
+ <netgo_socialfeeds>
36
+ <class>Netgo_Socialfeeds_Block</class>
37
+ </netgo_socialfeeds>
38
+ </blocks>
39
+ <helpers>
40
+ <netgo_socialfeeds>
41
+ <class>Netgo_Socialfeeds_Helper</class>
42
+ </netgo_socialfeeds>
43
+ </helpers>
44
+ <models>
45
+ <netgo_socialfeeds>
46
+ <class>Netgo_Socialfeeds_Model</class>
47
+ <resourceModel>netgo_socialfeeds_resource</resourceModel>
48
+ </netgo_socialfeeds>
49
+ <netgo_socialfeeds_resource>
50
+ <class>Netgo_Socialfeeds_Model_Resource</class>
51
+ <entities>
52
+ <socialfeed>
53
+ <table>netgo_socialfeeds_socialfeed</table>
54
+ </socialfeed>
55
+ </entities>
56
+ </netgo_socialfeeds_resource>
57
+ </models>
58
+ <events>
59
+ <controller_front_init_routers>
60
+ <observers>
61
+ <netgo_socialfeeds>
62
+ <class>Netgo_Socialfeeds_Controller_Router</class>
63
+ <method>initControllerRouters</method>
64
+ </netgo_socialfeeds>
65
+ </observers>
66
+ </controller_front_init_routers>
67
+ </events>
68
+ </global>
69
+ <adminhtml>
70
+ <layout>
71
+ <updates>
72
+ <netgo_socialfeeds>
73
+ <file>netgo_socialfeeds.xml</file>
74
+ </netgo_socialfeeds>
75
+ </updates>
76
+ </layout>
77
+ <translate>
78
+ <modules>
79
+ <Netgo_Socialfeeds>
80
+ <files>
81
+ <default>Netgo_Socialfeeds.csv</default>
82
+ </files>
83
+ </Netgo_Socialfeeds>
84
+ </modules>
85
+ </translate>
86
+ </adminhtml>
87
+ <admin>
88
+ <routers>
89
+ <adminhtml>
90
+ <args>
91
+ <modules>
92
+ <Netgo_Socialfeeds before="Mage_Adminhtml">Netgo_Socialfeeds_Adminhtml</Netgo_Socialfeeds>
93
+ </modules>
94
+ </args>
95
+ </adminhtml>
96
+ </routers>
97
+ </admin>
98
+ <frontend>
99
+ <routers>
100
+ <netgo_socialfeeds>
101
+ <use>standard</use>
102
+ <args>
103
+ <module>Netgo_Socialfeeds</module>
104
+ <frontName>netgo_social feeds</frontName>
105
+ </args>
106
+ </netgo_socialfeeds>
107
+ </routers>
108
+ <layout>
109
+ <updates>
110
+ <netgo_socialfeeds>
111
+ <file>netgo_socialfeeds.xml</file>
112
+ </netgo_socialfeeds>
113
+ </updates>
114
+ </layout>
115
+ <translate>
116
+ <modules>
117
+ <Netgo_Socialfeeds>
118
+ <files>
119
+ <default>Netgo_Socialfeeds.csv</default>
120
+ </files>
121
+ </Netgo_Socialfeeds>
122
+ </modules>
123
+ </translate>
124
+ </frontend>
125
+ <default>
126
+ <netgo_socialfeeds>
127
+ <socialfeed>
128
+ <breadcrumbs>1</breadcrumbs>
129
+ </socialfeed>
130
+ </netgo_socialfeeds>
131
+ </default>
132
+ </config>
app/code/community/Netgo/Socialfeeds/etc/system.xml ADDED
@@ -0,0 +1,250 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Netgo_Socialfeeds extension
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the MIT License
9
+ * that is bundled with this package in the file LICENSE.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/mit-license.php
12
+ *
13
+ * @category Netgo
14
+ * @package Netgo_Socialfeeds
15
+ * @copyright Copyright (c) 2015
16
+ * @license http://opensource.org/licenses/mit-license.php MIT License
17
+ */
18
+ -->
19
+ <config>
20
+ <tabs>
21
+ <netgo translate="label" module="netgo_socialfeeds">
22
+ <label>Netgo</label>
23
+ <sort_order>2000</sort_order>
24
+ </netgo>
25
+ </tabs>
26
+ <sections>
27
+ <netgo_socialfeeds translate="label" module="netgo_socialfeeds">
28
+ <class>separator-top</class>
29
+ <label>All in one Social feeds</label>
30
+ <tab>netgo</tab>
31
+ <frontend_type>text</frontend_type>
32
+ <sort_order>100</sort_order>
33
+ <show_in_default>1</show_in_default>
34
+ <show_in_website>1</show_in_website>
35
+ <show_in_store>1</show_in_store>
36
+ <groups>
37
+ <socialfeed translate="label" module="netgo_socialfeeds">
38
+ <label>All in one Social feeds</label>
39
+ <frontend_type>text</frontend_type>
40
+ <sort_order>10</sort_order>
41
+ <show_in_default>1</show_in_default>
42
+ <show_in_website>1</show_in_website>
43
+ <show_in_store>1</show_in_store>
44
+ <fields>
45
+ <mod_status translate="label">
46
+ <label>Status</label>
47
+ <frontend_type>select</frontend_type>
48
+ <source_model>adminhtml/system_config_source_yesno</source_model>
49
+ <sort_order>10</sort_order>
50
+ <show_in_default>1</show_in_default>
51
+ <show_in_website>1</show_in_website>
52
+ <show_in_store>1</show_in_store>
53
+ </mod_status>
54
+ </fields>
55
+ </socialfeed>
56
+ <fb_socialfeed translate="label" module="netgo_socialfeeds">
57
+ <label>Facebook Credentials</label>
58
+ <frontend_type>text</frontend_type>
59
+ <sort_order>20</sort_order>
60
+ <show_in_default>1</show_in_default>
61
+ <show_in_website>1</show_in_website>
62
+ <show_in_store>1</show_in_store>
63
+ <fields>
64
+ <fb_status translate="label">
65
+ <label>Status</label>
66
+ <frontend_type>select</frontend_type>
67
+ <source_model>adminhtml/system_config_source_yesno</source_model>
68
+ <sort_order>10</sort_order>
69
+ <show_in_default>1</show_in_default>
70
+ <show_in_website>1</show_in_website>
71
+ <show_in_store>1</show_in_store>
72
+ </fb_status>
73
+ <fb_app_id translate="label">
74
+ <label>Facebook APP ID</label>
75
+ <frontend_type>text</frontend_type>
76
+ <sort_order>20</sort_order>
77
+ <show_in_default>1</show_in_default>
78
+ <show_in_website>1</show_in_website>
79
+ <show_in_store>1</show_in_store>
80
+ </fb_app_id>
81
+ <fb_secret_key translate="label">
82
+ <label>Facebook Secret Key</label>
83
+ <frontend_type>text</frontend_type>
84
+ <sort_order>30</sort_order>
85
+ <show_in_default>1</show_in_default>
86
+ <show_in_website>1</show_in_website>
87
+ <show_in_store>1</show_in_store>
88
+ </fb_secret_key>
89
+ <fb_page_id translate="label">
90
+ <label>Facebook Page ID</label>
91
+ <frontend_type>text</frontend_type>
92
+ <sort_order>40</sort_order>
93
+ <show_in_default>1</show_in_default>
94
+ <show_in_website>1</show_in_website>
95
+ <show_in_store>1</show_in_store>
96
+ </fb_page_id>
97
+ </fields>
98
+ </fb_socialfeed>
99
+ <tw_socialfeed translate="label" module="netgo_socialfeeds">
100
+ <label>Twitter Credentials</label>
101
+ <frontend_type>text</frontend_type>
102
+ <sort_order>30</sort_order>
103
+ <show_in_default>1</show_in_default>
104
+ <show_in_website>1</show_in_website>
105
+ <show_in_store>1</show_in_store>
106
+ <fields>
107
+ <tw_status translate="label">
108
+ <label>Status</label>
109
+ <frontend_type>select</frontend_type>
110
+ <source_model>adminhtml/system_config_source_yesno</source_model>
111
+ <sort_order>10</sort_order>
112
+ <show_in_default>1</show_in_default>
113
+ <show_in_website>1</show_in_website>
114
+ <show_in_store>1</show_in_store>
115
+ </tw_status>
116
+ <tw_screen_name translate="label">
117
+ <label>Screen Name</label>
118
+ <frontend_type>text</frontend_type>
119
+ <sort_order>20</sort_order>
120
+ <show_in_default>1</show_in_default>
121
+ <show_in_website>1</show_in_website>
122
+ <show_in_store>1</show_in_store>
123
+ </tw_screen_name>
124
+ <tw_consumer_key translate="label">
125
+ <label>Consumer Key</label>
126
+ <frontend_type>text</frontend_type>
127
+ <sort_order>30</sort_order>
128
+ <show_in_default>1</show_in_default>
129
+ <show_in_website>1</show_in_website>
130
+ <show_in_store>1</show_in_store>
131
+ </tw_consumer_key>
132
+ <tw_consumer_secret translate="label">
133
+ <label>Consumer Secret</label>
134
+ <frontend_type>text</frontend_type>
135
+ <sort_order>40</sort_order>
136
+ <show_in_default>1</show_in_default>
137
+ <show_in_website>1</show_in_website>
138
+ <show_in_store>1</show_in_store>
139
+ </tw_consumer_secret>
140
+ <tw_access_token translate="label">
141
+ <label>Access Token</label>
142
+ <frontend_type>text</frontend_type>
143
+ <sort_order>50</sort_order>
144
+ <show_in_default>1</show_in_default>
145
+ <show_in_website>1</show_in_website>
146
+ <show_in_store>1</show_in_store>
147
+ </tw_access_token>
148
+ <tw_access_token_secret translate="label">
149
+ <label>Access Token Secret</label>
150
+ <frontend_type>text</frontend_type>
151
+ <sort_order>60</sort_order>
152
+ <show_in_default>1</show_in_default>
153
+ <show_in_website>1</show_in_website>
154
+ <show_in_store>1</show_in_store>
155
+ </tw_access_token_secret>
156
+ </fields>
157
+ </tw_socialfeed>
158
+ <ins_socialfeed translate="label" module="netgo_socialfeeds">
159
+ <label>Instagram Credentials</label>
160
+ <frontend_type>text</frontend_type>
161
+ <sort_order>40</sort_order>
162
+ <show_in_default>1</show_in_default>
163
+ <show_in_website>1</show_in_website>
164
+ <show_in_store>1</show_in_store>
165
+ <fields>
166
+ <ins_status translate="label">
167
+ <label>Status</label>
168
+ <frontend_type>select</frontend_type>
169
+ <source_model>adminhtml/system_config_source_yesno</source_model>
170
+ <sort_order>10</sort_order>
171
+ <show_in_default>1</show_in_default>
172
+ <show_in_website>1</show_in_website>
173
+ <show_in_store>1</show_in_store>
174
+ </ins_status>
175
+ <ins_user_id translate="label">
176
+ <label>User ID</label>
177
+ <frontend_type>text</frontend_type>
178
+ <sort_order>20</sort_order>
179
+ <show_in_default>1</show_in_default>
180
+ <show_in_website>1</show_in_website>
181
+ <show_in_store>1</show_in_store>
182
+ </ins_user_id>
183
+ <ins_access_token translate="label">
184
+ <label>Access Token</label>
185
+ <frontend_type>text</frontend_type>
186
+ <sort_order>30</sort_order>
187
+ <show_in_default>1</show_in_default>
188
+ <show_in_website>1</show_in_website>
189
+ <show_in_store>1</show_in_store>
190
+ </ins_access_token>
191
+ </fields>
192
+ </ins_socialfeed>
193
+ <pi_socialfeed translate="label" module="netgo_socialfeeds">
194
+ <label>Pinterest Credentials</label>
195
+ <frontend_type>text</frontend_type>
196
+ <sort_order>50</sort_order>
197
+ <show_in_default>1</show_in_default>
198
+ <show_in_website>1</show_in_website>
199
+ <show_in_store>1</show_in_store>
200
+ <fields>
201
+ <pi_status translate="label">
202
+ <label>Status</label>
203
+ <frontend_type>select</frontend_type>
204
+ <source_model>adminhtml/system_config_source_yesno</source_model>
205
+ <sort_order>10</sort_order>
206
+ <show_in_default>1</show_in_default>
207
+ <show_in_website>1</show_in_website>
208
+ <show_in_store>1</show_in_store>
209
+ </pi_status>
210
+ <ins_user_name translate="label">
211
+ <label>User Name</label>
212
+ <frontend_type>text</frontend_type>
213
+ <sort_order>20</sort_order>
214
+ <show_in_default>1</show_in_default>
215
+ <show_in_website>1</show_in_website>
216
+ <show_in_store>1</show_in_store>
217
+ </ins_user_name>
218
+ </fields>
219
+ </pi_socialfeed>
220
+ <yt_socialfeed translate="label" module="netgo_socialfeeds">
221
+ <label>YouTube Credentials</label>
222
+ <frontend_type>text</frontend_type>
223
+ <sort_order>60</sort_order>
224
+ <show_in_default>1</show_in_default>
225
+ <show_in_website>1</show_in_website>
226
+ <show_in_store>1</show_in_store>
227
+ <fields>
228
+ <yt_status translate="label">
229
+ <label>Status</label>
230
+ <frontend_type>select</frontend_type>
231
+ <source_model>adminhtml/system_config_source_yesno</source_model>
232
+ <sort_order>10</sort_order>
233
+ <show_in_default>1</show_in_default>
234
+ <show_in_website>1</show_in_website>
235
+ <show_in_store>1</show_in_store>
236
+ </yt_status>
237
+ <yt_url translate="label">
238
+ <label>YouTube Video URL</label>
239
+ <frontend_type>text</frontend_type>
240
+ <sort_order>20</sort_order>
241
+ <show_in_default>1</show_in_default>
242
+ <show_in_website>1</show_in_website>
243
+ <show_in_store>1</show_in_store>
244
+ </yt_url>
245
+ </fields>
246
+ </yt_socialfeed>
247
+ </groups>
248
+ </netgo_socialfeeds>
249
+ </sections>
250
+ </config>
app/code/community/Netgo/Socialfeeds/sql/netgo_socialfeeds_setup/install-1.0.0.php ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Netgo_Socialfeeds extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the MIT License
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/mit-license.php
11
+ *
12
+ * @category Netgo
13
+ * @package Netgo_Socialfeeds
14
+ * @copyright Copyright (c) 2015
15
+ * @license http://opensource.org/licenses/mit-license.php MIT License
16
+ */
17
+ /**
18
+ * Socialfeeds module install script
19
+ *
20
+ * @category Netgo
21
+ * @package Netgo_Socialfeeds
22
+ * @author Ultimate Module Creator
23
+ */
24
+ $this->startSetup();
25
+ $table = $this->getConnection()
26
+ ->newTable($this->getTable('netgo_socialfeeds/socialfeed'))
27
+ ->addColumn(
28
+ 'entity_id',
29
+ Varien_Db_Ddl_Table::TYPE_INTEGER,
30
+ null,
31
+ array(
32
+ 'identity' => true,
33
+ 'nullable' => false,
34
+ 'primary' => true,
35
+ ),
36
+ 'Socialfeed ID'
37
+ )
38
+ ->addColumn(
39
+ 'socialfeeds_status',
40
+ Varien_Db_Ddl_Table::TYPE_TEXT, 255,
41
+ array(
42
+ 'nullable' => false,
43
+ ),
44
+ 'Socialfeeds Status'
45
+ )
46
+ ->addColumn(
47
+ 'status',
48
+ Varien_Db_Ddl_Table::TYPE_SMALLINT, null,
49
+ array(),
50
+ 'Enabled'
51
+ )
52
+ ->addColumn(
53
+ 'url_key',
54
+ Varien_Db_Ddl_Table::TYPE_TEXT, 255,
55
+ array(),
56
+ 'URL key'
57
+ )
58
+ ->addColumn(
59
+ 'updated_at',
60
+ Varien_Db_Ddl_Table::TYPE_TIMESTAMP,
61
+ null,
62
+ array(),
63
+ 'Socialfeed Modification Time'
64
+ )
65
+ ->addColumn(
66
+ 'created_at',
67
+ Varien_Db_Ddl_Table::TYPE_TIMESTAMP,
68
+ null,
69
+ array(),
70
+ 'Socialfeed Creation Time'
71
+ )
72
+ ->setComment('Socialfeed Table');
73
+ $this->getConnection()->createTable($table);
74
+ $this->endSetup();
media/cod/file/MerchantSkus.csv ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ zipcode,status,days
2
+ 110011,1,1
3
+ 110012,1,2
4
+ 110013,1,3
5
+ 110014,1,4
6
+ 110015,1,5
package.xml CHANGED
@@ -1,27 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Netgo_Cod</name>
4
- <version>1.0.1</version>
5
  <stability>stable</stability>
6
  <license>Open Software License (OSL)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>This extension helps customer to check the product availability in a particular area.</summary>
10
- <description>This extension provides the facility to check on product detail page whether COD(Cash On Delivery) is available at a specific zipcode or not. Admin can upload a list of zip code where the COD is available and also approximate time in days in which COD is available at a specific zip code.&#xD;
11
- &#xD;
12
- For managing this zip code system, admin needs to create a CSV having three columns zip code, status and days and upload in magento admin by going to -&gt; .&#xD;
13
- &#xD;
14
- Features:&#xD;
15
- Check COD availability on Product Page through zip code&#xD;
16
- Can manage approximate days in which COD is available on specific zip code&#xD;
17
- Can set different messages for customer: Success, Failure and Empty.&#xD;
18
- User friendly&#xD;
19
- Admin friendly</description>
20
  <notes>Second Preview Release</notes>
21
  <authors><author><name>NetGo</name><user>NetGo</user><email>netattingomails@gmail.com</email></author></authors>
22
- <date>2015-08-13</date>
23
- <time>10:25:36</time>
24
- <contents><target name="magecommunity"><dir name="Netgo"><dir name="Cod"><dir name="Block"><dir name="Adminhtml"><dir name="Cod"><dir name="Edit"><file name="Form.php" hash="150c2d006867c2e55a8ef267fb657961"/><dir name="Tab"><file name="Form.php" hash="348ec9b395e0dfb508b9307374ec833c"/></dir><file name="Tabs.php" hash="233ddd82bd73dedd43f9086f32bd3d1d"/></dir><file name="Edit.php" hash="cac3643fd1efd8b9e061eded48da48a7"/><file name="Grid.php" hash="70f9acedabc12caed9183295faa88ae9"/><dir name="Helper"><file name="File.php" hash="a7e9f29bc5b667d2c5e52307dea95a2e"/></dir></dir><file name="Cod.php" hash="ae03c306174776f88930b07ff2b42f7b"/></dir><dir name="Cod"><file name="View.php" hash="218b43ec59c5269527af22e5e3262d29"/></dir></dir><dir name="Controller"><dir name="Adminhtml"><file name="Cod.php" hash="4510d1f811b4c012875aaacdf89cec53"/></dir></dir><dir name="Helper"><file name="Cod.php" hash="92fcd5972dbf39bbbdde5f9fe4589285"/><file name="Data.php" hash="8dfe9eb6a8195565ca413436a65d6781"/></dir><dir name="Model"><file name="Cod.php" hash="2061795a2d9e691a59efb53d7ff96019"/><dir name="Resource"><dir name="Cod"><file name="Collection.php" hash="284df409ce5ca7099f6b8212cf5979fd"/></dir><file name="Cod.php" hash="db3cd96013bb820a567a4f3eca95000e"/><file name="Setup.php" hash="871e2ea94ea2bced6bc6c2546c1849b7"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Cod"><file name="CodController.php" hash="142d46faabab99272aaa7144ea791376"/></dir></dir><file name="CodController.php" hash="60636307fbf4b473cad75b21c45b963a"/></dir><dir name="etc"><file name="adminhtml.xml" hash="41e3668937a2ea0ff7a0ad665c4c18cd"/><file name="config.xml" hash="ae7166b611f2816289481402c24b3eb6"/><file name="system.xml" hash="fedd70dbb9f012dd0d02cc3ac1c10bd4"/></dir><dir name="sql"><dir name="netgo_cod_setup"><file name="install-1.0.0.php" hash="154dd1abc227c7583c5a96a6c2c38f1f"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="netgo_cod.xml" hash="f44ffb6836ede7ef331318aa2f9244a0"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="netgo_cod.xml" hash="c7309d24e327bc9206e1e2f0fb7d37fa"/></dir><dir name="template"><dir name="netgo_cod"><dir name="cod"><file name="cod.phtml" hash="b328ee8a8c1b7110253d0da844e7ba05"/><file name="view.phtml" hash="aef67b38b0b286f222e39f70fbbdcd2f"/></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="."><file name="User_Manual.pdf" hash="0bd1c1eedc810a7c246ea4a623a0b120"/><file name="import_zipcode_sample.csv" hash="86c4cb210e059748cdae7d42fe022a46"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="cod"><dir name="img"><file name="pr-opt-bg.jpg" hash="e692389efe3d528514ea6b763e4ea76e"/><file name="van-icon.png" hash="73dcc4ad452ec0e4354c6cb78c7d8caa"/></dir><file name="style.css" hash="b4664c7d8b6b1fea6bb78b887c4a3d83"/></dir></dir></dir></dir></dir></target><target name="magemedia"><dir name="cod"><dir name="img"><file name="ajax-loader-2.gif" hash="a7cb027c1ed0c4df76e4c38c259853eb"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Netgo_Cod.xml" hash="baeba3bd11974237c54260644cea41c8"/></dir></target></contents>
25
  <compatible/>
26
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
27
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Netgo_Cod</name>
4
+ <version>1.0.2</version>
5
  <stability>stable</stability>
6
  <license>Open Software License (OSL)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>This extension helps customer to check the product availability in a particular area.</summary>
10
+ <description>This extension provides the facility to check on product detail page whether COD(Cash On Delivery) is available at a specific zipcode or not. Admin can upload a list of zip code where the COD is available and also approximate time in days in which COD is available at a specific zip code.</description>
 
 
 
 
 
 
 
 
 
11
  <notes>Second Preview Release</notes>
12
  <authors><author><name>NetGo</name><user>NetGo</user><email>netattingomails@gmail.com</email></author></authors>
13
+ <date>2016-04-21</date>
14
+ <time>11:49:09</time>
15
+ <contents><target name="magecommunity"><dir name="Netgo"><dir name="Cod"><dir name="Block"><dir name="Adminhtml"><dir name="Cod"><dir name="Edit"><file name="Form.php" hash="150c2d006867c2e55a8ef267fb657961"/><dir name="Tab"><file name="Form.php" hash="348ec9b395e0dfb508b9307374ec833c"/></dir><file name="Tabs.php" hash="233ddd82bd73dedd43f9086f32bd3d1d"/></dir><file name="Edit.php" hash="cac3643fd1efd8b9e061eded48da48a7"/><file name="Grid.php" hash="70f9acedabc12caed9183295faa88ae9"/><dir name="Helper"><file name="File.php" hash="a7e9f29bc5b667d2c5e52307dea95a2e"/></dir></dir><file name="Cod.php" hash="ae03c306174776f88930b07ff2b42f7b"/></dir><dir name="Cod"><file name="View.php" hash="218b43ec59c5269527af22e5e3262d29"/></dir></dir><dir name="Controller"><dir name="Adminhtml"><file name="Cod.php" hash="4510d1f811b4c012875aaacdf89cec53"/></dir></dir><dir name="Helper"><file name="Cod.php" hash="92fcd5972dbf39bbbdde5f9fe4589285"/><file name="Data.php" hash="8dfe9eb6a8195565ca413436a65d6781"/></dir><dir name="Model"><file name="Cod.php" hash="2061795a2d9e691a59efb53d7ff96019"/><dir name="Resource"><dir name="Cod"><file name="Collection.php" hash="284df409ce5ca7099f6b8212cf5979fd"/></dir><file name="Cod.php" hash="db3cd96013bb820a567a4f3eca95000e"/><file name="Setup.php" hash="871e2ea94ea2bced6bc6c2546c1849b7"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Cod"><file name="CodController.php" hash="142d46faabab99272aaa7144ea791376"/></dir></dir><file name="CodController.php" hash="055f1dfa0722bc680b7860e7f43241e4"/></dir><dir name="etc"><file name="adminhtml.xml" hash="41e3668937a2ea0ff7a0ad665c4c18cd"/><file name="config.xml" hash="2d73d418eb6f42b30df03d3fa0f19ee4"/><file name="system.xml" hash="fedd70dbb9f012dd0d02cc3ac1c10bd4"/></dir><dir name="sql"><dir name="netgo_cod_setup"><file name="install-1.0.0.php" hash="154dd1abc227c7583c5a96a6c2c38f1f"/></dir></dir></dir><dir name="Socialfeeds"><dir name="Block"><dir name="Adminhtml"><dir name="Socialfeed"><dir name="Edit"><file name="Form.php" hash="87e845b2def27894c1d2f16b3c9028ce"/><dir name="Tab"><file name="Form.php" hash="87e68ae3969418cd71a9ca15723a5c4d"/></dir><file name="Tabs.php" hash="db412b6b792e1094decd94c1bd8ba710"/></dir><file name="Edit.php" hash="bcc7663fc2c8ad40c6dc993ae46657c4"/><file name="Grid.php" hash="95a7876dee05c39a48f179117e3927ec"/></dir><file name="Socialfeed.php" hash="bcbd6967229fe7c788718977c28aea8e"/></dir><dir name="Socialfeed"><file name="List.php" hash="b3594fc0eef809ae588e3857099ba7bf"/><file name="Socialfeeds.php" hash="cbe240513c79307286f17cf63fafbf94"/><file name="View.php" hash="3b68f9d4eba6bf53940bd33d57bb2782"/></dir></dir><dir name="Controller"><dir name="Adminhtml"><file name="Socialfeeds.php" hash="a67f7a4c2ededd536450793e669c526b"/></dir><file name="Router.php" hash="451d1147ef277ed435aab345407324e1"/></dir><dir name="Helper"><file name="Data.php" hash="d4ff43cc84b8cbbe872cc1c06e132ac7"/><file name="Socialfeed.php" hash="9b35f8b8d023ee47a7f11b759eb83f0e"/></dir><dir name="Model"><dir name="Resource"><file name="Setup.php" hash="852ba824c221861cbcd59051eacae507"/><dir name="Socialfeed"><file name="Collection.php" hash="90dbaabe073e31e2c5b8876ea765f7f4"/></dir><file name="Socialfeed.php" hash="3cc219bd64b3c94eebf8979bb765ab73"/></dir><file name="Socialfeed.php" hash="ff2789ee57533d32451bc3eb4e2931a5"/></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Socialfeeds"><file name="SocialfeedController.php" hash="1d32da17a2f254779603643d3f6ce2d9"/></dir></dir><file name="SocialfeedController.php" hash="bbf0a99e6874f7f5b61b61e592699f84"/></dir><dir name="etc"><file name="adminhtml.xml" hash="6663f5258bbcdd1a7aec95594858cbc0"/><file name="config.xml" hash="88101c2a22866d682aa3d8dd30867601"/><file name="system.xml" hash="c9d472ba91dee0da4f89d291eb84358f"/></dir><dir name="sql"><dir name="netgo_socialfeeds_setup"><file name="install-1.0.0.php" hash="1b7920c194ce9c92f6a5409aec57e996"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="netgo_cod.xml" hash="f44ffb6836ede7ef331318aa2f9244a0"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="netgo_cod.xml" hash="c7309d24e327bc9206e1e2f0fb7d37fa"/></dir><dir name="template"><dir name="netgo_cod"><dir name="cod"><file name="cod.phtml" hash="b328ee8a8c1b7110253d0da844e7ba05"/><file name="view.phtml" hash="aef67b38b0b286f222e39f70fbbdcd2f"/></dir></dir></dir></dir></dir></dir></target><target name="magemedia"><dir name="cod"><dir name="file"><file name="MerchantSkus.csv" hash="86c4cb210e059748cdae7d42fe022a46"/></dir><dir name="img"><file name="ajax-loader-2.gif" hash="a7cb027c1ed0c4df76e4c38c259853eb"/></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="cod"><dir name="img"><file name="pr-opt-bg.jpg" hash="e692389efe3d528514ea6b763e4ea76e"/><file name="van-icon.png" hash="73dcc4ad452ec0e4354c6cb78c7d8caa"/></dir><file name="style.css" hash="b4664c7d8b6b1fea6bb78b887c4a3d83"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="."><file name="import_zipcode_sample.csv" hash="86c4cb210e059748cdae7d42fe022a46"/><file name="User_Manual.pdf" hash="0bd1c1eedc810a7c246ea4a623a0b120"/></dir></target><target name="mageetc"><dir name="modules"><file name="Netgo_Cod.xml" hash="baeba3bd11974237c54260644cea41c8"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>