Fishbowlprizes_Fishbowl - Version 1.0.0

Version Notes

Launching Fishbowl prizes extension

Download this release

Release Info

Developer Fishbowl Prizes
Extension Fishbowlprizes_Fishbowl
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

Files changed (22) hide show
  1. app/code/community/Fishbowlprizes/Fishbowl/Block/Adminhtml/System/Config/Fieldset/Hint.php +34 -0
  2. app/code/community/Fishbowlprizes/Fishbowl/Block/Adminhtml/System/Config/Form/Field/Hidden.php +15 -0
  3. app/code/community/Fishbowlprizes/Fishbowl/Block/Adminhtml/System/Config/Form/Field/Html.php +52 -0
  4. app/code/community/Fishbowlprizes/Fishbowl/Helper/Data.php +66 -0
  5. app/code/community/Fishbowlprizes/Fishbowl/controllers/Adminhtml/Fishbowl/ResponseController.php +40 -0
  6. app/code/community/Fishbowlprizes/Fishbowl/controllers/Adminhtml/SetupController.php +53 -0
  7. app/code/community/Fishbowlprizes/Fishbowl/etc/adminhtml.xml +22 -0
  8. app/code/community/Fishbowlprizes/Fishbowl/etc/config.xml +49 -0
  9. app/code/community/Fishbowlprizes/Fishbowl/etc/system.xml +78 -0
  10. app/design/adminhtml/default/default/layout/fishbowl.xml +10 -0
  11. app/design/adminhtml/default/default/template/fishbowl/system/config/fieldset/hint.phtml +39 -0
  12. app/design/frontend/base/default/layout/fishbowl.xml +11 -0
  13. app/design/frontend/base/default/template/fishbowl/fishbowl.phtml +7 -0
  14. app/etc/modules/Fishbowlprizes_Fishbowl.xml +10 -0
  15. package.xml +24 -0
  16. skin/adminhtml/default/default/fishbowl/fishbowl.css +21 -0
  17. skin/adminhtml/default/default/fishbowl/fishbowl_logo.jpg +0 -0
  18. skin/adminhtml/default/default/fishbowl/fishbowl_logo.png +0 -0
  19. skin/adminhtml/default/default/fishbowl/old_remove_fishbowl.png +0 -0
  20. skin/adminhtml/default/default/fishbowl/old_setting_acive.png +0 -0
  21. skin/adminhtml/default/default/fishbowl/remove_fishbowl.png +0 -0
  22. skin/adminhtml/default/default/fishbowl/setting_acive.png +0 -0
app/code/community/Fishbowlprizes/Fishbowl/Block/Adminhtml/System/Config/Fieldset/Hint.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Renderer for fishbowl banner in System Configuration
5
+ * @category fishbowl
6
+ * @package Fishbowlprizes_Fishbowl
7
+ * @author Fishbowlprizes
8
+ */
9
+ class Fishbowlprizes_Fishbowl_Block_Adminhtml_System_Config_Fieldset_Hint
10
+ extends Mage_Adminhtml_Block_Abstract
11
+ implements Varien_Data_Form_Element_Renderer_Interface
12
+ {
13
+ protected $_template = 'fishbowl/system/config/fieldset/hint.phtml';
14
+
15
+ /**
16
+ * Render fieldset html
17
+ * @param Varien_Data_Form_Element_Abstract $element
18
+ * @return string
19
+ */
20
+ public function render(Varien_Data_Form_Element_Abstract $element)
21
+ {
22
+ return $this->toHtml();
23
+ }
24
+
25
+ public function getEfishbowlVersion()
26
+ {
27
+ return (string)Mage::getConfig()->getNode('modules/Fishbowlprizes_Fishbowl/version');
28
+ }
29
+
30
+
31
+ }
32
+
33
+ ?>
34
+
app/code/community/Fishbowlprizes/Fishbowl/Block/Adminhtml/System/Config/Form/Field/Hidden.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @category Fishbowlprizes
4
+ * @package Fishbowlprizes_Fishbowl
5
+ * @author Fishbowlprizes
6
+ */
7
+ class Fishbowlprizes_Fishbowl_Block_Adminhtml_System_Config_Form_Field_Hidden extends Mage_Adminhtml_Block_System_Config_Form_Field
8
+ {
9
+
10
+ protected function _decorateRowHtml($element, $html)
11
+ {
12
+ return '<tr id="row_' . $element->getHtmlId() . '" style="display: none;">' . $html . '</tr>';
13
+ }
14
+
15
+ }
app/code/community/Fishbowlprizes/Fishbowl/Block/Adminhtml/System/Config/Form/Field/Html.php ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * In System Configuration Button widget
4
+ * @category Fishbowlprizes
5
+ * @package Fishbowlprizes_Fishbowl
6
+ * @author Fishbowlprizes
7
+ */
8
+ class Fishbowlprizes_Fishbowl_Block_Adminhtml_System_Config_Form_Field_Html extends Mage_Adminhtml_Block_System_Config_Form_Field
9
+ {
10
+
11
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
12
+ {
13
+ $this->setElement($element);
14
+ $buttonBlock = $this->getLayout()->createBlock('adminhtml/widget_button');
15
+
16
+ $websiteCode = $buttonBlock->getRequest()->getParam('website');
17
+ $websiteId = Mage::app()->getStore()->getWebsiteId();
18
+ if ($websiteCode)
19
+ {
20
+ $websiteId = Mage::getModel('core/website')->load($websiteCode)->getId();
21
+ }
22
+
23
+ $params = array(
24
+ 'website' => $websiteCode,
25
+ 'website_id' => $websiteId
26
+ );
27
+
28
+ $fishbowl_script = Mage::app()->getWebsite($websiteCode)->getConfig('fishbowl/general/rcode');
29
+ if($fishbowl_script)
30
+ {
31
+ $data = array(
32
+ 'label' => Mage::helper('adminhtml')->__('Remove Account'),
33
+ 'onclick' => 'confirmSetLocation(\'Are you sure?\',\''.Mage::helper('adminhtml')->getUrl("adminhtml/setup/uninstall", $params) . '\')',
34
+ 'class' => 'delete',
35
+ 'after_html'=>'<p class="note"><span>Your Account will be removed from fishbowlprizes.com also. </span></p>'
36
+ );
37
+ }
38
+ else
39
+ {
40
+ $data = array(
41
+ 'label' => Mage::helper('adminhtml')->__('Get Access'),
42
+ 'onclick' => "javascript:window.open('". Mage::helper('fishbowl')->authorizeRequestUrl()."',
43
+ 'apiwizard','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, ,left=100, top=100, width=500, height=700')",
44
+ 'after_html'=>'<p class="note"><span>You will be redirected to fishbowlprizes.com and login using your access details. </span></p>'
45
+ );
46
+ }
47
+ $html = $buttonBlock->setData($data)->toHtml();
48
+ return $html;
49
+ }
50
+
51
+ }
52
+ ?>
app/code/community/Fishbowlprizes/Fishbowl/Helper/Data.php ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Fishbowlprizes_Fishbowl_Helper_DataHelper
4
+ * @category Fishbowlprizes
5
+ * @package Fishbowlprizes_Fishbowl
6
+ * @author Fishbowlprizes
7
+ */
8
+ class Fishbowlprizes_Fishbowl_Helper_Data extends Mage_Core_Helper_Abstract
9
+ {
10
+ protected $_authorizeUrl = "https://www.fishbowlprizes.com/merchants/app-install/";
11
+ protected $_uninstallUrl = "https://www.fishbowlprizes.com/merchants/remove-app/";
12
+ protected $_scriptUrl = "https://service.fishbowlprizes.com/widget/";
13
+
14
+ public function checkModuleEnabled()
15
+ {
16
+ if(Mage::getStoreConfig('fishbowl/general/enabled')):
17
+ return true;
18
+ endif;
19
+ return false;
20
+ }
21
+ //-------------------------------------------------------------------------
22
+ public function authorizeRequestUrl()
23
+ {
24
+ $url = $this->_authorizeUrl;
25
+ $websiteCode = Mage::app()->getRequest()->getParam('website');
26
+ if ($websiteCode)
27
+ {
28
+ $websiteId = Mage::getModel('core/website')->load($websiteCode)->getId();
29
+ }
30
+
31
+ $calBackUrl = urlencode(Mage::helper('adminhtml')->getUrl('adminhtml/fishbowl_response/post',array('website_id' => $websiteId)));
32
+
33
+ $domian = $this->getHostName(Mage::app()->getWebsite($websiteId)->getConfig('web/unsecure/base_url'));
34
+
35
+
36
+ return "{$url}?app=magento&d={$domian}&cb_url={$calBackUrl}";
37
+ }
38
+ //-------------------------------------------------------------------------
39
+ public function getFishbowlScript()
40
+ {
41
+ $EfbUrl = $this->_scriptUrl;
42
+ $ccode = Mage::app()->getWebsite(Mage::app()->getStore()->getWebsiteId())->getConfig('fishbowl/general/ccode');
43
+ if($ccode)
44
+ {
45
+ return $EfbUrl.$ccode.'/';
46
+ }
47
+ return false;
48
+ }
49
+ //-------------------------------------------------------------------------
50
+ public function getUninstallUrl()
51
+ {
52
+ $uninstall_url = $this->_uninstallUrl;
53
+ return $uninstall_url;
54
+ }
55
+ //-------------------------------------------------------------------------
56
+ public function getHostName($unsecure_base_url)
57
+ {
58
+ $host = parse_url($unsecure_base_url, PHP_URL_HOST);
59
+ $path = parse_url($unsecure_base_url, PHP_URL_PATH);
60
+ $path = rtrim($path,'index.php/');
61
+ $host_name = $host.$path;
62
+ return $host_name;
63
+ }
64
+ //-------------------------------------------------------------------------
65
+ }
66
+
app/code/community/Fishbowlprizes/Fishbowl/controllers/Adminhtml/Fishbowl/ResponseController.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Redirect to fishbowl prizes account
4
+ * @category Fishbowlprizes
5
+ * @package Fishbowlprizes_Fishbowl
6
+ * @author Fishbowlprizes
7
+ */
8
+ class Fishbowlprizes_Fishbowl_Adminhtml_Fishbowl_ResponseController extends Mage_Adminhtml_Controller_Action
9
+ {
10
+ public function postAction()
11
+ {
12
+ $response = Mage::app()->getRequest()->getParam('done');
13
+ if ($response)
14
+ {
15
+ $ccode = Mage::app()->getRequest()->getParam('ccode');
16
+ $rcode = Mage::app()->getRequest()->getParam('rcode');
17
+
18
+ $websiteId = Mage::app()->getRequest()->getParam('website_id');
19
+ try {
20
+
21
+ $store_config = Mage::getModel('core/config');
22
+ $store_config->saveConfig('fishbowl/general/enabled', 1, 'websites', $websiteId);
23
+ $store_config->saveConfig('fishbowl/general/ccode', $ccode, 'websites', $websiteId);
24
+ $store_config->saveConfig('fishbowl/general/rcode', $rcode, 'websites', $websiteId);
25
+ Mage::app()->getStore()->resetConfig();
26
+ echo "<script type='text/javascript'>window.opener.location.reload(); window.close();
27
+ </script>";
28
+ $this->_getSession()->addSuccess(
29
+ $this->__('Fishbowl Account configuration has been saved successfully.')
30
+ );
31
+ } catch (Exception $e)
32
+ {
33
+ $this->_getSession()->addError('There is error in configuring Fishbowl Account');
34
+ }
35
+ } else {
36
+ $this->_getSession()->addError('There is error in configuring Fishbowl Account');
37
+ }
38
+
39
+ }
40
+ }
app/code/community/Fishbowlprizes/Fishbowl/controllers/Adminhtml/SetupController.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Remove fishbowl widget in fishbowl account
4
+ * @category Fishbowlprizes
5
+ * @package Fishbowlprizes_Fishbowl
6
+ * @author Fishbowlprizes
7
+ */
8
+ class Fishbowlprizes_Fishbowl_Adminhtml_SetupController extends Mage_Adminhtml_Controller_Action
9
+ {
10
+ public function uninstallAction()
11
+ {
12
+ $params = $this->getRequest()->getParams();
13
+ $websiteId = $params['website_id'];
14
+ try
15
+ {
16
+ $response = $this->_uninstallFishbowl($websiteId);
17
+ if($response == 'success')
18
+ {
19
+ $store_config = Mage::getModel('core/config');
20
+ $store_config->saveConfig('fishbowl/general/enabled', 0, 'websites', $websiteId);
21
+ $store_config->saveConfig('fishbowl/general/ccode', NULL, 'websites', $websiteId);
22
+ $store_config->saveConfig('fishbowl/general/rcode', NULL, 'websites', $websiteId);
23
+ Mage::app()->getStore()->resetConfig();
24
+
25
+ $this->_getSession()->addSuccess($this->__('Fishbowl account has been successfully removed.'));
26
+ } else {
27
+ $this->_getSession()->addError($this->__('Account removal failed. Please try again.'));
28
+ }
29
+ }
30
+ catch(Exception $e){
31
+ $this->_getSession()->addError($this->__('Account removal failed. Please try again.'));
32
+ }
33
+ $this->_redirectReferer();
34
+ }
35
+
36
+ protected function _uninstallFishbowl($websiteId)
37
+ {
38
+ $url = Mage::helper('fishbowl')->getUninstallUrl();
39
+ $rcode = Mage::app()->getWebsite($websiteId)->getConfig('fishbowl/general/rcode');
40
+ $params = '?rcode='.$rcode;
41
+ $get_url = $url.$params;
42
+ $ch = curl_init();
43
+ curl_setopt($ch,CURLOPT_URL, $get_url);
44
+ curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
45
+ $result = curl_exec($ch);
46
+ curl_close($ch);
47
+
48
+ return $result;
49
+ }
50
+
51
+ }
52
+
53
+ ?>
app/code/community/Fishbowlprizes/Fishbowl/etc/adminhtml.xml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <config>
3
+ <acl>
4
+ <resources>
5
+ <admin>
6
+ <children>
7
+ <system>
8
+ <children>
9
+ <config>
10
+ <children>
11
+ <fishbowl translate="title" module="fishbowl">
12
+ <title>Fishbowl</title>
13
+ </fishbowl>
14
+ </children>
15
+ </config>
16
+ </children>
17
+ </system>
18
+ </children>
19
+ </admin>
20
+ </resources>
21
+ </acl>
22
+ </config>
app/code/community/Fishbowlprizes/Fishbowl/etc/config.xml ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Fishbowlprizes_Fishbowl>
5
+ <version>1.0.0</version>
6
+ </Fishbowlprizes_Fishbowl>
7
+ </modules>
8
+ <global>
9
+ <blocks>
10
+ <fishbowl_adminhtml>
11
+ <class>Fishbowlprizes_Fishbowl_Block_Adminhtml</class>
12
+ </fishbowl_adminhtml>
13
+ </blocks>
14
+ <helpers>
15
+ <fishbowl>
16
+ <class>Fishbowlprizes_Fishbowl_Helper</class>
17
+ </fishbowl>
18
+ </helpers>
19
+ </global>
20
+ <frontend>
21
+ <layout>
22
+ <updates>
23
+ <fishbowl>
24
+ <file>fishbowl.xml</file>
25
+ </fishbowl>
26
+ </updates>
27
+ </layout>
28
+ </frontend>
29
+ <admin>
30
+ <routers>
31
+ <adminhtml>
32
+ <args>
33
+ <modules>
34
+ <fishbowl after="Mage_Adminhtml">Fishbowlprizes_Fishbowl_Adminhtml</fishbowl>
35
+ </modules>
36
+ </args>
37
+ </adminhtml>
38
+ </routers>
39
+ </admin>
40
+ <adminhtml>
41
+ <layout>
42
+ <updates>
43
+ <fishbowl>
44
+ <file>fishbowl.xml</file>
45
+ </fishbowl>
46
+ </updates>
47
+ </layout>
48
+ </adminhtml>
49
+ </config>
app/code/community/Fishbowlprizes/Fishbowl/etc/system.xml ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <tabs>
4
+ <fishbowl translate="label">
5
+ <label>Fishbowl Prizes</label>
6
+ <sort_order>200</sort_order>
7
+ </fishbowl>
8
+ </tabs>
9
+ <sections>
10
+ <fishbowl translate="label">
11
+ <class>separator-top</class>
12
+ <label>Settings</label>
13
+ <tab>fishbowl</tab>
14
+ <frontend_type>text</frontend_type>
15
+ <sort_order>40</sort_order>
16
+ <show_in_default>1</show_in_default>
17
+ <show_in_website>1</show_in_website>
18
+ <show_in_store>1</show_in_store>
19
+ <groups>
20
+ <hint>
21
+ <frontend_model>fishbowl_adminhtml/system_config_fieldset_hint</frontend_model>
22
+ <sort_order>0</sort_order>
23
+ <show_in_default>1</show_in_default>
24
+ <show_in_website>1</show_in_website>
25
+ <show_in_store>1</show_in_store>
26
+ </hint>
27
+ <general translate="label">
28
+ <label>General</label>
29
+ <frontend_type>text</frontend_type>
30
+ <expanded>1</expanded>
31
+ <sort_order>100</sort_order>
32
+ <show_in_default>0</show_in_default>
33
+ <show_in_website>1</show_in_website>
34
+ <show_in_store>0</show_in_store>
35
+ <fields>
36
+ <enabled translate="label">
37
+ <label>Enable</label>
38
+ <frontend_type>select</frontend_type>
39
+ <sort_order>1</sort_order>
40
+ <source_model>adminhtml/system_config_source_yesno</source_model>
41
+ <show_in_default>1</show_in_default>
42
+ <show_in_website>1</show_in_website>
43
+ <show_in_store>0</show_in_store>
44
+ </enabled>
45
+ <activate translate="label comment">
46
+ <label>Activate</label>
47
+ <sort_order>2</sort_order>
48
+ <frontend_model>fishbowl_adminhtml/system_config_form_field_html</frontend_model>
49
+ <show_in_default>0</show_in_default>
50
+ <show_in_website>1</show_in_website>
51
+ <show_in_store>0</show_in_store>
52
+ <depends><enabled>1</enabled></depends>
53
+ </activate>
54
+ <ccode translate="label comment">
55
+ <label>CCode</label>
56
+ <frontend_type>text</frontend_type>
57
+ <frontend_model>fishbowl_adminhtml/system_config_form_field_hidden</frontend_model> <sort_order>30</sort_order>
58
+ <comment>Do not edit the CCode</comment>
59
+ <show_in_default>0</show_in_default>
60
+ <show_in_website>1</show_in_website>
61
+ <show_in_store>0</show_in_store>
62
+ </ccode>
63
+ <rcode translate="label comment">
64
+ <label>RCode</label>
65
+ <frontend_type>text</frontend_type>
66
+ <frontend_model>fishbowl_adminhtml/system_config_form_field_hidden</frontend_model>
67
+ <sort_order>40</sort_order>
68
+ <comment>Do not edit the RCode</comment>
69
+ <show_in_default>0</show_in_default>
70
+ <show_in_website>1</show_in_website>
71
+ <show_in_store>0</show_in_store>
72
+ </rcode>
73
+ </fields>
74
+ </general>
75
+ </groups>
76
+ </fishbowl>
77
+ </sections>
78
+ </config>
app/design/adminhtml/default/default/layout/fishbowl.xml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout>
3
+ <adminhtml_system_config_edit>
4
+ <reference name="head">
5
+ <action method="addCss">
6
+ <stylesheet>fishbowl/fishbowl.css</stylesheet>
7
+ </action>
8
+ </reference>
9
+ </adminhtml_system_config_edit>
10
+ </layout>
app/design/adminhtml/default/default/template/fishbowl/system/config/fieldset/hint.phtml ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @see Rage_Efishbowl_Block_Adminhtml_System_Config_Fieldset_Hint
4
+ */
5
+ ?>
6
+ <div class="efishbowl-notice">
7
+ <img src="<?php echo $this->getSkinUrl('fishbowl/fishbowl_logo.png') ?>" width="" height="" /><br>
8
+ <ul class="fishbowl_list">
9
+ <li>
10
+ <span class="varsion">Fishbowl v<?php echo $this->getEfishbowlVersion();?></span> integrates the Fishbowl Prizes widget in your Magento Website.
11
+ Fishbowl brings in the Fishbowl Widget into any Magento website, which enhances the user experience and involvment in the website, thus usefull in collecting more customer emails than a conventional newsletter subscription.<a href="#" onclick="help_visibility('content_wrapper');">Help</a>
12
+ </li>
13
+ </ul>
14
+ <div id="content_wrapper" style="display:none">
15
+ <div class="border clear"></div>
16
+ <div class="help_content">
17
+ Fishbowl v<?php echo $this->getEfishbowlVersion();?> needs to be configured with your <a href="http://www.fishbowlprizes.com/" target="_blank">Fishbowl account</a>.
18
+ <ul>
19
+ <li>Step 1: Select a website in which Fishbowl widget needs to be integrated</li>
20
+ <img src="<?php echo $this->getSkinUrl('fishbowl/setting_acive.png') ?>" width="700" height="200" />
21
+ <li>Step 2: Click the "Get Access" button. You'll be redirected to Fishbowl website on a separate window, where you have to login to your <a href="http://www.fishbowlprizes.com/" target="_blank">merchant account</a></li>
22
+ <li>Step 3: Then you'll be automatically redirected back to the Fishbowl configuration page.</li>
23
+ <li>Step 4: You can disable the widget just by selecting "Enable" to "No".</li>
24
+ <li>Step 5: For removing the widget all together, click the "Remove Account" button.</li>
25
+ <img src="<?php echo $this->getSkinUrl('fishbowl/remove_fishbowl.png') ?>" width="700" height="200" />
26
+ </ul>
27
+ Note: You can manage the widgets separately for each website, if you run a Multi-website Magento installation.
28
+ </div>
29
+ </div>
30
+ </div>
31
+ <script type="text/javascript">
32
+ function help_visibility(id) {
33
+ var e = document.getElementById(id);
34
+ if(e.style.display == 'block')
35
+ e.style.display = 'none';
36
+ else
37
+ e.style.display = 'block';
38
+ }
39
+ </script>
app/design/frontend/base/default/layout/fishbowl.xml ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <layout version="0.1.0">
3
+ <default>
4
+ <reference name="before_body_end">
5
+ <block type="core/template" name="fishbowl" template="fishbowl/fishbowl.phtml"></block>
6
+ </reference>
7
+ </default>
8
+ </layout>
9
+
10
+
11
+
app/design/frontend/base/default/template/fishbowl/fishbowl.phtml ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+ $helper = Mage::helper('fishbowl');
3
+ $script = $helper->getFishbowlScript();
4
+ if($helper->checkModuleEnabled()):
5
+ if($script) { ?>
6
+ <script type="text/javascript" src="<?php echo $script; ?>"></script>
7
+ <?php } endif; ?>
app/etc/modules/Fishbowlprizes_Fishbowl.xml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Fishbowlprizes_Fishbowl>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ <version>1.0.0</version>
8
+ </Fishbowlprizes_Fishbowl>
9
+ </modules>
10
+ </config>
package.xml ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Fishbowlprizes_Fishbowl</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Fishbowl Prizes is a simple solution for operating and prize giveaway to display on your website, combined with a marketplace showing all of the best giveaways run by merchants using the software.</summary>
10
+ <description>Fishbowl for Magento will integrate the Fishbowl widget to the website. &#xD;
11
+ &#xD;
12
+ This widget will display the offers/prizes from the merchant's Fishbowl account. This serves as an attraction for the customers visiting the website and they provide their valuable email ids to the website.&#xD;
13
+ &#xD;
14
+ This method is similar to newsletter subscriptions, but this will attract more customers as they get some value or discount or offers in return for their Email ids.&#xD;
15
+ &#xD;
16
+ Thus, the merchant receives more and more lead, which can be later used to focus on Targeted marketing.</description>
17
+ <notes>Launching Fishbowl prizes extension</notes>
18
+ <authors><author><name>Fishbowl Prizes</name><user>fishbowl</user><email>scott@fishbowlprizes.com</email></author></authors>
19
+ <date>2016-01-12</date>
20
+ <time>09:30:36</time>
21
+ <contents><target name="magecommunity"><dir name="Fishbowlprizes"><dir name="Fishbowl"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Hint.php" hash="ca6db52ae7d9082707df7cb9316778b5"/></dir><dir name="Form"><dir name="Field"><file name="Hidden.php" hash="fccceb45db20b704d8d74a3570a76bd6"/><file name="Html.php" hash="10f7fc1ff3c82f03b934d627bd55f53e"/></dir></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="d7db5c9dcb00f546102dce8cbf54a780"/></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Fishbowl"><file name="ResponseController.php" hash="a90f2bb4dfdb837bca7296cb18eff399"/></dir><file name="SetupController.php" hash="bfea77a75e02f5981e5a69120c89baa6"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="a04b372bbd9a74f758ce2c89991b1ca0"/><file name="config.xml" hash="3e278cbc9f4f9d841dbe54ba5b9f0072"/><file name="system.xml" hash="30db50023ee9f531377f75bc812fc1cc"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="fishbowl.xml" hash="6d14ab59033814151815566c20887776"/></dir><dir name="template"><dir name="fishbowl"><dir name="system"><dir name="config"><dir name="fieldset"><file name="hint.phtml" hash="ce728103ee43bd1d4f3c2f597a2baed2"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="fishbowl.xml" hash="8a2d15069168708a92a09c3340a082f4"/></dir><dir name="template"><dir name="fishbowl"><file name="fishbowl.phtml" hash="88e2ab9a4d3e86c6fc5ef6f6952bf523"/></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="fishbowl"><file name="fishbowl.css" hash="b42ea357ca1734a67f29d03584e1b978"/><file name="fishbowl_logo.jpg" hash="aeb6b05492574ec78d8b9abc6038f97f"/><file name="fishbowl_logo.png" hash="4a4eca68a995ad4f672e55e146a107a5"/><file name="old_remove_fishbowl.png" hash="f89c725b326dd9099994206fb6f24246"/><file name="old_setting_acive.png" hash="7b105d55a1a622fbccde1c25bd67bb8b"/><file name="remove_fishbowl.png" hash="eebe24e2b976189bc87b207e13c30b15"/><file name="setting_acive.png" hash="7d7d2856161b75887bed2aa936e923b6"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Fishbowlprizes_Fishbowl.xml" hash="2d98630e7101f01cecbddb9ea274c320"/></dir></target></contents>
22
+ <compatible/>
23
+ <dependencies><required><php><min>5.2.0</min><max>5.6.13</max></php></required></dependencies>
24
+ </package>
skin/adminhtml/default/default/fishbowl/fishbowl.css ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ div.efishbowl-notice { background: #eaf0ee none repeat scroll 0 0;
2
+ border: 1px solid #cccccc;
3
+ margin-bottom: 10px;
4
+ padding: 11px 10px;
5
+
6
+ }
7
+ .fishbowl_list,ul .fishbowl_list li
8
+ {
9
+ margin-top:10px;
10
+ }
11
+ .border
12
+ {
13
+ border-bottom:1px solid #3497DB;
14
+ margin:10px 0;
15
+ }
16
+ .varsion{
17
+ color:#eb5e00;
18
+ }
19
+ .help_content li{
20
+ padding:10px;
21
+ }
skin/adminhtml/default/default/fishbowl/fishbowl_logo.jpg ADDED
Binary file
skin/adminhtml/default/default/fishbowl/fishbowl_logo.png ADDED
Binary file
skin/adminhtml/default/default/fishbowl/old_remove_fishbowl.png ADDED
Binary file
skin/adminhtml/default/default/fishbowl/old_setting_acive.png ADDED
Binary file
skin/adminhtml/default/default/fishbowl/remove_fishbowl.png ADDED
Binary file
skin/adminhtml/default/default/fishbowl/setting_acive.png ADDED
Binary file