Version Notes
1. Moved layout XML into a socialshare folder
2. Moved design phtml into base/default to support fallback of non-default based themes
3. Added logic to prevent Facebook Share JS from loading if no FB app-id is specified (body.html) -> prevents load & js errors for users who only need the OG metadata.
4. Added image upload functionality in adminhtml configuration for a default OG image (website logo, for instance). This is only loaded if no other image is found, and is not required.
5. Added OG Tags support for the homepage and Category pages
6. Added support for category images
7. Added support for MAP (if enabled in magento core config), final price vs special price/price and related logic.
8. Added support for product ratings
9. Built logic around an array to allow for defaults to be inserted for missing data.
10. Naming, capitalization and spelling in system.xml -> nothing that changes configuration values that already existed.
11. Added Price tag to priceless products
Release Info
Developer | Roy Toledo |
Extension | SocialShareOG |
Version | 3.0.1 |
Comparing to | |
See all releases |
Code changes from version 3.0.0 to 3.0.1
@@ -16,10 +16,9 @@
|
|
16 |
/* Defaults */
|
17 |
$_socialShareOgData["og:type"] = "article";
|
18 |
$_socialShareOgData["og:title"] = htmlspecialchars($this->getLayout()->getBlock('head')->getTitle());
|
19 |
-
$_socialShareOgData["og:url"]
|
20 |
-
$_socialShareOgData["og:description"] = htmlspecialchars( $this->getLayout()->getBlock('head')->getDescription() );
|
21 |
//$_socialShareOgData["og:description"] = strip_tags($this->getDescription());
|
22 |
-
|
23 |
$_socialShareOgData["og:site_name"] = Mage::app()->getStore()->getFrontEndName();
|
24 |
|
25 |
/* Product Pages */
|
@@ -40,6 +39,7 @@
|
|
40 |
} else { // Product not on sale
|
41 |
$_socialShareOgData["og:price:standard_amount"] = $_product->getPrice();
|
42 |
$_socialShareOgData["og:price:amount"] = $_product->getSpecialPrice();
|
|
|
43 |
}
|
44 |
$_socialShareOgData["og:price:currency"] = Mage::app()->getStore()->getCurrentCurrencyCode();
|
45 |
} elseif ($_product->getMsrp()) { // MAP pricing enabled and product has MSRP
|
16 |
/* Defaults */
|
17 |
$_socialShareOgData["og:type"] = "article";
|
18 |
$_socialShareOgData["og:title"] = htmlspecialchars($this->getLayout()->getBlock('head')->getTitle());
|
19 |
+
$_socialShareOgData["og:url"] = Mage::helper('core')->escapeHtml(Mage::helper('core/url')->getCurrentUrl());
|
20 |
+
$_socialShareOgData["og:description"] = strip_tags( htmlspecialchars( $this->getLayout()->getBlock('head')->getDescription() ) );
|
21 |
//$_socialShareOgData["og:description"] = strip_tags($this->getDescription());
|
|
|
22 |
$_socialShareOgData["og:site_name"] = Mage::app()->getStore()->getFrontEndName();
|
23 |
|
24 |
/* Product Pages */
|
39 |
} else { // Product not on sale
|
40 |
$_socialShareOgData["og:price:standard_amount"] = $_product->getPrice();
|
41 |
$_socialShareOgData["og:price:amount"] = $_product->getSpecialPrice();
|
42 |
+
$_socialShareOgData["og:product:price:amount"] = 0.00; // required by FB
|
43 |
}
|
44 |
$_socialShareOgData["og:price:currency"] = Mage::app()->getStore()->getCurrentCurrencyCode();
|
45 |
} elseif ($_product->getMsrp()) { // MAP pricing enabled and product has MSRP
|
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>SocialShareOG</name>
|
4 |
-
<version>3.0.
|
5 |
<stability>stable</stability>
|
6 |
<license>GNU</license>
|
7 |
<channel>community</channel>
|
@@ -19,11 +19,12 @@
|
|
19 |
8. Added support for product ratings
|
20 |
9. Built logic around an array to allow for defaults to be inserted for missing data.
|
21 |
10. Naming, capitalization and spelling in system.xml -> nothing that changes configuration values that already existed.
|
|
|
22 |
</notes>
|
23 |
<authors><author><name>Roy Toledo</name><user>NikNak</user><email>toledoroy@gmail.com</email></author></authors>
|
24 |
-
<date>2015-
|
25 |
-
<time>
|
26 |
-
<contents><target name="magecommunity"><dir name="SocialShare"><dir name="OpenGraphTags"><dir name="Adminhtml"><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><file name="Color.php" hash="ec237e9de0c6de32f75f1419a337defb"/><file name="Font.php" hash="a25370be2d6777fc30fa295888d59800"/><file name="Language.php" hash="d31bd885a47e85565d2b553d41664cdf"/><file name="Layout.php" hash="0e0c072db9b994d340e5a876fabfc470"/><file name="Verb.php" hash="502714d6b8e0b6dfb592e8f78753869a"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="0d955fa9a94fddc4e5fe8b6c87f1cece"/></dir><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><dir name="Dropdown"><file name="Localization.php" hash="124bfcf8e6be20123772da9c5c458989"/></dir></dir></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="000d6508eaaec0ab8f9ca63d5bd1418a"/><file name="config.xml" hash="efdb49f4ced5ec95afd300797f1ec187"/><file name="system.xml" hash="bbbba32503774d6adabaf78aeafecd8c"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="socialshare"><file name="OpenGraphTags.xml" hash="fab44e385036aa51b436aee01baed864"/></dir></dir><dir name="template"><dir name="socialshare"><file name="head.phtml" hash="
|
27 |
<compatible/>
|
28 |
<dependencies><required><php><min>4.0.0</min><max>6.8.0</max></php></required></dependencies>
|
29 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>SocialShareOG</name>
|
4 |
+
<version>3.0.1</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>GNU</license>
|
7 |
<channel>community</channel>
|
19 |
8. Added support for product ratings
|
20 |
9. Built logic around an array to allow for defaults to be inserted for missing data.
|
21 |
10. Naming, capitalization and spelling in system.xml -> nothing that changes configuration values that already existed.
|
22 |
+
11. Added Price tag to priceless products
|
23 |
</notes>
|
24 |
<authors><author><name>Roy Toledo</name><user>NikNak</user><email>toledoroy@gmail.com</email></author></authors>
|
25 |
+
<date>2015-08-31</date>
|
26 |
+
<time>17:00:59</time>
|
27 |
+
<contents><target name="magecommunity"><dir name="SocialShare"><dir name="OpenGraphTags"><dir name="Adminhtml"><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><file name="Color.php" hash="ec237e9de0c6de32f75f1419a337defb"/><file name="Font.php" hash="a25370be2d6777fc30fa295888d59800"/><file name="Language.php" hash="d31bd885a47e85565d2b553d41664cdf"/><file name="Layout.php" hash="0e0c072db9b994d340e5a876fabfc470"/><file name="Verb.php" hash="502714d6b8e0b6dfb592e8f78753869a"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="0d955fa9a94fddc4e5fe8b6c87f1cece"/></dir><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><dir name="Dropdown"><file name="Localization.php" hash="124bfcf8e6be20123772da9c5c458989"/></dir></dir></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="000d6508eaaec0ab8f9ca63d5bd1418a"/><file name="config.xml" hash="efdb49f4ced5ec95afd300797f1ec187"/><file name="system.xml" hash="bbbba32503774d6adabaf78aeafecd8c"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="socialshare"><file name="OpenGraphTags.xml" hash="fab44e385036aa51b436aee01baed864"/></dir></dir><dir name="template"><dir name="socialshare"><file name="head.phtml" hash="a42bc12db3810eaf86987a00a8b0160c"/><file name="body.phtml" hash="a978f917347c374dbe8fb9145d22df94"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="SocialShare_OpenGraphTags.xml" hash="820d4be224ecac5ad1ba1a7e23cb7b55"/></dir></target></contents>
|
28 |
<compatible/>
|
29 |
<dependencies><required><php><min>4.0.0</min><max>6.8.0</max></php></required></dependencies>
|
30 |
</package>
|