/** * Set complete delivery address for this order. * @param $data */ public function setDeliveryAddress($data) { $this->firstname = Toolbox::cleanName($data['firstname']); $this->lastname = Toolbox::cleanName($data['lastname']); $this->address1 = $data['address1']; $this->postcode = Toolbox::cleanPostCode($data['postcode']); $this->city = $data['city']; $this->id_country = (int) $data['id_country']; $this->id_state = (int) $data['id_state']; $this->phone = $data['phone']; $this->state_address = 1; $this->update(); }
* Check key */ $check_key = md5($current_cart->id . '_' . $current_cart->secure_key); if (!Tools::getValue('key', false) or Tools::getValue('key') != $check_key) { die('An error occurred...'); } /* * Get popup return data */ $receiver_type = Tools::getValue('receiver_type'); $receiver_linkedin_id = Tools::getValue('receiver_linkedin_id'); $receiver_facebook_id = Tools::getValue('receiver_facebook_id'); $postcode = Tools::getValue('postcode'); $telephone = Toolbox::cleanPhone(Tools::getValue('telephone')); $firstname = Toolbox::cleanName(Tools::getValue('firstname')); $lastname = Toolbox::cleanName(Tools::getValue('lastname')); $email = Tools::getValue('email'); $country_iso = Tools::getValue('country_id'); $telephone_no = Toolbox::cleanPhone(Tools::getValue('telephone_no')); $region = Tools::getValue('region'); $city = Tools::getValue('city'); if (!Validate::isEmail($email)) { die('<script language="javascript" type="text/javascript">top.location.href = "' . $context->link->getPageLink('order') . '?step=1" ;</script>'); } /* * Check if address already registered on ship2myid. */ /* * $sender_email = Db::getInstance()->getValue('SELECT email FROM '._DB_PREFIX_.'customer WHERE id_customer = '.(int)$current_cart->id_customer); */ $info = array('email_address' => $email);