Shopalize_Social_Widget - Version 1.0.0

Version Notes

Shopalize Purchase Sharing Widget 1.0 Stable released

Download this release

Release Info

Developer Magento Core Team
Extension Shopalize_Social_Widget
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

app/code/community/Shopalize/Purchasesharingwidget/Block/Purchasesharingwidget.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @company Ocean Websoft Pvt. Ltd.<www.oceanwebsoft.com>
4
+ * @author Ashwini Dinker<ashwini.owsm@gmail.com>
5
+ *
6
+ * @category Oceanwebsoft
7
+ * @package Oceanwebsoft_Shopalize_Social_widget
8
+ */
9
+
10
+ class Shopalize_Purchasesharingwidget_Block_Purchasesharingwidget extends Mage_Core_Block_Template
11
+ {
12
+
13
+ }
app/code/community/Shopalize/Purchasesharingwidget/Block/Success.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_Checkout
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+
28
+ class Shopalize_Purchasesharingwidget_Block_Success extends Mage_Checkout_Block_Success
29
+ {
30
+
31
+ }
app/code/community/Shopalize/Purchasesharingwidget/Block/System/Config/Info/About.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @company Ocean Websoft Pvt. Ltd.<www.oceanwebsoft.com>
4
+ * @author Ashwini Dinker<ashwini.owsm@gmail.com>
5
+ *
6
+ * @category Oceanwebsoft
7
+ * @package Oceanwebsoft_Shopalize_Social_widget
8
+ */
9
+ class Shopalize_Purchasesharingwidget_Block_System_Config_Info_About
10
+ extends Mage_Adminhtml_Block_Abstract
11
+ implements Varien_Data_Form_Element_Renderer_Interface
12
+ {
13
+
14
+ /**
15
+ * Render fieldset html
16
+ *
17
+ * @param Varien_Data_Form_Element_Abstract $element
18
+ * @return string
19
+ */
20
+ public function render(Varien_Data_Form_Element_Abstract $element)
21
+ {
22
+ $html = '<div style="background:url(\'http://www.dinkeronline.com/extensions/shopalize/icon.png\') no-repeat scroll 15px center #EAF0EE;border:1px solid #CCCCCC;margin-bottom:10px;padding:10px 5px 5px 200px;">
23
+ <h4>About Shopalize Purchase Sharing Widget</h4>
24
+ <p>Shopalize&acute;s Purchase Sharing Widget appears on the Order Confirmation page i.e. after checkout is complete and enables your customers to share their Purchases or specific Promotional Offers with their friends on existing social media platforms. It provides deep integration with growing social platforms like Facebook and Twitter for maximum reach, more engagement, and seamless experience. You can completely customize the look and feel, messaging of the Widget to match your store&acute;s needs.<br /><br/>
25
+ Author: Ashwini Dinker<br/>
26
+ View more extensions @ <a href="http://www.magentocommerce.com/magento-connect/developer/Dinker" target="_blank">MagentoConnect</a><br />
27
+ <a href="http://www.oceanwebsoft.com/contact_us" target="_blank">Request a Quote / Contact Us</a><br />
28
+ Skype me @ ashwini_ows<br />
29
+ Visit my website: <a href="http://www.oceanwebsoft.com" target="_blank">www.oceanwebsoft.com</a></p>
30
+ </div>';
31
+
32
+ return $html;
33
+ }
34
+ }
app/code/community/Shopalize/Purchasesharingwidget/Helper/Data.php ADDED
@@ -0,0 +1,174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @company Ocean Websoft Pvt. Ltd.<www.oceanwebsoft.com>
4
+ * @author Ashwini Dinker<ashwini.owsm@gmail.com>
5
+ *
6
+ * @category Oceanwebsoft
7
+ * @package Oceanwebsoft_Shopalize_Social_widget
8
+ */
9
+ class Shopalize_Purchasesharingwidget_Helper_Data extends Mage_Core_Helper_Abstract
10
+ {
11
+ public function getConfig($field, $group = 'settings', $default = null){
12
+ $value = Mage::getStoreConfig('purchasesharingwidget/'.$group.'/'.$field);
13
+ if(!isset($value) or trim($value) == ''){
14
+ return $default;
15
+ }else{
16
+ return $value;
17
+ }
18
+ }
19
+
20
+ public function getWidget($order_id) {
21
+
22
+ if($order_id)
23
+
24
+ {
25
+
26
+ $order = Mage::getModel('sales/order')->loadByIncrementId($order_id);
27
+ $_items = $order->getItemsCollection();
28
+ $_count = $_items->count();
29
+
30
+ if($_count>0)
31
+ {
32
+ $_output='<!-- Shopalize Integration BEGIN -->';
33
+ $_output.="\n".'<div id="shopalize-purchase-sharing-wrapper"></div>';
34
+ $_output.="\n".'<script type="text/javascript">';
35
+ $_output.="\nvar Shopalize = window.Shopalize || {};
36
+ (function() {
37
+ // Populate Purchase Order details
38
+ var PurchaseOrder = {'is_debug' : false, 'merchant_id': '', 'widget_width': '', 'campaign_id': '', 'customer_email': '', 'order_number': '', 'order_total': '', 'order_currency': '', 'order_date': '', 'items' : []},
39
+ num_items = '2';
40
+ for(var cnt = 0; cnt < num_items; cnt++) { PurchaseOrder.items[cnt] = {};}
41
+
42
+ // Provide Merchant account, Order, and Product Details\n";
43
+
44
+ $_output.="\n\tPurchaseOrder['is_debug'] = true;";
45
+ $_output.="\n\tPurchaseOrder['merchant_id'] = '".$this->getConfig('merchant_id', 'settings')."'";
46
+ $_output.="\n\tPurchaseOrder['widget_width'] = '".$this->getConfig('widget_width', 'settings')."px'";
47
+ $_output.="\n\tPurchaseOrder['customer_email'] = '".$this->escapeHtml($order->getCustomerEmail())."'";
48
+ $_output.="\n\tPurchaseOrder['order_number'] = '".$order_id."'";
49
+ $_output.="\n\tPurchaseOrder['order_total'] = '".$this->escapeHtml($order->getGrandTotal())."'";
50
+ $_output.="\n\tPurchaseOrder['order_currency'] = '".$this->escapeHtml($order->getOrderCurrencyCode())."'";
51
+ $_output.="\n\tPurchaseOrder['order_date'] = '".$order->getCreatedAtDate()."'";
52
+ $_output.="\n";
53
+
54
+ /*get ordered items*/
55
+
56
+ $k=0; foreach ($_items as $_item):
57
+ $_product = Mage::getModel('catalog/product');
58
+ $_product->load($_product->getIdBySku($_item->getSku()));
59
+ $_helper = Mage::helper('catalog/output');
60
+ if ($_product->getImage() != 'no_selection' && $_product->getImage()):
61
+ $_img = Mage::helper('catalog/image')->init($_product, 'image')->resize(50);
62
+ else:
63
+ $_img = Mage::helper('catalog/image')->init($_product, 'image')->resize(50);
64
+ endif;
65
+ if($_item->getPrice()==$_product->getPrice()):
66
+ $price=$_item->getPrice(); $special_price=$price;
67
+ else:
68
+ $price=$_product->getPrice(); $special_price=$_item->getPrice();
69
+ endif;
70
+ $_output.="\n\tPurchaseOrder['items'][".$k."]['id'] = '".$_item->getSku()."'";
71
+ $_output.="\n\tPurchaseOrder['items'][".$k."]['title'] = '".$_item->getName()."'";
72
+ $_output.="\n\tPurchaseOrder['items'][".$k."]['current_price'] = '".$special_price."'";
73
+ $_output.="\n\tPurchaseOrder['items'][".$k."]['list_price'] = '".$price."'";
74
+ $_output.="\n\tPurchaseOrder['items'][".$k."]['url'] = '".$_product->getProductUrl()."'";
75
+ $_output.="\n\tPurchaseOrder['items'][".$k."]['image_url'] = '".$_img."'";
76
+
77
+ $k++; endforeach;
78
+
79
+ /*get ordered items*/
80
+
81
+ $_output.="\n\n// Assign Purchase Order details to Shopalize scope
82
+ Shopalize.PurchaseOrder = PurchaseOrder;
83
+
84
+ // Load Widget script Asynchronously
85
+ var script = document.createElement('script');
86
+ script.type = 'text/javascript'; script.async = true;
87
+ script.src = 'http://shopalize.com/js/purchase_sharing_widget.js'
88
+ var entry = document.getElementsByTagName('script')[0];
89
+ entry.parentNode.insertBefore(script, entry);
90
+ }());";
91
+
92
+ $_output.="\n</script>\n".'<!-- Shopalize Integration END -->';
93
+
94
+ }
95
+
96
+ return $_output;
97
+ }
98
+ else {
99
+ return false;
100
+ }
101
+ }
102
+ public function getOrderinfoWidget($order_id) {
103
+
104
+ if($order_id)
105
+
106
+ {
107
+
108
+ $order = Mage::getModel('sales/order')->loadByIncrementId($order_id);
109
+ $_items = $order->getItemsCollection();
110
+ $_count = $_items->count();
111
+
112
+
113
+ $_output="<h3>Order Details</h3>";
114
+ $_output.="<p>Customer Name : ".$this->escapeHtml($order->getCustomerName())."</p>";
115
+ $_output.="<p>Customer Email : ".$this->escapeHtml($order->getCustomerEmail())."</p>";
116
+ $_output.="<p>Order No : ".$order_id."</p>";
117
+ $_output.="<p>Order Total : ".$this->escapeHtml($order->getGrandTotal())."</p>";
118
+ $_output.="<p>Order Currency : ".$this->escapeHtml($order->getOrderCurrencyCode())."</p>";
119
+ $_output.="<p>Order Date : ".$order->getCreatedAtDate()."</p>";
120
+
121
+ if($_count>0)
122
+ {
123
+ $_output.='<h3>Ordered Items</h3>';
124
+ $_output.='<table width="100%" class="data-table">
125
+ <tr style="background:#eee;">
126
+ <th>Item</th>
127
+ <th>Product Name</th>
128
+ <th>Product Code</th>
129
+ <th>Price</th>
130
+ <th>Special Price</th>
131
+ </tr>';
132
+
133
+
134
+
135
+ /*get ordered items*/
136
+
137
+ $k=0; foreach ($_items as $_item):
138
+ $_product = Mage::getModel('catalog/product');
139
+ $_product->load($_product->getIdBySku($_item->getSku()));
140
+ $_helper = Mage::helper('catalog/output');
141
+ if ($_product->getImage() != 'no_selection' && $_product->getImage()):
142
+ $_img = '<a href="'.$_product->getProductUrl().'" title="'.$_product->getName().'"><img id="image" src="'.Mage::helper('catalog/image')->init($_product, 'image')->resize(50).'" alt="'.$this->htmlEscape($_product->getImageLabel()).'" title="'.$this->htmlEscape($_product->getImageLabel()).'" /></a>';
143
+ else:
144
+ $_img = '<a href="'.$_product->getProductUrl().'"><img src="'.Mage::helper('catalog/image')->init($_product, 'image')->resize(50).'" alt="'.$this->htmlEscape($_product->getImageLabel()).'" title="'.$this->htmlEscape($_product->getImageLabel()).'" /></a>';
145
+ endif;
146
+ if($_item->getPrice()==$_product->getPrice()):
147
+ $price=$_item->getPrice(); $special_price=$price;
148
+ else:
149
+ $price=$_product->getPrice(); $special_price=$_item->getPrice();
150
+ endif;
151
+
152
+ //print items
153
+ $_output.='<tr>';
154
+ $_output.='<td>'.$_helper->productAttribute($_product, $_img, 'image').'</td>';
155
+ $_output.='<td>'.$_item->getName().'</td>';
156
+ $_output.='<td>'.$_item->getSku().'</td>';
157
+ $_output.='<td>'.$price.'</td>';
158
+ $_output.='<td>'.$price.'</td>';
159
+ $_output.='</tr>';
160
+
161
+ $k++; endforeach;
162
+
163
+ /*get ordered items*/
164
+ $_output.='</table>';
165
+ }
166
+
167
+ return $_output;
168
+ }
169
+ else {
170
+ return false;
171
+ }
172
+ }
173
+
174
+ }
app/code/community/Shopalize/Purchasesharingwidget/controllers/IndexController.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @company Ocean Websoft Pvt. Ltd.<www.oceanwebsoft.com>
4
+ * @author Ashwini Dinker<ashwini.owsm@gmail.com>
5
+ *
6
+ * @category Oceanwebsoft
7
+ * @package Oceanwebsoft_Shopalize_Social_widget
8
+ */
9
+
10
+ class Shopalize_Purchasesharingwidget_IndexController extends Mage_Core_Controller_Front_Action
11
+ {
12
+
13
+ }
app/code/community/Shopalize/Purchasesharingwidget/etc/adminhtml.xml ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ /**
4
+ * @company Ocean Websoft Pvt. Ltd.<www.oceanwebsoft.com>
5
+ * @author Ashwini Dinker<ashwini.owsm@gmail.com>
6
+ *
7
+ * @category Oceanwebsoft
8
+ * @package Oceanwebsoft_Shopalize_Social_widget
9
+ */
10
+
11
+ -->
12
+ <config>
13
+ <acl>
14
+ <resources>
15
+ <admin>
16
+ <children>
17
+ <system>
18
+ <children>
19
+ <config>
20
+ <children>
21
+ <purchasesharingwidget translate="title" module="purchasesharingwidget">
22
+ <title>Shpalize Purchase Sharing Widget</title>
23
+
24
+ </purchasesharingwidget>
25
+ </children>
26
+ </config>
27
+ </children>
28
+ </system>
29
+ </children>
30
+ </admin>
31
+ </resources>
32
+ </acl>
33
+ </config>
app/code/community/Shopalize/Purchasesharingwidget/etc/config.xml ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * @category OceanWebsoft
5
+ * @package OceanWebsoft_Shopalize_Socialwidget
6
+ * @author ashwini.owsm@gmail.com
7
+ * @website http://www.oceanwebsoft.com
8
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
9
+ */
10
+ -->
11
+ <config>
12
+ <modules>
13
+ <Shopalize_Purchasesharingwidget>
14
+ <version>1.1.0</version>
15
+ </Shopalize_Purchasesharingwidget>
16
+ </modules>
17
+ <global>
18
+ <helpers>
19
+ <purchasesharingwidget>
20
+ <class>Shopalize_Purchasesharingwidget_Helper</class>
21
+ </purchasesharingwidget>
22
+ </helpers>
23
+
24
+ <blocks>
25
+ <purchasesharingwidget>
26
+ <class>Shopalize_Purchasesharingwidget_Block</class>
27
+ </purchasesharingwidget>
28
+ <checkout>
29
+ <rewrite>
30
+ <success>Shopalize_Purchasesharingwidget_Block_Success</success>
31
+ </rewrite>
32
+ </checkout>
33
+ </blocks>
34
+
35
+
36
+ </global>
37
+ <frontend>
38
+ <layout>
39
+ <updates>
40
+ <purchasesharingwidget>
41
+ <file>purchasesharingwidget.xml</file>
42
+ </purchasesharingwidget>
43
+ </updates>
44
+ </layout>
45
+ </frontend>
46
+ <adminhtml>
47
+ <acl>
48
+ <resources>
49
+ <admin>
50
+ <children>
51
+ <system>
52
+ <children>
53
+ <config>
54
+ <children>
55
+ <shopalizeinfo>
56
+ <title>Shopalize</title>
57
+ </shopalizeinfo>
58
+ <purchasesharingwidget>
59
+ <title>Social Widget</title>
60
+ </purchasesharingwidget>
61
+ </children>
62
+ </config>
63
+ </children>
64
+ </system>
65
+ </children>
66
+ </admin>
67
+ </resources>
68
+ </acl>
69
+ </adminhtml>
70
+ <default>
71
+ <purchasesharingwidget>
72
+ <settings>
73
+ <active>0</active>
74
+ <widget_width>400</widget_width>
75
+
76
+ </settings>
77
+ </purchasesharingwidget>
78
+ </default>
79
+ </config>
app/code/community/Shopalize/Purchasesharingwidget/etc/system.xml ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * @category OceanWebsoft
5
+ * @package OceanWebsoft_Shopalize_Socialwidget
6
+ * @author ashwini.owsm@gmail.com
7
+ * @website http://www.oceanwebsoft.com
8
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
9
+ */
10
+ -->
11
+ <config>
12
+ <tabs>
13
+ <shopalizeall translate="label" module="purchasesharingwidget">
14
+ <label>Shopalize Extensions</label>
15
+ <sort_order>400</sort_order>
16
+ </shopalizeall>
17
+ </tabs>
18
+ <sections>
19
+ <shopalizeinfo translate="label" module="purchasesharingwidget">
20
+ <label>Info</label>
21
+ <tab>shopalizeall</tab>
22
+ <frontend_type>text</frontend_type>
23
+ <sort_order>99999999999</sort_order>
24
+ <show_in_default>1</show_in_default>
25
+ <show_in_website>1</show_in_website>
26
+ <show_in_store>1</show_in_store>
27
+ <groups>
28
+ <info>
29
+ <frontend_model>purchasesharingwidget/system_config_info</frontend_model>
30
+ <sort_order>10</sort_order>
31
+ <show_in_default>1</show_in_default>
32
+ <show_in_website>1</show_in_website>
33
+ <show_in_store>1</show_in_store>
34
+ </info>
35
+ </groups>
36
+ </shopalizeinfo>
37
+ <purchasesharingwidget module="purchasesharingwidget">
38
+ <label>Purchase Sharing Widget</label>
39
+ <tab>shopalizeall</tab>
40
+ <frontend_type>text</frontend_type>
41
+ <sort_order>400</sort_order>
42
+ <show_in_default>1</show_in_default>
43
+ <show_in_website>1</show_in_website>
44
+ <show_in_store>1</show_in_store>
45
+ <groups>
46
+ <info>
47
+ <label>About Extension</label>
48
+ <frontend_type>text</frontend_type>
49
+ <sort_order>10</sort_order>
50
+ <show_in_default>1</show_in_default>
51
+ <show_in_website>1</show_in_website>
52
+ <show_in_store>1</show_in_store>
53
+ <fields>
54
+ <purchasesharingwidget_info translate="label">
55
+ <frontend_model>purchasesharingwidget/system_config_info_about</frontend_model>
56
+ <sort_order>10</sort_order>
57
+ <show_in_default>1</show_in_default>
58
+ <show_in_website>1</show_in_website>
59
+ <show_in_store>1</show_in_store>
60
+ </purchasesharingwidget_info>
61
+
62
+ </fields>
63
+ </info>
64
+ <settings translate="label">
65
+ <label>Widget Settings</label>
66
+ <frontend_type>text</frontend_type>
67
+ <sort_order>11</sort_order>
68
+ <show_in_default>1</show_in_default>
69
+ <show_in_website>1</show_in_website>
70
+ <show_in_store>1</show_in_store>
71
+ <fields>
72
+ <active translate="label">
73
+ <label>Enabled</label>
74
+ <frontend_type>select</frontend_type>
75
+ <source_model>adminhtml/system_config_source_yesno</source_model>
76
+ <sort_order>10</sort_order>
77
+ <show_in_default>1</show_in_default>
78
+ <show_in_website>1</show_in_website>
79
+ <show_in_store>1</show_in_store>
80
+ </active>
81
+ <merchant_id translate="label">
82
+ <label>Merchant Id</label>
83
+ <frontend_type>text</frontend_type>
84
+ <sort_order>20</sort_order><show_in_default>1</show_in_default>
85
+ <show_in_website>1</show_in_website>
86
+ <show_in_store>1</show_in_store>
87
+ <comment><![CDATA[shopalize merchant id <a target="_blank" href="http://www.shopalize.com/merchant/invite">Get here</a>]]></comment>
88
+ </merchant_id>
89
+ <widget_width translate="label">
90
+ <label>Widget Width</label>
91
+ <frontend_type>text</frontend_type>
92
+ <sort_order>30</sort_order><show_in_default>1</show_in_default>
93
+ <show_in_website>1</show_in_website>
94
+ <show_in_store>1</show_in_store>
95
+ <comment><![CDATA[Size in px Example: 400]]></comment>
96
+ </widget_width>
97
+
98
+
99
+ </fields>
100
+ </settings>
101
+
102
+ </groups>
103
+ </purchasesharingwidget>
104
+ </sections>
105
+ </config>
app/design/frontend/default/default/layout/purchasesharingwidget.xml ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <layout version="0.1.0">
3
+
4
+
5
+
6
+ <checkout_onepage_success translate="label">
7
+
8
+ <reference name="checkout.success">
9
+
10
+ <action method="setTemplate" ifconfig="purchasesharingwidget/settings/active"><template>purchasesharingwidget/success.phtml</template></action>
11
+
12
+ </reference>
13
+ </checkout_onepage_success>
14
+ </layout>
app/design/frontend/default/default/template/purchasesharingwidget/success.phtml ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Academic Free License (AFL 3.0)
8
+ * that is bundled with this package in the file LICENSE_AFL.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/afl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category design
22
+ * @package base_default
23
+ * @copyright Copyright (c) 2010 Oceanwebsoft Pvt Ltd. (http://www.oceanwebsoft.com)
24
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
25
+ */
26
+ ?>
27
+
28
+ <div class="page-title">
29
+ <h1><?php echo $this->__('Your order has been received') ?></h1>
30
+ </div>
31
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
32
+ <h2 class="sub-title"><?php echo $this->__('Thank you for your purchase!') ?></h2>
33
+
34
+ <?php if ($this->getOrderId()):?>
35
+
36
+ <?php if ($this->getCanViewOrder()) :?>
37
+ <p><?php echo $this->__('Your order # is: %s.', sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getViewOrderUrl()), $this->escapeHtml($this->getOrderId()))) ?></p>
38
+ <?php else :?>
39
+ <p><?php echo $this->__('Your order # is: %s.', $this->escapeHtml($this->getOrderId())) ?></p>
40
+ <?php endif;?>
41
+ <p><?php echo $this->__('You will receive an order confirmation email with details of your order and a link to track its progress.') ?></p>
42
+
43
+
44
+ <!--Shopalize Custom Code starts-->
45
+
46
+ <?php $_widget=Mage::helper('purchasesharingwidget'); echo $_widget->getWidget($this->getOrderId()); ?>
47
+
48
+ <!--Shopalize Custom Code ends-->
49
+
50
+ <?php if ($this->getCanViewOrder() && $this->getCanPrintOrder()) :?>
51
+ <p>
52
+ <?php echo $this->__('Click <a href="%s" onclick="this.target=\'_blank\'">here to print</a> a copy of your order confirmation.', $this->getPrintUrl()) ?>
53
+ <?php echo $this->getChildHtml() ?>
54
+ </p>
55
+ <?php endif;?>
56
+ <?php endif;?>
57
+
58
+ <?php if ($this->getAgreementRefId()): ?>
59
+ <p><?php echo $this->__('Your billing agreement # is: %s.', sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getAgreementUrl()), $this->escapeHtml($this->getAgreementRefId())))?></p>
60
+ <?php endif;?>
61
+
62
+ <?php if ($profiles = $this->getRecurringProfiles()):?>
63
+ <p><?php echo $this->__('Your recurring payment profiles:'); ?></p>
64
+ <ul class="disc">
65
+ <?php foreach($profiles as $profile):?>
66
+ <?php $profileIdHtml = ($this->getCanViewProfiles() ? sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getProfileUrl($profile)), $this->escapeHtml($this->getObjectData($profile, 'reference_id'))) : $this->escapeHtml($this->getObjectData($profile, 'reference_id')));?>
67
+ <li><?php echo $this->__('Payment profile # %s: "%s".', $profileIdHtml, $this->escapeHtml($this->getObjectData($profile, 'schedule_description')))?></li>
68
+ <?php endforeach;?>
69
+ </ul>
70
+ <?php endif;?>
71
+
72
+ <div class="buttons-set">
73
+ <button type="button" class="button" title="<?php echo $this->__('Continue Shopping') ?>" onclick="window.location='<?php echo $this->getUrl() ?>'"><span><span><?php echo $this->__('Continue Shopping') ?></span></span></button>
74
+ </div>
app/etc/modules/Shopalize_Purchasesharingwidget.xml ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Shopalize_Purchasesharingwidget>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ <depends>
8
+ <Mage_Checkout />
9
+ </depends>
10
+ </Shopalize_Purchasesharingwidget>
11
+ </modules>
12
+ </config>
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Shopalize_Social_Widget</name>
4
+ <version>1.0.0</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>The extension Integrates Shopalize Social Purchase Sharing Widget with magento shop.</summary>
10
+ <description>Shopalize&#xB4;s Purchase Sharing Widget appears on the Order Confirmation page i.e. after checkout is complete and enables your customers to share their Purchases or specific Promotional Offers with their friends on existing social media platforms. It provides deep integration with growing social platforms like Facebook and Twitter for maximum reach, more engagement, and seamless experience. You can completely customize the look and feel, messaging of the Widget to match your store&#xB4;s needs.</description>
11
+ <notes>Shopalize Purchase Sharing Widget 1.0 Stable released</notes>
12
+ <authors><author><name>Ashwini Dinker</name><user>auto-converted</user><email>dinkeronline@gmail.com</email></author></authors>
13
+ <date>2011-11-05</date>
14
+ <time>14:06:20</time>
15
+ <contents><target name="mageetc"><dir name="modules"><file name="Shopalize_Purchasesharingwidget.xml" hash="374670608fd7b7012a90aeec163220f9"/></dir></target><target name="magecommunity"><dir name="Shopalize"><dir name="Purchasesharingwidget"><dir name="Block"><dir name="System"><dir name="Config"><dir name="Info"><file name="About.php" hash="d882c623f4e0b70cf79ed83d84e99284"/><file name="Info.php" hash=""/></dir></dir></dir><file name="Purchasesharingwidget.php" hash="345cd1a160a857e4cec48d400bb91c1c"/><file name="Success.php" hash="92428ca11a72510a62952e8515e38d7f"/></dir><dir name="controllers"><file name="IndexController.php" hash="a82c545d242ee4fc9a40de34c103b1db"/></dir><dir name="etc"><file name="adminhtml.xml" hash="86bdb512b92ee4b236d6e611953cad6d"/><file name="config.xml" hash="d3ac38b495665181cf775e9a0912cba8"/><file name="system.xml" hash="9b77a0f5af215cff5be944c99b343387"/></dir><dir name="Helper"><file name="Data.php" hash="0cf78ef93204190388d97f99f4378013"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="purchasesharingwidget.xml" hash="c9628990b3dbfceeb9bffb33dccf7824"/></dir><dir name="template"><dir name="purchasesharingwidget"><file name="success.phtml" hash="45bca1908ae08864823137728df2f35e"/></dir></dir></dir></dir></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies/>
18
+ </package>