Online Order";

        $steps = DataObject::get('MultiFormStep', "SessionID = {$this->session->ID}");
        if($steps) {
            foreach($steps as $step) {

                $data = $step->loadData();

                if($step->class == 'BoardOrderAcceptTermsStep') {
                    $data = $step->loadData();
                    if($data) {

                    }
                }

                if($step->class == 'BoardOrderShaping1Step') {
                    $data = $step->loadData();
                    if($data) {
                        $basic_type = $data['basic_type'];
                        $body .= "

Shaping 1

"; $body .= ""; $body .= ""; $body .= ""; $body .= ""; $body .= ""; $body .= ""; $body .= ""; $body .= ""; $body .= "
Basic type" . $data['basic_type'] . "
Length" . $data['length'] . "
Width" . $data['width'] . "
Thickness" . $data['thickness'] . "
"; } } if($step->class == 'BoardOrderShaping2Step') { $data = $step->loadData(); if($data) { $body .= "

Shaping 2

"; $body .= ""; $body .= ""; $body .= ""; $body .= ""; $body .= ""; $body .= ""; $body .= ""; $body .= ""; $body .= ""; $body .= ""; $body .= ""; $body .= ""; } } if($step->class == 'BoardOrderFinal') { $data = $step->loadData(); if($data) { } } Debug::show($step->loadData()); // Shows the step data (unserialized by loadData) } } // Get email address from page or send to admin $sendto = ($this->ContactEmail!='' ? $this->ContactEmail : Email::getAdminEmail()); // Send email to Item Contact $email = new Email('[email protected]', '[email protected]', "Website Order: " . $basic_type, $body); $email->send(); //Director::redirect("orders"); //$response = array("Success" => "Success"); // Send email to User who enquired //$email = new Email('[email protected]', $data['email'], 'Receipt of website enquiry from Chapman Surfboards: '.$data['Title'], "Thankyou for your enquiry.\n\n".$body); //$email->sendPlain(); //$this->customise($response)->renderWith(array('Page', 'Page')); } } ?>
Rails type" . $data['rails_type'] . "
Bottom shape" . $data['bottom_shape'] . "
Bottom shape (other)" . $data['bottom_shape_other'] . "
Tail shape" . $data['tail_shape'] . "
Tail shape (other)" . $data['tail_shape_other'] . "