Trendyr_Trendyrshare - Version 1.0.4

Version Notes

Refactored 1.0.4

Download this release

Release Info

Developer Steve Barbera
Extension Trendyr_Trendyrshare
Version 1.0.4
Comparing to
See all releases


Code changes from version 1.0.3 to 1.0.4

app/design/frontend/default/default/template/trendyrshare/cart_trendyr_button.phtml ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if(isset($_SESSION['trendyr'])) :?>
2
+ <?php
3
+ $resource = Mage::getSingleton('core/resource');
4
+ $read_connection = $resource->getConnection('core_read');
5
+ $table_name = $resource->getTableName('trendyrshare');
6
+ $q = "SELECT * from $table_name";
7
+ $r = $read_connection->fetchAll($q);
8
+ $jsmode = $r[0]['jsmode'];
9
+ ?>
10
+
11
+ <script type="text/javascript" src="<?=$jsmode?>"></script>
12
+
13
+
14
+ <?php if($_SESSION['trendyr']['btn_msg_code'] != 2) : ?>
15
+ <?php
16
+ //get the notes val from the db
17
+
18
+
19
+ $tcopy = $r[0]['tcopy'];
20
+ $tcopy = preg_replace("@\"@", '\"', $tcopy); //get rid of any double quote issues.
21
+
22
+ ?>
23
+ <script type="text/javascript">
24
+ //Load the Trendyr Javascript Library
25
+ window.onload = function(){
26
+ //Add any addtional notices or notes to the modal window
27
+ var notes = "<?=$tcopy?>";
28
+
29
+ //Instantiate the Trendyr Javascript Library
30
+ //Include the Transaction Social Key
31
+ var trendyr = new Trendyr("<?=$_SESSION['trendyr']['transaction_social_key']?>", notes);
32
+ trendyr.createButton();
33
+ //When the window is closed refresh the window
34
+ trendyr.onClose(function(result){
35
+ window.location.reload();
36
+ });
37
+ };
38
+ </script>
39
+ <div href="#" id="Trendyr-Button"></div>
40
+ <?php endif; ?>
41
+
42
+ <?php endif; ?>
app/design/frontend/default/default/template/trendyrshare/on_success.phtml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if($_SESSION['trendyr']) : ?>
2
+ <?php
3
+
4
+ $resource = Mage::getSingleton('core/resource');
5
+ $read_connection = $resource->getConnection('core_read');
6
+ $table_name = $resource->getTableName('trendyrshare');
7
+ $q = "SELECT * from $table_name";
8
+ $r = $read_connection->fetchAll($q);
9
+ $jsmode = $r[0]['jsmode'];
10
+ $url = $jsmode;
11
+
12
+
13
+ ?>
14
+ <script type="text/javascript" src="<?=$url?>"></script>
15
+ <script>
16
+ var trendyr = new Trendyr('<?=$_SESSION['trendyr']['transaction_social_key']?>');
17
+ trendyr.transactionComplete();
18
+ </script>
19
+ <?php unset($_SESSION['trendyr']); ?>
20
+ <?php endif;?>
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Trendyr_Trendyrshare</name>
4
- <version>1.0.3</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.apache.org/licenses/LICENSE-2.0">ASL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Trendyr social share productions on checkout</summary>
10
  <description>Trendyr social share productions on checkout</description>
11
- <notes>Refactored</notes>
12
  <authors><author><name>Steve Barbera</name><user>trendyr</user><email>info@trendyr.com</email></author></authors>
13
  <date>2012-08-21</date>
14
- <time>20:16:42</time>
15
- <contents><target name="magecommunity"><dir name="Trendyr"><dir name="Trendyrshare"><dir name="Block"><dir name="Sales"><dir name="Order"><file name="Total.php" hash="411a319e2b492a22544bef8809802b7a"/></dir></dir><file name="Template.php" hash="92d8091e27a0c02f34115ae94faa00db"/></dir><dir name="Helper"><file name="Data.php" hash="5ff36855d52b16de7cf6ac9c29469c3e"/></dir><dir name="Model"><file name="Observer.php" hash="21afccea7c98498c73a8cc708b239755"/><dir name="Sales"><dir name="Order"><dir name="Total"><dir name="Creditmemo"><file name="Trendyr.php" hash="46790941ddf158f1a34a180e35a8205a"/></dir><dir name="Invoice"><file name="Trendyr.php" hash="2a313d89b5ee0ccc004153555b70aac9"/></dir></dir></dir><dir name="Quote"><dir name="Address"><dir name="Total"><file name="Trendyrshare.php" hash="4914701d5fa568a1267b738836c3cca6"/></dir></dir></dir></dir><file name="Trendyrshare.php" hash="807d5af85a1dfc623c29c94a1424b228"/></dir><dir name="controllers"><file name="IndexController.php" hash="868c96c7b48becda2b4803f11595e9e7"/></dir><dir name="etc"><file name="config.xml" hash="14229c1257a637cc7c0846de73b811c5"/></dir><dir name="sql"><dir name="trendyrshare_setup"><file name="mysql4-install-1.0.php" hash="008622ca2016ec58ef38458ca8f3de32"/></dir></dir><dir name="templates"><file name="form_block_action.phtml" hash="e1b85bf81d98e21f4bc7ef696b55ad6c"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="trendyrshare.xml" hash="0b8577cc69cf51735414180da439df24"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Trendyr_Trendyrshare.xml" hash="be570b8cfdb7114f6af540fb56454ffe"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.17</min><max>5.3.15</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Trendyr_Trendyrshare</name>
4
+ <version>1.0.4</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.apache.org/licenses/LICENSE-2.0">ASL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Trendyr social share productions on checkout</summary>
10
  <description>Trendyr social share productions on checkout</description>
11
+ <notes>Refactored 1.0.4</notes>
12
  <authors><author><name>Steve Barbera</name><user>trendyr</user><email>info@trendyr.com</email></author></authors>
13
  <date>2012-08-21</date>
14
+ <time>20:39:44</time>
15
+ <contents><target name="magecommunity"><dir name="Trendyr"><dir name="Trendyrshare"><dir name="Block"><dir name="Sales"><dir name="Order"><file name="Total.php" hash="411a319e2b492a22544bef8809802b7a"/></dir></dir><file name="Template.php" hash="92d8091e27a0c02f34115ae94faa00db"/></dir><dir name="Helper"><file name="Data.php" hash="5ff36855d52b16de7cf6ac9c29469c3e"/></dir><dir name="Model"><file name="Observer.php" hash="21afccea7c98498c73a8cc708b239755"/><dir name="Sales"><dir name="Order"><dir name="Total"><dir name="Creditmemo"><file name="Trendyr.php" hash="46790941ddf158f1a34a180e35a8205a"/></dir><dir name="Invoice"><file name="Trendyr.php" hash="2a313d89b5ee0ccc004153555b70aac9"/></dir></dir></dir><dir name="Quote"><dir name="Address"><dir name="Total"><file name="Trendyrshare.php" hash="4914701d5fa568a1267b738836c3cca6"/></dir></dir></dir></dir><file name="Trendyrshare.php" hash="807d5af85a1dfc623c29c94a1424b228"/></dir><dir name="controllers"><file name="IndexController.php" hash="868c96c7b48becda2b4803f11595e9e7"/></dir><dir name="etc"><file name="config.xml" hash="14229c1257a637cc7c0846de73b811c5"/></dir><dir name="sql"><dir name="trendyrshare_setup"><file name="mysql4-install-1.0.php" hash="008622ca2016ec58ef38458ca8f3de32"/></dir></dir><dir name="templates"><file name="form_block_action.phtml" hash="e1b85bf81d98e21f4bc7ef696b55ad6c"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="trendyrshare.xml" hash="0b8577cc69cf51735414180da439df24"/></dir><dir name="template"><dir name="trendyrshare"><file name="cart_trendyr_button.phtml" hash="4b1c52ea0b6ee2b65ba055c3a87458ce"/><file name="on_success.phtml" hash="3d5173afa1f42c1147879e035fb57769"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Trendyr_Trendyrshare.xml" hash="be570b8cfdb7114f6af540fb56454ffe"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.17</min><max>5.3.15</max></php></required></dependencies>
18
  </package>