I have an observer event tat right now grabs the customer info on customer_save_after
at this point I am writing that information into a var log file.
I want to send that information to a SOAP API on an external web service.
Observer.php
class Mage_Customerupdate_Model_Observer { public function logUpdate(Varien_Event_Observer $ observer) { $ customer = $ observer->getEvent()->getCustomer(); $ name = $ customer->getName(); $ billingaddress = $ customer->getDefaultBillingAddress(); // just check if there is a billing adress if ($ billingaddress) { $ fon = $ billingaddress->getTelephone(); $ street1 = $ billingaddress->getStreet(1); $ street2 = $ billingaddress->getStreet(2); $ city = $ billingaddress->getCity(); $ region = $ billingaddress->getRegion(); $ postcode = $ billingaddress->getPostcode(); Mage::log("{$ name} {$ fon} {$ street1} {$ street2} {$ city} {$ region} {$ postcpde} updated", null, 'customerupdate.log', true); } } }
I have a wsdl url to send it to.
My variables there are:
CustomerNumber (phone number) CustomerName CustomerAddress1 CustomerAddress2 CustomerCity CustomerState CustomerZip
I am lost at how I can send the data to the SOAP client rather than to the var log.