Oro_Api - Version 1.1.2

Version Notes

OroCRM Bridge extension adds a couple of improvements to Magento SOAP API v2 in order to expose more shopping cart and customer data.

Download this release

Release Info

Developer Oro, Inc
Extension Oro_Api
Version 1.1.2
Comparing to
See all releases


Code changes from version 1.1.1 to 1.1.2

Files changed (32) hide show
  1. app/code/community/Oro/Api/Helper/Data.php +0 -0
  2. app/code/community/Oro/Api/Model/Catalog/Product/Api/V2.php +0 -0
  3. app/code/community/Oro/Api/Model/Customer/Api.php +13 -0
  4. app/code/community/Oro/Api/Model/Customer/Api/V2.php +0 -0
  5. app/code/community/Oro/Api/Model/Newsletter/Subscriber/Api.php +0 -0
  6. app/code/community/Oro/Api/Model/Newsletter/Subscriber/Api/V2.php +0 -0
  7. app/code/community/Oro/Api/Model/Observer/Crm/Controller.php +0 -0
  8. app/code/community/Oro/Api/Model/Observer/Sales/Order.php +0 -0
  9. app/code/community/Oro/Api/Model/Ping.php +0 -0
  10. app/code/community/Oro/Api/Model/Ping/V2.php +0 -0
  11. app/code/community/Oro/Api/Model/Report/Product/Viewed/Api.php +0 -0
  12. app/code/community/Oro/Api/Model/Report/Product/Viewed/Api/V2.php +0 -0
  13. app/code/community/Oro/Api/Model/Resource/Reports/Product/Index/Viewed/Collection.php +0 -0
  14. app/code/community/Oro/Api/Model/Sales/Order/Api.php +0 -0
  15. app/code/community/Oro/Api/Model/Sales/Order/Api/V2.php +0 -0
  16. app/code/community/Oro/Api/Model/Sales/Quote/Api.php +0 -0
  17. app/code/community/Oro/Api/Model/Sales/Quote/Api/V2.php +0 -0
  18. app/code/community/Oro/Api/Model/Wishlist/Api.php +0 -0
  19. app/code/community/Oro/Api/Model/Wishlist/Api/V2.php +0 -0
  20. app/code/community/Oro/Api/Model/Wishlist/Item/Api.php +0 -0
  21. app/code/community/Oro/Api/Model/Wishlist/Item/Api/V2.php +0 -0
  22. app/code/community/Oro/Api/controllers/Adminhtml/Oro/GatewayController.php +0 -0
  23. app/code/community/Oro/Api/controllers/Adminhtml/Oro/SalesController.php +0 -0
  24. app/code/community/Oro/Api/etc/api.xml +0 -0
  25. app/code/community/Oro/Api/etc/config.xml +0 -0
  26. app/code/community/Oro/Api/etc/workflow.xml +0 -0
  27. app/code/community/Oro/Api/etc/wsdl.xml +1 -0
  28. app/code/community/Oro/Api/etc/wsi.xml +2 -1
  29. app/design/adminhtml/default/default/template/oro/api/page.phtml +56 -0
  30. app/design/adminhtml/default/default/template/oro/api/script.phtml +18 -0
  31. app/etc/modules/Oro_Api.xml +0 -0
  32. package.xml +4 -4
app/code/community/Oro/Api/Helper/Data.php CHANGED
File without changes
app/code/community/Oro/Api/Model/Catalog/Product/Api/V2.php CHANGED
File without changes
app/code/community/Oro/Api/Model/Customer/Api.php CHANGED
@@ -25,6 +25,15 @@ class Oro_Api_Model_Customer_Api extends Mage_Customer_Model_Api_Resource
25
  'customer_address_id' => 'entity_id'
26
  );
27
 
 
 
 
 
 
 
 
 
 
28
  /**
29
  * Retrieve customers data
30
  *
@@ -64,7 +73,11 @@ class Oro_Api_Model_Customer_Api extends Mage_Customer_Model_Api_Resource
64
  }
65
 
66
  foreach ($this->getAllowedAttributes($customer) as $attributeCode => $attribute) {
 
67
  $row[$attributeCode] = $customer->getData($attributeCode);
 
 
 
68
  }
69
 
70
  $row['addresses'] = $this->getAddressItems($customer);
25
  'customer_address_id' => 'entity_id'
26
  );
27
 
28
+ /**
29
+ * Attributes must be processed with source
30
+ *
31
+ * @var array
32
+ */
33
+ protected $_sourcedAttributes = array(
34
+ 'gender',
35
+ );
36
+
37
  /**
38
  * Retrieve customers data
39
  *
73
  }
74
 
75
  foreach ($this->getAllowedAttributes($customer) as $attributeCode => $attribute) {
76
+ /** @var $attribute Mage_Customer_Model_Attribute */
77
  $row[$attributeCode] = $customer->getData($attributeCode);
78
+ if (in_array($attributeCode, $this->_sourcedAttributes)) {
79
+ $row[$attributeCode] = $attribute->getSource()->getOptionText($customer->getData($attributeCode));
80
+ }
81
  }
82
 
83
  $row['addresses'] = $this->getAddressItems($customer);
app/code/community/Oro/Api/Model/Customer/Api/V2.php CHANGED
File without changes
app/code/community/Oro/Api/Model/Newsletter/Subscriber/Api.php CHANGED
File without changes
app/code/community/Oro/Api/Model/Newsletter/Subscriber/Api/V2.php CHANGED
File without changes
app/code/community/Oro/Api/Model/Observer/Crm/Controller.php CHANGED
File without changes
app/code/community/Oro/Api/Model/Observer/Sales/Order.php CHANGED
File without changes
app/code/community/Oro/Api/Model/Ping.php CHANGED
File without changes
app/code/community/Oro/Api/Model/Ping/V2.php CHANGED
File without changes
app/code/community/Oro/Api/Model/Report/Product/Viewed/Api.php CHANGED
File without changes
app/code/community/Oro/Api/Model/Report/Product/Viewed/Api/V2.php CHANGED
File without changes
app/code/community/Oro/Api/Model/Resource/Reports/Product/Index/Viewed/Collection.php CHANGED
File without changes
app/code/community/Oro/Api/Model/Sales/Order/Api.php CHANGED
File without changes
app/code/community/Oro/Api/Model/Sales/Order/Api/V2.php CHANGED
File without changes
app/code/community/Oro/Api/Model/Sales/Quote/Api.php CHANGED
File without changes
app/code/community/Oro/Api/Model/Sales/Quote/Api/V2.php CHANGED
File without changes
app/code/community/Oro/Api/Model/Wishlist/Api.php CHANGED
File without changes
app/code/community/Oro/Api/Model/Wishlist/Api/V2.php CHANGED
File without changes
app/code/community/Oro/Api/Model/Wishlist/Item/Api.php CHANGED
File without changes
app/code/community/Oro/Api/Model/Wishlist/Item/Api/V2.php CHANGED
File without changes
app/code/community/Oro/Api/controllers/Adminhtml/Oro/GatewayController.php CHANGED
File without changes
app/code/community/Oro/Api/controllers/Adminhtml/Oro/SalesController.php CHANGED
File without changes
app/code/community/Oro/Api/etc/api.xml CHANGED
File without changes
app/code/community/Oro/Api/etc/config.xml CHANGED
File without changes
app/code/community/Oro/Api/etc/workflow.xml CHANGED
File without changes
app/code/community/Oro/Api/etc/wsdl.xml CHANGED
@@ -224,6 +224,7 @@
224
  <element name="taxvat" type="xsd:string" minOccurs="0" />
225
  <element name="confirmation" type="xsd:boolean" minOccurs="0" />
226
  <element name="password_hash" type="xsd:string" minOccurs="0" />
 
227
 
228
  <element name="addresses" type="typens:customerAddressEntityArray" minOccurs="1"/>
229
  </all>
224
  <element name="taxvat" type="xsd:string" minOccurs="0" />
225
  <element name="confirmation" type="xsd:boolean" minOccurs="0" />
226
  <element name="password_hash" type="xsd:string" minOccurs="0" />
227
+ <element name="gender" type="xsd:string" minOccurs="0" />
228
 
229
  <element name="addresses" type="typens:customerAddressEntityArray" minOccurs="1"/>
230
  </all>
app/code/community/Oro/Api/etc/wsi.xml CHANGED
@@ -180,7 +180,7 @@
180
  <xsd:sequence>
181
  <xsd:element name="version" type="xsd:string" minOccurs="0" />
182
  <xsd:element name="mage_version" type="xsd:string" minOccurs="0" />
183
- <xsd:element name="mage_edition" type="xsd:string" minOccurs="0" />
184
  </xsd:sequence>
185
  </xsd:complexType>
186
 
@@ -204,6 +204,7 @@
204
  <xsd:element name="taxvat" type="xsd:string" minOccurs="0" />
205
  <xsd:element name="confirmation" type="xsd:boolean" minOccurs="0" />
206
  <xsd:element name="password_hash" type="xsd:string" minOccurs="0" />
 
207
 
208
  <xsd:element minOccurs="1" maxOccurs="1" name="addresses" type="typens:customerAddressEntityArray" />
209
  </xsd:sequence>
180
  <xsd:sequence>
181
  <xsd:element name="version" type="xsd:string" minOccurs="0" />
182
  <xsd:element name="mage_version" type="xsd:string" minOccurs="0" />
183
+ <xsd:element name="admin_url" type="xsd:string" minOccurs="0" />
184
  </xsd:sequence>
185
  </xsd:complexType>
186
 
204
  <xsd:element name="taxvat" type="xsd:string" minOccurs="0" />
205
  <xsd:element name="confirmation" type="xsd:boolean" minOccurs="0" />
206
  <xsd:element name="password_hash" type="xsd:string" minOccurs="0" />
207
+ <xsd:element name="gender" type="xsd:string" minOccurs="0" />
208
 
209
  <xsd:element minOccurs="1" maxOccurs="1" name="addresses" type="typens:customerAddressEntityArray" />
210
  </xsd:sequence>
app/design/adminhtml/default/default/template/oro/api/page.phtml ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php /*{
2
+ "label":"Root page layout",
3
+ "type":"core/template",
4
+ "children":{
5
+ "header":{ "label":"Header", "type":"adminhtml/page_header" },
6
+ "menu":{ "label":"Top navigation", "type":"adminhtml/page_menu" },
7
+ "breadcrumbs":{ "label":"Breadcrumbs", "type":"adminhtml/widget_breadcrumbs" },
8
+ "content":{ "label":"Content block", "type":"core/template" },
9
+ "left":{ "label":"Left navigation", "type":"core/template" },
10
+ "footer":{ "label":"Footer", "type":"adminhtml/page_footer" }
11
+ },
12
+ "vars":{}
13
+ }*/ ?>
14
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
15
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->getLang() ?>" lang="<?php echo $this->getLang() ?>">
16
+ <head>
17
+ <?php echo $this->getChildHtml('head') ?>
18
+ </head>
19
+
20
+ <body id="html-body"<?php echo $this->getBodyClass() ? ' class="' . $this->getBodyClass() . '"' : ''; ?>>
21
+ <?php echo $this->getChildHtml('notification_window'); ?>
22
+ <div class="wrapper">
23
+ <?php echo $this->getChildHtml('global_notices') ?>
24
+ <div class="middle" id="anchor-content">
25
+ <div id="page:main-container">
26
+ <?php if($this->getChildHtml('left')): ?>
27
+
28
+ <div class="columns <?php echo $this->getContainerCssClass() ?>">
29
+ <div class="side-col" id="page:left">
30
+ <?php echo $this->getChildHtml('left') ?>
31
+ </div>
32
+ <div class="main-col" id="content">
33
+ <div class="main-col-inner">
34
+ <div id="messages"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
35
+ <?php echo $this->getChildHtml('content') ?>
36
+ </div>
37
+ </div>
38
+ </div>
39
+
40
+ <?php else: ?>
41
+ <div id="messages"><?php echo $this->getMessagesBlock()->getGroupedHtml() ?></div>
42
+ <?php echo $this->getChildHtml('content') ?>
43
+ <?php endif; ?>
44
+ </div>
45
+ </div>
46
+ </div>
47
+ <?php echo $this->getChildHtml('js') ?>
48
+ <?php echo $this->getChildHtml('profiler') ?>
49
+ <div id="loading-mask" style="display:none">
50
+ <p class="loader" id="loading_mask_loader"><img src="<?php echo $this->getSkinUrl('images/ajax-loader-tr.gif') ?>" alt="<?php echo Mage::helper('adminhtml')->__('Loading...') ?>"/><br/><?php echo Mage::helper('adminhtml')->__('Please wait...') ?></p>
51
+ </div>
52
+
53
+ <?php echo $this->getChildHtml('before_body_end') ?>
54
+
55
+ </body>
56
+ </html>
app/design/adminhtml/default/default/template/oro/api/script.phtml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <script type="text/javascript" src="<?php echo Mage::getBaseUrl('js') ?>mage/cookies.js"></script>
2
+ <?php /** @var $cookie Mage_Core_Model_Cookie */
3
+ $cookie = Mage::getSingleton('core/cookie'); ?>
4
+ <script type="text/javascript">
5
+ //<![CDATA[
6
+ if (window.self == window.top && 1 == window.Mage.Cookies.get("is-oro-request")) {
7
+ // If is not iframe and cookie exists then clear it
8
+ window.Mage.Cookies.set(
9
+ "is-oro-request",
10
+ 0,
11
+ null,
12
+ '<?php echo $cookie->getPath();?>',
13
+ '<?php echo $cookie->getDomain();?>'
14
+ );
15
+ location.reload();
16
+ }
17
+ //]]>
18
+ </script>
app/etc/modules/Oro_Api.xml CHANGED
File without changes
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Oro_Api</name>
4
- <version>1.1.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL 3.0)</license>
7
  <channel>community</channel>
@@ -10,9 +10,9 @@
10
  <description>OroCRM Bridge extension adds a couple of improvements to Magento SOAP API v2 in order to expose more shopping cart and customer data.</description>
11
  <notes>OroCRM Bridge extension adds a couple of improvements to Magento SOAP API v2 in order to expose more shopping cart and customer data.</notes>
12
  <authors><author><name>Oro, Inc</name><user>orocrm</user><email>info@orocrm.com</email></author></authors>
13
- <date>2014-04-15</date>
14
- <time>10:30:53</time>
15
- <contents><target name="magecommunity"><dir name="Oro"><dir name="Api"><dir name="Helper"><file name="Data.php" hash="94d7cebbd20dca0e0176e300a4165434"/></dir><dir name="Model"><dir name="Catalog"><dir name="Product"><dir name="Api"><file name="V2.php" hash="9fe5e65e1b189ba6a9fed25fe8d858d6"/></dir></dir></dir><dir name="Customer"><dir name="Api"><file name="V2.php" hash="89fc6f16e7f452438d4927669ea0f0de"/></dir><file name="Api.php" hash="5da59afaac86ecb594f8e3d280cdc67d"/></dir><dir name="Newsletter"><dir name="Subscriber"><dir name="Api"><file name="V2.php" hash="7b18db294f86ccf841a95aa7b7e656af"/></dir><file name="Api.php" hash="a49473afaca6c5bbbb82f58f41ff1650"/></dir></dir><dir name="Observer"><dir name="Crm"><file name="Controller.php" hash="10e07e0b8086c9475c6128cd2ac43878"/></dir><dir name="Sales"><file name="Order.php" hash="81e2f8992f57a406130c893072365782"/></dir></dir><dir name="Ping"><file name="V2.php" hash="0fa10110ecb67d32079c5530a979c55a"/></dir><file name="Ping.php" hash="e5f8c2feb8ece7f27ff4f13277da68fd"/><dir name="Report"><dir name="Product"><dir name="Viewed"><dir name="Api"><file name="V2.php" hash="c8481504cefd028a17cc4a6555182ad0"/></dir><file name="Api.php" hash="fe175f2aab97cafa47574f1da2e169a3"/></dir></dir></dir><dir name="Resource"><dir name="Reports"><dir name="Product"><dir name="Index"><dir name="Viewed"><file name="Collection.php" hash="199749c5c972ab305abff0c9b10e9954"/></dir></dir></dir></dir></dir><dir name="Sales"><dir name="Order"><dir name="Api"><file name="V2.php" hash="0621bd68c420feb8000dae6861c49369"/></dir><file name="Api.php" hash="62c6b56d1fbe74b44d0ec087b605334d"/></dir><dir name="Quote"><dir name="Api"><file name="V2.php" hash="4e8ba0ed7757110c4eae1d239b2adf76"/></dir><file name="Api.php" hash="193c05456f86b5072f0ee5c20cb22eac"/></dir></dir><dir name="Wishlist"><dir name="Api"><file name="V2.php" hash="f0ac63e1cf9440ed0e4ca72eb93834f2"/></dir><file name="Api.php" hash="3ebfc3b7841c265921ea05d63f8ba5a9"/><dir name="Item"><dir name="Api"><file name="V2.php" hash="43a919dae8dd432e211878a39ba3f4a2"/></dir><file name="Api.php" hash="8d5d856ea533b9b122c96d0bef32861b"/></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Oro"><file name="GatewayController.php" hash="aca4efd099a889a77fb119356d9fab23"/><file name="SalesController.php" hash="4ba37d2b0d86c0eeaf9e6fa2b7bac843"/></dir></dir></dir><dir name="etc"><file name="api.xml" hash="2ee90b80f4d29ab73b3517a3d19e7aa3"/><file name="config.xml" hash="bbaa0acc4714204e0dd4bad2bbdf8263"/><file name="workflow.xml" hash="12ad592e533d8a53187af25c46fb017e"/><file name="wsdl.xml" hash="daa6f02635ba6912c1155a6fb003a155"/><file name="wsi.xml" hash="ed1f4cac2c8afd96e266517c7ddfcb2b"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Oro_Api.xml" hash="e4836dedcf0ace31dd01b117a1fd962e"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.13</min><max>5.5.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Oro_Api</name>
4
+ <version>1.1.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL 3.0)</license>
7
  <channel>community</channel>
10
  <description>OroCRM Bridge extension adds a couple of improvements to Magento SOAP API v2 in order to expose more shopping cart and customer data.</description>
11
  <notes>OroCRM Bridge extension adds a couple of improvements to Magento SOAP API v2 in order to expose more shopping cart and customer data.</notes>
12
  <authors><author><name>Oro, Inc</name><user>orocrm</user><email>info@orocrm.com</email></author></authors>
13
+ <date>2014-05-12</date>
14
+ <time>10:32:21</time>
15
+ <contents><target name="magecommunity"><dir name="Oro"><dir name="Api"><dir name="Helper"><file name="Data.php" hash="94d7cebbd20dca0e0176e300a4165434"/></dir><dir name="Model"><dir name="Catalog"><dir name="Product"><dir name="Api"><file name="V2.php" hash="9fe5e65e1b189ba6a9fed25fe8d858d6"/></dir></dir></dir><dir name="Customer"><dir name="Api"><file name="V2.php" hash="89fc6f16e7f452438d4927669ea0f0de"/></dir><file name="Api.php" hash="4cbc2a224da7d80ca7253f297efeaaed"/></dir><dir name="Newsletter"><dir name="Subscriber"><dir name="Api"><file name="V2.php" hash="7b18db294f86ccf841a95aa7b7e656af"/></dir><file name="Api.php" hash="a49473afaca6c5bbbb82f58f41ff1650"/></dir></dir><dir name="Observer"><dir name="Crm"><file name="Controller.php" hash="10e07e0b8086c9475c6128cd2ac43878"/></dir><dir name="Sales"><file name="Order.php" hash="81e2f8992f57a406130c893072365782"/></dir></dir><dir name="Ping"><file name="V2.php" hash="0fa10110ecb67d32079c5530a979c55a"/></dir><file name="Ping.php" hash="e5f8c2feb8ece7f27ff4f13277da68fd"/><dir name="Report"><dir name="Product"><dir name="Viewed"><dir name="Api"><file name="V2.php" hash="c8481504cefd028a17cc4a6555182ad0"/></dir><file name="Api.php" hash="fe175f2aab97cafa47574f1da2e169a3"/></dir></dir></dir><dir name="Resource"><dir name="Reports"><dir name="Product"><dir name="Index"><dir name="Viewed"><file name="Collection.php" hash="199749c5c972ab305abff0c9b10e9954"/></dir></dir></dir></dir></dir><dir name="Sales"><dir name="Order"><dir name="Api"><file name="V2.php" hash="0621bd68c420feb8000dae6861c49369"/></dir><file name="Api.php" hash="62c6b56d1fbe74b44d0ec087b605334d"/></dir><dir name="Quote"><dir name="Api"><file name="V2.php" hash="4e8ba0ed7757110c4eae1d239b2adf76"/></dir><file name="Api.php" hash="193c05456f86b5072f0ee5c20cb22eac"/></dir></dir><dir name="Wishlist"><dir name="Api"><file name="V2.php" hash="f0ac63e1cf9440ed0e4ca72eb93834f2"/></dir><file name="Api.php" hash="3ebfc3b7841c265921ea05d63f8ba5a9"/><dir name="Item"><dir name="Api"><file name="V2.php" hash="43a919dae8dd432e211878a39ba3f4a2"/></dir><file name="Api.php" hash="8d5d856ea533b9b122c96d0bef32861b"/></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Oro"><file name="GatewayController.php" hash="aca4efd099a889a77fb119356d9fab23"/><file name="SalesController.php" hash="4ba37d2b0d86c0eeaf9e6fa2b7bac843"/></dir></dir></dir><dir name="etc"><file name="api.xml" hash="2ee90b80f4d29ab73b3517a3d19e7aa3"/><file name="config.xml" hash="bbaa0acc4714204e0dd4bad2bbdf8263"/><file name="workflow.xml" hash="12ad592e533d8a53187af25c46fb017e"/><file name="wsdl.xml" hash="d0266ccf9a6811d3e7e2340cd7af8081"/><file name="wsi.xml" hash="dd9047840a8cc69deee4df21cf08d553"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Oro_Api.xml" hash="e4836dedcf0ace31dd01b117a1fd962e"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="oro"><dir><dir name="api"><file name="page.phtml" hash="be4a29775b24569d60802616072b2628"/><file name="script.phtml" hash="e9002ec0c9b90fc92c926542e84045bf"/></dir></dir></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.13</min><max>5.5.0</max></php></required></dependencies>
18
  </package>