/** * Copies the values of the address item into another one. * * @param \Aimeos\MShop\Common\Item\Address\Iface $item Address item * @return \Aimeos\MShop\Common\Item\Address\Iface Common address item for chaining method calls */ public function copyFrom(\Aimeos\MShop\Common\Item\Address\Iface $item) { $this->setCompany($item->getCompany()); $this->setVatID($item->getVatID()); $this->setSalutation($item->getSalutation()); $this->setTitle($item->getTitle()); $this->setFirstname($item->getFirstname()); $this->setLastname($item->getLastname()); $this->setAddress1($item->getAddress1()); $this->setAddress2($item->getAddress2()); $this->setAddress3($item->getAddress3()); $this->setPostal($item->getPostal()); $this->setCity($item->getCity()); $this->setState($item->getState()); $this->setCountryId($item->getCountryId()); $this->setLanguageId($item->getLanguageId()); $this->setTelephone($item->getTelephone()); $this->setTelefax($item->getTelefax()); $this->setEmail($item->getEmail()); $this->setWebsite($item->getWebsite()); $this->setFlag($item->getFlag()); $this->setModified(); return $this; }
/** * Sends the notification e-mail for the given customer address and products * * @param \Aimeos\MShop\Context\Item\Iface $context Context item object * @param \Aimeos\MShop\Common\Item\Address\Iface $address Payment address of the customer * @param array $products List of products a notification should be sent for */ protected function sendMail(\Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MShop\Common\Item\Address\Iface $address, array $products) { $view = $context->getView(); $view->extProducts = $products; $view->extAddressItem = $address; $helper = new \Aimeos\MW\View\Helper\Translate\Standard($view, $context->getI18n($address->getLanguageId())); $view->addHelper('translate', $helper); $mailer = $context->getMail(); $message = $mailer->createMessage(); $helper = new \Aimeos\MW\View\Helper\Mail\Standard($view, $message); $view->addHelper('mail', $helper); $client = $this->getClient($context); $client->setView($view); $client->getHeader(); $client->getBody(); $mailer->send($message); }