protected function addAddressCheckout($type)
    {
        $submitted = $this->getSubmitted("address.$type");

        if ($this->{"show_{$type}_address_form"} && !empty($submitted)) {

            $address_id = $this->address->add($submitted);
            $this->setSubmitted("{$type}_address", $address_id);

            foreach ($this->address->getExceeded($this->order_user_id) as $address) {
                $this->address->delete($address['address_id']);
            }
        }
    }
protected function addAddressCheckout($type)
    {
        $submitted = $this->getSubmitted("address.$type");

        if ($this->{"show_{$type}_address_form"} && !empty($submitted)) {

            $address_id = $this->address->add($submitted);
            $this->setSubmitted("{$type}_address", $address_id);

            foreach ($this->address->getExceeded($this->order_user_id) as $address) {
                $this->address->delete($address['address_id']);
            }
        }
    }
protected function addAddressCheckout ( $ type ) { $ submitted = $ this -> getSubmitted ( "address.$type" ) ; if ( $ this -> { "show_{$type}_address_form" } && ! empty ( $ submitted ) ) { $ address_id = $ this -> address -> add ( $ submitted ) ; $ this -> setSubmitted ( "{$type}_address" , $ address_id ) ; foreach ( $ this -> address -> getExceeded ( $ this -> order_user_id ) as $ address ) { $ this -> address -> delete ( $ address [ 'address_id' ] ) ; } } }
Adds a submitted address
@param string $type
Adds a submitted address