ClearSaleing - Version 1.0.0

Version Notes

Initial Release.

Download this release

Release Info

Developer True Action ClearSaleing
Extension ClearSaleing
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

Files changed (21) hide show
  1. app/code/community/TrueAction/ClearSaleing/Block/Adminhtml/System/Form/Renderer/Config/HeadingComment.php +25 -0
  2. app/code/community/TrueAction/ClearSaleing/Block/Adminhtml/System/Form/Renderer/Config/RegisterButton.php +60 -0
  3. app/code/community/TrueAction/ClearSaleing/Block/Beacon.php +45 -0
  4. app/code/community/TrueAction/ClearSaleing/Block/Beacon/Order.php +92 -0
  5. app/code/community/TrueAction/ClearSaleing/Block/Beacon/Searchresults.php +29 -0
  6. app/code/community/TrueAction/ClearSaleing/Helper/Data.php +22 -0
  7. app/code/community/TrueAction/ClearSaleing/Helper/Xfabric.php +71 -0
  8. app/code/community/TrueAction/ClearSaleing/LICENSE.TXT +81 -0
  9. app/code/community/TrueAction/ClearSaleing/controllers/Adminhtml/Clearsaleing/RegisterController.php +15 -0
  10. app/code/community/TrueAction/ClearSaleing/etc/adminhtml.xml +29 -0
  11. app/code/community/TrueAction/ClearSaleing/etc/config.xml +68 -0
  12. app/code/community/TrueAction/ClearSaleing/etc/system.xml +76 -0
  13. app/design/adminhtml/default/default/layout/clearsaleing.xml +15 -0
  14. app/design/adminhtml/default/default/template/clearsaleing/register/view.phtml +24 -0
  15. app/design/adminhtml/default/default/template/clearsaleing/system/config/register_button.phtml +53 -0
  16. app/design/frontend/base/default/layout/clearsaleing.xml +38 -0
  17. app/design/frontend/base/default/template/clearsaleing/beacon.phtml +19 -0
  18. app/design/frontend/base/default/template/clearsaleing/beacon/order.phtml +28 -0
  19. app/design/frontend/base/default/template/clearsaleing/beacon/searchResults.phtml +11 -0
  20. app/etc/modules/TrueAction_ClearSaleing.xml +19 -0
  21. package.xml +18 -0
app/code/community/TrueAction/ClearSaleing/Block/Adminhtml/System/Form/Renderer/Config/HeadingComment.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @category TrueAction
4
+ * @package TrueAction_ClearSaleing
5
+ * @copyright Copyright (c) 2012 True Action Network (http://www.trueaction.com)
6
+ */
7
+
8
+ class TrueAction_ClearSaleing_Block_Adminhtml_System_Form_Renderer_Config_HeadingComment
9
+ extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface
10
+ {
11
+ /**
12
+ * Render element html
13
+ *
14
+ * @param Varien_Data_Form_Element_Abstract $element
15
+ * @return string
16
+ */
17
+ public function render(Varien_Data_Form_Element_Abstract $element)
18
+ {
19
+ return sprintf('<tr class="system-fieldset-sub-head" id="row_%s"><td colspan="5">'
20
+ . '<h4 id="%s">%s</h4><div id="system-fieldset-sub-head-comment">%s</div></td></tr>',
21
+ $element->getHtmlId(), $element->getHtmlId(),
22
+ $element->getLabel(), $element->getComment()
23
+ );
24
+ }
25
+ }
app/code/community/TrueAction/ClearSaleing/Block/Adminhtml/System/Form/Renderer/Config/RegisterButton.php ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @category TrueAction
4
+ * @package TrueAction_ClearSaleing
5
+ * @copyright Copyright (c) 2012 True Action Network (http://www.trueaction.com)
6
+ */
7
+
8
+ class TrueAction_ClearSaleing_Block_Adminhtml_System_Form_Renderer_Config_RegisterButton
9
+ extends Mage_Adminhtml_Block_System_Config_Form_Field
10
+ implements Varien_Data_Form_Element_Renderer_Interface
11
+ {
12
+
13
+ protected $_template = 'clearsaleing/system/config/register_button.phtml';
14
+
15
+ /**
16
+ * Unset scope label and pass further to parent render()
17
+ *
18
+ * @param Varien_Data_Form_Element_Abstract $element
19
+ * @return string
20
+ */
21
+ public function render(Varien_Data_Form_Element_Abstract $element)
22
+ {
23
+ /* only show this button if the capability has not yet been onboarded
24
+ if ($capabilityIsOnboarded) {
25
+ return '';
26
+ }
27
+ */
28
+ // Unset the scope label near the button
29
+ $element->unsScope()->unsCanUseWebsiteValue()->unsCanUseDefaultValue();
30
+ $html = sprintf(
31
+ '<tr class="system-fieldset-sub-head" id="row_%1$s">
32
+ <td colspan="5">
33
+ %2$s
34
+ </td>
35
+ </tr>',
36
+ $element->getHtmlId(),
37
+ $this->_getElementHtml($element)
38
+ );
39
+ return $html;
40
+ }
41
+
42
+ /**
43
+ * Get the button and scripts contents
44
+ *
45
+ * @param Varien_Data_Form_Element_Abstract $element
46
+ * @return string
47
+ */
48
+ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
49
+ {
50
+ $originalData = $element->getOriginalData();
51
+ $this->addData(array(
52
+ 'button_label' => Mage::helper('clearsaleing/xfabric')->__($originalData['button_label']),
53
+ 'html_id' => $element->getHtmlId(),
54
+ 'button_url' => trim($originalData['button_url']),
55
+ 'element_label' => $element->getLabel(),
56
+ 'element_comment' => $element->getComment(),
57
+ ));
58
+ return $this->_toHtml();
59
+ }
60
+ }
app/code/community/TrueAction/ClearSaleing/Block/Beacon.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @category TrueAction
4
+ * @package TrueAction_ClearSaleing
5
+ * @copyright Copyright (c) 2012 True Action Network (http://www.trueaction.com)
6
+ */
7
+
8
+ class TrueAction_ClearSaleing_Block_Beacon extends Mage_Core_Block_Template
9
+ {
10
+ /**
11
+ * Whether or not to display the beacon.
12
+ *
13
+ * @return Boolean
14
+ */
15
+ public function showBeacon()
16
+ {
17
+ $helper = Mage::helper('clearsaleing');
18
+ if (!$helper->isEnabled()) return false;
19
+ return true;
20
+ }
21
+
22
+ /**
23
+ * Get the ClearSaleing Account Id
24
+ *
25
+ * @return String
26
+ */
27
+ public function getAccountId()
28
+ {
29
+ $helper = Mage::helper('clearsaleing');
30
+ return $helper->getAccountId();
31
+ }
32
+
33
+ /**
34
+ * Get the beacon url.
35
+ *
36
+ * @return String
37
+ */
38
+ public function getBeaconUrl()
39
+ {
40
+ $helper = Mage::helper('clearsaleing');
41
+ $accountId = urlencode($helper->getAccountId());
42
+ $url = "https://dsa.csdata1.com/data/js/$accountId/csgather.js";
43
+ return $url;
44
+ }
45
+ }
app/code/community/TrueAction/ClearSaleing/Block/Beacon/Order.php ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @category TrueAction
4
+ * @package TrueAction_ClearSaleing
5
+ * @copyright Copyright (c) 2012 True Action Network (http://www.trueaction.com)
6
+ */
7
+
8
+ class TrueAction_ClearSaleing_Block_Beacon_Order extends TrueAction_ClearSaleing_Block_Beacon
9
+ {
10
+ protected $_order; // The order
11
+
12
+ /**
13
+ * Get the last order.
14
+ *
15
+ * @return Mage_Sales_Model_Order
16
+ */
17
+ protected function _getOrder()
18
+ {
19
+ if (!($this->_order instanceof Mage_Sales_Model_Order)) {
20
+ $orderId = Mage::getSingleton('checkout/session')->getLastOrderId();
21
+ if ($orderId) {
22
+ $this->_order = Mage::getModel('sales/order')->load($orderId);
23
+ }
24
+ }
25
+ return $this->_order;
26
+ }
27
+
28
+ /**
29
+ * Set all the magic values needed by the template
30
+ */
31
+ public function __construct()
32
+ {
33
+ $orderId = Mage::getSingleton('checkout/session')->getLastOrderId();
34
+ if ($orderId) {
35
+ $order = Mage::getModel('sales/order')->load($orderId);
36
+ $addressId = $order->getBillingAddressId();
37
+ $address = $order->getAddressById($addressId);
38
+ $customerId = $order->getCustomerId();
39
+ $this->setOrderNumber($order->getIncrementId());
40
+ $this->setCustomerKey($customerId);
41
+ $this->setOrderCity($address->getCity());
42
+ $this->setOrderState($address->getRegionCode());
43
+ $this->setOrderZip($address->getPostcode());
44
+ $this->setOrderCountry($address->getCountryId());
45
+ $this->setOrderCurrency($order->getOrderCurrencyCode());
46
+ $this->setOrderSubtotal((float) $order->getSubtotal());
47
+ $this->setOrderDiscount(abs((float) $order->getDiscountAmount())); // CS expects a positive number.
48
+ $this->setOrderShipping((float) $order->getShippingAmount());
49
+ $this->setOrderTax((float) $order->getTaxAmount());
50
+ $this->setOrderTotal((float) $order->getGrandTotal());
51
+ $productIds = array();
52
+ $productPrices = array();
53
+ $productQtys = array();
54
+ $productItems = array();
55
+ $productSkus = array();
56
+ $productCats = array();
57
+ $productSubcats = array();
58
+ foreach($order->getAllVisibleItems() as $item) {
59
+ $product = Mage::getModel('catalog/product')->load($item->getProductId());
60
+ $productId = $product->getIdBySku($item->getSku());
61
+ array_push($productIds, $productId);
62
+ array_push($productPrices, (float) $item->getPrice());
63
+ array_push($productQtys, (int) $item->getQtyOrdered());
64
+ array_push($productItems, $item->getName());
65
+ array_push($productSkus, $item->getSku());
66
+ }
67
+ $this->setProductIdsToJSArray(json_encode($productIds));
68
+ $this->setProductPriceToJSArray(json_encode($productPrices));
69
+ $this->setProductQtyToJSArray(json_encode($productQtys));
70
+ $this->setProductItemToJSArray(json_encode($productItems));
71
+ $this->setProductSKUsToJSArray(json_encode($productSkus));
72
+ //$this->setProductCatsToJSArray();
73
+ //$this->setProductSubcatsToJSArray();
74
+ }
75
+ }
76
+
77
+ /*
78
+ csOrderSubTotal
79
+ csOrderDiscount
80
+ csShipping
81
+ csTax
82
+ csOrderTotal
83
+ csIds
84
+ csPrice
85
+ csQtys
86
+ csItems
87
+ csCodes
88
+ csCategories
89
+ csSubCategories
90
+ */
91
+
92
+ }
app/code/community/TrueAction/ClearSaleing/Block/Beacon/Searchresults.php ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @category TrueAction
4
+ * @package TrueAction_ClearSaleing
5
+ * @copyright Copyright (c) 2012 True Action Network (http://www.trueaction.com)
6
+ */
7
+
8
+ class TrueAction_ClearSaleing_Block_Beacon_SearchResults extends TrueAction_ClearSaleing_Block_Beacon
9
+ {
10
+ /**
11
+ * The term used in site search
12
+ *
13
+ * @return string
14
+ */
15
+ public function getSiteSearchTerm()
16
+ {
17
+ return Mage::helper('catalogsearch')->getQueryText();
18
+ }
19
+
20
+ /**
21
+ * The number of search results returned
22
+ *
23
+ * @return int
24
+ */
25
+ public function countSiteSearchResults()
26
+ {
27
+ return $this->getLayout()->getBlock('search.result')->getResultCount();
28
+ }
29
+ }
app/code/community/TrueAction/ClearSaleing/Helper/Data.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @category TrueAction
4
+ * @package TrueAction_ClearSaleing
5
+ * @copyright Copyright (c) 2012 True Action Network (http://www.trueaction.com)
6
+ */
7
+
8
+ class TrueAction_ClearSaleing_Helper_Data extends Mage_Core_Helper_Abstract
9
+ {
10
+ const CLEARSALEING_CONFIG_ENABLED = 'analytics/clearsaleing/enabled';
11
+ const CLEARSALEING_CONFIG_ACCOUNT_ID = 'analytics/clearsaleing/account_id';
12
+
13
+ public function isEnabled()
14
+ {
15
+ return Mage::getStoreConfigFlag(self::CLEARSALEING_CONFIG_ENABLED);
16
+ }
17
+
18
+ public function getAccountId()
19
+ {
20
+ return Mage::getStoreConfig(self::CLEARSALEING_CONFIG_ACCOUNT_ID);
21
+ }
22
+ }
app/code/community/TrueAction/ClearSaleing/Helper/Xfabric.php ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @category TrueAction
4
+ * @package TrueAction_ClearSaleing
5
+ * @copyright Copyright (c) 2012 True Action Network (http://www.trueaction.com)
6
+ */
7
+
8
+ class TrueAction_ClearSaleing_Helper_XFabric extends Mage_Core_Helper_Data
9
+ {
10
+
11
+ const XML_PATH_CLEARSALEING_CHANNEL_REGISTRATION_TARGET_CAPABILITY_NAME
12
+ = 'analytics/clearsaleing/registration/target_capability_name';
13
+ const XML_PATH_CLEARSALEING_CHANNEL_REGISTRATION_STORE_ENDPOINT_URL
14
+ = 'analytics/clearsaleing/registration/store_endpoint_url';
15
+ const XML_PATH_CLEARSALEING_CHANNEL_REGISTRATION_IS_REGISTERED
16
+ = 'analytics/clearsaleing/registration/is_registered';
17
+ const XML_PATH_CLEARSALEING_CHANNEL_REGISTRATION_REQUEST_URL
18
+ = 'analytics/clearsaleing/registration/registration_url';
19
+ const XML_PATH_CLEARSALEING_CHANNEL_REGISTRATION_LEGAL_AGREEMENT_URL
20
+ = 'analytics/clearsaleing/registration/legal_agreement_url';
21
+
22
+
23
+ /**
24
+ * Check xFabric registration status
25
+ * @return bool
26
+ */
27
+ public function isXfabricRegistered()
28
+ {
29
+ return (bool)Mage::helper('xcom_xfabric')->getResponseAuthorizationKey();
30
+ }
31
+
32
+ public function getRegistrationRequestUrl()
33
+ {
34
+ return Mage::getStoreConfig(self::XML_PATH_CLEARSALEING_CHANNEL_REGISTRATION_REQUEST_URL);
35
+ }
36
+
37
+ public function getRegistrationTargetCapabilityName()
38
+ {
39
+ return Mage::getStoreConfig(self::XML_PATH_CLEARSALEING_CHANNEL_REGISTRATION_TARGET_CAPABILITY_NAME);
40
+ }
41
+
42
+ public function getRegistrationStoreEndpointUrl()
43
+ {
44
+ return Mage::getStoreConfig(self::XML_PATH_CLEARSALEING_CHANNEL_REGISTRATION_STORE_ENDPOINT_URL);
45
+ }
46
+
47
+ public function getRegistrationLegalAgreementUrl()
48
+ {
49
+ return Mage::getStoreConfig(self::XML_PATH_CLEARSALEING_CHANNEL_REGISTRATION_LEGAL_AGREEMENT_URL);
50
+ }
51
+
52
+ /**
53
+ * Retrieve registration request
54
+ *
55
+ * @return Varien_Object
56
+ */
57
+ public function getRegistrationRequest()
58
+ {
59
+ $request = new Varien_Object();
60
+ $postData = array(
61
+ 'target_capability_name' => $this->getRegistrationTargetCapabilityName(),
62
+ 'store_endpoint_url' => $this->getRegistrationStoreEndpointUrl(),
63
+ 'is_registered' => $this->isXfabricRegistered(),
64
+ 'legal_agreement_url' => $this->getRegistrationLegalAgreementUrl(),
65
+ );
66
+ $jsonData = Zend_Json::encode($postData);
67
+ $request->setOnboardingInfo(urlencode($jsonData));
68
+ return $request;
69
+ }
70
+
71
+ }
app/code/community/TrueAction/ClearSaleing/LICENSE.TXT ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ GSI COMMERCE
2
+ MAGENTO CONNECT EXTENSIONS
3
+ END USER LICENSE AGREEMENT
4
+ This End User License Agreement ("Agreement") is made as of July 10, 2012 (the "Effective Date") by and between GSI Interactive, Inc. (dba "TrueAction") ("TrueAction"), a Pennsylvania corporation having its principal place of business at 935 1st Avenue, King of Prussia, PA 19406 USA and the Licensee executing this Agreement.
5
+
6
+ WHEREAS, TrueAction along with its affiliates owned or controlled by GSI Commerce, Inc. (each, a "GSI Company") offer various e-commerce and marketing technology and services to its clients, including, among other things, fulfillment and customer call center services, various marketing technology platform services, and account management and marketing agency services (together, the "GSI Services").
7
+
8
+ WHEREAS, TrueAction desires to grant Licensee a limited licensee to use the applicable Magento Connect integration extension (including the associated documentation, the "Extension") in connection with Licensee's purchase and use of the corresponding GSI Services pursuant to an executed services agreement between Licensee and the applicable GSI Company ("Service Agreement").
9
+
10
+ The parties agree as follows:
11
+ TERMS AND CONDITIONS
12
+ 1. License
13
+ 1.1. Subject to Licensee's payment for the applicable GSI Services pursuant to a Service Agreement and Licensee's compliance with other terms and conditions of a Service Agreement and this Agreement, TrueAction hereby grants Licensee a non-transferable, non-assignable, non-sublicensable, worldwide license to use the Extension, solely for internal purposes, in accordance with the Extension's technical documentation and solely during the term of a Service Agreement.
14
+ 1.2. Licensee shall implement reasonable controls to ensure that it does not use the Extension except as permitted hereunder. TrueAction reserves the right to audit Licensee's use of the Extension during normal business hours and with reasonable notice and to include means within the Extension to limit Licensee's use of the Extension to the use permitted hereunder.
15
+ 1.3. TrueAction shall provide the Extension to Licensee, including the associated technical documentation, for use by Licensee in accordance with this Agreement.
16
+ 1.4. TrueAction may modify the terms of this Agreement at any time upon notice to Licensee, which notice shall be deemed given thirty (30) days following the posting of the modified agreement on the applicable Magento website or other website where the Extension is made available. Continued use of the Extension shall be deemed Licensee's consent and agreement with the modified agreement.
17
+
18
+ 2. License Exclusions and Restrictions
19
+ 2.1. Except as expressly authorized herein, Licensee shall not:
20
+ a. use or deploy the Extension in any manner except in connection with its purchase and use of the GSI Services pursuant to a Service Agreement;
21
+ b. reverse engineer, disassemble, decompile or otherwise attempt to derive the source code or functionality of the Extension, except to the extent allowed under any applicable law;
22
+ c. distribute, sublicense, disclose, market, rent, lease, or offer remote computing services, networking, batch processing or transfer of, the Extension to any third party, or permit any person or entity to have access to the Extension by means of a time sharing, remote computing services, networking, batch processing, service bureau or time sharing arrangement;
23
+ d. export the Extension in violation of U.S. Department of Commerce export administration regulations.
24
+ 2.2. No license, right or interest in any TrueAction or any other GSI Company trademark, trade name or service mark is granted hereunder.
25
+
26
+ 3. Fees
27
+ The Extension is made available to Licensee at no additional charge, subject to Licensee's timely payment for the GSI Services and compliance with a Service Agreement and this Agreement.
28
+
29
+ 4. Title and Protection
30
+ 4.1. TrueAction (or its third party providers) retains title to all portions of the Extension and any copies thereof. The Extension contains valuable proprietary information, and Licensee shall not disclose the Extension to anyone other than those of its employees or consultants under written nondisclosure obligations at least as restrictive as those contained in this Agreement, having a need to know for purposes consistent with this Agreement. Licensee shall be responsible for the compliance of such employees or consultants. Licensee shall affix, to each full or partial copy of the Extension made by Licensee, all copyright and proprietary information notices as were affixed to the original. The obligations set forth in this Section shall survive termination of this Agreement.
31
+ 4.2. If the Extension is acquired by or on behalf of a unit or agency of the U.S. Government (the "Government"), the Government agrees that such Product is "commercial computer software" or "commercial computer software documentation" and that, absent a written agreement to the contrary, the Government's rights with respect to such Product are limited by the terms of this Agreement, pursuant to applicable FAR and/or DFARS and successor regulations.
32
+
33
+ 5. Patent and Copyright Indemnity
34
+ For such time as Licensee is receiving Services pursuant to a Service Agreement, TrueAction shall indemnify and defend Licensee against any claims that the Extension infringes any United States patent or copyright; provided that TrueAction is given prompt notice of such claim and is given information, reasonable assistance and sole authority to defend or settle the claim. In the defense or settlement of the claim, TrueAction shall obtain for Licensee the right to continue using the Extension, replace or modify the Extension so that it becomes non-infringing while giving equivalent performance or, if TrueAction determines that such remedies are not reasonably available, remove the infringing portion of the Extension. TrueAction shall have no liability if the alleged infringement is based on (i) a modification of the Extension by anyone other than, or a combination of the Extension with any product or service not provided by, TrueAction; (ii) use of the Extension other than in accordance with the documentation of this Agreement; or (iii) use of the Extension not in connection with the GSI Services. This Section 5 states TrueAction's entire liability and Licensee's exclusive remedy for infringement.
35
+
36
+ 6. Default and Termination
37
+ 6.1. An event of default shall be deemed to occur if: (i) Licensee fails to perform any of its obligations under this Agreement or is otherwise in breach of this Agreement or a Service Agreement.
38
+ 6.2. If an event of default occurs, the non-defaulting party, in addition to any other rights available to it under the law, may terminate this Agreement and all licenses granted hereunder by written notice to the defaulting party. Remedies shall be cumulative and there shall be no obligation to exercise a particular remedy.
39
+ 6.3. This Agreement and all licenses granted herein shall automatically terminate upon the termination or expiration of the applicable Service Agreement.
40
+ 6.4. Within thirty (30) days after termination of this Agreement, Licensee shall certify in writing to TrueAction that Licensee has ceased use of the Extension and that all copies of the Extension in any form, including partial copies, have been destroyed.
41
+
42
+ 7. Warranty
43
+ 7.1. Warranty. TrueAction warrants for a single period of ninety (90) days commencing upon TrueAction's electronic delivery of the Extension to Licensee that the Extension will in all material respects perform the functions described in the specifications contained in the documentation provided with the Extension. TrueAction will use commercially reasonable efforts to undertake to correct any reported and verifiable error, which shall be TrueAction's entire liability and Licensee's exclusive remedy for errors. TrueAction does not warrant that the Extension will meet Licensee's requirements, that the Extension will operate in the combinations which Licensee may select for use, that the operation of the Extension will be uninterrupted or error-free, or that all error conditions will be corrected. EXCEPT AS PROVIDED IN THIS SECTION ALL SOFTWARE PROVIDED HEREUNDER IS PROVIDED "AS IS".
44
+ 7.2. DISCLAIMER . THE EXPRESS WARRANTIES SET FORTH IN THIS SECTION 7 ARE THE ONLY WARRANTIES MADE BY TRUEACTION WITH RESPECT TO THE EXTENSION PROVIDED BY TRUEACTION. TRUEACTION MAKES NO OTHER WARRANTIES, EXPRESS, IMPLIED OR ARISING BY CUSTOM OR TRADE USAGE, AND, SPECIFICALLY, MAKES NO WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE. TRUEACTION'S EXPRESS WARRANTIES SHALL NOT BE ENLARGED, DIMINISHED OR AFFECTED BY, AND NO OBLIGATION OR LIABILITY SHALL ARISE OUT OF, TRUEACTION RENDERING TECHNICAL OR OTHER ADVICE OR SERVICE IN CONNECTION WITH THE EXTENSION.
45
+
46
+ 8. Limitation of Liability
47
+ 8.1. LIABILITY EXCLUSIONS. NOTHING IN THIS AGREEMENT SHALL EXCLUDE OR LIMIT EITHER PARTY'S LIABILITY FOR BREACH OF THE LICENSES OR RELATED RESTRICTIONS CONTAINED HEREIN OR ANY LIABILITY WHICH CANNOT BE EXCLUDED OR LIMITED BY APPLICABLE LAW. SAVE FOR THE FOREGOING, NEITHER PARTY ACCEPTS AND EACH PARTY HEREBY EXCLUDES ANY LIABILITY FOR LOSS OF OR DAMAGE TO TANGIBLE PROPERTY OTHER THAN THAT CAUSED BY ITS NEGLIGENCE AND HEREBY EXCLUDES ANY OTHER LIABILITY FOR NEGLIGENCE ARISING PURSUANT TO THE TERMS OF THIS AGREEMENT. UNDER NO CIRCUMSTANCES WILL EITHER PARTY BE LIABLE FOR: LOSS OF REVENUE; LOSS OF ACTUAL OR ANTICIPATED PROFITS; LOSS OF CONTRACTS; LOSS OF THE USE OF MONEY; LOSS OF ANTICIPATED SAVINGS; LOSS OF BUSINESS; LOSS OF OPPORTUNITY; LOSS OF GOODWILL; LOSS OF REPUTATION; LOSS OF, DAMAGE TO OR CORRUPTION OF DATA; OR CONSEQUENTIAL OR INDIRECT LOSS OR SPECIAL, PUNITIVE, OR INCIDENTAL DAMAGES (INCLUDING, FOR THE AVOIDANCE OF DOUBT, WHERE SUCH LOSS OR DAMAGE IS ALSO OF A CATEGORY OF LOSS OR DAMAGE ALREADY LISTED), WHETHER FORESEEABLE OR UNFORESEEABLE, BASED ON CLAIMS OF LICENSEE, TRUEACTION OR ANY THIRD PARTY ARISING OUT OF ANY BREACH OR FAILURE OF EXPRESS OR IMPLIED WARRANTY CONDITIONS OR OTHER TERM, BREACH OF CONTRACT, MISREPRESENTATION, NEGLIGENCE, OTHER LIABILITY IN TORT, FAILURE OF ANY REMEDY TO ACHIEVE ITS ESSENTIAL PURPOSE, OR OTHERWISE.
48
+
49
+ 8.2. LIABILITY CAP. NOTWITHSTANDING THE FORM (E.G., CONTRACT, TORT, OR OTHERWISE) IN WHICH ANY LEGAL OR EQUITABLE ACTION MAY BE BROUGHT, IN NO EVENT WILL TRUEACTION OR ITS SUPPLIERS BE LIABLE FOR DAMAGES, RESTITUTION OR LOSSES, THAT EXCEED, IN THE AGGREGATE, FOR EACH RESPECTIVE BREACH OR SERIES OF RELATED BREACHES, THE LESSER OF $5,000 OR THE AMOUNT OF FEES PAID BY LICENSEE FOR THE EXTENSION LICENSE IN THE TWELVE (12) MONTH PERIOD PRIOR TO THE DATE ON WHICH THE EVENT GIVING RISE TO SUCH DAMAGES OR LOSSES OCCURRED.
50
+
51
+ 9. Support Services
52
+ No support services are provided under this Agreement. Any support services provided to Licensee will be provided pursuant to a Service Agreement through the applicable GSI Company.
53
+
54
+ 10. Joint Marketing Activities
55
+ The parties agree to undertake the joint marketing activities set forth in Schedule A (Joint Marketing Activities).
56
+
57
+ 11. Notices
58
+ All notices shall be in writing and sent by first class mail or overnight mail (or courier), transmitted by facsimile (if confirmed by such mailing), or email, to the addresses indicated on the first page of this Agreement, or such other address as either party may indicate by at least ten (10) days prior written notice to the other party. Notices to TrueAction shall be sent to the attention of the General Counsel.
59
+
60
+ 12. Assignment
61
+ Licensee may not assign this Agreement without the prior written consent of TrueAction; provided that such consent shall not be required for assignment to a purchaser of all or substantially all of the assets or equity securities of Licensee who undertakes in writing to be bound by all the terms and conditions of this Agreement. Any prohibited assignment shall be null and void.
62
+
63
+ 13. Entire Agreement
64
+ This Agreement is the complete and exclusive agreement between the parties, which supersedes all proposals or prior agreements, oral or written, including any other online (click-through) agreement which Licensee may have accepted in conjunction with the downloading of the Extension, and all other communications between the parties relating to the subject matter hereof. No purchase order, other ordering document or any hand written or typewritten text or email which purports to modify or supplement the printed text hereof or any executed agreement with any GSI Company other than TrueAction shall add to or vary the terms thereof. Except as contained in a writing signed by both parties, all such proposed variations or additions are objected to and shall have no force or effect.
65
+
66
+ 14. General
67
+ This Agreement is made in and shall be governed by the laws of the State of New York, excluding choice of law principles. All proceedings shall be conducted in English. Venue for all proceedings shall be the state and federal courts located in New York, New York, provided that TrueAction may seek injunctive relief in any court of competent jurisdiction. The United Nations Convention for the International Sale of Goods shall not apply. The section headings herein are provided for convenience only and have no substantive effect on the construction of this Agreement. Except for Licensee's license restrictions herein, neither party shall be liable for any failure to perform due to causes beyond its reasonable control. If any provision of this Agreement is held to be unenforceable, this Agreement shall be construed without such provision. The failure by a party to exercise any right hereunder shall not operate as a waiver of such party's right to exercise such right or any other right in the future. This Agreement may be amended only by a written document executed by a duly authorized representative of each of the parties. The parties agree to receive electronic documents and accept electronic signatures (information attached or logically associated with such document and clicked or otherwise adopted with an intent to sign) including in counterparts which shall be valid substitutes for paper-based documents and signatures, and the legal validity of a transaction will not be denied on the ground that it is not in writing.
68
+
69
+ 15. Definitions
70
+ "Updates" means all published revisions and corrections to the printed documentation and corrections and new releases of the Extension which are generally made available to TrueAction's supported customers at no additional cost or for media and handling charges only. Updates shall not include any options or future products which TrueAction sells separately.
71
+
72
+ SCHEDULE A
73
+ TRUEACTION EXTENSION
74
+ JOINT MARKETING ACTIVITIES
75
+ These Joint Marketing Activities are referenced in and incorporated into the End User License Agreement between GSI Interactive, Inc. ("TrueAction") and ("Licensee"), dated July 10, 2012 (the "Agreement").
76
+ 1. Press Releases. Licensee agrees to permit TrueAction to issue a press releases at (i) contract execution announcing the selection of the Extension(s), and (ii) at launch of GSI Services. Licensee will have the right to approve the release in advance, but such approval will not be unreasonably delayed or withheld.
77
+ 2. Use of Licensee Logo. TrueAction shall be permitted to include Licensee's logo on TrueAction's website (including its social media pages) as well as in connection with the Magento Connect website and in printed marketing material.
78
+ 3. Interview. Licensee agrees to designate one of its founders and/or executives to participate in a video and/or written interview to promote the TrueAction Extension.
79
+ 4. Case Study. The parties shall jointly issue a case study based on such use. Licensee's site may be showcased on TrueAction's website.
80
+ 5. Reference. Licensee's employees shall make themselves available to be a reference for the Extension and will provide quotations about how the Extension has contributed to the success of their site or product.
81
+ 6. Other. Additional joint marketing activities may be developed based upon mutual agreement.
app/code/community/TrueAction/ClearSaleing/controllers/Adminhtml/Clearsaleing/RegisterController.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @category TrueAction
4
+ * @package TrueAction_ClearSaleing
5
+ * @copyright Copyright (c) 2012 True Action Network (http://www.trueaction.com)
6
+ */
7
+
8
+ class TrueAction_ClearSaleing_Adminhtml_ClearSaleing_RegisterController extends Mage_Adminhtml_Controller_Action
9
+ {
10
+ public function indexAction()
11
+ {
12
+ $this->loadLayout();
13
+ $this->renderLayout();
14
+ }
15
+ }
app/code/community/TrueAction/ClearSaleing/etc/adminhtml.xml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ /**
4
+ * @category TrueAction
5
+ * @package TrueAction_ClearSaleing
6
+ * @copyright Copyright (c) 2012 True Action Network (http://www.trueaction.com)
7
+ */
8
+ -->
9
+ <config>
10
+ <acl>
11
+ <resources>
12
+ <admin>
13
+ <children>
14
+ <system>
15
+ <children>
16
+ <config>
17
+ <children>
18
+ <analytics>
19
+ <title>Analytics</title>
20
+ </analytics>
21
+ </children>
22
+ </config>
23
+ </children>
24
+ </system>
25
+ </children>
26
+ </admin>
27
+ </resources>
28
+ </acl>
29
+ </config>
app/code/community/TrueAction/ClearSaleing/etc/config.xml ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ /**
4
+ * @category TrueAction
5
+ * @package TrueAction_ClearSaleing
6
+ * @copyright Copyright (c) 2012 True Action Network (http://www.trueaction.com)
7
+ */
8
+ -->
9
+ <config>
10
+ <modules>
11
+ <TrueAction_ClearSaleing>
12
+ <version>1.0.0</version>
13
+ </TrueAction_ClearSaleing>
14
+ </modules>
15
+ <global>
16
+ <blocks>
17
+ <clearsaleing>
18
+ <class>TrueAction_ClearSaleing_Block</class>
19
+ </clearsaleing>
20
+ </blocks>
21
+ <helpers>
22
+ <clearsaleing>
23
+ <class>TrueAction_ClearSaleing_Helper</class>
24
+ </clearsaleing>
25
+ </helpers>
26
+ </global>
27
+ <frontend>
28
+ <layout>
29
+ <updates>
30
+ <clearsaleing>
31
+ <file>clearsaleing.xml</file>
32
+ </clearsaleing>
33
+ </updates>
34
+ </layout>
35
+ </frontend>
36
+ <adminhtml>
37
+ <layout>
38
+ <updates>
39
+ <clearsaleing>
40
+ <file>clearsaleing.xml</file>
41
+ </clearsaleing>
42
+ </updates>
43
+ </layout>
44
+ </adminhtml>
45
+ <admin>
46
+ <routers>
47
+ <adminhtml>
48
+ <args>
49
+ <modules>
50
+ <TrueAction_ClearSaleing before="Mage_Adminhtml">TrueAction_ClearSaleing_Adminhtml</TrueAction_ClearSaleing>
51
+ </modules>
52
+ </args>
53
+ </adminhtml>
54
+ </routers>
55
+ </admin>
56
+ <default>
57
+ <analytics>
58
+ <clearsaleing>
59
+ <registration>
60
+ <target_capability_name>ClearSaleing</target_capability_name>
61
+ <store_endpoint_url />
62
+ <registration_url><![CDATA[https://devportal.x.com/merchant_onboarding/]]></registration_url>
63
+ <legal_agreement_url><![CDATA[http://www.clearsaleing.com/terms/]]></legal_agreement_url>
64
+ </registration>
65
+ </clearsaleing>
66
+ </analytics>
67
+ </default>
68
+ </config>
app/code/community/TrueAction/ClearSaleing/etc/system.xml ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ /**
4
+ * @category TrueAction
5
+ * @package TrueAction_ClearSaleing
6
+ * @copyright Copyright (c) 2012 True Action Network (http://www.trueaction.com)
7
+ */
8
+ -->
9
+ <config>
10
+ <tabs>
11
+ <marketing translate="label" module="clearsaleing">
12
+ <label>Marketing</label>
13
+ <sort_order>99999</sort_order>
14
+ </marketing>
15
+ </tabs>
16
+ <sections>
17
+ <analytics>
18
+ <label>Analytics</label>
19
+ <tab>marketing</tab>
20
+ <frontend_type>text</frontend_type>
21
+ <sort_order>100</sort_order>
22
+ <show_in_default>1</show_in_default>
23
+ <show_in_website>1</show_in_website>
24
+ <show_in_store>1</show_in_store>
25
+ <groups>
26
+ <clearsaleing translate="label">
27
+ <label>ClearSaleing</label>
28
+ <frontend_type>text</frontend_type>
29
+ <sort_order>1</sort_order>
30
+ <show_in_default>1</show_in_default>
31
+ <show_in_website>1</show_in_website>
32
+ <show_in_store>1</show_in_store>
33
+ <fields>
34
+ <register_button>
35
+ <label>Register</label>
36
+ <frontend_model>clearsaleing/adminhtml_system_form_renderer_config_registerButton</frontend_model>
37
+ <comment><![CDATA[To enable this channel, you must register the ClearSaleing extension. A new window will appear and take you to x.com to complete your registration.<br />Log in with the same credentials you used when you registered for the Fabric at the System menu, under "Configuration".]]></comment>
38
+ <button_label>Register with X.commerce</button_label>
39
+ <button_url><![CDATA[*/clearsaleing_register/index]]></button_url>
40
+ <sort_order>20</sort_order>
41
+ <show_in_default>1</show_in_default>
42
+ <show_in_website>0</show_in_website>
43
+ <show_in_store>0</show_in_store>
44
+ </register_button>
45
+ <setup_text translate="label comment">
46
+ <label>Configuration</label>
47
+ <frontend_model>clearsaleing/adminhtml_system_form_renderer_config_headingComment</frontend_model>
48
+ <comment><![CDATA[This extension requres you to have an account with ClearSaleing. If you do not have an account or do not know the account information to enter below, please contact <a href="http://www.clearsaleing.com/contact/" target="_blank">ClearSaleing</a> for details.]]></comment>
49
+ <sort_order>130</sort_order>
50
+ <show_in_default>1</show_in_default>
51
+ <show_in_website>0</show_in_website>
52
+ <show_in_store>0</show_in_store>
53
+ </setup_text>
54
+ <enabled translate="label">
55
+ <label>Enable ClearSaleing</label>
56
+ <frontend_type>select</frontend_type>
57
+ <source_model>adminhtml/system_config_source_yesno</source_model>
58
+ <sort_order>140</sort_order>
59
+ <show_in_default>1</show_in_default>
60
+ <show_in_website>1</show_in_website>
61
+ <show_in_store>1</show_in_store>
62
+ </enabled>
63
+ <account_id translate="label">
64
+ <label>ClearSaleing Account Id</label>
65
+ <frontend_type>text</frontend_type>
66
+ <sort_order>150</sort_order>
67
+ <show_in_default>1</show_in_default>
68
+ <show_in_website>1</show_in_website>
69
+ <show_in_store>1</show_in_store>
70
+ </account_id>
71
+ </fields>
72
+ </clearsaleing>
73
+ </groups>
74
+ </analytics>
75
+ </sections>
76
+ </config>
app/design/adminhtml/default/default/layout/clearsaleing.xml ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * @category design
5
+ * @package default_design
6
+ * @copyright Copyright (c) 2012 True Action Network (http://www.trueaction.com)
7
+ */
8
+ -->
9
+ <layout>
10
+ <adminhtml_clearsaleing_register_index>
11
+ <reference name="root">
12
+ <action method="setTemplate"><template>clearsaleing/register/view.phtml</template></action>
13
+ </reference>
14
+ </adminhtml_clearsaleing_register_index>
15
+ </layout>
app/design/adminhtml/default/default/template/clearsaleing/register/view.phtml ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @category design
4
+ * @package default_default
5
+ * @copyright Copyright (c) 2012 True Action Network (http://www.trueaction.com)
6
+ */
7
+ ?>
8
+ <!DOCTYPE HTML>
9
+ <html lang="en-US">
10
+ <head>
11
+ <meta charset="UTF-8" />
12
+ <title><?php echo $this->__('Please wait') ?></title>
13
+ </head>
14
+ <body>
15
+ <?php /** @var $_helper TrueAction_ClearSaleing_Helper_Xfabric */ ?>
16
+ <?php $_helper = $this->helper('clearsaleing/xfabric'); ?>
17
+ <form id="xcom_registration" action="<?php echo $_helper->getRegistrationRequestUrl() ?>" method="post" enctype="multipart/form-data">
18
+ <input type="hidden" name="onboarding_info" value="<?php echo $_helper->getRegistrationRequest()->getOnboardingInfo() ?>" />
19
+ </form>
20
+ <script type="text/javascript">
21
+ document.forms['xcom_registration'].submit();
22
+ </script>
23
+ </body>
24
+ </html>
app/design/adminhtml/default/default/template/clearsaleing/system/config/register_button.phtml ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @category design
4
+ * @package default_default
5
+ * @copyright Copyright (c) 2012 True Action Network (http://www.trueaction.com)
6
+ * @var $this = TrueAction_ClearSaleing_Block_Adminhtml_System_Form_Renderer_Config_RegisterButton
7
+ */
8
+ ?>
9
+ <h4 id="heading_<?php echo $this->getHtmlId() ?>"><?php echo $this->getElementLabel() ?></h4>
10
+ <div id="system-fieldset-sub-head-comment"><?php echo $this->getElementComment() ?></div>
11
+ <div>
12
+ <button class="scalable add" type="button" id="<?php echo $this->getHtmlId() ?>">
13
+ <span><?php echo $this->escapeHtml($this->getButtonLabel()); ?></span>
14
+ </button>
15
+ </div>
16
+ <script type="text/javascript">
17
+ //<![CDATA[
18
+ var XFabricExtensionRegistration = Class.create();
19
+ XFabricExtensionRegistration.prototype = {
20
+ initialize: function() {
21
+ this.redirectURL = '<?php echo $this->getUrl($this->getButtonUrl())?>';
22
+ this.buttonId = '<?php echo $this->getHtmlId() ?>';
23
+ this.popupWindow = null;
24
+
25
+ $(this.buttonId).observe('click', this.openWindow.bindAsEventListener(this));
26
+ },
27
+
28
+ openWindow: function() {
29
+ if (this.popupWindow == null || this.popupWindow.closed) {
30
+ this.popupWindow = window.open(this.redirectURL, 'ExtensionRegistartion', 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, ,left=100, top=100, width=815, height=640');
31
+ }
32
+ else {
33
+ this.popupWindow.focus();
34
+ }
35
+ if (typeof this.intervalID == "number") {
36
+ window.clearInterval(this.intervalID);
37
+ delete this.intervalID;
38
+ }
39
+ this.intervalID = window.setInterval(function(){this.checkWindow();}.bind(this), 500);
40
+ return false;
41
+ },
42
+
43
+ checkWindow: function() {
44
+ if (this.popupWindow != null && this.popupWindow.closed) {
45
+ window.clearInterval(this.intervalID);
46
+ delete this.intervalID;
47
+ window.location.reload(true);
48
+ }
49
+ }
50
+ };
51
+ var registrationExtension = new XFabricExtensionRegistration();
52
+ //]]>
53
+ </script>
app/design/frontend/base/default/layout/clearsaleing.xml ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * @category TrueAction
5
+ * @package TrueAction_ClearSaleing
6
+ * @copyright Copyright (c) 2012 True Action Network (http://www.trueaction.com)
7
+ */
8
+ -->
9
+
10
+ <layout version="0.1.0">
11
+ <default>
12
+ <reference name="before_body_end">
13
+ <block type="clearsaleing/beacon" name="clearsaleing.beacon" template="clearsaleing/beacon.phtml"/>
14
+ </reference>
15
+ </default>
16
+
17
+ <catalogsearch_result_index>
18
+ <reference name="clearsaleing.beacon">
19
+ <block type="clearsaleing/beacon_searchresults" name="clearsaleing.beacon.searchResults" template="clearsaleing/beacon/searchResults.phtml"/>
20
+ </reference>
21
+ </catalogsearch_result_index>
22
+
23
+ <checkout_clearsaleing_success translate="label">
24
+ <reference name="clearsaleing.beacon">
25
+ <block type="clearsaleing/beacon_order" name="clearsaleing.beacon.order" template="clearsaleing/beacon/order.phtml"/>
26
+ </reference>
27
+ </checkout_clearsaleing_success>
28
+
29
+ <checkout_onepage_success translate="label">
30
+ <label>Onepage Checkout Success</label>
31
+ <update handle="checkout_clearsaleing_success"/>
32
+ </checkout_onepage_success>
33
+
34
+ <checkout_multishipping_success translate="label">
35
+ <label>Multishipping Checkout Success</label>
36
+ <update handle="checkout_clearsaleing_success"/>
37
+ </checkout_multishipping_success>
38
+ </layout>
app/design/frontend/base/default/template/clearsaleing/beacon.phtml ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @category TrueAction
4
+ * @package TrueAction_ClearSaleing
5
+ * @copyright Copyright (c) 2012 True Action Network (http://www.trueaction.com)
6
+ * @var $this = TrueAction_ClearSaleing_Block_Beacon
7
+ */
8
+ ?>
9
+ <?php if ($this->showBeacon()):?>
10
+ <script>
11
+ var csAccountID = <?php echo json_encode($this->getAccountId())?>,
12
+ <?php echo $this->getChildHtml()?>
13
+ csAjaxTracking = true;
14
+ (function (d,s) {
15
+ s=d.getElementsByTagName('head')[0].appendChild(d.createElement('script'));
16
+ s.src='<?php echo $this->getBeaconUrl()?>';
17
+ }(document));
18
+ </script>
19
+ <?php endif?>
app/design/frontend/base/default/template/clearsaleing/beacon/order.phtml ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @category TrueAction
4
+ * @package TrueAction_ClearSaleing
5
+ * @copyright Copyright (c) 2012 True Action Network (http://www.trueaction.com)
6
+ * @var $this = TrueAction_ClearSaleing_Block_Beacon_Order
7
+ */
8
+ ?>
9
+ csOrderType = 'Order',
10
+ csChannel = 'Web',
11
+ csSalesStageCode = 'Closed/Won',
12
+ csOrderNum = <?php echo json_encode($this->getOrderNumber())?>,
13
+ csCustKey = <?php echo json_encode($this->getCustomerKey())?>,
14
+ csCity = <?php echo json_encode($this->getOrderCity())?>,
15
+ csState = <?php echo json_encode($this->getOrderState())?>,
16
+ csPostalCode = <?php echo json_encode($this->getOrderZip())?>,
17
+ csCountryCode = <?php echo json_encode($this->getOrderCountry())?>,
18
+ csCurrencyCd = <?php echo json_encode($this->getOrderCurrency())?>,
19
+ csOrderSubTotal = <?php echo json_encode($this->getOrderSubtotal())?>,
20
+ csOrderDiscount = <?php echo json_encode($this->getOrderDiscount())?>,
21
+ csShipping = <?php echo json_encode($this->getOrderShipping())?>,
22
+ csTax = <?php echo json_encode($this->getOrderTax())?>,
23
+ csOrderTotal = <?php echo json_encode($this->getOrderTotal())?>,
24
+ csIds = <?php echo $this->getProductIdsToJSArray()?>,
25
+ csPrice = <?php echo $this->getProductPriceToJSArray()?>,
26
+ csQtys = <?php echo $this->getProductQtyToJSArray()?>,
27
+ csItems = <?php echo $this->getProductItemToJSArray()?>,
28
+ csCodes = <?php echo $this->getProductSKUsToJSArray()?>,
app/design/frontend/base/default/template/clearsaleing/beacon/searchResults.phtml ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @category TrueAction
4
+ * @package TrueAction_ClearSaleing
5
+ * @copyright Copyright (c) 2012 True Action Network (http://www.trueaction.com)
6
+ * @var $this = TrueAction_ClearSaleing_Block_Beacon_SearchResults
7
+ */
8
+ ?>
9
+ <?php // vars will need to leak into global scope so no var keywork ?>
10
+ csSiteSearchTerm = <?php echo json_encode($this->getSiteSearchTerm())?>,
11
+ csSiteSearchResultCount = <?php echo json_encode($this->countSiteSearchResults())?>,
app/etc/modules/TrueAction_ClearSaleing.xml ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * @category TrueAction
5
+ * @package TrueAction_ClearSaleing
6
+ * @copyright Copyright (c) 2012 True Action Network (http://www.trueaction.com)
7
+ */
8
+ -->
9
+ <config>
10
+ <modules>
11
+ <TrueAction_ClearSaleing>
12
+ <active>true</active>
13
+ <codePool>community</codePool>
14
+ <depends>
15
+ <Xcom_Xfabric />
16
+ </depends>
17
+ </TrueAction_ClearSaleing>
18
+ </modules>
19
+ </config>
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>ClearSaleing</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://media.trueaction.com/magento/LICENSE.TXT">GSI Commerce End User License Agreement</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>ClearSaleing is an industry leading advertising analytics and attribution platform.</summary>
10
+ <description>ClearSaleing enables innovative marketers and agencies to achieve competitive dominance, increased sales volume and improved return on investment through a leading edge solution offering data insights across the entire digital marketing spectrum. With a highly scientific basis, and a user-friendly interface, the ClearSaleing platform delivers advanced analytics and attribution solutions customized to each client&#x2019;s unique needs and channel mix, including cohesive measurement of paid search, shopping comparison engines, display media, email marketing, social media and more.</description>
11
+ <notes>Initial Release.</notes>
12
+ <authors><author><name>True Action ClearSaleing</name><user>trueaction_cs</user><email>clearsaleing@trueaction.com</email></author></authors>
13
+ <date>2012-07-10</date>
14
+ <time>22:50:38</time>
15
+ <contents><target name="magecommunity"><dir name="TrueAction"><dir name="ClearSaleing"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Form"><dir name="Renderer"><dir name="Config"><file name="HeadingComment.php" hash="c7d67de25428ceb3636bb41e1fa30b86"/><file name="RegisterButton.php" hash="ae122f8df149e3388a9c04b939917489"/></dir></dir></dir></dir></dir><dir name="Beacon"><file name="Order.php" hash="0753adba821e924c76b85bdfe9078c4a"/><file name="Searchresults.php" hash="c6b18628388b4052ecfe4d4920f49bf7"/></dir><file name="Beacon.php" hash="58ffbe81a27322848df250edc8c86685"/></dir><dir name="Helper"><file name="Data.php" hash="f978e2999765596d8b4644a3e19cff71"/><file name="Xfabric.php" hash="25c0345c70f05129bca5c367a6b9fa5f"/></dir><file name="LICENSE.TXT" hash="90f4fc90c81a1ca036fad0087c9c7dee"/><dir name="controllers"><dir name="Adminhtml"><dir name="Clearsaleing"><file name="RegisterController.php" hash="ac90a6aa86f6027b46ab9132ae741e2d"/></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="8691b4500c1df2bb8f0911a94bf032bb"/><file name="config.xml" hash="86091c12a259bc714388deb9d9f8a515"/><file name="system.xml" hash="e9be241743220bc3c068f5e6c5c0cb13"/></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="clearsaleing.xml" hash="cc31c0e66b0dc5ef24643b9afcbf893d"/></dir><dir name="template"><dir name="clearsaleing"><dir name="register"><file name="view.phtml" hash="fac813093675d44a2a6eed0dc0eb33c3"/></dir><dir name="system"><dir name="config"><file name="register_button.phtml" hash="49a84a49c3a1319827c48b21a0e181cb"/></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="clearsaleing.xml" hash="74ca85dd0acf4b3605cd47fa67b0d093"/></dir><dir name="template"><dir name="clearsaleing"><dir name="beacon"><file name="order.phtml" hash="9f5c70595a86035a2c0b919ffa9cb0fc"/><file name="searchResults.phtml" hash="f8a2e2f2c40aeb306b70c832b95641b6"/></dir><file name="beacon.phtml" hash="7131fc256b617b841489394dfb2d6cf2"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="TrueAction_ClearSaleing.xml" hash="a8337f4c3ec822f215ea79b830fc586f"/></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><package><name>xintegrationpack</name><channel>community</channel><min>1.0.0</min><max>1.0.9</max></package><extension><name>Core</name><min></min><max></max></extension></required></dependencies>
18
+ </package>