Facebook_Like_by_Vivacity - Version 1.0.0

Version Notes

Initial Release of Extension

Download this release

Release Info

Developer Team Vivacity
Extension Facebook_Like_by_Vivacity
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

app/code/community/Vivacity/FacebookLike/Helper/Data.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+ class Vivacity_FacebookLike_Helper_Data extends Mage_Core_Helper_Abstract
3
+ {
4
+ }
5
+
app/code/community/Vivacity/FacebookLike/Model/Fbcolorscheme.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Vivacity_FacebookLike_Model_Fbcolorscheme
3
+ {
4
+
5
+ public function toOptionArray()
6
+ {
7
+ $option = array(
8
+ "light"=>'Light',
9
+ "dark"=>'Dark'
10
+ );
11
+ return $option;
12
+ }
13
+
14
+ }
15
+ ?>
16
+
17
+
app/code/community/Vivacity/FacebookLike/Model/Layout.php ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Vivacity_FacebookLike_Model_Layout
3
+ {
4
+
5
+ public function toOptionArray()
6
+ {
7
+ $option = array(
8
+ "standard"=>'standard',
9
+ "button_count"=>'button_count',
10
+ "box_count"=>'box_count',
11
+ "button"=>'button');
12
+ return $option;
13
+ }
14
+
15
+ }
16
+ ?>
17
+
app/code/community/Vivacity/FacebookLike/etc/config.xml ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Vivacity_FacebookLike>
5
+ <version>1.0.0</version>
6
+ </Vivacity_FacebookLike>
7
+ </modules>
8
+ <global>
9
+ <helpers>
10
+ <facebooklike>
11
+ <class>Vivacity_FacebookLike_Helper</class>
12
+ </facebooklike>
13
+ </helpers>
14
+ </global>
15
+
16
+ <adminhtml>
17
+ <acl>
18
+ <resources>
19
+ <admin>
20
+ <children>
21
+ <system>
22
+ <children>
23
+ <config>
24
+ <children>
25
+ <facebooklike_options>
26
+ <title>Store FacebookLike Section</title>
27
+ </facebooklike_options>
28
+ </children>
29
+ </config>
30
+ </children>
31
+ </system>
32
+ </children>
33
+ </admin>
34
+ </resources>
35
+ </acl>
36
+ </adminhtml>
37
+
38
+ <frontend>
39
+ <routers>
40
+ <facebooklike>
41
+ <use>standard</use>
42
+ <args>
43
+ <module>Vivacity_FacebookLike</module>
44
+ <frontName>facebooklike</frontName>
45
+ </args>
46
+ </facebooklike>
47
+ </routers>
48
+ <layout>
49
+ <updates>
50
+ <facebooklike>
51
+ <file>facebooklike.xml</file>
52
+ </facebooklike>
53
+ </updates>
54
+ </layout>
55
+ </frontend>
56
+ </config>
app/code/community/Vivacity/FacebookLike/etc/system.xml ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <tabs>
4
+ <vivacity_infotech>
5
+ <label>Vivacity InfoTech</label>
6
+ <sort_order>190</sort_order>
7
+ </vivacity_infotech>
8
+ </tabs>
9
+ <sections>
10
+ <facebooklike_options translate="label" module="facebooklike">
11
+ <tab>vivacity_infotech</tab>
12
+ <label>Facebook Like</label>
13
+ <frontend_type>text</frontend_type>
14
+ <sort_order>1</sort_order>
15
+ <show_in_default>1</show_in_default>
16
+ <show_in_website>1</show_in_website>
17
+ <show_in_store>1</show_in_store>
18
+ <groups>
19
+ <all_settings translate="label">
20
+ <label>Facebook Settings</label>
21
+ <frontend_type>text</frontend_type>
22
+ <sort_order>10</sort_order>
23
+ <show_in_default>1</show_in_default>
24
+ <show_in_website>1</show_in_website>
25
+ <show_in_store>0</show_in_store>
26
+
27
+ <fields>
28
+ <enabledisable translate="label">
29
+ <label>Enabled? </label>
30
+ <frontend_type>select</frontend_type>
31
+ <source_model>adminhtml/system_config_source_yesno</source_model>
32
+ <sort_order>2</sort_order>
33
+ <show_in_default>1</show_in_default>
34
+ <show_in_website>1</show_in_website>
35
+ <show_in_store>0</show_in_store>
36
+ </enabledisable>
37
+ <fbappid translate="label">
38
+ <label>Facebook App ID</label>
39
+ <comment><![CDATA[Don`t have Facebook App yet? <a href="http://www.facebook.com/developers/createapp.php" target="_blank">Click</a> to get one here.]]>
40
+ </comment>
41
+ <frontend_type>text</frontend_type>
42
+ <sort_order>3</sort_order>
43
+ <show_in_default>1</show_in_default>
44
+ <show_in_website>1</show_in_website>
45
+ <show_in_store>0</show_in_store>
46
+ </fbappid>
47
+ <fbface translate="label">
48
+ <label>Show Faces</label>
49
+ <frontend_type>select</frontend_type>
50
+ <source_model>adminhtml/system_config_source_yesno</source_model>
51
+ <sort_order>4</sort_order>
52
+ <show_in_default>1</show_in_default>
53
+ <show_in_website>1</show_in_website>
54
+ <show_in_store>0</show_in_store>
55
+ </fbface>
56
+ <fblayout translate="label">
57
+ <label>Button Layout</label>
58
+ <frontend_type>select</frontend_type>
59
+ <comment>standard,button_count or box_count</comment>
60
+ <source_model>Vivacity_FacebookLike_Model_Layout</source_model>
61
+ <sort_order>5</sort_order>
62
+ <show_in_default>1</show_in_default>
63
+ <show_in_website>1</show_in_website>
64
+ <show_in_store>1</show_in_store>
65
+ </fblayout>
66
+
67
+ <fbcolorscheme translate="label">
68
+ <label>Color Scheme</label>
69
+ <frontend_type>select</frontend_type>
70
+ <source_model>Vivacity_FacebookLike_Model_Fbcolorscheme</source_model>
71
+ <sort_order>6</sort_order>
72
+ <show_in_default>1</show_in_default>
73
+ <show_in_website>1</show_in_website>
74
+ <show_in_store>1</show_in_store>
75
+ </fbcolorscheme>
76
+ <datawidth translate="label">
77
+ <label>Width</label>
78
+ <frontend_type>text</frontend_type>
79
+ <sort_order>7</sort_order>
80
+ <show_in_default>1</show_in_default>
81
+ <show_in_website>1</show_in_website>
82
+ <show_in_store>1</show_in_store>
83
+ </datawidth>
84
+ </fields>
85
+ </all_settings>
86
+ </groups>
87
+ </facebooklike_options>
88
+ </sections>
89
+ </config>
app/design/frontend/base/default/template/facebooklike/facebooklike.phtml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $fbcolorscheme = Mage::getStoreConfig('facebooklike_options/all_settings/fbcolorscheme');
3
+
4
+ $fbappid = Mage::getStoreConfig('facebooklike_options/all_settings/fbappid');
5
+
6
+ $fblayout = Mage::getStoreConfig('facebooklike_options/all_settings/fblayout');
7
+
8
+ $fbface = Mage::getStoreConfig('facebooklike_options/all_settings/fbface');
9
+
10
+ $fblocale = Mage::app()->getLocale()->getLocaleCode();
11
+
12
+ $dbdatawidth = Mage::getStoreConfig('facebooklike_options/all_settings/datawidth');
13
+
14
+ if($fbface==1){
15
+
16
+ $fbface='true';
17
+
18
+ }else{
19
+
20
+ $fbface='false';
21
+
22
+ }
23
+ $fbappid=($fbappid=='') ? '512993528731249' : $fbappid ;//If FB APP ID is not added
24
+ $dbdatawidth=($dbdatawidth=='') ? '450' : $dbdatawidth ;//default button width
25
+ ?>
26
+ <script>(function(d, s, id) {
27
+ var js, fjs = d.getElementsByTagName(s)[0];
28
+ if (d.getElementById(id)) return;
29
+ js = d.createElement(s); js.id = id;
30
+ js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=<?php echo $fbappid;?>";
31
+ fjs.parentNode.insertBefore(js, fjs);
32
+ }(document, 'script', 'facebook-jssdk'));
33
+ </script>
34
+ <div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like layout="<?php echo $fblayout; ?>" show_faces="<?php echo $fbface; ?>" width="<?php echo $dbdatawidth;?>" color_scheme="<?php echo $fbcolorscheme;?>" ></fb:like>
app/design/frontend/base/default/template/facebooklike/head.phtml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php $product = Mage::registry('current_product'); ?>
2
+ <?php if ($product): ?>
3
+ <meta property="fb:app_id" content="<?php echo Mage::getStoreConfig('facebooklike_options/all_settings/fbappid'); ?>"/>
4
+ <meta property="og:title" content="<?php echo trim($product->getName()); ?>"/>
5
+ <meta property="og:url" content="<?php echo $this->helper('core/url')->getCurrentUrl();?>"/>
6
+ <meta property="og:type" content="product"/>
7
+ <meta property="og:image" content="<?php echo $this->helper('catalog/image')->init($product, 'small_image')->resize(130, 110); ?>" />
8
+ <?php endif; ?>
9
+
10
+
app/etc/modules/Vivacity_FacebookLike.xml ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Vivacity_FacebookLike>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ <version>1.0.0</version>
8
+ </Vivacity_FacebookLike>
9
+ </modules>
10
+ </config>
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Facebook_Like_by_Vivacity</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://www.gnu.org/copyleft/gpl.html">GPL</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Adds "Facebook Like button" to your product detail page. </summary>
10
+ <description> "Facebook Like Vivacity" extension provides users an easy &amp; simple way to like any of your store products which then is posted on user's Facebook account wall, thus telling your friends and FaceBook connections about that product and its description. </description>
11
+ <notes>Initial Release of Extension</notes>
12
+ <authors><author><name>Team Vivacity</name><user>vivacityinfotec</user><email>vivacityinfotech.jaipur@gmail.com</email></author></authors>
13
+ <date>2014-05-07</date>
14
+ <time>06:41:43</time>
15
+ <contents><target name="magecommunity"><dir name="Vivacity"><dir name="FacebookLike"><dir name="Helper"><file name="Data.php" hash="ab7954778cebab04b849b2a7d2a26e8b"/></dir><dir name="Model"><file name="Fbcolorscheme.php" hash="6ca3976387c8c63c7f4a2bfa3bb91b25"/><file name="Layout.php" hash="ef6f038a3654e0238b19770327ec74f7"/></dir><dir name="etc"><file name="config.xml" hash="b27f6850d8b342570dcad233503b167b"/><file name="system.xml" hash="37c59acecb5c71584a58b1e527590d9f"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Vivacity_FacebookLike.xml" hash="e8869ea63f7c6305de39a294deef443a"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="facebooklike"><file name="facebooklike.phtml" hash="f639bbf6eacccb90ac1315a7ba5253ef"/><file name="head.phtml" hash="c200db758cc264bcf050f4b3b65906c2"/></dir></dir></dir></dir></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
+ </package>