Version Notes
First release
Download this release
Release Info
| Developer | Talkable |
| Extension | talkable |
| Version | 0.1.1 |
| Comparing to | |
| See all releases | |
Code changes from version 0.1.0 to 0.1.1
- app/code/community/Talkable/CheckoutOffer/Helper/Data.php +0 -55
- app/code/community/Talkable/CheckoutOffer/etc/config.xml +0 -52
- app/code/community/Talkable/CheckoutOffer/etc/system.xml +0 -72
- app/code/community/Talkable/SocialReferrals/Block/Affiliate.php +14 -0
- app/code/community/Talkable/{CheckoutOffer/Block/Multishipping/Checkoutoffer.php → SocialReferrals/Block/Multishipping/Purchase.php} +3 -3
- app/code/community/Talkable/{CheckoutOffer/Block/Checkoutoffer.php → SocialReferrals/Block/Purchase.php} +3 -3
- app/code/community/Talkable/SocialReferrals/Helper/Data.php +134 -0
- app/code/community/Talkable/SocialReferrals/controllers/IndexController.php +27 -0
- app/code/community/Talkable/{CheckoutOffer → SocialReferrals}/etc/adminhtml.xml +5 -5
- app/code/community/Talkable/SocialReferrals/etc/config.xml +74 -0
- app/code/community/Talkable/SocialReferrals/etc/system.xml +157 -0
- app/design/frontend/base/default/layout/talkable/checkoutoffer.xml +0 -24
- app/design/frontend/base/default/layout/talkable/socialreferrals.xml +34 -0
- app/design/frontend/base/default/template/talkable/socialreferrals/register_affiliate.phtml +40 -0
- app/design/frontend/base/default/template/talkable/{checkoutoffer/checkoutoffer.phtml → socialreferrals/register_purchase.phtml} +8 -9
- app/etc/modules/{Talkable_CheckoutOffer.xml → Talkable_SocialReferrals.xml} +4 -4
- package.xml +5 -5
app/code/community/Talkable/CheckoutOffer/Helper/Data.php
DELETED
|
@@ -1,55 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Talkable CheckoutOffer for Magento
|
| 4 |
-
*
|
| 5 |
-
* @package Talkable_CheckoutOffer
|
| 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_CheckoutOffer_Helper_Data extends Mage_Core_Helper_Abstract
|
| 12 |
-
{
|
| 13 |
-
|
| 14 |
-
public function isEnabled()
|
| 15 |
-
{
|
| 16 |
-
return (bool) Mage::getStoreConfig("checkoutoffer/settings/enabled");
|
| 17 |
-
}
|
| 18 |
-
|
| 19 |
-
public function getSiteId()
|
| 20 |
-
{
|
| 21 |
-
return trim(Mage::getStoreConfig("checkoutoffer/settings/site_id"));
|
| 22 |
-
}
|
| 23 |
-
|
| 24 |
-
public function getCampaignTags()
|
| 25 |
-
{
|
| 26 |
-
return array_filter(array_map("trim", explode(",", Mage::getStoreConfig("checkoutoffer/settings/campaign_tags"))));
|
| 27 |
-
}
|
| 28 |
-
|
| 29 |
-
public function getOrderData($order)
|
| 30 |
-
{
|
| 31 |
-
$retval = array(
|
| 32 |
-
"order_number" => $order->getIncrementId(),
|
| 33 |
-
"order_date" => $order->getCreatedAt(),
|
| 34 |
-
"email" => $order->getCustomerEmail(),
|
| 35 |
-
"subtotal" => $order->getSubtotal(),
|
| 36 |
-
"coupon_code" => $order->getCouponCode(),
|
| 37 |
-
"customer_id" => $order->getCustomerId(),
|
| 38 |
-
"items" => array(),
|
| 39 |
-
"first_name" => $order->getCustomerFirstname(),
|
| 40 |
-
"last_name" => $order->getCustomerLastname(),
|
| 41 |
-
);
|
| 42 |
-
|
| 43 |
-
foreach ($order->getAllVisibleItems() as $product) {
|
| 44 |
-
$retval["items"][] = array(
|
| 45 |
-
"product_id" => $product->getSku(),
|
| 46 |
-
"price" => $product->getPrice(),
|
| 47 |
-
"quantity" => $product->getQtyOrdered(),
|
| 48 |
-
"title" => $product->getName(),
|
| 49 |
-
);
|
| 50 |
-
}
|
| 51 |
-
|
| 52 |
-
return $retval;
|
| 53 |
-
}
|
| 54 |
-
|
| 55 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Talkable/CheckoutOffer/etc/config.xml
DELETED
|
@@ -1,52 +0,0 @@
|
|
| 1 |
-
<?xml version="1.0"?>
|
| 2 |
-
<!--
|
| 3 |
-
/**
|
| 4 |
-
* Talkable CheckoutOffer for Magento
|
| 5 |
-
*
|
| 6 |
-
* @package Talkable_CheckoutOffer
|
| 7 |
-
* @author Talkable (http://www.talkable.com/)
|
| 8 |
-
* @copyright Copyright (c) 2015 Talkable (http://www.talkable.com/)
|
| 9 |
-
* @license MIT
|
| 10 |
-
*/
|
| 11 |
-
-->
|
| 12 |
-
<config>
|
| 13 |
-
<modules>
|
| 14 |
-
<Talkable_CheckoutOffer>
|
| 15 |
-
<version>0.1.0</version>
|
| 16 |
-
</Talkable_CheckoutOffer>
|
| 17 |
-
</modules>
|
| 18 |
-
|
| 19 |
-
<global>
|
| 20 |
-
<blocks>
|
| 21 |
-
<checkoutoffer>
|
| 22 |
-
<class>Talkable_CheckoutOffer_Block</class>
|
| 23 |
-
</checkoutoffer>
|
| 24 |
-
</blocks>
|
| 25 |
-
|
| 26 |
-
<helpers>
|
| 27 |
-
<checkoutoffer>
|
| 28 |
-
<class>Talkable_CheckoutOffer_Helper</class>
|
| 29 |
-
</checkoutoffer>
|
| 30 |
-
</helpers>
|
| 31 |
-
</global>
|
| 32 |
-
|
| 33 |
-
<frontend>
|
| 34 |
-
<layout>
|
| 35 |
-
<updates>
|
| 36 |
-
<checkoutoffer>
|
| 37 |
-
<file>talkable/checkoutoffer.xml</file>
|
| 38 |
-
</checkoutoffer>
|
| 39 |
-
</updates>
|
| 40 |
-
</layout>
|
| 41 |
-
</frontend>
|
| 42 |
-
|
| 43 |
-
<default>
|
| 44 |
-
<checkoutoffer>
|
| 45 |
-
<settings>
|
| 46 |
-
<enabled>0</enabled>
|
| 47 |
-
<site_id></site_id>
|
| 48 |
-
<campaign_tags>default</campaign_tags>
|
| 49 |
-
</settings>
|
| 50 |
-
</checkoutoffer>
|
| 51 |
-
</default>
|
| 52 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Talkable/CheckoutOffer/etc/system.xml
DELETED
|
@@ -1,72 +0,0 @@
|
|
| 1 |
-
<?xml version="1.0"?>
|
| 2 |
-
<!--
|
| 3 |
-
/**
|
| 4 |
-
* Talkable CheckoutOffer for Magento
|
| 5 |
-
*
|
| 6 |
-
* @package Talkable_CheckoutOffer
|
| 7 |
-
* @author Talkable (http://www.talkable.com/)
|
| 8 |
-
* @copyright Copyright (c) 2015 Talkable (http://www.talkable.com/)
|
| 9 |
-
* @license MIT
|
| 10 |
-
*/
|
| 11 |
-
-->
|
| 12 |
-
<config>
|
| 13 |
-
<tabs>
|
| 14 |
-
<talkable translate="label" module="checkoutoffer">
|
| 15 |
-
<label>Talkable</label>
|
| 16 |
-
<sort_order>1000</sort_order>
|
| 17 |
-
</talkable>
|
| 18 |
-
</tabs>
|
| 19 |
-
<sections>
|
| 20 |
-
<checkoutoffer translate="label" module="checkoutoffer">
|
| 21 |
-
<label>Extension Options</label>
|
| 22 |
-
<tab>talkable</tab>
|
| 23 |
-
<sort_order>1000</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 |
-
|
| 28 |
-
<groups>
|
| 29 |
-
<settings translate="label">
|
| 30 |
-
<label>Default Settings</label>
|
| 31 |
-
<frontend_type>text</frontend_type>
|
| 32 |
-
<sort_order>1</sort_order>
|
| 33 |
-
<show_in_default>1</show_in_default>
|
| 34 |
-
<show_in_website>0</show_in_website>
|
| 35 |
-
<show_in_store>0</show_in_store>
|
| 36 |
-
|
| 37 |
-
<fields>
|
| 38 |
-
<enabled translate="label">
|
| 39 |
-
<label>Enabled</label>
|
| 40 |
-
<frontend_type>select</frontend_type>
|
| 41 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 42 |
-
<sort_order>1</sort_order>
|
| 43 |
-
<show_in_default>1</show_in_default>
|
| 44 |
-
<show_in_website>1</show_in_website>
|
| 45 |
-
<show_in_store>1</show_in_store>
|
| 46 |
-
</enabled>
|
| 47 |
-
|
| 48 |
-
<site_id translate="label">
|
| 49 |
-
<label>Talkable Site ID</label>
|
| 50 |
-
<comment></comment>
|
| 51 |
-
<frontend_type>text</frontend_type>
|
| 52 |
-
<sort_order>2</sort_order>
|
| 53 |
-
<show_in_default>1</show_in_default>
|
| 54 |
-
<show_in_website>1</show_in_website>
|
| 55 |
-
<show_in_store>1</show_in_store>
|
| 56 |
-
</site_id>
|
| 57 |
-
|
| 58 |
-
<campaign_tags translate="label">
|
| 59 |
-
<label>Campaign Tags</label>
|
| 60 |
-
<comment><![CDATA[CSV-list of campaign tags]]></comment>
|
| 61 |
-
<frontend_type>text</frontend_type>
|
| 62 |
-
<sort_order>3</sort_order>
|
| 63 |
-
<show_in_default>1</show_in_default>
|
| 64 |
-
<show_in_website>1</show_in_website>
|
| 65 |
-
<show_in_store>1</show_in_store>
|
| 66 |
-
</campaign_tags>
|
| 67 |
-
</fields>
|
| 68 |
-
</settings>
|
| 69 |
-
</groups>
|
| 70 |
-
</checkoutoffer>
|
| 71 |
-
</sections>
|
| 72 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Talkable/SocialReferrals/Block/Affiliate.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_Affiliate extends Mage_Core_Block_Template
|
| 12 |
+
{
|
| 13 |
+
|
| 14 |
+
}
|
app/code/community/Talkable/{CheckoutOffer/Block/Multishipping/Checkoutoffer.php → SocialReferrals/Block/Multishipping/Purchase.php}
RENAMED
|
@@ -1,14 +1,14 @@
|
|
| 1 |
<?php
|
| 2 |
/**
|
| 3 |
-
* Talkable
|
| 4 |
*
|
| 5 |
-
* @package
|
| 6 |
* @author Talkable (http://www.talkable.com/)
|
| 7 |
* @copyright Copyright (c) 2015 Talkable (http://www.talkable.com/)
|
| 8 |
* @license MIT
|
| 9 |
*/
|
| 10 |
|
| 11 |
-
class
|
| 12 |
{
|
| 13 |
|
| 14 |
public function getCheckoutOrder()
|
| 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_Multishipping_Purchase extends Mage_Checkout_Block_Multishipping_Success
|
| 12 |
{
|
| 13 |
|
| 14 |
public function getCheckoutOrder()
|
app/code/community/Talkable/{CheckoutOffer/Block/Checkoutoffer.php → SocialReferrals/Block/Purchase.php}
RENAMED
|
@@ -1,14 +1,14 @@
|
|
| 1 |
<?php
|
| 2 |
/**
|
| 3 |
-
* Talkable
|
| 4 |
*
|
| 5 |
-
* @package
|
| 6 |
* @author Talkable (http://www.talkable.com/)
|
| 7 |
* @copyright Copyright (c) 2015 Talkable (http://www.talkable.com/)
|
| 8 |
* @license MIT
|
| 9 |
*/
|
| 10 |
|
| 11 |
-
class
|
| 12 |
{
|
| 13 |
|
| 14 |
public function getCheckoutOrder()
|
| 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_Purchase extends Mage_Checkout_Block_Onepage_Success
|
| 12 |
{
|
| 13 |
|
| 14 |
public function getCheckoutOrder()
|
app/code/community/Talkable/SocialReferrals/Helper/Data.php
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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_Helper_Data extends Mage_Core_Helper_Abstract
|
| 12 |
+
{
|
| 13 |
+
|
| 14 |
+
//------------------+
|
| 15 |
+
// Default Settings |
|
| 16 |
+
//------------------+
|
| 17 |
+
|
| 18 |
+
public function getSiteId()
|
| 19 |
+
{
|
| 20 |
+
return $this->_getTextConfigValue("general/site_id");
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
//---------------------------+
|
| 24 |
+
// Post-Checkout Integration |
|
| 25 |
+
//---------------------------+
|
| 26 |
+
|
| 27 |
+
/**
|
| 28 |
+
* @return bool Whether or not Post-Checkout Integration is enabled
|
| 29 |
+
*/
|
| 30 |
+
public function isPurchaseEnabled()
|
| 31 |
+
{
|
| 32 |
+
return $this->_getBoolConfigValue("purchase/enabled");
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
public function getPurchaseCampaignTags()
|
| 36 |
+
{
|
| 37 |
+
return $this->_getListConfigValue("purchase/campaign_tags");
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
public function getPurchaseData($order)
|
| 41 |
+
{
|
| 42 |
+
$retval = array(
|
| 43 |
+
"order_number" => $order->getIncrementId(),
|
| 44 |
+
"order_date" => $order->getCreatedAt(),
|
| 45 |
+
"subtotal" => $order->getSubtotal(),
|
| 46 |
+
"coupon_code" => $order->getCouponCode(),
|
| 47 |
+
"customer_id" => $order->getCustomerId(),
|
| 48 |
+
"email" => $order->getCustomerEmail(),
|
| 49 |
+
"first_name" => $order->getCustomerFirstname(),
|
| 50 |
+
"last_name" => $order->getCustomerLastname(),
|
| 51 |
+
"items" => array(),
|
| 52 |
+
);
|
| 53 |
+
|
| 54 |
+
foreach ($order->getAllVisibleItems() as $product) {
|
| 55 |
+
$retval["items"][] = array(
|
| 56 |
+
"product_id" => $product->getSku(),
|
| 57 |
+
"price" => $product->getPrice(),
|
| 58 |
+
"quantity" => $product->getQtyOrdered(),
|
| 59 |
+
"title" => $product->getName(),
|
| 60 |
+
);
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
return $retval;
|
| 64 |
+
}
|
| 65 |
+
|
| 66 |
+
//------------------------+
|
| 67 |
+
// Standalone Integration |
|
| 68 |
+
//------------------------+
|
| 69 |
+
|
| 70 |
+
/**
|
| 71 |
+
* @return bool Whether or not Standalone Integration is enabled
|
| 72 |
+
*/
|
| 73 |
+
public function isAffiliateEnabled()
|
| 74 |
+
{
|
| 75 |
+
return $this->_getBoolConfigValue("affiliate/enabled");
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
public function getAffiliateCampaignTags()
|
| 79 |
+
{
|
| 80 |
+
return $this->_getListConfigValue("affiliate/campaign_tags");
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
public function getAffiliateIframeOptions()
|
| 84 |
+
{
|
| 85 |
+
$width = $this->_getTextConfigValue("affiliate/iframe_width");
|
| 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($customer)
|
| 104 |
+
{
|
| 105 |
+
return array(
|
| 106 |
+
"affiliate_member" => array(
|
| 107 |
+
"email" => $customer->getEmail(),
|
| 108 |
+
"first_name" => $customer->getFirstname(),
|
| 109 |
+
"last_name" => $customer->getLastname(),
|
| 110 |
+
"customer_id" => $customer->getId(),
|
| 111 |
+
),
|
| 112 |
+
);
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
//---------+
|
| 116 |
+
// Private |
|
| 117 |
+
//---------+
|
| 118 |
+
|
| 119 |
+
private function _getBoolConfigValue($path)
|
| 120 |
+
{
|
| 121 |
+
return (bool) Mage::getStoreConfig("socialreferrals/" . $path);
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
+
private function _getListConfigValue($path)
|
| 125 |
+
{
|
| 126 |
+
return array_filter(array_map("trim", explode(",", Mage::getStoreConfig("socialreferrals/" . $path))));
|
| 127 |
+
}
|
| 128 |
+
|
| 129 |
+
private function _getTextConfigValue($path)
|
| 130 |
+
{
|
| 131 |
+
return trim(Mage::getStoreConfig("socialreferrals/" . $path));
|
| 132 |
+
}
|
| 133 |
+
|
| 134 |
+
}
|
app/code/community/Talkable/SocialReferrals/controllers/IndexController.php
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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_IndexController extends Mage_Core_Controller_Front_Action
|
| 12 |
+
{
|
| 13 |
+
|
| 14 |
+
public function indexAction()
|
| 15 |
+
{
|
| 16 |
+
if (
|
| 17 |
+
Mage::getSingleton("customer/session")->isLoggedIn() &&
|
| 18 |
+
Mage::helper("socialreferrals")->isAffiliateEnabled()
|
| 19 |
+
) {
|
| 20 |
+
$this->loadLayout();
|
| 21 |
+
$this->renderLayout();
|
| 22 |
+
} else {
|
| 23 |
+
$this->_forward("defaultNoRoute"); // 404 page
|
| 24 |
+
}
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
}
|
app/code/community/Talkable/{CheckoutOffer → SocialReferrals}/etc/adminhtml.xml
RENAMED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<!--
|
| 3 |
/**
|
| 4 |
-
* Talkable
|
| 5 |
*
|
| 6 |
-
* @package
|
| 7 |
* @author Talkable (http://www.talkable.com/)
|
| 8 |
* @copyright Copyright (c) 2015 Talkable (http://www.talkable.com/)
|
| 9 |
* @license MIT
|
|
@@ -18,9 +18,9 @@
|
|
| 18 |
<children>
|
| 19 |
<config>
|
| 20 |
<children>
|
| 21 |
-
<
|
| 22 |
-
<title>
|
| 23 |
-
</
|
| 24 |
</children>
|
| 25 |
</config>
|
| 26 |
</children>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<!--
|
| 3 |
/**
|
| 4 |
+
* Talkable SocialReferrals for Magento
|
| 5 |
*
|
| 6 |
+
* @package Talkable_SocialReferrals
|
| 7 |
* @author Talkable (http://www.talkable.com/)
|
| 8 |
* @copyright Copyright (c) 2015 Talkable (http://www.talkable.com/)
|
| 9 |
* @license MIT
|
| 18 |
<children>
|
| 19 |
<config>
|
| 20 |
<children>
|
| 21 |
+
<socialreferrals>
|
| 22 |
+
<title>Talkable_SocialReferrals Settings</title>
|
| 23 |
+
</socialreferrals>
|
| 24 |
</children>
|
| 25 |
</config>
|
| 26 |
</children>
|
app/code/community/Talkable/SocialReferrals/etc/config.xml
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<!--
|
| 3 |
+
/**
|
| 4 |
+
* Talkable SocialReferrals for Magento
|
| 5 |
+
*
|
| 6 |
+
* @package Talkable_SocialReferrals
|
| 7 |
+
* @author Talkable (http://www.talkable.com/)
|
| 8 |
+
* @copyright Copyright (c) 2015 Talkable (http://www.talkable.com/)
|
| 9 |
+
* @license MIT
|
| 10 |
+
*/
|
| 11 |
+
-->
|
| 12 |
+
<config>
|
| 13 |
+
<modules>
|
| 14 |
+
<Talkable_SocialReferrals>
|
| 15 |
+
<version>0.1.1</version>
|
| 16 |
+
</Talkable_SocialReferrals>
|
| 17 |
+
</modules>
|
| 18 |
+
|
| 19 |
+
<global>
|
| 20 |
+
<blocks>
|
| 21 |
+
<socialreferrals>
|
| 22 |
+
<class>Talkable_SocialReferrals_Block</class>
|
| 23 |
+
</socialreferrals>
|
| 24 |
+
</blocks>
|
| 25 |
+
|
| 26 |
+
<helpers>
|
| 27 |
+
<socialreferrals>
|
| 28 |
+
<class>Talkable_SocialReferrals_Helper</class>
|
| 29 |
+
</socialreferrals>
|
| 30 |
+
</helpers>
|
| 31 |
+
</global>
|
| 32 |
+
|
| 33 |
+
<frontend>
|
| 34 |
+
<routers>
|
| 35 |
+
<socialreferrals>
|
| 36 |
+
<use>standard</use>
|
| 37 |
+
<args>
|
| 38 |
+
<module>Talkable_SocialReferrals</module>
|
| 39 |
+
<frontName>share</frontName>
|
| 40 |
+
</args>
|
| 41 |
+
</socialreferrals>
|
| 42 |
+
</routers>
|
| 43 |
+
|
| 44 |
+
<layout>
|
| 45 |
+
<updates>
|
| 46 |
+
<socialreferrals>
|
| 47 |
+
<file>talkable/socialreferrals.xml</file>
|
| 48 |
+
</socialreferrals>
|
| 49 |
+
</updates>
|
| 50 |
+
</layout>
|
| 51 |
+
</frontend>
|
| 52 |
+
|
| 53 |
+
<default>
|
| 54 |
+
<socialreferrals>
|
| 55 |
+
<general>
|
| 56 |
+
<site_id></site_id>
|
| 57 |
+
</general>
|
| 58 |
+
|
| 59 |
+
<purchase>
|
| 60 |
+
<enabled>0</enabled>
|
| 61 |
+
<campaign_tags>default</campaign_tags>
|
| 62 |
+
</purchase>
|
| 63 |
+
|
| 64 |
+
<affiliate>
|
| 65 |
+
<enabled>0</enabled>
|
| 66 |
+
<campaign_tags>default</campaign_tags>
|
| 67 |
+
<iframe_responsive>1</iframe_responsive>
|
| 68 |
+
<iframe_container>talkable-container</iframe_container>
|
| 69 |
+
<iframe_width>100%</iframe_width>
|
| 70 |
+
<iframe_height>960</iframe_height>
|
| 71 |
+
</affiliate>
|
| 72 |
+
</socialreferrals>
|
| 73 |
+
</default>
|
| 74 |
+
</config>
|
app/code/community/Talkable/SocialReferrals/etc/system.xml
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<!--
|
| 3 |
+
/**
|
| 4 |
+
* Talkable SocialReferrals for Magento
|
| 5 |
+
*
|
| 6 |
+
* @package Talkable_SocialReferrals
|
| 7 |
+
* @author Talkable (http://www.talkable.com/)
|
| 8 |
+
* @copyright Copyright (c) 2015 Talkable (http://www.talkable.com/)
|
| 9 |
+
* @license MIT
|
| 10 |
+
*/
|
| 11 |
+
-->
|
| 12 |
+
<config>
|
| 13 |
+
<tabs>
|
| 14 |
+
<talkable translate="label" module="socialreferrals">
|
| 15 |
+
<label>Talkable</label>
|
| 16 |
+
<sort_order>1000</sort_order>
|
| 17 |
+
</talkable>
|
| 18 |
+
</tabs>
|
| 19 |
+
|
| 20 |
+
<sections>
|
| 21 |
+
<socialreferrals translate="label" module="socialreferrals">
|
| 22 |
+
<label>Extension Options</label>
|
| 23 |
+
<tab>talkable</tab>
|
| 24 |
+
<sort_order>1000</sort_order>
|
| 25 |
+
<show_in_default>1</show_in_default>
|
| 26 |
+
<show_in_website>1</show_in_website>
|
| 27 |
+
<show_in_store>1</show_in_store>
|
| 28 |
+
|
| 29 |
+
<groups>
|
| 30 |
+
<general translate="label">
|
| 31 |
+
<label>Default Settings</label>
|
| 32 |
+
<frontend_type>text</frontend_type>
|
| 33 |
+
<sort_order>1</sort_order>
|
| 34 |
+
<show_in_default>1</show_in_default>
|
| 35 |
+
<show_in_website>0</show_in_website>
|
| 36 |
+
<show_in_store>0</show_in_store>
|
| 37 |
+
|
| 38 |
+
<fields>
|
| 39 |
+
<site_id translate="label">
|
| 40 |
+
<label>Talkable Site ID</label>
|
| 41 |
+
<comment></comment>
|
| 42 |
+
<frontend_type>text</frontend_type>
|
| 43 |
+
<sort_order>1</sort_order>
|
| 44 |
+
<show_in_default>1</show_in_default>
|
| 45 |
+
<show_in_website>1</show_in_website>
|
| 46 |
+
<show_in_store>1</show_in_store>
|
| 47 |
+
</site_id>
|
| 48 |
+
</fields>
|
| 49 |
+
</general>
|
| 50 |
+
|
| 51 |
+
<purchase translate="label">
|
| 52 |
+
<label>Post-Checkout Integration</label>
|
| 53 |
+
<frontend_type>text</frontend_type>
|
| 54 |
+
<sort_order>2</sort_order>
|
| 55 |
+
<show_in_default>1</show_in_default>
|
| 56 |
+
<show_in_website>0</show_in_website>
|
| 57 |
+
<show_in_store>0</show_in_store>
|
| 58 |
+
|
| 59 |
+
<fields>
|
| 60 |
+
<enabled translate="label">
|
| 61 |
+
<label>Enabled</label>
|
| 62 |
+
<comment><![CDATA[(Offer will be shown on the Checkout Success page)]]></comment>
|
| 63 |
+
<frontend_type>select</frontend_type>
|
| 64 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 65 |
+
<sort_order>1</sort_order>
|
| 66 |
+
<show_in_default>1</show_in_default>
|
| 67 |
+
<show_in_website>1</show_in_website>
|
| 68 |
+
<show_in_store>1</show_in_store>
|
| 69 |
+
</enabled>
|
| 70 |
+
|
| 71 |
+
<campaign_tags translate="label">
|
| 72 |
+
<label>Campaign Tags</label>
|
| 73 |
+
<comment><![CDATA[CSV-list of campaign tags]]></comment>
|
| 74 |
+
<frontend_type>text</frontend_type>
|
| 75 |
+
<sort_order>2</sort_order>
|
| 76 |
+
<show_in_default>1</show_in_default>
|
| 77 |
+
<show_in_website>1</show_in_website>
|
| 78 |
+
<show_in_store>1</show_in_store>
|
| 79 |
+
</campaign_tags>
|
| 80 |
+
</fields>
|
| 81 |
+
</purchase>
|
| 82 |
+
|
| 83 |
+
<affiliate translate="label">
|
| 84 |
+
<label>Standalone Integration</label>
|
| 85 |
+
<frontend_type>text</frontend_type>
|
| 86 |
+
<sort_order>3</sort_order>
|
| 87 |
+
<show_in_default>1</show_in_default>
|
| 88 |
+
<show_in_website>0</show_in_website>
|
| 89 |
+
<show_in_store>0</show_in_store>
|
| 90 |
+
|
| 91 |
+
<fields>
|
| 92 |
+
<enabled translate="label">
|
| 93 |
+
<label>Enabled</label>
|
| 94 |
+
<comment><![CDATA[(Standalone campaign will be mounted at /share)]]></comment>
|
| 95 |
+
<frontend_type>select</frontend_type>
|
| 96 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 97 |
+
<sort_order>1</sort_order>
|
| 98 |
+
<show_in_default>1</show_in_default>
|
| 99 |
+
<show_in_website>1</show_in_website>
|
| 100 |
+
<show_in_store>1</show_in_store>
|
| 101 |
+
</enabled>
|
| 102 |
+
|
| 103 |
+
<campaign_tags translate="label">
|
| 104 |
+
<label>Campaign Tags</label>
|
| 105 |
+
<comment><![CDATA[CSV-list of campaign tags]]></comment>
|
| 106 |
+
<frontend_type>text</frontend_type>
|
| 107 |
+
<sort_order>2</sort_order>
|
| 108 |
+
<show_in_default>1</show_in_default>
|
| 109 |
+
<show_in_website>1</show_in_website>
|
| 110 |
+
<show_in_store>1</show_in_store>
|
| 111 |
+
</campaign_tags>
|
| 112 |
+
|
| 113 |
+
<iframe_responsive translate="label">
|
| 114 |
+
<label>IFrame responsive</label>
|
| 115 |
+
<comment><![CDATA[Automatically adapt the IFrame to the viewport size]]></comment>
|
| 116 |
+
<frontend_type>select</frontend_type>
|
| 117 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 118 |
+
<sort_order>3</sort_order>
|
| 119 |
+
<show_in_default>1</show_in_default>
|
| 120 |
+
<show_in_website>1</show_in_website>
|
| 121 |
+
<show_in_store>1</show_in_store>
|
| 122 |
+
</iframe_responsive>
|
| 123 |
+
|
| 124 |
+
<iframe_container translate="label">
|
| 125 |
+
<label>IFrame container</label>
|
| 126 |
+
<comment><![CDATA[ID of a DOM element to contain the IFrame]]></comment>
|
| 127 |
+
<frontend_type>text</frontend_type>
|
| 128 |
+
<sort_order>4</sort_order>
|
| 129 |
+
<show_in_default>1</show_in_default>
|
| 130 |
+
<show_in_website>1</show_in_website>
|
| 131 |
+
<show_in_store>1</show_in_store>
|
| 132 |
+
</iframe_container>
|
| 133 |
+
|
| 134 |
+
<iframe_width translate="label">
|
| 135 |
+
<label>IFrame width</label>
|
| 136 |
+
<frontend_type>text</frontend_type>
|
| 137 |
+
<sort_order>5</sort_order>
|
| 138 |
+
<show_in_default>1</show_in_default>
|
| 139 |
+
<show_in_website>1</show_in_website>
|
| 140 |
+
<show_in_store>1</show_in_store>
|
| 141 |
+
</iframe_width>
|
| 142 |
+
|
| 143 |
+
<iframe_height translate="label">
|
| 144 |
+
<label>IFrame height</label>
|
| 145 |
+
<comment><![CDATA[Not applied if <em>responsive</em> is set to "No"]]></comment>
|
| 146 |
+
<frontend_type>text</frontend_type>
|
| 147 |
+
<sort_order>6</sort_order>
|
| 148 |
+
<show_in_default>1</show_in_default>
|
| 149 |
+
<show_in_website>1</show_in_website>
|
| 150 |
+
<show_in_store>1</show_in_store>
|
| 151 |
+
</iframe_height>
|
| 152 |
+
</fields>
|
| 153 |
+
</affiliate>
|
| 154 |
+
</groups>
|
| 155 |
+
</socialreferrals>
|
| 156 |
+
</sections>
|
| 157 |
+
</config>
|
app/design/frontend/base/default/layout/talkable/checkoutoffer.xml
DELETED
|
@@ -1,24 +0,0 @@
|
|
| 1 |
-
<?xml version="1.0"?>
|
| 2 |
-
<!--
|
| 3 |
-
/**
|
| 4 |
-
* Talkable CheckoutOffer for Magento
|
| 5 |
-
*
|
| 6 |
-
* @package Talkable_CheckoutOffer
|
| 7 |
-
* @author Talkable (http://www.talkable.com/)
|
| 8 |
-
* @copyright Copyright (c) 2015 Talkable (http://www.talkable.com/)
|
| 9 |
-
* @license MIT
|
| 10 |
-
*/
|
| 11 |
-
-->
|
| 12 |
-
<layout version="0.1.0">
|
| 13 |
-
<checkout_onepage_success>
|
| 14 |
-
<reference name="head">
|
| 15 |
-
<block type="checkoutoffer/checkoutoffer" name="talkable.checkoutoffer" template="talkable/checkoutoffer/checkoutoffer.phtml" />
|
| 16 |
-
</reference>
|
| 17 |
-
</checkout_onepage_success>
|
| 18 |
-
|
| 19 |
-
<checkout_multishipping_success>
|
| 20 |
-
<reference name="head">
|
| 21 |
-
<block type="checkoutoffer/multishipping_checkoutoffer" name="checkout_checkoutoffer_success" template="talkable/checkoutoffer/checkoutoffer.phtml" />
|
| 22 |
-
</reference>
|
| 23 |
-
</checkout_multishipping_success>
|
| 24 |
-
</layout>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/layout/talkable/socialreferrals.xml
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<!--
|
| 3 |
+
/**
|
| 4 |
+
* Talkable SocialReferrals for Magento
|
| 5 |
+
*
|
| 6 |
+
* @package Talkable_SocialReferrals
|
| 7 |
+
* @author Talkable (http://www.talkable.com/)
|
| 8 |
+
* @copyright Copyright (c) 2015 Talkable (http://www.talkable.com/)
|
| 9 |
+
* @license MIT
|
| 10 |
+
*/
|
| 11 |
+
-->
|
| 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/register_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/register_purchase.phtml" />
|
| 22 |
+
</reference>
|
| 23 |
+
</checkout_multishipping_success>
|
| 24 |
+
|
| 25 |
+
<socialreferrals_index_index>
|
| 26 |
+
<reference name="root">
|
| 27 |
+
<action method="setTemplate"><template>page/1column.phtml</template></action>
|
| 28 |
+
</reference>
|
| 29 |
+
|
| 30 |
+
<reference name="content">
|
| 31 |
+
<block type="socialreferrals/affiliate" name="talkable.socialreferrals.affiliate" template="talkable/socialreferrals/register_affiliate.phtml" />
|
| 32 |
+
</reference>
|
| 33 |
+
</socialreferrals_index_index>
|
| 34 |
+
</layout>
|
app/design/frontend/base/default/template/talkable/socialreferrals/register_affiliate.phtml
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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->isAffiliateEnabled()): ?>
|
| 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 |
+
<?php $_customer = $this->helper("customer")->getCustomer() ?>
|
| 21 |
+
<div id="talkable-container"></div>
|
| 22 |
+
<script type="text/javascript">
|
| 23 |
+
//<![CDATA[
|
| 24 |
+
var _curebitq = _curebitq || [];
|
| 25 |
+
_curebitq.push(["init", {
|
| 26 |
+
site_id: "<?php echo $_helper->getSiteId() ?>",
|
| 27 |
+
server: "https://www.talkable.com"
|
| 28 |
+
}]);
|
| 29 |
+
|
| 30 |
+
<?php $_event_data = array_merge($_helper->getAffiliateData($_customer), $_helper->getAffiliateIframeOptions()) ?>
|
| 31 |
+
<?php $_event_data["campaign_tags"] = $_helper->getAffiliateCampaignTags() ?>
|
| 32 |
+
|
| 33 |
+
_curebitq.push(["register_affiliate", <?php echo Mage::helper("core")->jsonEncode($_event_data) ?>]);
|
| 34 |
+
//]]>
|
| 35 |
+
</script>
|
| 36 |
+
<script type="text/javascript" src="//d2jjzw81hqbuqv.cloudfront.net/integration/curebit-1.0.min.js"></script>
|
| 37 |
+
<?php endif ?>
|
| 38 |
+
|
| 39 |
+
<!-- End Talkable integration code -->
|
| 40 |
+
<?php endif ?>
|
app/design/frontend/base/default/template/talkable/{checkoutoffer/checkoutoffer.phtml → socialreferrals/register_purchase.phtml}
RENAMED
|
@@ -1,40 +1,40 @@
|
|
| 1 |
<?php
|
| 2 |
/**
|
| 3 |
-
* Talkable
|
| 4 |
*
|
| 5 |
-
* @package
|
| 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("
|
| 13 |
|
| 14 |
-
<?php if ($_helper->
|
| 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 |
<?php if ($_order = $this->getCheckoutOrder()): ?>
|
| 21 |
-
<script type="text/javascript" src="//d2jjzw81hqbuqv.cloudfront.net/integration/curebit-1.0.min.js"></script>
|
| 22 |
<script type="text/javascript">
|
| 23 |
//<![CDATA[
|
| 24 |
var _curebitq = _curebitq || [];
|
| 25 |
_curebitq.push(["init", {
|
| 26 |
-
site_id:
|
| 27 |
server: "https://www.talkable.com"
|
| 28 |
}]);
|
| 29 |
|
| 30 |
-
<?php $_event_data = $_helper->
|
| 31 |
<?php $_event_data["responsive"] = true ?>
|
| 32 |
<?php $_event_data["traffic_source"] = "Post-checkout" ?>
|
| 33 |
-
<?php $_event_data["campaign_tags"] = $_helper->
|
| 34 |
|
| 35 |
_curebitq.push(["register_purchase", <?php echo Mage::helper("core")->jsonEncode($_event_data) ?>]);
|
| 36 |
//]]>
|
| 37 |
</script>
|
|
|
|
| 38 |
<?php else: ?>
|
| 39 |
<!-- Order could not be found -->
|
| 40 |
<?php endif ?>
|
|
@@ -42,4 +42,3 @@
|
|
| 42 |
|
| 43 |
<!-- End Talkable integration code -->
|
| 44 |
<?php endif ?>
|
| 45 |
-
|
| 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->isPurchaseEnabled()): ?>
|
| 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 |
<?php if ($_order = $this->getCheckoutOrder()): ?>
|
|
|
|
| 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 = $_helper->getPurchaseData($_order) ?>
|
| 30 |
<?php $_event_data["responsive"] = true ?>
|
| 31 |
<?php $_event_data["traffic_source"] = "Post-checkout" ?>
|
| 32 |
+
<?php $_event_data["campaign_tags"] = $_helper->getPurchaseCampaignTags() ?>
|
| 33 |
|
| 34 |
_curebitq.push(["register_purchase", <?php echo Mage::helper("core")->jsonEncode($_event_data) ?>]);
|
| 35 |
//]]>
|
| 36 |
</script>
|
| 37 |
+
<script type="text/javascript" src="//d2jjzw81hqbuqv.cloudfront.net/integration/curebit-1.0.min.js"></script>
|
| 38 |
<?php else: ?>
|
| 39 |
<!-- Order could not be found -->
|
| 40 |
<?php endif ?>
|
| 42 |
|
| 43 |
<!-- End Talkable integration code -->
|
| 44 |
<?php endif ?>
|
|
|
app/etc/modules/{Talkable_CheckoutOffer.xml → Talkable_SocialReferrals.xml}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<!--
|
| 3 |
/**
|
| 4 |
-
* Talkable
|
| 5 |
*
|
| 6 |
-
* @package
|
| 7 |
* @author Talkable (http://www.talkable.com/)
|
| 8 |
* @copyright Copyright (c) 2015 Talkable (http://www.talkable.com/)
|
| 9 |
* @license MIT
|
|
@@ -11,9 +11,9 @@
|
|
| 11 |
-->
|
| 12 |
<config>
|
| 13 |
<modules>
|
| 14 |
-
<
|
| 15 |
<active>true</active>
|
| 16 |
<codePool>community</codePool>
|
| 17 |
-
</
|
| 18 |
</modules>
|
| 19 |
</config>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<!--
|
| 3 |
/**
|
| 4 |
+
* Talkable SocialReferrals for Magento
|
| 5 |
*
|
| 6 |
+
* @package Talkable_SocialReferrals
|
| 7 |
* @author Talkable (http://www.talkable.com/)
|
| 8 |
* @copyright Copyright (c) 2015 Talkable (http://www.talkable.com/)
|
| 9 |
* @license MIT
|
| 11 |
-->
|
| 12 |
<config>
|
| 13 |
<modules>
|
| 14 |
+
<Talkable_SocialReferrals>
|
| 15 |
<active>true</active>
|
| 16 |
<codePool>community</codePool>
|
| 17 |
+
</Talkable_SocialReferrals>
|
| 18 |
</modules>
|
| 19 |
</config>
|
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>
|
|
@@ -9,16 +9,16 @@
|
|
| 9 |
<summary>Talkable (http://www.talkable.com) integration for Magento</summary>
|
| 10 |
<description>Talkable enables your Magento store to attract new customers by offering them special deals in exchange for sharing with their friends.
|
| 11 |

|
| 12 |
-
This
|
| 13 |

|
| 14 |
Using Talkable, you help your customers drive more referral sales per dollar than traditional marketing and advertising.
|
| 15 |

|
| 16 |
See more at Talkable.com</description>
|
| 17 |
<notes>First release</notes>
|
| 18 |
<authors><author><name>Talkable</name><user>talkable</user><email>sub@talkable.com</email></author></authors>
|
| 19 |
-
<date>2015-02-
|
| 20 |
-
<time>
|
| 21 |
-
<contents><target name="magecommunity"><dir name="Talkable"><dir name="
|
| 22 |
<compatible/>
|
| 23 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
| 24 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>talkable</name>
|
| 4 |
+
<version>0.1.1</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://opensource.org/licenses/mit-license.php">MIT License</license>
|
| 7 |
<channel>community</channel>
|
| 9 |
<summary>Talkable (http://www.talkable.com) integration for Magento</summary>
|
| 10 |
<description>Talkable enables your Magento store to attract new customers by offering them special deals in exchange for sharing with their friends.
|
| 11 |

|
| 12 |
+
This extension provides links for them to share their purchase on Facebook, Twitter, and Email and encourages them to bring in new customers for you.
|
| 13 |

|
| 14 |
Using Talkable, you help your customers drive more referral sales per dollar than traditional marketing and advertising.
|
| 15 |

|
| 16 |
See more at Talkable.com</description>
|
| 17 |
<notes>First release</notes>
|
| 18 |
<authors><author><name>Talkable</name><user>talkable</user><email>sub@talkable.com</email></author></authors>
|
| 19 |
+
<date>2015-02-18</date>
|
| 20 |
+
<time>12:34:23</time>
|
| 21 |
+
<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="5edcb929ebae8c45151cbceb69d75544"/></dir><dir name="controllers"><file name="IndexController.php" hash="3af0ec76d8edc7b7bccbb1375e7a8045"/></dir><dir name="etc"><file name="adminhtml.xml" hash="3f86a3e4bf980fa36aba8c0e33737e59"/><file name="config.xml" hash="05f9e39822aa44b75c972d422419d6ee"/><file name="system.xml" hash="7ecf7e23f655ac932af4e56cd3446d4f"/></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="229ed61d0a4f0ea343248f85fc4f1d83"/></dir></dir><dir name="template"><dir name="talkable"><dir name="socialreferrals"><file name="register_affiliate.phtml" hash="7df514f68944239ed13e0d6d924c82c3"/><file name="register_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>
|
| 22 |
<compatible/>
|
| 23 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
| 24 |
</package>
|
