Mage::app('default'); $email = "*****@*****.**"; $a = new ICC_Avectra_Model_Account(); $customer = $a->getByEmail($email); $ak = $customer->getAvectraKey(); #print_r($a->hasBillMemberStatus($ak)); #die; $account = new ICC_Avectra_Model_Account(); $orgavkeys = $account->getAffiliatedOrgAvKeys($ak); print_r ($customer->getAvectraKey()); die; $ui = $account->getAvComm()->getUserInfo($customer->getAvectraKey()); print_r($ui); die;
<?php require_once '../app/Mage.php'; umask ( 0 ); Mage::app ( 'default' ); $av = new ICC_Avectra_Model_Account(); /* * 850739 * * 820110 */ // // 8063540 /// 5225406 org $user = $av->getUserByRecNo(8063540)->WEBWebUserGetByRecno_CustomResult; print_r($user); //echo "\n\n------------createNewUser---------------\n\n"; echo "\n\n---------updateUser------------------\n\n"; $aff = $av->updateUser($user->CurrentKey);
protected function setCustomerData($order) { // name $this->CustomerName = trim($order->getCustomerFirstname() . " " . $order->getCustomerLastname()); if (empty($this->CustomerName)) { $this->CustomerName = $this->BillToAddress->ContactName; } $this->CustomerEmail = $order->getCustomerEmail(); $this->CustomerPhone = preg_replace("[^0-9]", "", $order->getBillingAddress()->getTelephone()); // Data not stored on order. // Will always be blank if this is a guest. $avcustomer = new ICC_Avectra_Model_Account(); $customer = Mage::getModel('customer/customer')->load($order->getCustomerId()); if ($customer->getCustomerNo()) { $this->CustomerId = $customer->getCustomerNo(); $this->INDNumber = $customer->getCustomerNo(); // if( $customer->getOrgCustomerNo() != null) // $this->ORGNumber = $customer->getOrgCustomerNo(); $user = $avcustomer->getUserByRecNo($this->CustomerId)->WEBWebUserGetByRecno_CustomResult; $orgcustno = null; $orgcustno = $avcustomer->getUserOrgCustomerNo($user->CurrentKey); if ($orgcustno) { if (is_array($orgcustno)) { $orgcustno = $orgcustno[0]; } $this->ORGNumber = $orgcustno; } } if ($customer->getMemberStatus()) { $this->MemberFlag = $customer->getMemberStatus(); } else { $this->MemberFlag = ""; } }