Version Notes
The ChannelUnity connector kit for Magento.
Download this release
Release Info
Developer | Magento Core Team |
Extension | Camiloo_Channelunity |
Version | 1.0.0.17 |
Comparing to | |
See all releases |
Code changes from version 1.0.0.16 to 1.0.0.17
app/code/community/Camiloo/Channelunity/controllers/ApiController.php.old.php
DELETED
@@ -1,120 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class Camiloo_Channelunity_ApiController extends Mage_Core_Controller_Front_Action
|
4 |
-
{
|
5 |
-
private function terminate($message) {
|
6 |
-
|
7 |
-
echo '<?xml version="1.0" encoding="utf-8" ?>';
|
8 |
-
echo ' <ChannelUnity>';
|
9 |
-
echo ' <Status>'.$message.'</Status>';
|
10 |
-
echo ' </ChannelUnity>';
|
11 |
-
die;
|
12 |
-
}
|
13 |
-
|
14 |
-
|
15 |
-
/**
|
16 |
-
* This is the main API beacon for the connector module
|
17 |
-
* It will verify the request the pass it onto the model
|
18 |
-
**/
|
19 |
-
public function indexAction(){
|
20 |
-
|
21 |
-
$xml = $this->getRequest()->getPost('xml');
|
22 |
-
if (!isset($xml)) {
|
23 |
-
|
24 |
-
$this->terminate("Error - could not find XML within request");
|
25 |
-
|
26 |
-
} else {
|
27 |
-
$xml = urldecode($xml);
|
28 |
-
|
29 |
-
// load the XML into the simplexml parser
|
30 |
-
$xml = simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA);
|
31 |
-
|
32 |
-
// we now need to verify that this message is genuine. We do this by calling
|
33 |
-
// to ChannelUnity HQ with just the contents of the signedmessage element in
|
34 |
-
// the XML message.
|
35 |
-
|
36 |
-
$payload = (string) $xml->Notification->Payload;
|
37 |
-
|
38 |
-
if ($payload == '') {
|
39 |
-
$payload = (string) $xml->Notification->payload;
|
40 |
-
}
|
41 |
-
|
42 |
-
|
43 |
-
// we pass the signedmessage, intact, to the ChannelUnity API
|
44 |
-
// by posting it as signedmessage. Verifypost will only return
|
45 |
-
// to the variable if the response was successful. It will fail
|
46 |
-
// on invalid messages, so we won't have to worry about that here.
|
47 |
-
// It will return a simplexml object too, so we can get straight
|
48 |
-
// down to work.
|
49 |
-
|
50 |
-
$payload = trim($payload);
|
51 |
-
|
52 |
-
if ($payload != '') {
|
53 |
-
$request = Mage::getModel('channelunity/products')->verifypost($payload);
|
54 |
-
}
|
55 |
-
else {
|
56 |
-
$request = "";
|
57 |
-
}
|
58 |
-
// RequestHeader contains the request type. Lets find out what type of request
|
59 |
-
// we are handling by creating a switch.
|
60 |
-
|
61 |
-
$type = (string) $xml->Notification->Type;
|
62 |
-
if ($type == '') {
|
63 |
-
$type = (string) $xml->Notification->type;
|
64 |
-
}
|
65 |
-
|
66 |
-
ini_set("display_errors","1");
|
67 |
-
error_reporting(E_ALL);
|
68 |
-
|
69 |
-
echo '<?xml version="1.0" encoding="utf-8" ?>';
|
70 |
-
echo ' <ChannelUnity>';
|
71 |
-
echo ' <RequestType>'.$type.'</RequestType>';
|
72 |
-
|
73 |
-
switch ($type) {
|
74 |
-
|
75 |
-
case "Ping":
|
76 |
-
Mage::getModel('channelunity/orders')->verifyMyself($request);
|
77 |
-
break;
|
78 |
-
|
79 |
-
case "OrderNotification":
|
80 |
-
Mage::getModel('channelunity/orders')->doUpdate($request);
|
81 |
-
break;
|
82 |
-
|
83 |
-
case "OrderDataUpdate":
|
84 |
-
|
85 |
-
break;
|
86 |
-
|
87 |
-
case "ProductData":
|
88 |
-
error_reporting(E_ALL);
|
89 |
-
ini_set("display_errors", "On");
|
90 |
-
$attributeStatus = Mage::getModel('channelunity/products')->postAttributesToCU();
|
91 |
-
Mage::getModel('channelunity/products')->postProductTypesToCU($request);
|
92 |
-
Mage::getModel('channelunity/products')->doRead($request);
|
93 |
-
|
94 |
-
break;
|
95 |
-
|
96 |
-
case "CartDataRequest":
|
97 |
-
|
98 |
-
// get URL out of the CartDataRequest
|
99 |
-
$myStoreURL = $xml->Notification->URL;
|
100 |
-
$storeStatus = Mage::getModel('channelunity/stores')->postStoresToCU($myStoreURL);
|
101 |
-
$categoryStatus = Mage::getModel('channelunity/categories')->postCategoriesToCU($myStoreURL);
|
102 |
-
$attributeStatus = Mage::getModel('channelunity/products')->postAttributesToCU();
|
103 |
-
|
104 |
-
echo "<StoreStatus>$storeStatus</StoreStatus>
|
105 |
-
<CategoryStatus>$categoryStatus</CategoryStatus>
|
106 |
-
<ProductAttributeStatus>$attributeStatus</ProductAttributeStatus>";
|
107 |
-
|
108 |
-
break;
|
109 |
-
|
110 |
-
}
|
111 |
-
|
112 |
-
echo ' </ChannelUnity>';
|
113 |
-
die;
|
114 |
-
}
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
}
|
119 |
-
|
120 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/adminhtml/default/default/template/channelunity/configheader.phtml
CHANGED
@@ -14,11 +14,13 @@
|
|
14 |
<div style="float:left;width:50%;text-align:left;"><img src="http://my.channelunity.com/culogoformodule.gif" /></div>
|
15 |
<div style="float:left;width:50%;text-align:right;">
|
16 |
<h3>ChannelUnity Integration for Magento</h3>
|
17 |
-
Devised and Developed in Manchester, UK by <a href="http://www.
|
18 |
<?php
|
19 |
-
|
|
|
20 |
$html = $xml->DisplayMessage[0];
|
21 |
echo $html;
|
|
|
22 |
?>
|
23 |
</div>
|
24 |
</div>
|
14 |
<div style="float:left;width:50%;text-align:left;"><img src="http://my.channelunity.com/culogoformodule.gif" /></div>
|
15 |
<div style="float:left;width:50%;text-align:right;">
|
16 |
<h3>ChannelUnity Integration for Magento</h3>
|
17 |
+
Devised and Developed in Manchester, UK by <a href="http://www.channelunity.com/?ref=cu_magento_module" target="_blank">ChannelUnity Limited</a><br />
|
18 |
<?php
|
19 |
+
/*
|
20 |
+
$xml = Mage::getModel('channelunity/checkforupdates')->getRemoteXMLFileData("http://my.channelunity.com/versioncheck.php?Version=1.0.0.17");
|
21 |
$html = $xml->DisplayMessage[0];
|
22 |
echo $html;
|
23 |
+
*/
|
24 |
?>
|
25 |
</div>
|
26 |
</div>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Camiloo_Channelunity</name>
|
4 |
-
<version>1.0.0.
|
5 |
<stability>stable</stability>
|
6 |
<license/>
|
7 |
<channel>community</channel>
|
@@ -12,8 +12,8 @@ Should you need any help getting started, please email support@channelunity.com.
|
|
12 |
<notes>The ChannelUnity connector kit for Magento.</notes>
|
13 |
<authors><author><name>ChannelUnity Limited</name><user>auto-converted</user><email>support@channelunity.com</email></author></authors>
|
14 |
<date>2015-12-10</date>
|
15 |
-
<time>15:
|
16 |
-
<contents><target name="magecommunity"><dir name="Camiloo"><dir name="Channelunity"><dir name="Block"><file name="Configheader.php" hash="3e8ac32de257ecff2631046941e6137e"/><file name="Paymentform.php" hash="fabdb31dc620cfb9ab61c8c725c17d9c"/><file name="Paymentinfo.php" hash="53895170d72a8dde7c8580be51057978"/></dir><dir name="Helper"><file name="Data.php" hash="3c92fe3908be9de73f04dbfd67539830"/></dir><dir name="Model"><file name="Abstract.php" hash="81485d6e0bcf978cff2a4ece2962c352"/><file name="Attributes.php" hash="e7e3c18496a4a33d0bb1cb56a0a2122e"/><file name="Categories.php" hash="8a45e805e20f2138194820bc5ea9f0d5"/><file name="Checkforupdates.php" hash="1059e54fb953d343dbbbf42a025148e8"/><file name="Collection.php" hash="2aa4e920044de962d1813a48defe29f1"/><file name="Customrate.php" hash="5bd3a98549764890c5b3ebc311e8c114"/><file name="Entity.php" hash="fc95b86e51597afad477cd09db5c8b4d"/><file name="Observer.php" hash="4837df027561b8482a87e22f62cf3e11"/><file name="Ordercreatebackport.php" hash="c2db4232b69e06a0f897a94735546cb4"/><file name="Orders.php" hash="e5000f854f655806a59a6ec644de76cf"/><file name="Payment.php" hash="40352086906a6a09ca220605706d62d4"/><file name="Paymentinfo.php" hash="5ae85a0e16183b3b2ee35aad71c722d8"/><file name="Paymentmethoduk.php" hash="d03558fd4886a68e8b2d618dbd64e19f"/><file name="Products.php" hash="5001579e4051846bca4246384d3e6726"/><file name="Stores.php" hash="67cacf0dd8ef1f8baa8ee706e9014e3e"/></dir><dir name="controllers"><file name="ApiController.php" hash="c0817b82a4092a25f27f21b95c9873d3"
|
17 |
<compatible/>
|
18 |
<dependencies/>
|
19 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Camiloo_Channelunity</name>
|
4 |
+
<version>1.0.0.17</version>
|
5 |
<stability>stable</stability>
|
6 |
<license/>
|
7 |
<channel>community</channel>
|
12 |
<notes>The ChannelUnity connector kit for Magento.</notes>
|
13 |
<authors><author><name>ChannelUnity Limited</name><user>auto-converted</user><email>support@channelunity.com</email></author></authors>
|
14 |
<date>2015-12-10</date>
|
15 |
+
<time>15:29:11</time>
|
16 |
+
<contents><target name="magecommunity"><dir name="Camiloo"><dir name="Channelunity"><dir name="Block"><file name="Configheader.php" hash="3e8ac32de257ecff2631046941e6137e"/><file name="Paymentform.php" hash="fabdb31dc620cfb9ab61c8c725c17d9c"/><file name="Paymentinfo.php" hash="53895170d72a8dde7c8580be51057978"/></dir><dir name="Helper"><file name="Data.php" hash="3c92fe3908be9de73f04dbfd67539830"/></dir><dir name="Model"><file name="Abstract.php" hash="81485d6e0bcf978cff2a4ece2962c352"/><file name="Attributes.php" hash="e7e3c18496a4a33d0bb1cb56a0a2122e"/><file name="Categories.php" hash="8a45e805e20f2138194820bc5ea9f0d5"/><file name="Checkforupdates.php" hash="1059e54fb953d343dbbbf42a025148e8"/><file name="Collection.php" hash="2aa4e920044de962d1813a48defe29f1"/><file name="Customrate.php" hash="5bd3a98549764890c5b3ebc311e8c114"/><file name="Entity.php" hash="fc95b86e51597afad477cd09db5c8b4d"/><file name="Observer.php" hash="4837df027561b8482a87e22f62cf3e11"/><file name="Ordercreatebackport.php" hash="c2db4232b69e06a0f897a94735546cb4"/><file name="Orders.php" hash="e5000f854f655806a59a6ec644de76cf"/><file name="Payment.php" hash="40352086906a6a09ca220605706d62d4"/><file name="Paymentinfo.php" hash="5ae85a0e16183b3b2ee35aad71c722d8"/><file name="Paymentmethoduk.php" hash="d03558fd4886a68e8b2d618dbd64e19f"/><file name="Products.php" hash="5001579e4051846bca4246384d3e6726"/><file name="Stores.php" hash="67cacf0dd8ef1f8baa8ee706e9014e3e"/></dir><dir name="controllers"><file name="ApiController.php" hash="c0817b82a4092a25f27f21b95c9873d3"/></dir><dir name="etc"><file name="config.xml" hash="d1f11f74fc3f651bca80223c92f9c9ea"/><file name="system.xml" hash="e28563b67338d75cf60a94d2fd9f850a"/></dir><dir name="sql"><dir name="channelunity_setup"><file name="install-1.0.0.php" hash="b57eef321edab5b5563133bad997a21c"/><file name="mysql4-install-0.0.1.php" hash="6884471a4d5a25afe17597df2d49dcf2"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Camiloo_Channelunity.xml" hash="cccfbce64ee176372c5afecb8676fab0"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="channelunity"><file name="configheader.phtml" hash="db63713569d98dd7683d3d58daad7728"/><file name="paymentinfo.phtml" hash="76caa9ce9fbe2d6e044c0504a07b1094"/></dir></dir></dir></dir></dir></target></contents>
|
17 |
<compatible/>
|
18 |
<dependencies/>
|
19 |
</package>
|