Techinflo_SocialMedia - Version 1.0.1

Version Notes

Social Media Extension:

Social Media Extension provides magento admin to integrate with facebook and twitter account and post activities on the wall.

This extension helps the admin to select the specific social media from the dropdown through the product general information tab
as well as from the general information tab of catalog rules and shopping cart price rules, So that the admin can post on the specific activity on the wall.

The admin can share;

1. The recently added new store product.
2. Special Offers for a particular product.
3. Catalog price rule information of any special offer defined by the admin.
4. Shopping cart price rule information of any special offer defined by the admin.

Download this release

Release Info

Developer Techinflo
Extension Techinflo_SocialMedia
Version 1.0.1
Comparing to
See all releases


Code changes from version 1.0.0 to 1.0.1

app/code/local/Techinflo/SocialMedia/Model/Blockobserver.php CHANGED
@@ -20,7 +20,9 @@ class Techinflo_SocialMedia_Model_Blockobserver
20
  $fieldset = $form->addFieldset('socialmedia_fieldset',
21
  array('legend' => Mage::helper('salesrule')->__('Social Media Information'))
22
  );
23
-
 
 
24
  $fieldset->addField('is_facebook', 'select', array(
25
  'label' => Mage::helper('salesrule')->__('In Facebook'),
26
  'title' => Mage::helper('salesrule')->__('In Facebook'),
@@ -31,7 +33,10 @@ class Techinflo_SocialMedia_Model_Blockobserver
31
  'No' => Mage::helper('salesrule')->__('No'),
32
  ),
33
  ));
 
34
 
 
 
35
  $fieldset->addField('is_twitter', 'select', array(
36
  'label' => Mage::helper('salesrule')->__('In Twitter'),
37
  'title' => Mage::helper('salesrule')->__('In Twitter'),
@@ -42,7 +47,7 @@ class Techinflo_SocialMedia_Model_Blockobserver
42
  'No' => Mage::helper('salesrule')->__('No'),
43
  ),
44
  ));
45
-
46
  }
47
 
48
  if ($block->getType() == 'adminhtml/promo_catalog_edit_tab_main') {
@@ -53,28 +58,31 @@ class Techinflo_SocialMedia_Model_Blockobserver
53
  array('legend' => Mage::helper('catalogrule')->__('Social Media Information'))
54
  );
55
 
56
- $fieldset->addField('is_facebook', 'select', array(
57
- 'label' => Mage::helper('catalogrule')->__('In Facebook'),
58
- 'title' => Mage::helper('catalogrule')->__('In Facebook'),
59
- 'name' => 'is_facebook',
60
- 'required' => true,
61
- 'options' => array(
62
- 'Yes' => Mage::helper('catalogrule')->__('Yes'),
63
- 'No' => Mage::helper('catalogrule')->__('No'),
64
- ),
65
- ));
66
-
67
- $fieldset->addField('is_twitter', 'select', array(
68
- 'label' => Mage::helper('catalogrule')->__('In Twitter'),
69
- 'title' => Mage::helper('catalogrule')->__('In Twitter'),
70
- 'name' => 'is_twitter',
71
- 'required' => true,
72
- 'options' => array(
73
- 'Yes' => Mage::helper('catalogrule')->__('Yes'),
74
- 'No' => Mage::helper('catalogrule')->__('No'),
75
- ),
76
- ));
77
-
 
 
 
78
  }
79
  }
80
  }
20
  $fieldset = $form->addFieldset('socialmedia_fieldset',
21
  array('legend' => Mage::helper('salesrule')->__('Social Media Information'))
22
  );
23
+
24
+ if (Mage::getStoreConfig('techinflosocialmedia/facebook/fbenabled')) {
25
+
26
  $fieldset->addField('is_facebook', 'select', array(
27
  'label' => Mage::helper('salesrule')->__('In Facebook'),
28
  'title' => Mage::helper('salesrule')->__('In Facebook'),
33
  'No' => Mage::helper('salesrule')->__('No'),
34
  ),
35
  ));
36
+ }
37
 
38
+ if (Mage::getStoreConfig('techinflosocialmedia/twitter/twenabled')) {
39
+
40
  $fieldset->addField('is_twitter', 'select', array(
41
  'label' => Mage::helper('salesrule')->__('In Twitter'),
42
  'title' => Mage::helper('salesrule')->__('In Twitter'),
47
  'No' => Mage::helper('salesrule')->__('No'),
48
  ),
49
  ));
50
+ }
51
  }
52
 
53
  if ($block->getType() == 'adminhtml/promo_catalog_edit_tab_main') {
58
  array('legend' => Mage::helper('catalogrule')->__('Social Media Information'))
59
  );
60
 
61
+ if (Mage::getStoreConfig('techinflosocialmedia/facebook/fbenabled')) {
62
+ $fieldset->addField('is_facebook', 'select', array(
63
+ 'label' => Mage::helper('catalogrule')->__('In Facebook'),
64
+ 'title' => Mage::helper('catalogrule')->__('In Facebook'),
65
+ 'name' => 'is_facebook',
66
+ 'required' => true,
67
+ 'options' => array(
68
+ 'Yes' => Mage::helper('catalogrule')->__('Yes'),
69
+ 'No' => Mage::helper('catalogrule')->__('No'),
70
+ ),
71
+ ));
72
+ }
73
+
74
+ if (Mage::getStoreConfig('techinflosocialmedia/twitter/twenabled')) {
75
+ $fieldset->addField('is_twitter', 'select', array(
76
+ 'label' => Mage::helper('catalogrule')->__('In Twitter'),
77
+ 'title' => Mage::helper('catalogrule')->__('In Twitter'),
78
+ 'name' => 'is_twitter',
79
+ 'required' => true,
80
+ 'options' => array(
81
+ 'Yes' => Mage::helper('catalogrule')->__('Yes'),
82
+ 'No' => Mage::helper('catalogrule')->__('No'),
83
+ ),
84
+ ));
85
+ }
86
  }
87
  }
88
  }
app/code/local/Techinflo/SocialMedia/Model/Observer.php CHANGED
@@ -49,7 +49,7 @@ class Techinflo_SocialMedia_Model_Observer
49
  "access_token" => $access_token, // this is the main access token (facebook profile)
50
  "message" => $product_info["short_description"],
51
  "link" => $product_info["url"],
52
- "picture" => $product_image,
53
  "name" => $product_title,
54
  "caption" => $product_tagline,
55
  "description" => $product_info["description"],
49
  "access_token" => $access_token, // this is the main access token (facebook profile)
50
  "message" => $product_info["short_description"],
51
  "link" => $product_info["url"],
52
+ // "picture" => $product_image,
53
  "name" => $product_title,
54
  "caption" => $product_tagline,
55
  "description" => $product_info["description"],
app/code/local/Techinflo/SocialMedia/etc/config.xml CHANGED
@@ -4,7 +4,7 @@
4
 
5
  <modules>
6
  <Techinflo_SocialMedia>
7
- <version>1.0.0</version>
8
  </Techinflo_SocialMedia>
9
  </modules>
10
 
4
 
5
  <modules>
6
  <Techinflo_SocialMedia>
7
+ <version>1.0.1</version>
8
  </Techinflo_SocialMedia>
9
  </modules>
10
 
app/code/local/Techinflo/SocialMedia/sql/techinflo_socialmedia_setup/{mysql4-install-1.0.0.php → mysql4-install-1.0.1.php} RENAMED
File without changes
app/code/local/Techinflo/SocialMedia/sql/techinflo_socialmedia_setup/{mysql4-upgrade-1.0.0-1.0.1.php → mysql4-upgrade-1.0.1-1.0.2.php} RENAMED
File without changes
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Techinflo_SocialMedia</name>
4
- <version>1.0.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/OSL-3.0">OSL-3.0</license>
7
  <channel>community</channel>
@@ -36,9 +36,9 @@ The admin can share;&#xD;
36
  &#xD;
37
  </notes>
38
  <authors><author><name>Techinflo</name><user>Techinflo</user><email>anil.gupta@techinflo.com</email></author></authors>
39
- <date>2014-02-20</date>
40
- <time>05:13:06</time>
41
- <contents><target name="mageetc"><dir><dir name="modules"><file name="Techinflo_SocialMedia.xml" hash="6395d8810d5e2a94539e50c6ecdaff50"/></dir></dir></target><target name="magelocal"><dir><dir name="Techinflo"><dir name="SocialMedia"><dir><dir name="Helper"><file name="Data.php" hash="641f6e4644ef886b715ef6c8d02ac4b5"/></dir><dir name="Model"><file name="Blockobserver.php" hash="35368ee563a49f7eb5979fc2bb666a59"/><file name="Observer.php" hash="09d4fddf01500fb796702743f1e9c147"/></dir><dir name="etc"><file name="adminhtml.xml" hash="c7d66ef65cdb074cd1309bdd0064384a"/><file name="config.xml" hash="16a52b441b65a4635e881a646d587964"/><file name="system.xml" hash="d41f42a8a10ca0c95ee67a16516e981f"/></dir><dir name="sql"><dir name="techinflo_socialmedia_setup"><file name="mysql4-install-1.0.0.php" hash="cfd4919830b50354962b9dcea0c7f9a8"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="4f3b63cd987cfdb69e57251cabfffaab"/></dir></dir></dir></dir></dir></dir></target><target name="magelib"><dir><dir name="techinflo"><dir><dir name="facebook"><dir name="facebook_sdk"><file name="changelog.md" hash="31fce8336dd5a3f061686f19e19bd56d"/><file name="composer.json" hash="5d17b681de9984e9af98629c2404f0a4"/><dir name="examples"><file name="example.php" hash="21f296ecba4b310c889ad661de54328d"/><file name="with_js_sdk.php" hash="555e738cb8c6b42834a5c5a2083bd3e6"/></dir><file name="facebook-php-sdk-master.zip" hash="d0ef2b729736026521d49e67eae71c10"/><file name="readme.md" hash="b732598f748027abede8be4ef245bdb4"/><dir name="src"><file name="base_facebook.php" hash="a3c310c31d60499775e52cedf420bee9"/><file name="facebook.php" hash="55eff3b0c609b03f592b3d0e8163e9b0"/><file name="fb_ca_chain_bundle.crt" hash="c4290b9deb70d0bef2f88b67fc68c8ec"/></dir><dir name="tests"><file name="bootstrap.php" hash="b8bd1937c8d639841949a24e2fcdf983"/><file name="tests.php" hash="ae9cc21f0c90dd921e69f680334709b5"/></dir><file name=".gitignore" hash="c70225b31dfd58749ffe8a1596368282"/><file name=".travis.yml" hash="b50200162dd1758876be367e894194e6"/></dir><dir name="token"><file name="index.php" hash="7bbe8106bb426b3f670b240e91fcbe24"/></dir></dir><dir name="twitter"><dir name="twitter_sdk"><dir name="src"><file name="OAuth.php" hash="d645162e3e8906ab8c24d1ce54bf0279"/><file name="twitter.php" hash="04da60b8d764ecd9001e5e1f3e3c61c5"/></dir></dir></dir></dir></dir></dir></target></contents>
42
  <compatible/>
43
  <dependencies><required><php><min>5.1.0</min><max>6.1.0</max></php></required></dependencies>
44
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Techinflo_SocialMedia</name>
4
+ <version>1.0.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/OSL-3.0">OSL-3.0</license>
7
  <channel>community</channel>
36
  &#xD;
37
  </notes>
38
  <authors><author><name>Techinflo</name><user>Techinflo</user><email>anil.gupta@techinflo.com</email></author></authors>
39
+ <date>2014-03-08</date>
40
+ <time>07:27:39</time>
41
+ <contents><target name="mageetc"><dir><dir name="modules"><file name="Techinflo_SocialMedia.xml" hash="6395d8810d5e2a94539e50c6ecdaff50"/></dir></dir></target><target name="magelocal"><dir><dir name="Techinflo"><dir name="SocialMedia"><dir><dir name="Helper"><file name="Data.php" hash="641f6e4644ef886b715ef6c8d02ac4b5"/></dir><dir name="Model"><file name="Blockobserver.php" hash="084a3601a9a247ac0ce7e28446fc3d7a"/><file name="Observer.php" hash="4a3dc4788168ec0a3c5f441cf7fa2452"/></dir><dir name="etc"><file name="adminhtml.xml" hash="c7d66ef65cdb074cd1309bdd0064384a"/><file name="config.xml" hash="811b226a5e182e3e0f3afd02d4f0aab1"/><file name="system.xml" hash="d41f42a8a10ca0c95ee67a16516e981f"/></dir><dir name="sql"><dir name="techinflo_socialmedia_setup"><file name="mysql4-install-1.0.1.php" hash="cfd4919830b50354962b9dcea0c7f9a8"/><file name="mysql4-upgrade-1.0.1-1.0.2.php" hash="4f3b63cd987cfdb69e57251cabfffaab"/></dir></dir></dir></dir></dir></dir></target><target name="magelib"><dir><dir name="techinflo"><dir><dir name="facebook"><dir name="facebook_sdk"><file name="changelog.md" hash="31fce8336dd5a3f061686f19e19bd56d"/><file name="composer.json" hash="5d17b681de9984e9af98629c2404f0a4"/><dir name="examples"><file name="example.php" hash="21f296ecba4b310c889ad661de54328d"/><file name="with_js_sdk.php" hash="555e738cb8c6b42834a5c5a2083bd3e6"/></dir><file name="facebook-php-sdk-master.zip" hash="d0ef2b729736026521d49e67eae71c10"/><file name="readme.md" hash="b732598f748027abede8be4ef245bdb4"/><dir name="src"><file name="base_facebook.php" hash="a3c310c31d60499775e52cedf420bee9"/><file name="facebook.php" hash="55eff3b0c609b03f592b3d0e8163e9b0"/><file name="fb_ca_chain_bundle.crt" hash="c4290b9deb70d0bef2f88b67fc68c8ec"/></dir><dir name="tests"><file name="bootstrap.php" hash="b8bd1937c8d639841949a24e2fcdf983"/><file name="tests.php" hash="ae9cc21f0c90dd921e69f680334709b5"/></dir><file name=".gitignore" hash="c70225b31dfd58749ffe8a1596368282"/><file name=".travis.yml" hash="b50200162dd1758876be367e894194e6"/></dir><dir name="token"><file name="index.php" hash="7bbe8106bb426b3f670b240e91fcbe24"/></dir></dir><dir name="twitter"><dir name="twitter_sdk"><dir name="src"><file name="OAuth.php" hash="d645162e3e8906ab8c24d1ce54bf0279"/><file name="twitter.php" hash="04da60b8d764ecd9001e5e1f3e3c61c5"/></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir><dir name="techinflo_socialmedia"><file name="readme.txt" hash="3a667e4e3cbb06d8e6f3b44f83f7b349"/><file name="uninstal.php" hash="ae04d7f1516f2653aedf165cefbf87c5"/></dir></dir></target></contents>
42
  <compatible/>
43
  <dependencies><required><php><min>5.1.0</min><max>6.1.0</max></php></required></dependencies>
44
  </package>
techinflo_socialmedia/readme.txt ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ UNINSTALLATION PROCEDURE FOR SOCIAL MEDIA EXTENSION:
2
+
3
+ After uninstalling the social media extension from magento connect manager,
4
+ to remove the system attributes and ensure the complete uninstallation of
5
+ social media extension,
6
+
7
+
8
+ It is required to run the following queries in to
9
+ the database manually;
10
+
11
+ DELETE FROM `eav_attribute` WHERE `attribute_code`='is_facebook';
12
+
13
+ DELETE FROM `eav_attribute` WHERE `attribute_code`='is_twitter';
14
+
15
+ DELETE FROM `eav_attribute` WHERE `attribute_code`='special_offer';
16
+
17
+ or else need to place the uninstallation script(uninstal.php file)in magento
18
+ root dir and run the uninstal script in the browser.
techinflo_socialmedia/uninstal.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Uninstallation script
4
+ *
5
+ * @category SocialMedia
6
+ * @package Techinflo_SocialMedia
7
+ * @author Techinflo Team
8
+ */
9
+
10
+ /* @var $uninstaller Mage_Catalog_Model_Resource_Setup */
11
+
12
+ require_once('app/Mage.php');
13
+
14
+ Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(Mage_Core_Model_App::ADMIN_STORE_ID));
15
+ $uninstaller = new Mage_Sales_Model_Mysql4_Setup;
16
+ $uninstaller->startSetup();
17
+
18
+ if ($uninstaller->getAttributeId('catalog_product', 'is_facebook')) {
19
+ $uninstaller->removeAttribute('catalog_product', 'is_facebook');
20
+ }
21
+
22
+ if ($uninstaller->getAttributeId('catalog_product', 'is_twitter')) {
23
+ $uninstaller->removeAttribute('catalog_product', 'is_twitter');
24
+ }
25
+
26
+ if ($uninstaller->getAttributeId('catalog_product', 'special_offer')) {
27
+ $uninstaller->removeAttribute('catalog_product', 'special_offer');
28
+ }
29
+
30
+ $uninstaller->endSetup();
31
+ ?>