BeeShopy_BeeSocial - Version 0.4.3

Version Notes

Checking if product exists.

Download this release

Release Info

Developer Magento Core Team
Extension BeeShopy_BeeSocial
Version 0.4.3
Comparing to
See all releases


Code changes from version 0.4.2 to 0.4.3

app/code/community/BeeShopy/BeeSocial/Block/Iframe.php CHANGED
@@ -6,16 +6,23 @@ class BeeShopy_BeeSocial_Block_Iframe
6
 
7
  protected function _toHtml()
8
  {
9
- $html = "<script type='text/javascript'>
10
- // Resize iframe to full height
11
- function resizeIframe(height)
12
- {
13
- // '+60' is a general rule of thumb to allow for differences in
14
- // IE & and FF height reporting, can be adjusted as required..
15
- document.getElementById('beesocial').height = parseInt(height)+10;
16
- }
17
- </script>";
18
- $html.= '<div class="product-view" style ="margin-top:10px"><div class="product-collateral" style="background-color:#e9effe"><h2>Spread the word!</h2><iframe src="http://beeshopy.com/out?domain=' . urlencode(Mage::getBaseURL()) . '&product_id=' . Mage::registry('current_product')->getId() .'&url='. urlencode(Mage::helper('core/url')->getCurrentUrl()) .'&width=600" width="100%" scrolling="auto" frameborder="0" id="beesocial"></iframe></div></div>';
19
- return $html;
 
 
 
 
 
 
 
20
  }
21
  }
6
 
7
  protected function _toHtml()
8
  {
9
+ $product = Mage::registry('current_product');
10
+ $domain = urlencode(Mage::getBaseURL());
11
+ $url = urlencode(Mage::helper('core/url')->getCurrentUrl());
12
+ $html = "";
13
+
14
+ if($product){
15
+ $html .= "<script type='text/javascript'>
16
+ // Resize iframe to full height
17
+ function resizeIframe(height)
18
+ {
19
+ // '+60' is a general rule of thumb to allow for differences in
20
+ // IE & and FF height reporting, can be adjusted as required..
21
+ document.getElementById('beesocial').height = parseInt(height)+10;
22
+ }
23
+ </script>";
24
+ $html.= '<div class="product-view" style ="margin-top:10px"><div class="product-collateral" style="background-color:#e9effe"><h2>Spread the word!</h2><iframe src="http://beeshopy.com/out?domain='.$domain.'&product_id='.$product->getId().'&url='.$url.'&width=600" width="100%" scrolling="auto" frameborder="0" id="beesocial"></iframe></div></div>';
25
+ }
26
+ return $html;
27
  }
28
  }
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>BeeShopy_BeeSocial</name>
4
- <version>0.4.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>FB:Comments, FB:Like and Twitter Badget for your products.</summary>
10
  <description>BeeSocial allows to your users comment and share your products in Facebook and Twitter.</description>
11
- <notes>Fixing header problem</notes>
12
  <authors><author><name>Miguel &#xC1;ngel Mart&#xED;nez Trivi&#xF1;o</name><user>auto-converted</user><email>miguelangel@beeshopy.com</email></author><author><name>Juan Gallego</name><user>auto-converted</user><email>juan@beeshopy.com</email></author></authors>
13
- <date>2011-01-10</date>
14
- <time>22:48:20</time>
15
- <contents><target name="magecommunity"><dir name="BeeShopy"><dir name="BeeSocial"><dir name="Block"><file name="Iframe.php" hash="acf73dd8afe2ffd436ab7dd82a0cd101"/></dir><dir name="controllers"><file name="IndexController.php" hash="c296bff38d157d13c3d5705ea523bc68"/></dir><dir name="etc"><file name="config.xml" hash="0ae95b3831c399cb4e9ec321ee3a1c83"/><file name="widget.xml" hash="983dfa5d28418547ca7b636f246f5e98"/></dir><dir name="helper"><file name="Data.php" hash="7a9befef350fe2d362599b32620eb534"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="BeeShopy_BeeSocial.xml" hash="f24331c9435e13df6243bdf75e28b5b1"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>BeeShopy_BeeSocial</name>
4
+ <version>0.4.3</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>FB:Comments, FB:Like and Twitter Badget for your products.</summary>
10
  <description>BeeSocial allows to your users comment and share your products in Facebook and Twitter.</description>
11
+ <notes>Checking if product exists.</notes>
12
  <authors><author><name>Miguel &#xC1;ngel Mart&#xED;nez Trivi&#xF1;o</name><user>auto-converted</user><email>miguelangel@beeshopy.com</email></author><author><name>Juan Gallego</name><user>auto-converted</user><email>juan@beeshopy.com</email></author></authors>
13
+ <date>2011-01-11</date>
14
+ <time>03:33:12</time>
15
+ <contents><target name="magecommunity"><dir name="BeeShopy"><dir name="BeeSocial"><dir name="Block"><file name="Iframe.php" hash="3f47c640691c4af43b73bb3d00005a0c"/></dir><dir name="controllers"><file name="IndexController.php" hash="c296bff38d157d13c3d5705ea523bc68"/></dir><dir name="etc"><file name="config.xml" hash="0ae95b3831c399cb4e9ec321ee3a1c83"/><file name="widget.xml" hash="983dfa5d28418547ca7b636f246f5e98"/></dir><dir name="helper"><file name="Data.php" hash="7a9befef350fe2d362599b32620eb534"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="BeeShopy_BeeSocial.xml" hash="f24331c9435e13df6243bdf75e28b5b1"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>