Version Notes
Removed unneeded module dependency. Added the ability to set global custom_field values.
In addition to a comma delimited list of order fields. You can now add name=value in the Custom Fields list. These will be sent with every order.
In CMS add a matching custom field plug-in option:
Name: CMS XML element name to store the data
Value: the custom field name specified in Magento
Type: Custom Field
If no mapping plug-in option is found, the values will appear in the order notes.
Download this release
Release Info
Developer | Jason Morrison |
Extension | NewHavenSoftware_CMSAPI |
Version | 9.0.1.4 |
Comparing to | |
See all releases |
Code changes from version 9.0.1.3 to 9.0.1.4
app/code/community/NewHavenSoftware/CMSAPI/Model/Custom/Api/V2.php
CHANGED
@@ -9,12 +9,18 @@ class NewHavenSoftware_CMSAPI_Model_Custom_Api_V2 extends Mage_Api_Model_Resourc
|
|
9 |
// ad_code,customer_number
|
10 |
$fields = explode(',', $customFields);
|
11 |
foreach ($fields as $field) {
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
}
|
19 |
|
20 |
$results = rtrim($results, ', \t\n\r\0\x0B'); //Clean up the last comma and any spaces
|
9 |
// ad_code,customer_number
|
10 |
$fields = explode(',', $customFields);
|
11 |
foreach ($fields as $field) {
|
12 |
+
if (strpos($field,'=') !== false) {
|
13 |
+
// we have a global assignment use this value
|
14 |
+
$results = $results . $field . ',';
|
15 |
+
} else {
|
16 |
+
$object = Mage::getModel('sales/order')
|
17 |
+
->getCollection()
|
18 |
+
->addAttributeToFilter('state', array('neq' => Mage_Sales_Model_Order::STATE_CANCELED))
|
19 |
+
->addAttributeToFilter('increment_id', $orderIncrementId)
|
20 |
+
->getFirstItem();
|
21 |
+
$objectValue = $object[$field];
|
22 |
+
$results = $results . $field . "=" . $objectValue . ',';
|
23 |
+
}
|
24 |
}
|
25 |
|
26 |
$results = rtrim($results, ', \t\n\r\0\x0B'); //Clean up the last comma and any spaces
|
app/code/community/NewHavenSoftware/CMSAPI/etc/config.xml
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
|
3 |
<config>
|
4 |
<modules>
|
5 |
-
<
|
6 |
-
<version>9.0.1.
|
7 |
-
</
|
8 |
</modules>
|
9 |
<global>
|
10 |
<models>
|
2 |
|
3 |
<config>
|
4 |
<modules>
|
5 |
+
<NewHavenSoftware_CMSAPI>
|
6 |
+
<version>9.0.1.4</version>
|
7 |
+
</NewHavenSoftware_CMSAPI>
|
8 |
</modules>
|
9 |
<global>
|
10 |
<models>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>NewHavenSoftware_CMSAPI</name>
|
4 |
-
<version>9.0.1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
@@ -14,11 +14,20 @@ Adds the following to the v2 API:
|
|
14 |
</ol>
|
15 |

|
16 |
This extension is required for integration with the CMS eCMS module.</description>
|
17 |
-
<notes>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
<authors><author><name>Jason Morrison</name><user>jmorrison</user><email>jmorrison@newhavensoftware.com</email></author></authors>
|
19 |
-
<date>2013-
|
20 |
-
<time>
|
21 |
-
<contents><target name="magecommunity"><dir name="NewHavenSoftware"><dir name="CMSAPI"><dir name="Helper"><file name="Data.php" hash="ab4082fe27f7c6732a7f857fc326ec99"/></dir><dir name="Model"><dir name="Catalog"><dir name="Product"><dir name="Api"><file name="V2.php" hash="aad926da6a10b2c2de3c28abac0eaf52"/></dir></dir></dir><dir name="Check"><dir name="Api"><file name="V2.php" hash="c27fcf391dcf5ad7e0c86de44fd14e7c"/></dir></dir><dir name="Custom"><dir name="Api"><file name="V2.php" hash="
|
22 |
<compatible/>
|
23 |
-
<dependencies><required><php><min>5.2.0</min><max>5.4.12</max></php
|
24 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>NewHavenSoftware_CMSAPI</name>
|
4 |
+
<version>9.0.1.4</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
14 |
</ol>
|
15 |

|
16 |
This extension is required for integration with the CMS eCMS module.</description>
|
17 |
+
<notes>Removed unneeded module dependency. Added the ability to set global custom_field values.
|
18 |
+

|
19 |
+
In addition to a comma delimited list of order fields. You can now add name=value in the Custom Fields list. These will be sent with every order. 
|
20 |
+

|
21 |
+
In CMS add a matching custom field plug-in option:
|
22 |
+
Name: CMS XML <Order> element name to store the data
|
23 |
+
Value: the custom field name specified in Magento
|
24 |
+
Type: Custom Field
|
25 |
+

|
26 |
+
If no mapping plug-in option is found, the values will appear in the order notes.</notes>
|
27 |
<authors><author><name>Jason Morrison</name><user>jmorrison</user><email>jmorrison@newhavensoftware.com</email></author></authors>
|
28 |
+
<date>2013-06-28</date>
|
29 |
+
<time>02:48:34</time>
|
30 |
+
<contents><target name="magecommunity"><dir name="NewHavenSoftware"><dir name="CMSAPI"><dir name="Helper"><file name="Data.php" hash="ab4082fe27f7c6732a7f857fc326ec99"/></dir><dir name="Model"><dir name="Catalog"><dir name="Product"><dir name="Api"><file name="V2.php" hash="aad926da6a10b2c2de3c28abac0eaf52"/></dir></dir></dir><dir name="Check"><dir name="Api"><file name="V2.php" hash="c27fcf391dcf5ad7e0c86de44fd14e7c"/></dir></dir><dir name="Custom"><dir name="Api"><file name="V2.php" hash="c1fa022302bdc819ee59e14750ae18a5"/></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="ba4c36dbd3d346c3561fb5822d5fd3b4"/><file name="api.xml" hash="d78c5d767a78b9b03be362c8ef895c98"/><file name="config.xml" hash="780d234cb167e08c7d26f10ceda84f3d"/><file name="system.xml" hash="ab6f7ba6be148634383f9e3a8f63e2cd"/><file name="wsdl.xml" hash="a0c5b11146e29e8bdfcea57ff53f8c4c"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="NewHavenSoftware_CMSAPI.xml" hash="f858d97574f528dc237ad32e0e96ae73"/></dir></target></contents>
|
31 |
<compatible/>
|
32 |
+
<dependencies><required><php><min>5.2.0</min><max>5.4.12</max></php></required></dependencies>
|
33 |
</package>
|