Adventos_OrderExport - Version 1.3.8

Version Notes

add state to address
php XML bug workaround

Download this release

Release Info

Developer Karsten Hoffmann
Extension Adventos_OrderExport
Version 1.3.8
Comparing to
See all releases


Code changes from version 1.3.6 to 1.3.8

app/code/local/Adventos/OrderExport/Model/Observer.php CHANGED
@@ -82,6 +82,23 @@ class Adventos_OrderExport_Model_Observer
82
 
83
  return $this;
84
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
 
86
  public function toXML($data, $rootNodeName='base',$xml=null){
87
  if ($xml == null){
@@ -110,6 +127,9 @@ class Adventos_OrderExport_Model_Observer
110
  } else {
111
  // add single node.
112
  $value = str_replace('€','EUR',$value);
 
 
 
113
  $xml->addChild($key,$value);
114
  }
115
 
82
 
83
  return $this;
84
  }
85
+
86
+ public function _translateLiteral2NumericEntities($xmlSource, $reverse=FALSE) {
87
+ static $literal2NumericEntity;
88
+
89
+ if (empty($literal2NumericEntity)) {
90
+ $transTbl = get_html_translation_table(HTML_ENTITIES);
91
+ foreach ($transTbl as $char => $entity) {
92
+ if (strpos('&"<>', $char) !== FALSE) continue;
93
+ $literal2NumericEntity[$entity] = '&#'.ord($char).';';
94
+ }
95
+ }
96
+ if ($reverse) {
97
+ return strtr($xmlSource, array_flip($literal2NumericEntity));
98
+ } else {
99
+ return strtr($xmlSource, $literal2NumericEntity);
100
+ }
101
+ }
102
 
103
  public function toXML($data, $rootNodeName='base',$xml=null){
104
  if ($xml == null){
127
  } else {
128
  // add single node.
129
  $value = str_replace('€','EUR',$value);
130
+ Mage::log("ADVENTOS XML before value: ".$value);
131
+ $value = htmlspecialchars($value);
132
+ Mage::log("ADVENTOS XML encoded value: ".$value);
133
  $xml->addChild($key,$value);
134
  }
135
 
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Adventos_OrderExport</name>
4
- <version>1.3.6</version>
5
  <stability>stable</stability>
6
  <license>OSL</license>
7
  <channel>community</channel>
@@ -9,11 +9,11 @@
9
  <summary>Magento integration for HeadOffice</summary>
10
  <description>Create Order XML file to integrate Magento with HeadOffice and synchronize stock, order status, invoice, shipments and credit memos.</description>
11
  <notes>add state to address&#xD;
12
- </notes>
13
  <authors><author><name>Karsten Hoffmann</name><user>adventos</user><email>karsten@adventos.de</email></author></authors>
14
- <date>2013-08-22</date>
15
- <time>15:49:11</time>
16
- <contents><target name="magelocal"><dir name="Adventos"><dir name="OrderExport"><dir name="Helper"><file name="Data.php" hash="f90dd7d2136cfb6349ba1d7ee939cd15"/></dir><dir name="Model"><dir name="Creditmemo"><dir name="Api"><file name="V2.php" hash="797a58eedbbe8bf1a0c20d7c8599f8be"/></dir><file name="Api.php" hash="c41e82cf79235d51f25d248719e93f92"/></dir><dir name="Invoice"><dir name="Api"><file name="V2.php" hash="3596dc5fe58a597ba5f244b52687288e"/></dir><file name="Api.php" hash="280512b1ae37690871384b3cba0a3a2b"/></dir><file name="Observer.php" hash="6e92e4c475feaca7d51c205e1defb74a"/><file name="Observer.php.def" hash="8849a673153fbab13536e3f83d605c3c"/><dir name="Shipment"><dir name="Api"><file name="V2.php" hash="3d7824e13e4d5cedb755b4858398f23e"/></dir><file name="Api.php" hash="0b9bf452b7e36c1ee5cefbb3d6c5eb3b"/></dir></dir><dir name="etc"><file name="api.xml" hash="c1b2bc277e329b8191bcc5358cb96581"/><file name="config.xml" hash="cdbbf42811356eed0919a776765e98c9"/><file name="system.xml" hash="d7feaf247eed064d617138508dd88fe4"/><file name="wsdl.xml" hash="1538d2cb05f819c45e807f992c1b7cb3"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Adventos_OrderExport.xml" hash="479b13bf3a08de9f93f5f58d77d3f9bb"/></dir></target></contents>
17
  <compatible/>
18
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
19
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Adventos_OrderExport</name>
4
+ <version>1.3.8</version>
5
  <stability>stable</stability>
6
  <license>OSL</license>
7
  <channel>community</channel>
9
  <summary>Magento integration for HeadOffice</summary>
10
  <description>Create Order XML file to integrate Magento with HeadOffice and synchronize stock, order status, invoice, shipments and credit memos.</description>
11
  <notes>add state to address&#xD;
12
+ php XML bug workaround</notes>
13
  <authors><author><name>Karsten Hoffmann</name><user>adventos</user><email>karsten@adventos.de</email></author></authors>
14
+ <date>2013-09-10</date>
15
+ <time>11:22:04</time>
16
+ <contents><target name="magelocal"><dir name="Adventos"><dir name="OrderExport"><dir name="Helper"><file name="Data.php" hash="f90dd7d2136cfb6349ba1d7ee939cd15"/></dir><dir name="Model"><dir name="Creditmemo"><dir name="Api"><file name="V2.php" hash="797a58eedbbe8bf1a0c20d7c8599f8be"/></dir><file name="Api.php" hash="c41e82cf79235d51f25d248719e93f92"/></dir><dir name="Invoice"><dir name="Api"><file name="V2.php" hash="3596dc5fe58a597ba5f244b52687288e"/></dir><file name="Api.php" hash="280512b1ae37690871384b3cba0a3a2b"/></dir><file name="Observer.php" hash="edeb43ec4129f24a099c9c3f9d864dab"/><file name="Observer.php.def" hash="8849a673153fbab13536e3f83d605c3c"/><dir name="Shipment"><dir name="Api"><file name="V2.php" hash="3d7824e13e4d5cedb755b4858398f23e"/></dir><file name="Api.php" hash="0b9bf452b7e36c1ee5cefbb3d6c5eb3b"/></dir></dir><dir name="etc"><file name="api.xml" hash="c1b2bc277e329b8191bcc5358cb96581"/><file name="config.xml" hash="cdbbf42811356eed0919a776765e98c9"/><file name="system.xml" hash="d7feaf247eed064d617138508dd88fe4"/><file name="wsdl.xml" hash="1538d2cb05f819c45e807f992c1b7cb3"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Adventos_OrderExport.xml" hash="479b13bf3a08de9f93f5f58d77d3f9bb"/></dir></target></contents>
17
  <compatible/>
18
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
19
  </package>