Exemplo n.º 1
0
 function question()
 {
     $Order = new mOrder();
     $Order->__fromMemory();
     $Order->customer->__toMemory();
     redirect('/contact/');
 }
Exemplo n.º 2
0
 function send()
 {
     $Review = new mReview();
     $Review->__post();
     if ($Review->validate()) {
         $Order = new mOrder();
         $Order->__post();
         $Order->load();
         if ($Order->is_loaded()) {
             $Order->save($Review);
         } else {
             $Review->save();
         }
         return $this->display('sent');
     }
     return $this->index();
 }
Exemplo n.º 3
0
 function addToOrder()
 {
     $Order = mOrder::get_instance();
     $Order->addToOrder($this);
 }
Exemplo n.º 4
0
 function __construct()
 {
     parent::__construct();
     $API = new stripelib();
     $this->order = mOrder::get_instance();
 }
Exemplo n.º 5
0
 function delete($OrderID)
 {
     $Order = new mOrder($OrderID);
     $Order->delete();
     redirect($_SERVER['HTTP_REFERER']);
 }
Exemplo n.º 6
0
<?php

include '../model/mCart.php';
include '../model/mCategory.php';
include '../model/mProductLister.php';
include '../model/mOrder.php';
/*
echo '<pre>'; print_r($_POST); echo '</pre><br/>';
echo 'postback=\''; echo $_POST['postback']; echo '\''; 
*/
if (!empty($_POST['postback'])) {
    if (mOrder::set_order()) {
        // order was successful
        $order = 't';
    } else {
        // order was failed
        $order = 'f';
    }
}
$categories = mCategory::get_categories(0);
$cart = mCart::get_cart();
// set variables for display
if ($_POST['customer_datas'] == 1 and isset($_POST['c_name']) and isset($_POST['c_email']) and isset($_POST['c_email2']) and isset($_POST['c_tel']) and isset($_POST['c_country']) and isset($_POST['c_postal_code']) and isset($_POST['c_city']) and isset($_POST['c_address']) and isset($_POST['i_name']) and isset($_POST['i_country']) and isset($_POST['i_postal_code']) and isset($_POST['i_city']) and isset($_POST['i_address'])) {
    $c_name = $_POST['c_name'];
    $_SESSION['c_name'] = $_POST['c_name'];
    if ($_POST['c_email'] == $_POST['c_email2']) {
        $c_email = $_POST['c_email'];
        $_SESSION['c_email'] = $_POST['c_email'];
    }
    $c_tel = $_POST['c_tel'];
    $_SESSION['c_tel'] = $_POST['c_tel'];