Version Notes
Added gender value to the returned customer object
Download this release
Release Info
| Developer | Magento Core Team |
| Extension | NL2go_Sync |
| Version | 1.0.2 |
| Comparing to | |
| See all releases | |
Code changes from version 1.0.1 to 1.0.2
app/code/local/NL2go/Sync/Model/Newsletter/Api/V2.php
CHANGED
|
@@ -33,6 +33,9 @@ class Nl2go_Sync_Model_Newsletter_Api_V2 extends Mage_Api_Model_Resource_Abstrac
|
|
| 33 |
$customerInfo = Mage::getModel('customer/customer_api')->info($v["customer_id"]);
|
| 34 |
|
| 35 |
$customer = Mage::getModel('customer/customer')->load($v["customer_id"]);
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
$customerTotals = Mage::getResourceModel('sales/sale_collection')
|
| 38 |
->setOrderStateFilter(Mage_Sales_Model_Order::STATE_CANCELED, true)
|
|
@@ -57,6 +60,8 @@ class Nl2go_Sync_Model_Newsletter_Api_V2 extends Mage_Api_Model_Resource_Abstrac
|
|
| 57 |
unset($customerTotals);
|
| 58 |
if(method_exists($customer, "clearInstance"))
|
| 59 |
$customer->clearInstance();
|
|
|
|
|
|
|
| 60 |
}
|
| 61 |
|
| 62 |
// get simple subscribers, as unregistered customers
|
| 33 |
$customerInfo = Mage::getModel('customer/customer_api')->info($v["customer_id"]);
|
| 34 |
|
| 35 |
$customer = Mage::getModel('customer/customer')->load($v["customer_id"]);
|
| 36 |
+
$gender_code = $customer->getGender();
|
| 37 |
+
if(!is_null($gender_code))
|
| 38 |
+
$customerInfo['gender'] = $customer->getAttribute("gender")->getSource()->getOptionText($gender_code);
|
| 39 |
|
| 40 |
$customerTotals = Mage::getResourceModel('sales/sale_collection')
|
| 41 |
->setOrderStateFilter(Mage_Sales_Model_Order::STATE_CANCELED, true)
|
| 60 |
unset($customerTotals);
|
| 61 |
if(method_exists($customer, "clearInstance"))
|
| 62 |
$customer->clearInstance();
|
| 63 |
+
if(method_exists($customerTotals, "clearInstance"))
|
| 64 |
+
$customerTotals->clearInstance();
|
| 65 |
}
|
| 66 |
|
| 67 |
// get simple subscribers, as unregistered customers
|
app/code/local/NL2go/Sync/etc/wsdl.xml
CHANGED
|
@@ -8,6 +8,29 @@
|
|
| 8 |
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:Magento">
|
| 9 |
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"
|
| 10 |
schemaLocation="http://schemas.xmlsoap.org/soap/encoding/"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
<complexType name="newsletterSubscriberEntity">
|
| 12 |
<all>
|
| 13 |
<element name="subscriber_id" type="xsd:int" minOccurs="0"/>
|
|
@@ -17,7 +40,7 @@
|
|
| 17 |
<element name="total_sales" type="xsd:float" minOccurs="0"/>
|
| 18 |
<element name="avg_sales" type="xsd:float" minOccurs="0"/>
|
| 19 |
<element name="total_orders" type="xsd:int" minOccurs="0"/>
|
| 20 |
-
<element name="customer_info" type="typens:
|
| 21 |
</all>
|
| 22 |
</complexType>
|
| 23 |
<complexType name="ArrayOfNewsletterSubscriberEntity">
|
| 8 |
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:Magento">
|
| 9 |
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"
|
| 10 |
schemaLocation="http://schemas.xmlsoap.org/soap/encoding/"/>
|
| 11 |
+
<complexType name="customerCustomerEntityExtended">
|
| 12 |
+
<all>
|
| 13 |
+
<element name="customer_id" type="xsd:int" minOccurs="0"/>
|
| 14 |
+
<element name="created_at" type="xsd:string" minOccurs="0"/>
|
| 15 |
+
<element name="updated_at" type="xsd:string" minOccurs="0"/>
|
| 16 |
+
<element name="increment_id" type="xsd:string" minOccurs="0"/>
|
| 17 |
+
<element name="store_id" type="xsd:int" minOccurs="0"/>
|
| 18 |
+
<element name="website_id" type="xsd:int" minOccurs="0"/>
|
| 19 |
+
<element name="created_in" type="xsd:string" minOccurs="0"/>
|
| 20 |
+
<element name="email" type="xsd:string" minOccurs="0"/>
|
| 21 |
+
<element name="firstname" type="xsd:string" minOccurs="0"/>
|
| 22 |
+
<element name="middlename" type="xsd:string" minOccurs="0"/>
|
| 23 |
+
<element name="lastname" type="xsd:string" minOccurs="0"/>
|
| 24 |
+
<element name="group_id" type="xsd:int" minOccurs="0"/>
|
| 25 |
+
<element name="prefix" type="xsd:string" minOccurs="0"/>
|
| 26 |
+
<element name="suffix" type="xsd:string" minOccurs="0"/>
|
| 27 |
+
<element name="dob" type="xsd:string" minOccurs="0"/>
|
| 28 |
+
<element name="taxvat" type="xsd:string" minOccurs="0"/>
|
| 29 |
+
<element name="confirmation" type="xsd:boolean" minOccurs="0"/>
|
| 30 |
+
<element name="password_hash" type="xsd:string" minOccurs="0"/>
|
| 31 |
+
<element name="gender" type="xsd:string" minOccurs="0"/>
|
| 32 |
+
</all>
|
| 33 |
+
</complexType>
|
| 34 |
<complexType name="newsletterSubscriberEntity">
|
| 35 |
<all>
|
| 36 |
<element name="subscriber_id" type="xsd:int" minOccurs="0"/>
|
| 40 |
<element name="total_sales" type="xsd:float" minOccurs="0"/>
|
| 41 |
<element name="avg_sales" type="xsd:float" minOccurs="0"/>
|
| 42 |
<element name="total_orders" type="xsd:int" minOccurs="0"/>
|
| 43 |
+
<element name="customer_info" type="typens:customerCustomerEntityExtended" minOccurs="0"/>
|
| 44 |
</all>
|
| 45 |
</complexType>
|
| 46 |
<complexType name="ArrayOfNewsletterSubscriberEntity">
|
package.xml
CHANGED
|
@@ -1,19 +1,19 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>NL2go_Sync</name>
|
| 4 |
-
<version>1.0.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>GPL</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
<summary>Synchronizes your Magento newsletter subscribers, sales figures and shop items with Newsletter2Go.</summary>
|
| 10 |
<description><h2>Newsletter2Go Magento Extension</h2>
|
| 11 |
-
<p>The Magento Extension for the <a href=https://www.newsletter2go.de>Newsletter2Go email marketing software</a> automatically synchronizes all newsletter subscribers, including basic data like name and gender as well as the total amount of sales and average sale
|
| 12 |
-
<notes>
|
| 13 |
<authors><author><name>Steffen</name><user>auto-converted</user><email>info@newsletter2go.de</email></author></authors>
|
| 14 |
-
<date>2013-04-
|
| 15 |
-
<time>09:
|
| 16 |
-
<contents><target name="magelocal"><dir name="NL2go"><dir name="Sync"><dir name="Model"><dir name="Newsletter"><dir name="Api"><file name="V2.php" hash="
|
| 17 |
<compatible/>
|
| 18 |
<dependencies/>
|
| 19 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>NL2go_Sync</name>
|
| 4 |
+
<version>1.0.2</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>GPL</license>
|
| 7 |
<channel>community</channel>
|
| 8 |
<extends/>
|
| 9 |
<summary>Synchronizes your Magento newsletter subscribers, sales figures and shop items with Newsletter2Go.</summary>
|
| 10 |
<description><h2>Newsletter2Go Magento Extension</h2>
|
| 11 |
+
<p>The Magento Extension for the <a href=https://www.newsletter2go.de>Newsletter2Go email marketing software</a> automatically synchronizes all newsletter subscribers, including basic data like name and gender as well as the total amount of sales and average sale.</description>
|
| 12 |
+
<notes>Added gender value to the returned customer object</notes>
|
| 13 |
<authors><author><name>Steffen</name><user>auto-converted</user><email>info@newsletter2go.de</email></author></authors>
|
| 14 |
+
<date>2013-04-11</date>
|
| 15 |
+
<time>09:23:53</time>
|
| 16 |
+
<contents><target name="magelocal"><dir name="NL2go"><dir name="Sync"><dir name="Model"><dir name="Newsletter"><dir name="Api"><file name="V2.php" hash="a2f2316b18daa6ec1ad4ad6acf7890d2"/></dir><file name="Api.php" hash="c26ea29af9b050074560193228047842"/></dir></dir><dir name="etc"><file name="api.xml" hash="f1d83f4b3ce370e72285745611ae9aee"/><file name="config.xml" hash="534eb47f4db745e8b5210c1dfb5ca40a"/><file name="wsdl.xml" hash="ca2b3e1b8b1d2d3cdcb6bebc76620b21"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="NL2go_Sync.xml" hash="93aca69e7ba45a5664e4bcd277aa775b"/></dir></target></contents>
|
| 17 |
<compatible/>
|
| 18 |
<dependencies/>
|
| 19 |
</package>
|
