Version Notes
9.0.1.13 02/03/2015
Updated configuration display. Added the current website id and the store view id to the configuration page
9.0.1.12 01/20/2014
Updated Saved CC support. Added framework for storing extension data in the Magento database. Deprecated the cmsapiCustomFields method. Added the cmsapiCustomFieldsObject method for more advanced usage of custom field data and nested arrays
9.0.1.11 01/08/2014
Updated custom fields to better support 3rd party classes. The third party class needs to support the info method accepting an order increment id as the only parameter
Download this release
Release Info
Developer | Jason Morrison |
Extension | NewHavenSoftware_CMSAPI |
Version | 9.0.1.13 |
Comparing to | |
See all releases |
Code changes from version 9.0.1.12 to 9.0.1.13
- app/code/community/NewHavenSoftware/CMSAPI/Model/Formdata/Storeviewid.php +21 -0
- app/code/community/NewHavenSoftware/CMSAPI/Model/Formdata/Websiteid.php +19 -0
- app/code/community/NewHavenSoftware/CMSAPI/Model/Resource/General/Setup.php +4 -0
- app/code/community/NewHavenSoftware/CMSAPI/Model/Sales/Order/Invoice/Api/V2.php +13 -0
- app/code/community/NewHavenSoftware/CMSAPI/etc/api.xml +12 -0
- app/code/community/NewHavenSoftware/CMSAPI/etc/config.xml +13 -1
- app/code/community/NewHavenSoftware/CMSAPI/etc/system.xml +29 -0
- app/code/community/NewHavenSoftware/CMSAPI/sql/cmsapi_setup/general-install-9.0.1.9.php +2 -0
- package.xml +14 -15
app/code/community/NewHavenSoftware/CMSAPI/Model/Formdata/Storeviewid.php
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class NewHavenSoftware_CMSAPI_Model_FormData_Storeviewid extends Mage_Core_Model_Config_Data {
|
3 |
+
public function _afterLoad() {
|
4 |
+
$_storeCode = $this->getStore();
|
5 |
+
$_websiteCode = $this->getWebsite();
|
6 |
+
$_storeId = 0;
|
7 |
+
|
8 |
+
if (strlen($_storeCode)) {
|
9 |
+
$_storeId = Mage::getModel('core/store')->load($_storeCode)->getId();
|
10 |
+
} else {
|
11 |
+
if (strlen($_websiteCode)) {
|
12 |
+
$_id = Mage::getModel('core/website')->load($_websiteCode)->getId();
|
13 |
+
$_storeId = Mage::app()->getWebsite($_id)->getDefaultStore()->getId();
|
14 |
+
}
|
15 |
+
}
|
16 |
+
|
17 |
+
$this->setValue($_storeId);
|
18 |
+
|
19 |
+
return $this;
|
20 |
+
}
|
21 |
+
}
|
app/code/community/NewHavenSoftware/CMSAPI/Model/Formdata/Websiteid.php
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class NewHavenSoftware_CMSAPI_Model_FormData_Websiteid extends Mage_Core_Model_Config_Data {
|
3 |
+
public function _afterLoad() {
|
4 |
+
$_storeCode = $this->getStore();
|
5 |
+
$_websiteCode = $this->getWebsite();
|
6 |
+
$_id = 0;
|
7 |
+
|
8 |
+
if (strlen($_storeCode)) {
|
9 |
+
$_storeId = Mage::getModel('core/store')->load($_storeCode)->getId();
|
10 |
+
$_id = Mage::app()->getStore($_storeId)->getWebsiteId();
|
11 |
+
} elseif (strlen($_websiteCode)) {
|
12 |
+
$_id = Mage::getModel('core/website')->load($_websiteCode)->getId();
|
13 |
+
}
|
14 |
+
|
15 |
+
$this->setValue($_id);
|
16 |
+
|
17 |
+
return $this;
|
18 |
+
}
|
19 |
+
}
|
app/code/community/NewHavenSoftware/CMSAPI/Model/Resource/General/Setup.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class NewHavenSoftware_CMSAPI_Model_Resource_General_Setup extends Mage_Core_Model_Resource_Setup {
|
3 |
+
|
4 |
+
}
|
app/code/community/NewHavenSoftware/CMSAPI/Model/Sales/Order/Invoice/Api/V2.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class NewHavenSoftware_CMSAPI_Model_Sales_Order_Invoice_Api_V2 extends Mage_Sales_Model_Order_Invoice_Api_V2 {
|
3 |
+
public function items($filters = null) {
|
4 |
+
$result = parent::items($filters);
|
5 |
+
|
6 |
+
// populate the order_increment_id to avoid an external api call to info
|
7 |
+
foreach($result as $key => $item) {
|
8 |
+
$_info = parent::info($item['increment_id']);
|
9 |
+
$result[$key]['order_increment_id'] = $_info['order_increment_id'];
|
10 |
+
}
|
11 |
+
return $result;
|
12 |
+
}
|
13 |
+
}
|
app/code/community/NewHavenSoftware/CMSAPI/etc/api.xml
CHANGED
@@ -64,6 +64,18 @@
|
|
64 |
</info>
|
65 |
</methods>
|
66 |
</cmsapi_sales_order>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
<cmsapi_catalog_product translate="title" module="cmsapi">
|
68 |
<model>cmsapi/catalog_product_api</model>
|
69 |
<acl>catalog/product</acl>
|
64 |
</info>
|
65 |
</methods>
|
66 |
</cmsapi_sales_order>
|
67 |
+
<cmsapi_sales_order_invoice translate="title" module="cmsapi">
|
68 |
+
<model>cmsapi/sales_order_invoice_api</model>
|
69 |
+
<acl>sales/order/invoice</acl>
|
70 |
+
<title>Order Invoice API</title>
|
71 |
+
<methods>
|
72 |
+
<list translate="title" module="sales">
|
73 |
+
<title>Retrieve list of invoices by filters</title>
|
74 |
+
<method>items</method>
|
75 |
+
<acl>sales/order/invoice/info</acl>
|
76 |
+
</list>
|
77 |
+
</methods>
|
78 |
+
</cmsapi_sales_order_invoice>
|
79 |
<cmsapi_catalog_product translate="title" module="cmsapi">
|
80 |
<model>cmsapi/catalog_product_api</model>
|
81 |
<acl>catalog/product</acl>
|
app/code/community/NewHavenSoftware/CMSAPI/etc/config.xml
CHANGED
@@ -1,9 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
|
3 |
<config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
<modules>
|
5 |
<NewHavenSoftware_CMSAPI>
|
6 |
-
<version>9.0.1.
|
7 |
</NewHavenSoftware_CMSAPI>
|
8 |
</modules>
|
9 |
<adminhtml>
|
@@ -50,6 +59,9 @@
|
|
50 |
<rewrite>
|
51 |
<order_api_v2>NewHavenSoftware_CMSAPI_Model_Sales_Order_Api_V2</order_api_v2>
|
52 |
</rewrite>
|
|
|
|
|
|
|
53 |
</sales>
|
54 |
<payment>
|
55 |
<rewrite>
|
1 |
<?xml version="1.0"?>
|
2 |
|
3 |
<config>
|
4 |
+
<!-- example default section
|
5 |
+
<default>
|
6 |
+
<cmsapi>
|
7 |
+
<information>
|
8 |
+
<websiteid>default value</websiteid>
|
9 |
+
</information>
|
10 |
+
</cmsapi>
|
11 |
+
</default>
|
12 |
+
-->
|
13 |
<modules>
|
14 |
<NewHavenSoftware_CMSAPI>
|
15 |
+
<version>9.0.1.13</version>
|
16 |
</NewHavenSoftware_CMSAPI>
|
17 |
</modules>
|
18 |
<adminhtml>
|
59 |
<rewrite>
|
60 |
<order_api_v2>NewHavenSoftware_CMSAPI_Model_Sales_Order_Api_V2</order_api_v2>
|
61 |
</rewrite>
|
62 |
+
<rewrite>
|
63 |
+
<order_invoice_api_v2>NewHavenSoftware_CMSAPI_Model_Sales_Order_Invoice_Api_V2</order_invoice_api_v2>
|
64 |
+
</rewrite>
|
65 |
</sales>
|
66 |
<payment>
|
67 |
<rewrite>
|
app/code/community/NewHavenSoftware/CMSAPI/etc/system.xml
CHANGED
@@ -28,6 +28,35 @@
|
|
28 |
</customfields>
|
29 |
</fields>
|
30 |
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
</groups>
|
32 |
</cmsapi>
|
33 |
</sections>
|
28 |
</customfields>
|
29 |
</fields>
|
30 |
</config>
|
31 |
+
<information translate="label">
|
32 |
+
<label>Website and Store View Data</label>
|
33 |
+
<frontend_type>text</frontend_type>
|
34 |
+
<expanded>1</expanded>
|
35 |
+
<sort_order>2</sort_order>
|
36 |
+
<show_in_default>1</show_in_default>
|
37 |
+
<show_in_website>1</show_in_website>
|
38 |
+
<show_in_store>1</show_in_store>
|
39 |
+
<fields>
|
40 |
+
<websiteid translate="label">
|
41 |
+
<label>Website ID:</label>
|
42 |
+
<frontend_type>label</frontend_type>
|
43 |
+
<backend_model>cmsapi/formdata_websiteid</backend_model>
|
44 |
+
<sort_order>1</sort_order>
|
45 |
+
<show_in_default>1</show_in_default>
|
46 |
+
<show_in_website>1</show_in_website>
|
47 |
+
<show_in_store>1</show_in_store>
|
48 |
+
</websiteid>
|
49 |
+
<storeview translate="label">
|
50 |
+
<label>Store View ID:</label>
|
51 |
+
<frontend_type>label</frontend_type>
|
52 |
+
<backend_model>cmsapi/formdata_Storeviewid</backend_model>
|
53 |
+
<sort_order>2</sort_order>
|
54 |
+
<show_in_default>1</show_in_default>
|
55 |
+
<show_in_website>1</show_in_website>
|
56 |
+
<show_in_store>1</show_in_store>
|
57 |
+
</storeview>
|
58 |
+
</fields>
|
59 |
+
</information>
|
60 |
</groups>
|
61 |
</cmsapi>
|
62 |
</sections>
|
app/code/community/NewHavenSoftware/CMSAPI/sql/cmsapi_setup/general-install-9.0.1.9.php
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$installer = $this;
|
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>
|
@@ -11,26 +11,25 @@
|
|
11 |

|
12 |
Adds the following to the v2 API:
|
13 |
<ol><ul><strong>cmsapiChecknhsInstalled:</strong> To verify this extension has been added to the API</ul>
|
14 |
-
<ul><strong>
|
15 |
-
<ul><strong>
|
16 |
-
<ul><strong>cmsapiGiftMessageInfo:</strong> This API call is used to gain access to the "To" and "From" fields used in gift messages</ul>
|
17 |
<ul>Extend <strong>catalogProductCreate:</strong> to allow the passing of additional productdata fields: configurable_products and configurable_attributes (structure documented in the wsdl) </ul>
|
18 |
<ul>Extend <strong>salesProductInfo:</strong> for items the product_options property was changed to json (from serialized php). This is required for downloading orders containing configurable products</ul>
|
19 |
</ol>
|
20 |

|
21 |
-
This extension is
|
22 |
-
<notes><strong>9.0.1.
|
23 |
-
Updated
|
24 |

|
25 |
-
<strong>9.0.1.
|
26 |
-
Updated
|
27 |

|
28 |
-
<strong>9.0.1.
|
29 |
-
Updated
|
30 |
<authors><author><name>Jason Morrison</name><user>nhsjason</user><email>jmorrison@newhavensoftware.com</email></author></authors>
|
31 |
-
<date>
|
32 |
-
<time>
|
33 |
-
<contents><target name="magecommunity"><dir name="NewHavenSoftware"><dir name="CMSAPI"><dir name="Helper"><file name="Data.php" hash="c0802d9a61543d36c4afea5a24038e99"/></dir><dir name="Model"><dir name="Catalog"><dir name="Product"><dir name="Api"><file name="V2.php" hash="4bb4f10d96309b7adcf6f5e3cadb0450"/></dir></dir></dir><dir name="Check"><dir name="Api"><file name="V2.php" hash="f589ff6d45ee96855afe53461092813e"/></dir></dir><dir name="Custom"><dir name="Api"><file name="V2.php" hash="9fc895c87b6d6f66859d2de0528c778e"/></dir></dir><dir name="Gift"><dir name="Message"><dir name="Api"><file name="V2.php" hash="0a5ffdd3fc3760b311970169858d5475"/></dir></dir></dir><file name="Observer.php" hash="e0dd0d6633c7444e92c0caaed3228ff4"/><dir name="Payment"><dir name="Method"><file name="Ccsave.php" hash="45b452bb026658506b26645b1b0c0cec"/></dir></dir><file name="Queue.php" hash="5a0e876dbd9aff660a9bc1fc83c1ce1a"/><dir name="Resource"><file name="Queue.php" hash="92f454caba9979af5e61eedbf4524cf4"/><file name="Setup.php" hash="42c3233e31ecd255e117d1781d9ed08d"/></dir><dir name="Sales"><dir name="Order"><dir name="Api"><file name="V2.php" hash="86bbc553d3784a7afe4810af21e6a709"/></dir></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="ba4c36dbd3d346c3561fb5822d5fd3b4"/><file name="api.xml" hash="
|
34 |
<compatible/>
|
35 |
-
<dependencies><required><php><min>5.
|
36 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>NewHavenSoftware_CMSAPI</name>
|
4 |
+
<version>9.0.1.13</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
11 |

|
12 |
Adds the following to the v2 API:
|
13 |
<ol><ul><strong>cmsapiChecknhsInstalled:</strong> To verify this extension has been added to the API</ul>
|
14 |
+
<ul><strong>cmsapiCustomFields:</strong> This API call is used to get order level data based on the fields entered in System Configuration that may not be published in the v2 API</ul>
|
15 |
+
<ul><strong>cmsapiGiftMessageInfo:</strong> This API call is used to gain access to the &quot;To&quot; and &quot;From&quot; fields used in gift messages</ul>
|
|
|
16 |
<ul>Extend <strong>catalogProductCreate:</strong> to allow the passing of additional productdata fields: configurable_products and configurable_attributes (structure documented in the wsdl) </ul>
|
17 |
<ul>Extend <strong>salesProductInfo:</strong> for items the product_options property was changed to json (from serialized php). This is required for downloading orders containing configurable products</ul>
|
18 |
</ol>
|
19 |

|
20 |
+
This extension is required for integration with the CMS eCMS module.<br /><br /></description>
|
21 |
+
<notes><strong>9.0.1.13</strong> 02/03/2015<br />
|
22 |
+
Updated configuration display. Added the current website id and the store view id to the configuration page<br /><br />
|
23 |

|
24 |
+
<strong>9.0.1.12</strong> 01/20/2014<br />
|
25 |
+
Updated Saved CC support. Added framework for storing extension data in the Magento database. Deprecated the cmsapiCustomFields method. Added the cmsapiCustomFieldsObject method for more advanced usage of custom field data and nested arrays<br /><br />
|
26 |

|
27 |
+
<strong>9.0.1.11</strong> 01/08/2014<br />
|
28 |
+
Updated custom fields to better support 3rd party classes. The third party class needs to support the info method accepting an order increment id as the only parameter<br /><br /></notes>
|
29 |
<authors><author><name>Jason Morrison</name><user>nhsjason</user><email>jmorrison@newhavensoftware.com</email></author></authors>
|
30 |
+
<date>2015-12-16</date>
|
31 |
+
<time>20:51:28</time>
|
32 |
+
<contents><target name="magecommunity"><dir name="NewHavenSoftware"><dir name="CMSAPI"><dir name="Helper"><file name="Data.php" hash="c0802d9a61543d36c4afea5a24038e99"/></dir><dir name="Model"><dir name="Catalog"><dir name="Product"><dir name="Api"><file name="V2.php" hash="4bb4f10d96309b7adcf6f5e3cadb0450"/></dir></dir></dir><dir name="Check"><dir name="Api"><file name="V2.php" hash="f589ff6d45ee96855afe53461092813e"/></dir></dir><dir name="Custom"><dir name="Api"><file name="V2.php" hash="9fc895c87b6d6f66859d2de0528c778e"/></dir></dir><dir name="Formdata"><file name="Storeviewid.php" hash="fa7b7a16d11f0d9428751f62a48ef065"/><file name="Websiteid.php" hash="b1c3f0b7b9f870b543ee4eace6e6e614"/></dir><dir name="Gift"><dir name="Message"><dir name="Api"><file name="V2.php" hash="0a5ffdd3fc3760b311970169858d5475"/></dir></dir></dir><file name="Observer.php" hash="e0dd0d6633c7444e92c0caaed3228ff4"/><dir name="Payment"><dir name="Method"><file name="Ccsave.php" hash="45b452bb026658506b26645b1b0c0cec"/></dir></dir><file name="Queue.php" hash="5a0e876dbd9aff660a9bc1fc83c1ce1a"/><dir name="Resource"><dir name="General"><file name="Setup.php" hash="2969c4fb3ceee1c2376712d5a069a89e"/></dir><file name="Queue.php" hash="92f454caba9979af5e61eedbf4524cf4"/><file name="Setup.php" hash="42c3233e31ecd255e117d1781d9ed08d"/></dir><dir name="Sales"><dir name="Order"><dir name="Api"><file name="V2.php" hash="86bbc553d3784a7afe4810af21e6a709"/></dir><dir name="Invoice"><dir name="Api"><file name="V2.php" hash="a42a96aacbbd4dd05612bf0db3eadfef"/></dir></dir></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="ba4c36dbd3d346c3561fb5822d5fd3b4"/><file name="api.xml" hash="caf65d4c02a016341d693b8afe1a963d"/><file name="config.xml" hash="aaf69a44aa8211ad347d0a667058982c"/><file name="system.xml" hash="537b84688f4efb8625c249aa397e1930"/><file name="wsdl.xml" hash="a22c14c3adf8405c96ce53dbbfc7332c"/></dir><dir name="sql"><dir name="cmsapi_setup"><file name="general-install-9.0.1.9.php" hash="70bc17bb54c0be0b95f5974f700ef442"/><file name="install-9.0.1.12.php" hash="0c411170976bee3cabda7c3699588505"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="NewHavenSoftware_CMSAPI.xml" hash="4c5fe5d61b389c00a8e54970a29017a0"/></dir></target></contents>
|
33 |
<compatible/>
|
34 |
+
<dependencies><required><php><min>5.2.0</min><max>7.0.0</max></php></required></dependencies>
|
35 |
</package>
|