Version Notes
Fixed bug in api that caused improper loading of configurable products.
Download this release
Release Info
Developer | nChannel |
Extension | nChannel_Communicator |
Version | 0.1.12 |
Comparing to | |
See all releases |
Code changes from version 0.1.11 to 0.1.12
app/code/community/Nchannel/Communicator/Model/Productutility/Api/V2.php
CHANGED
@@ -6,15 +6,17 @@ class Nchannel_Communicator_Model_Productutility_Api_V2 extends Nchannel_Communi
|
|
6 |
Mage::log("LinkConfigurable fired!" . $url, null, 'nChannel_Communicator.log');
|
7 |
return "Hello World! My argument is : " . $configurableProductID;
|
8 |
}
|
9 |
-
|
10 |
Mage::log('attachProductToConfigurable: sku ' . $childSku,null,'nChannel_Communicator.log');
|
11 |
Mage::log('attachProductToConfigurable: pid ' . $configurableProductID,null,'nChannel_Communicator.log');
|
12 |
-
$
|
13 |
-
$
|
|
|
|
|
|
|
14 |
$product = Mage::getModel('catalog/product')->loadByAttribute('sku',$childSku);
|
15 |
|
16 |
$ids = Mage::getModel('catalog/product_type_configurable')->getChildrenIds($configurableProductID);
|
17 |
-
|
18 |
$newids = array();
|
19 |
Mage::log('attachProductToConfigurable: current child product id output: ' . $product->getId(),null,'nChannel_Communicator.log');
|
20 |
|
@@ -31,12 +33,11 @@ class Nchannel_Communicator_Model_Productutility_Api_V2 extends Nchannel_Communi
|
|
31 |
try{
|
32 |
Mage::log('attachProductToConfigurable: Saving Products', null, 'nChannel_Communicator.log');
|
33 |
Mage::log('attachProductToConfigurable: Configurable Product ID: ' . print_r($configurableProduct->getId(),true),null, 'nChannel_Communicator.log');
|
34 |
-
Mage::log('attachProductToConfigurable: Configurable Product Type: ' . print_r($configurableProduct->getTypeInstance(),true),null, 'nChannel_Communicator.log');
|
35 |
$loader->saveProducts( $configurableProduct, array_keys( $newids ) );
|
36 |
} catch(exception $ex)
|
37 |
{
|
38 |
array_pop($newids);
|
39 |
-
$loader->saveProducts( $
|
40 |
Mage::log('attachProductToConfigurable: erorr ->' . $ex->getMessage(),null,'nChannel_Communicator.log');
|
41 |
}
|
42 |
Mage::log('attachProductToConfigurable: Product '.$childSku.' was added', null, 'nChannel_Communicator.log');
|
6 |
Mage::log("LinkConfigurable fired!" . $url, null, 'nChannel_Communicator.log');
|
7 |
return "Hello World! My argument is : " . $configurableProductID;
|
8 |
}
|
9 |
+
public function attachProductToConfigurable( $childSku, $configurableProductID ) {
|
10 |
Mage::log('attachProductToConfigurable: sku ' . $childSku,null,'nChannel_Communicator.log');
|
11 |
Mage::log('attachProductToConfigurable: pid ' . $configurableProductID,null,'nChannel_Communicator.log');
|
12 |
+
$model = Mage::getModel('catalog/product');
|
13 |
+
$configurableProduct = $model->load($configurableProductID);
|
14 |
+
Mage::log('attachProductToConfigurable: Configurable Product ID: ' . print_r($configurableProduct->getId(),true),null, 'nChannel_Communicator.log');
|
15 |
+
$newModel = Mage::getModel('catalog/product');
|
16 |
+
$loader = Mage::getResourceModel( 'catalog/product_type_configurable' )->load($newModel,$configurableProductID);
|
17 |
$product = Mage::getModel('catalog/product')->loadByAttribute('sku',$childSku);
|
18 |
|
19 |
$ids = Mage::getModel('catalog/product_type_configurable')->getChildrenIds($configurableProductID);
|
|
|
20 |
$newids = array();
|
21 |
Mage::log('attachProductToConfigurable: current child product id output: ' . $product->getId(),null,'nChannel_Communicator.log');
|
22 |
|
33 |
try{
|
34 |
Mage::log('attachProductToConfigurable: Saving Products', null, 'nChannel_Communicator.log');
|
35 |
Mage::log('attachProductToConfigurable: Configurable Product ID: ' . print_r($configurableProduct->getId(),true),null, 'nChannel_Communicator.log');
|
|
|
36 |
$loader->saveProducts( $configurableProduct, array_keys( $newids ) );
|
37 |
} catch(exception $ex)
|
38 |
{
|
39 |
array_pop($newids);
|
40 |
+
$loader->saveProducts( $test, array_keys( $newids ) );
|
41 |
Mage::log('attachProductToConfigurable: erorr ->' . $ex->getMessage(),null,'nChannel_Communicator.log');
|
42 |
}
|
43 |
Mage::log('attachProductToConfigurable: Product '.$childSku.' was added', null, 'nChannel_Communicator.log');
|
app/code/community/Nchannel/Communicator/etc/api.xml
CHANGED
@@ -33,6 +33,9 @@
|
|
33 |
<detachProductFromConfigurable translate="title" module="Communicator">
|
34 |
<method>detachProductFromConfigurable</method>
|
35 |
</detachProductFromConfigurable>
|
|
|
|
|
|
|
36 |
</methods>
|
37 |
</Communicator_Productutility>
|
38 |
</resources>
|
33 |
<detachProductFromConfigurable translate="title" module="Communicator">
|
34 |
<method>detachProductFromConfigurable</method>
|
35 |
</detachProductFromConfigurable>
|
36 |
+
<getConfigurableAttribute translate="title" module="Communicator">
|
37 |
+
<method>getConfigurableAttribute</method>
|
38 |
+
</getConfigurableAttribute>
|
39 |
</methods>
|
40 |
</Communicator_Productutility>
|
41 |
</resources>
|
app/code/community/Nchannel/Communicator/etc/wsdl.xml
CHANGED
@@ -55,6 +55,13 @@
|
|
55 |
<message name="ProductutilityDetachProductFromConfigurableResponse">
|
56 |
<part name="result" type="xsd:string" />
|
57 |
</message>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
<portType name="{{var wsdl.handler}}PortType">
|
60 |
<operation name="CommunicatorHello">
|
@@ -86,6 +93,11 @@
|
|
86 |
<documentation>Sets up configurable attributes. </documentation>
|
87 |
<input message="typens:ProductutilityDetachProductFromConfigurableRequest" />
|
88 |
<output message="typens:ProductutilityDetachProductFromConfigurableResponse" />
|
|
|
|
|
|
|
|
|
|
|
89 |
</operation>
|
90 |
</portType>
|
91 |
|
@@ -144,6 +156,15 @@
|
|
144 |
<output>
|
145 |
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
146 |
</output>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
</operation>
|
148 |
</binding>
|
149 |
|
55 |
<message name="ProductutilityDetachProductFromConfigurableResponse">
|
56 |
<part name="result" type="xsd:string" />
|
57 |
</message>
|
58 |
+
<message name="ProductutilityGetConfigurableAttributeRequest">
|
59 |
+
<part name="sessionId" type="xsd:string" />
|
60 |
+
<part name="configurableProductID" type="xsd:string" />
|
61 |
+
</message>
|
62 |
+
<message name="ProductutilityGetConfigurableAttributeResponse">
|
63 |
+
<part name="result" type="xsd:string" />
|
64 |
+
</message>
|
65 |
|
66 |
<portType name="{{var wsdl.handler}}PortType">
|
67 |
<operation name="CommunicatorHello">
|
93 |
<documentation>Sets up configurable attributes. </documentation>
|
94 |
<input message="typens:ProductutilityDetachProductFromConfigurableRequest" />
|
95 |
<output message="typens:ProductutilityDetachProductFromConfigurableResponse" />
|
96 |
+
</operation>
|
97 |
+
<operation name="ProductutilityGetConfigurableAttribute">
|
98 |
+
<documentation>Sets up configurable attributes. </documentation>
|
99 |
+
<input message="typens:ProductutilityGetConfigurableAttributeRequest" />
|
100 |
+
<output message="typens:ProductutilityGetConfigurableAttributeResponse" />
|
101 |
</operation>
|
102 |
</portType>
|
103 |
|
156 |
<output>
|
157 |
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
158 |
</output>
|
159 |
+
</operation>
|
160 |
+
<operation name="ProductutilityGetConfigurableAttribute">
|
161 |
+
<soap:operation soapAction="urn:{{var wsdl.handler}}Action" />
|
162 |
+
<input>
|
163 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
164 |
+
</input>
|
165 |
+
<output>
|
166 |
+
<soap:body namespace="urn:{{var wsdl.name}}" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
167 |
+
</output>
|
168 |
</operation>
|
169 |
</binding>
|
170 |
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>nChannel_Communicator</name>
|
4 |
-
<version>0.1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="https://portal.nchannel.com/Content/data/EULA_2012-04-21.pdf">nChannel EULA</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>nChannel Communicator allows for event driven communication with the nChannel API on creation of new orders.</summary>
|
10 |
<description>nChannel Communicator allows for event driven communication with the nChannel API on creation of new orders.</description>
|
11 |
-
<notes>
|
12 |
<authors><author><name>nChannel</name><user>jpepper</user><email>jpepper@nchannel.com</email></author></authors>
|
13 |
-
<date>2014-09-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="Nchannel"><dir name="Communicator"><dir name="Block"><dir name="Adminhtml"><file name="Version.php" hash="afa8d0feea50602251007002ae1eb4b1"/></dir></dir><dir name="Helper"><file name="Data.php" hash="7d5d9a9593474991cec1d1f521f41482"/></dir><dir name="Model"><file name="Api.php" hash="9001584aa011771215b4a26d31214998"/><dir name="Helloworld"><dir name="Api"><file name="V2.php" hash="f9c5dd40cee982eeb2c8d6d739e42f9d"/></dir><file name="Api.php" hash="fadb95acd58027f40bca5b9847dc2eda"/></dir><file name="Observer.php" hash="461f9acf6b47d6d53240b4f9ef5b3af3"/><dir name="Productutility"><dir name="Api"><file name="V2.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.2.0</min><max>5.5.11</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>nChannel_Communicator</name>
|
4 |
+
<version>0.1.12</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="https://portal.nchannel.com/Content/data/EULA_2012-04-21.pdf">nChannel EULA</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>nChannel Communicator allows for event driven communication with the nChannel API on creation of new orders.</summary>
|
10 |
<description>nChannel Communicator allows for event driven communication with the nChannel API on creation of new orders.</description>
|
11 |
+
<notes>Fixed bug in api that caused improper loading of configurable products.</notes>
|
12 |
<authors><author><name>nChannel</name><user>jpepper</user><email>jpepper@nchannel.com</email></author></authors>
|
13 |
+
<date>2014-09-11</date>
|
14 |
+
<time>00:31:55</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Nchannel"><dir name="Communicator"><dir name="Block"><dir name="Adminhtml"><file name="Version.php" hash="afa8d0feea50602251007002ae1eb4b1"/></dir></dir><dir name="Helper"><file name="Data.php" hash="7d5d9a9593474991cec1d1f521f41482"/></dir><dir name="Model"><file name="Api.php" hash="9001584aa011771215b4a26d31214998"/><dir name="Helloworld"><dir name="Api"><file name="V2.php" hash="f9c5dd40cee982eeb2c8d6d739e42f9d"/></dir><file name="Api.php" hash="fadb95acd58027f40bca5b9847dc2eda"/></dir><file name="Observer.php" hash="461f9acf6b47d6d53240b4f9ef5b3af3"/><dir name="Productutility"><dir name="Api"><file name="V2.php" hash="dd5eb35ea5564bd466990481d842b398"/></dir><file name="Api.php" hash="83e30c3b4526c851d8ff31dd73957495"/></dir><dir name="Source"><file name="NchannelEnvironment.php" hash="cf979a2ce627f3e20d1d04e55533e89f"/></dir></dir><dir name="controllers"><file name="IndexController.php" hash="04f02984743361ad17d0d9c85c05afc5"/></dir><dir name="etc"><file name="adminhtml.xml" hash="1c959ca1b60ae9fc0ea61107c4bf3a8d"/><file name="api.xml" hash="30ce217ce88b9963146419dd72717f1d"/><file name="config.xml" hash="11ac8090f0a1b735aa3e92cbca9108bf"/><file name="system.xml" hash="19596271befc22620795ae244d6c20b0"/><file name="wsdl.xml" hash="5f8202c97f14f2221f23fba3e803161a"/><file name="wsi.xml" hash="41f6baef07d7e977a3fbd26cb37bd5d2"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Nchannel_Communicator.xml" hash="698fe66f544b1bcf42154dcd4d621527"/></dir><dir name="en_US"><dir name="template"><dir name="email"><file name="FailedOrder.html" hash=""/></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.2.0</min><max>5.5.11</max></php></required></dependencies>
|
18 |
</package>
|