Version Notes
Extension provides:
- Post-Checkout Integration
- Standalone Integration
Download this release
Release Info
| Developer | Talkable |
| Extension | talkable |
| Version | 0.1.4 |
| Comparing to | |
| See all releases | |
Code changes from version 0.1.3 to 0.1.4
- app/code/community/Talkable/SocialReferrals/Block/Customer/Dashboard.php +14 -0
- app/code/community/Talkable/SocialReferrals/Helper/Data.php +49 -22
- app/code/community/Talkable/SocialReferrals/Model/Observer.php +21 -0
- app/code/community/Talkable/SocialReferrals/controllers/Customer/DashboardController.php +24 -0
- app/code/community/Talkable/SocialReferrals/etc/config.xml +36 -1
- app/code/community/Talkable/SocialReferrals/etc/system.xml +72 -0
- app/design/frontend/base/default/layout/talkable/socialreferrals.xml +21 -3
- app/design/frontend/base/default/template/talkable/socialreferrals/dashboard.phtml +39 -0
- app/design/frontend/base/default/template/talkable/socialreferrals/{register_affiliate.phtml → invite.phtml} +0 -0
- app/design/frontend/base/default/template/talkable/socialreferrals/{register_purchase.phtml → post_purchase.phtml} +0 -0
- package.xml +4 -4
app/code/community/Talkable/SocialReferrals/Block/Customer/Dashboard.php
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Talkable SocialReferrals for Magento
|
| 4 |
+
*
|
| 5 |
+
* @package Talkable_SocialReferrals
|
| 6 |
+
* @author Talkable (http://www.talkable.com/)
|
| 7 |
+
* @copyright Copyright (c) 2015 Talkable (http://www.talkable.com/)
|
| 8 |
+
* @license MIT
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
class Talkable_SocialReferrals_Block_Customer_Dashboard extends Mage_Core_Block_Template
|
| 12 |
+
{
|
| 13 |
+
|
| 14 |
+
}
|
app/code/community/Talkable/SocialReferrals/Helper/Data.php
CHANGED
|
@@ -20,9 +20,9 @@ class Talkable_SocialReferrals_Helper_Data extends Mage_Core_Helper_Abstract
|
|
| 20 |
return $this->_getTextConfigValue("general/site_id");
|
| 21 |
}
|
| 22 |
|
| 23 |
-
|
| 24 |
-
// Post-Checkout
|
| 25 |
-
|
| 26 |
|
| 27 |
/**
|
| 28 |
* @return bool Whether or not Post-Checkout Integration is enabled
|
|
@@ -63,9 +63,9 @@ class Talkable_SocialReferrals_Helper_Data extends Mage_Core_Helper_Abstract
|
|
| 63 |
return $retval;
|
| 64 |
}
|
| 65 |
|
| 66 |
-
|
| 67 |
-
//
|
| 68 |
-
|
| 69 |
|
| 70 |
/**
|
| 71 |
* @return bool Whether or not Standalone Integration is enabled
|
|
@@ -82,22 +82,7 @@ class Talkable_SocialReferrals_Helper_Data extends Mage_Core_Helper_Abstract
|
|
| 82 |
|
| 83 |
public function getAffiliateIframeOptions()
|
| 84 |
{
|
| 85 |
-
|
| 86 |
-
$width = strpos($width, "%") !== false ? $width : (int) $width;
|
| 87 |
-
|
| 88 |
-
$height = $this->_getTextConfigValue("affiliate/iframe_height");
|
| 89 |
-
$height = strpos($height, "%") !== false ? $height : (int) $height;
|
| 90 |
-
|
| 91 |
-
$container = $this->_getTextConfigValue("affiliate/iframe_container");
|
| 92 |
-
|
| 93 |
-
return array(
|
| 94 |
-
"responsive" => $this->_getBoolConfigValue("affiliate/iframe_responsive"),
|
| 95 |
-
"iframe" => array(
|
| 96 |
-
"container" => $container ? $container : "talkable-container",
|
| 97 |
-
"width" => $width ? $width : "100%",
|
| 98 |
-
"height" => $height ? $height : 960,
|
| 99 |
-
),
|
| 100 |
-
);
|
| 101 |
}
|
| 102 |
|
| 103 |
public function getAffiliateData()
|
|
@@ -117,6 +102,28 @@ class Talkable_SocialReferrals_Helper_Data extends Mage_Core_Helper_Abstract
|
|
| 117 |
}
|
| 118 |
}
|
| 119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 120 |
//---------+
|
| 121 |
// Private |
|
| 122 |
//---------+
|
|
@@ -136,4 +143,24 @@ class Talkable_SocialReferrals_Helper_Data extends Mage_Core_Helper_Abstract
|
|
| 136 |
return trim(Mage::getStoreConfig("socialreferrals/" . $path));
|
| 137 |
}
|
| 138 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
}
|
| 20 |
return $this->_getTextConfigValue("general/site_id");
|
| 21 |
}
|
| 22 |
|
| 23 |
+
//------------------------+
|
| 24 |
+
// Post-Checkout Campaign |
|
| 25 |
+
//------------------------+
|
| 26 |
|
| 27 |
/**
|
| 28 |
* @return bool Whether or not Post-Checkout Integration is enabled
|
| 63 |
return $retval;
|
| 64 |
}
|
| 65 |
|
| 66 |
+
//-----------------+
|
| 67 |
+
// Invite Campaign |
|
| 68 |
+
//-----------------+
|
| 69 |
|
| 70 |
/**
|
| 71 |
* @return bool Whether or not Standalone Integration is enabled
|
| 82 |
|
| 83 |
public function getAffiliateIframeOptions()
|
| 84 |
{
|
| 85 |
+
return $this->_getIntegrationIframeOptions("affiliate");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
}
|
| 87 |
|
| 88 |
public function getAffiliateData()
|
| 102 |
}
|
| 103 |
}
|
| 104 |
|
| 105 |
+
//--------------------+
|
| 106 |
+
// Dashboard Campaign |
|
| 107 |
+
//--------------------+
|
| 108 |
+
|
| 109 |
+
/**
|
| 110 |
+
* @return bool Whether or not Dashboard Integration is enabled
|
| 111 |
+
*/
|
| 112 |
+
public function isDashboardEnabled()
|
| 113 |
+
{
|
| 114 |
+
return $this->_getBoolConfigValue("dashboard/enabled");
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
public function getDashboardCampaignTags()
|
| 118 |
+
{
|
| 119 |
+
return $this->_getListConfigValue("dashboard/campaign_tags");
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
public function getDashboardIframeOptions()
|
| 123 |
+
{
|
| 124 |
+
return $this->_getIntegrationIframeOptions("dashboard");
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
//---------+
|
| 128 |
// Private |
|
| 129 |
//---------+
|
| 143 |
return trim(Mage::getStoreConfig("socialreferrals/" . $path));
|
| 144 |
}
|
| 145 |
|
| 146 |
+
private function _getIntegrationIframeOptions($path)
|
| 147 |
+
{
|
| 148 |
+
$width = $this->_getTextConfigValue($path . "/iframe_width");
|
| 149 |
+
$width = strpos($width, "%") !== false ? $width : (int) $width;
|
| 150 |
+
|
| 151 |
+
$height = $this->_getTextConfigValue($path . "/iframe_height");
|
| 152 |
+
$height = strpos($height, "%") !== false ? $height : (int) $height;
|
| 153 |
+
|
| 154 |
+
$container = $this->_getTextConfigValue($path . "/iframe_container");
|
| 155 |
+
|
| 156 |
+
return array(
|
| 157 |
+
"responsive" => $this->_getBoolConfigValue($path . "/iframe_responsive"),
|
| 158 |
+
"iframe" => array(
|
| 159 |
+
"container" => $container ? $container : "talkable-container",
|
| 160 |
+
"width" => $width ? $width : "100%",
|
| 161 |
+
"height" => $height ? $height : 960,
|
| 162 |
+
),
|
| 163 |
+
);
|
| 164 |
+
}
|
| 165 |
+
|
| 166 |
}
|
app/code/community/Talkable/SocialReferrals/Model/Observer.php
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Talkable SocialReferrals for Magento
|
| 4 |
+
*
|
| 5 |
+
* @package Talkable_SocialReferrals
|
| 6 |
+
* @author Talkable (http://www.talkable.com/)
|
| 7 |
+
* @copyright Copyright (c) 2015 Talkable (http://www.talkable.com/)
|
| 8 |
+
* @license MIT
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
class Talkable_SocialReferrals_Model_Observer extends Mage_Core_Model_Abstract
|
| 12 |
+
{
|
| 13 |
+
|
| 14 |
+
public function customerDashboardLink(Varien_Event_Observer $observer)
|
| 15 |
+
{
|
| 16 |
+
if (Mage::helper("socialreferrals")->isDashboardEnabled()) {
|
| 17 |
+
$observer->getEvent()->getLayout()->getUpdate()->addHandle("customer_dashboard_handle");
|
| 18 |
+
}
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
}
|
app/code/community/Talkable/SocialReferrals/controllers/Customer/DashboardController.php
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Talkable SocialReferrals for Magento
|
| 4 |
+
*
|
| 5 |
+
* @package Talkable_SocialReferrals
|
| 6 |
+
* @author Talkable (http://www.talkable.com/)
|
| 7 |
+
* @copyright Copyright (c) 2015 Talkable (http://www.talkable.com/)
|
| 8 |
+
* @license MIT
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
class Talkable_SocialReferrals_Customer_DashboardController extends Mage_Core_Controller_Front_Action
|
| 12 |
+
{
|
| 13 |
+
|
| 14 |
+
public function indexAction()
|
| 15 |
+
{
|
| 16 |
+
if (Mage::helper("socialreferrals")->isDashboardEnabled()) {
|
| 17 |
+
$this->loadLayout();
|
| 18 |
+
$this->renderLayout();
|
| 19 |
+
} else {
|
| 20 |
+
$this->_forward("defaultNoRoute"); // 404 page
|
| 21 |
+
}
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
}
|
app/code/community/Talkable/SocialReferrals/etc/config.xml
CHANGED
|
@@ -12,7 +12,7 @@
|
|
| 12 |
<config>
|
| 13 |
<modules>
|
| 14 |
<Talkable_SocialReferrals>
|
| 15 |
-
<version>0.1.
|
| 16 |
</Talkable_SocialReferrals>
|
| 17 |
</modules>
|
| 18 |
|
|
@@ -28,6 +28,12 @@
|
|
| 28 |
<class>Talkable_SocialReferrals_Helper</class>
|
| 29 |
</socialreferrals>
|
| 30 |
</helpers>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
</global>
|
| 32 |
|
| 33 |
<frontend>
|
|
@@ -39,8 +45,28 @@
|
|
| 39 |
<frontName>share</frontName>
|
| 40 |
</args>
|
| 41 |
</socialreferrals>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
</routers>
|
| 43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
<layout>
|
| 45 |
<updates>
|
| 46 |
<socialreferrals>
|
|
@@ -69,6 +95,15 @@
|
|
| 69 |
<iframe_width>100%</iframe_width>
|
| 70 |
<iframe_height>960</iframe_height>
|
| 71 |
</affiliate>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
</socialreferrals>
|
| 73 |
</default>
|
| 74 |
</config>
|
| 12 |
<config>
|
| 13 |
<modules>
|
| 14 |
<Talkable_SocialReferrals>
|
| 15 |
+
<version>0.1.4</version>
|
| 16 |
</Talkable_SocialReferrals>
|
| 17 |
</modules>
|
| 18 |
|
| 28 |
<class>Talkable_SocialReferrals_Helper</class>
|
| 29 |
</socialreferrals>
|
| 30 |
</helpers>
|
| 31 |
+
|
| 32 |
+
<models>
|
| 33 |
+
<socialreferrals>
|
| 34 |
+
<class>Talkable_SocialReferrals_Model</class>
|
| 35 |
+
</socialreferrals>
|
| 36 |
+
</models>
|
| 37 |
</global>
|
| 38 |
|
| 39 |
<frontend>
|
| 45 |
<frontName>share</frontName>
|
| 46 |
</args>
|
| 47 |
</socialreferrals>
|
| 48 |
+
|
| 49 |
+
<customer>
|
| 50 |
+
<args>
|
| 51 |
+
<modules>
|
| 52 |
+
<socialreferrals before="Mage_Customer">Talkable_SocialReferrals_Customer</socialreferrals>
|
| 53 |
+
</modules>
|
| 54 |
+
</args>
|
| 55 |
+
</customer>
|
| 56 |
</routers>
|
| 57 |
|
| 58 |
+
<events>
|
| 59 |
+
<controller_action_layout_load_before>
|
| 60 |
+
<observers>
|
| 61 |
+
<socialreferrals_controller_action_layout_load_before>
|
| 62 |
+
<type>singleton</type>
|
| 63 |
+
<class>socialreferrals/observer</class>
|
| 64 |
+
<method>customerDashboardLink</method>
|
| 65 |
+
</socialreferrals_controller_action_layout_load_before>
|
| 66 |
+
</observers>
|
| 67 |
+
</controller_action_layout_load_before>
|
| 68 |
+
</events>
|
| 69 |
+
|
| 70 |
<layout>
|
| 71 |
<updates>
|
| 72 |
<socialreferrals>
|
| 95 |
<iframe_width>100%</iframe_width>
|
| 96 |
<iframe_height>960</iframe_height>
|
| 97 |
</affiliate>
|
| 98 |
+
|
| 99 |
+
<dashboard>
|
| 100 |
+
<enabled>0</enabled>
|
| 101 |
+
<campaign_tags>default</campaign_tags>
|
| 102 |
+
<iframe_responsive>1</iframe_responsive>
|
| 103 |
+
<iframe_container>talkable-container</iframe_container>
|
| 104 |
+
<iframe_width>100%</iframe_width>
|
| 105 |
+
<iframe_height>960</iframe_height>
|
| 106 |
+
</dashboard>
|
| 107 |
</socialreferrals>
|
| 108 |
</default>
|
| 109 |
</config>
|
app/code/community/Talkable/SocialReferrals/etc/system.xml
CHANGED
|
@@ -151,6 +151,78 @@
|
|
| 151 |
</iframe_height>
|
| 152 |
</fields>
|
| 153 |
</affiliate>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 154 |
</groups>
|
| 155 |
</socialreferrals>
|
| 156 |
</sections>
|
| 151 |
</iframe_height>
|
| 152 |
</fields>
|
| 153 |
</affiliate>
|
| 154 |
+
|
| 155 |
+
<dashboard translate="label">
|
| 156 |
+
<label>Dashboard Integration</label>
|
| 157 |
+
<frontend_type>text</frontend_type>
|
| 158 |
+
<sort_order>4</sort_order>
|
| 159 |
+
<show_in_default>1</show_in_default>
|
| 160 |
+
<show_in_website>1</show_in_website>
|
| 161 |
+
<show_in_store>1</show_in_store>
|
| 162 |
+
|
| 163 |
+
<fields>
|
| 164 |
+
<enabled translate="label">
|
| 165 |
+
<label>Enabled</label>
|
| 166 |
+
<comment><![CDATA[(Will be added to the Customer Account section)]]></comment>
|
| 167 |
+
<frontend_type>select</frontend_type>
|
| 168 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 169 |
+
<sort_order>1</sort_order>
|
| 170 |
+
<show_in_default>1</show_in_default>
|
| 171 |
+
<show_in_website>1</show_in_website>
|
| 172 |
+
<show_in_store>1</show_in_store>
|
| 173 |
+
</enabled>
|
| 174 |
+
|
| 175 |
+
<campaign_tags translate="label">
|
| 176 |
+
<label>Campaign Tags</label>
|
| 177 |
+
<comment><![CDATA[CSV-list of campaign tags]]></comment>
|
| 178 |
+
<frontend_type>text</frontend_type>
|
| 179 |
+
<sort_order>2</sort_order>
|
| 180 |
+
<show_in_default>1</show_in_default>
|
| 181 |
+
<show_in_website>1</show_in_website>
|
| 182 |
+
<show_in_store>1</show_in_store>
|
| 183 |
+
</campaign_tags>
|
| 184 |
+
|
| 185 |
+
<iframe_responsive translate="label">
|
| 186 |
+
<label>IFrame responsive</label>
|
| 187 |
+
<comment><![CDATA[Automatically adapt the IFrame to the viewport size]]></comment>
|
| 188 |
+
<frontend_type>select</frontend_type>
|
| 189 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 190 |
+
<sort_order>3</sort_order>
|
| 191 |
+
<show_in_default>1</show_in_default>
|
| 192 |
+
<show_in_website>1</show_in_website>
|
| 193 |
+
<show_in_store>1</show_in_store>
|
| 194 |
+
</iframe_responsive>
|
| 195 |
+
|
| 196 |
+
<iframe_container translate="label">
|
| 197 |
+
<label>IFrame container</label>
|
| 198 |
+
<comment><![CDATA[ID of a DOM element to contain the IFrame]]></comment>
|
| 199 |
+
<frontend_type>text</frontend_type>
|
| 200 |
+
<sort_order>4</sort_order>
|
| 201 |
+
<show_in_default>1</show_in_default>
|
| 202 |
+
<show_in_website>1</show_in_website>
|
| 203 |
+
<show_in_store>1</show_in_store>
|
| 204 |
+
</iframe_container>
|
| 205 |
+
|
| 206 |
+
<iframe_width translate="label">
|
| 207 |
+
<label>IFrame width</label>
|
| 208 |
+
<frontend_type>text</frontend_type>
|
| 209 |
+
<sort_order>5</sort_order>
|
| 210 |
+
<show_in_default>1</show_in_default>
|
| 211 |
+
<show_in_website>1</show_in_website>
|
| 212 |
+
<show_in_store>1</show_in_store>
|
| 213 |
+
</iframe_width>
|
| 214 |
+
|
| 215 |
+
<iframe_height translate="label">
|
| 216 |
+
<label>IFrame height</label>
|
| 217 |
+
<comment><![CDATA[Not applied if <em>responsive</em> is set to "No"]]></comment>
|
| 218 |
+
<frontend_type>text</frontend_type>
|
| 219 |
+
<sort_order>6</sort_order>
|
| 220 |
+
<show_in_default>1</show_in_default>
|
| 221 |
+
<show_in_website>1</show_in_website>
|
| 222 |
+
<show_in_store>1</show_in_store>
|
| 223 |
+
</iframe_height>
|
| 224 |
+
</fields>
|
| 225 |
+
</dashboard>
|
| 226 |
</groups>
|
| 227 |
</socialreferrals>
|
| 228 |
</sections>
|
app/design/frontend/base/default/layout/talkable/socialreferrals.xml
CHANGED
|
@@ -12,13 +12,13 @@
|
|
| 12 |
<layout version="0.1.0">
|
| 13 |
<checkout_onepage_success>
|
| 14 |
<reference name="before_body_end">
|
| 15 |
-
<block type="socialreferrals/purchase" name="talkable.socialreferrals.purchase" template="talkable/socialreferrals/
|
| 16 |
</reference>
|
| 17 |
</checkout_onepage_success>
|
| 18 |
|
| 19 |
<checkout_multishipping_success>
|
| 20 |
<reference name="before_body_end">
|
| 21 |
-
<block type="socialreferrals/multishipping_purchase" name="talkable.socialreferrals.multishipping_purchase" template="talkable/socialreferrals/
|
| 22 |
</reference>
|
| 23 |
</checkout_multishipping_success>
|
| 24 |
|
|
@@ -28,7 +28,25 @@
|
|
| 28 |
</reference>
|
| 29 |
|
| 30 |
<reference name="content">
|
| 31 |
-
<block type="socialreferrals/affiliate" name="talkable.socialreferrals.affiliate" template="talkable/socialreferrals/
|
| 32 |
</reference>
|
| 33 |
</socialreferrals_index_index>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
</layout>
|
| 12 |
<layout version="0.1.0">
|
| 13 |
<checkout_onepage_success>
|
| 14 |
<reference name="before_body_end">
|
| 15 |
+
<block type="socialreferrals/purchase" name="talkable.socialreferrals.purchase" template="talkable/socialreferrals/post_purchase.phtml" />
|
| 16 |
</reference>
|
| 17 |
</checkout_onepage_success>
|
| 18 |
|
| 19 |
<checkout_multishipping_success>
|
| 20 |
<reference name="before_body_end">
|
| 21 |
+
<block type="socialreferrals/multishipping_purchase" name="talkable.socialreferrals.multishipping_purchase" template="talkable/socialreferrals/post_purchase.phtml" />
|
| 22 |
</reference>
|
| 23 |
</checkout_multishipping_success>
|
| 24 |
|
| 28 |
</reference>
|
| 29 |
|
| 30 |
<reference name="content">
|
| 31 |
+
<block type="socialreferrals/affiliate" name="talkable.socialreferrals.affiliate" template="talkable/socialreferrals/invite.phtml" />
|
| 32 |
</reference>
|
| 33 |
</socialreferrals_index_index>
|
| 34 |
+
|
| 35 |
+
<customer_dashboard_index>
|
| 36 |
+
<update handle="customer_account"/>
|
| 37 |
+
|
| 38 |
+
<reference name="my.account.wrapper">
|
| 39 |
+
<block type="socialreferrals/customer_dashboard" name="talkable.socialreferrals.customer_dashboard" template="talkable/socialreferrals/dashboard.phtml" />
|
| 40 |
+
</reference>
|
| 41 |
+
</customer_dashboard_index>
|
| 42 |
+
|
| 43 |
+
<customer_dashboard_handle>
|
| 44 |
+
<reference name="customer_account_navigation">
|
| 45 |
+
<action method="addLink" module="customer">
|
| 46 |
+
<name>customer_dashboard</name>
|
| 47 |
+
<path>customer/dashboard/</path>
|
| 48 |
+
<label>Referral Dashboard</label>
|
| 49 |
+
</action>
|
| 50 |
+
</reference>
|
| 51 |
+
</customer_dashboard_handle>
|
| 52 |
</layout>
|
app/design/frontend/base/default/template/talkable/socialreferrals/dashboard.phtml
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Talkable SocialReferrals for Magento
|
| 4 |
+
*
|
| 5 |
+
* @package Talkable_SocialReferrals
|
| 6 |
+
* @author Talkable (http://www.talkable.com/)
|
| 7 |
+
* @copyright Copyright (c) 2015 Talkable (http://www.talkable.com/)
|
| 8 |
+
* @license MIT
|
| 9 |
+
*/
|
| 10 |
+
?>
|
| 11 |
+
|
| 12 |
+
<?php $_helper = $this->helper("socialreferrals") ?>
|
| 13 |
+
|
| 14 |
+
<?php if ($_helper->isDashboardEnabled()): ?>
|
| 15 |
+
<!-- Begin Talkable integration code -->
|
| 16 |
+
|
| 17 |
+
<?php if (empty($_helper->getSiteId())): ?>
|
| 18 |
+
<!-- Talkable Site ID is blank, check your Talkable extension settings -->
|
| 19 |
+
<?php else: ?>
|
| 20 |
+
<div id="talkable-container"></div>
|
| 21 |
+
<script type="text/javascript">
|
| 22 |
+
//<![CDATA[
|
| 23 |
+
var _curebitq = _curebitq || [];
|
| 24 |
+
_curebitq.push(["init", {
|
| 25 |
+
site_id: "<?php echo $_helper->getSiteId() ?>",
|
| 26 |
+
server: "https://www.talkable.com"
|
| 27 |
+
}]);
|
| 28 |
+
|
| 29 |
+
<?php $_event_data = array_merge($_helper->getAffiliateData(), $_helper->getDashboardIframeOptions()) ?>
|
| 30 |
+
<?php $_event_data["campaign_tags"] = $_helper->getDashboardCampaignTags() ?>
|
| 31 |
+
|
| 32 |
+
_curebitq.push(["register_affiliate", <?php echo Mage::helper("core")->jsonEncode($_event_data) ?>]);
|
| 33 |
+
//]]>
|
| 34 |
+
</script>
|
| 35 |
+
<script type="text/javascript" src="//d2jjzw81hqbuqv.cloudfront.net/integration/curebit-1.0.min.js"></script>
|
| 36 |
+
<?php endif ?>
|
| 37 |
+
|
| 38 |
+
<!-- End Talkable integration code -->
|
| 39 |
+
<?php endif ?>
|
app/design/frontend/base/default/template/talkable/socialreferrals/{register_affiliate.phtml → invite.phtml}
RENAMED
|
File without changes
|
app/design/frontend/base/default/template/talkable/socialreferrals/{register_purchase.phtml → post_purchase.phtml}
RENAMED
|
File without changes
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>talkable</name>
|
| 4 |
-
<version>0.1.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://opensource.org/licenses/mit-license.php">MIT License</license>
|
| 7 |
<channel>community</channel>
|
|
@@ -18,9 +18,9 @@ See more at Talkable.com</description>
|
|
| 18 |
- Post-Checkout Integration
|
| 19 |
- Standalone Integration</notes>
|
| 20 |
<authors><author><name>Talkable</name><user>talkable</user><email>sub@talkable.com</email></author></authors>
|
| 21 |
-
<date>2015-
|
| 22 |
-
<time>
|
| 23 |
-
<contents><target name="magecommunity"><dir name="Talkable"><dir name="SocialReferrals"><dir name="Block"><file name="Affiliate.php" hash="e5cf1648f2aab8c8894fd1311ae865b8"/><dir name="Multishipping"><file name="Purchase.php" hash="6eaab3557bdf97f40a77c7b6e040e483"/></dir><file name="Purchase.php" hash="5cd37269372b88cec4657bf85077c1a4"/></dir><dir name="Helper"><file name="Data.php" hash="
|
| 24 |
<compatible/>
|
| 25 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
| 26 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>talkable</name>
|
| 4 |
+
<version>0.1.4</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://opensource.org/licenses/mit-license.php">MIT License</license>
|
| 7 |
<channel>community</channel>
|
| 18 |
- Post-Checkout Integration
|
| 19 |
- Standalone Integration</notes>
|
| 20 |
<authors><author><name>Talkable</name><user>talkable</user><email>sub@talkable.com</email></author></authors>
|
| 21 |
+
<date>2015-03-03</date>
|
| 22 |
+
<time>15:15:49</time>
|
| 23 |
+
<contents><target name="magecommunity"><dir name="Talkable"><dir name="SocialReferrals"><dir name="Block"><file name="Affiliate.php" hash="e5cf1648f2aab8c8894fd1311ae865b8"/><dir name="Customer"><file name="Dashboard.php" hash="78d93dcf31455b09117506a78d3b7797"/></dir><dir name="Multishipping"><file name="Purchase.php" hash="6eaab3557bdf97f40a77c7b6e040e483"/></dir><file name="Purchase.php" hash="5cd37269372b88cec4657bf85077c1a4"/></dir><dir name="Helper"><file name="Data.php" hash="81a5d32510febf7735dd78abb0dca5ef"/></dir><dir name="Model"><file name="Observer.php" hash="c5ebe37375fb3d6b40d8d440b790ee8b"/></dir><dir name="controllers"><dir name="Customer"><file name="DashboardController.php" hash="fb89ba06fed8cb3329a941d59bd67b7c"/></dir><file name="IndexController.php" hash="41a785b074c529b65a3f82ca3573662e"/></dir><dir name="etc"><file name="adminhtml.xml" hash="3f86a3e4bf980fa36aba8c0e33737e59"/><file name="config.xml" hash="e47e25e757596e1ae33bdf49941adfd5"/><file name="system.xml" hash="647731d932fb0c728c4c46ff2f6a93ca"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><dir name="talkable"><file name="socialreferrals.xml" hash="87e9f62d2d649e5da197e7a93c47c986"/></dir></dir><dir name="template"><dir name="talkable"><dir name="socialreferrals"><file name="dashboard.phtml" hash="327a9f9fa1c50dad9877674e4f9eeec6"/><file name="invite.phtml" hash="26bd0b36fb59be303302eba575b884f3"/><file name="post_purchase.phtml" hash="5d0e67f9a983bbaf57c6f6e84cdcd1d6"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Talkable_SocialReferrals.xml" hash="ed1152e3c169ac8e9d33219e5ec9fb47"/></dir></target></contents>
|
| 24 |
<compatible/>
|
| 25 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
| 26 |
</package>
|
