Esempio n. 1
0
 function batch_process()
 {
     $os = new order_status();
     $oss = $os->find('all');
     $order_status = array();
     $order_status[-1] = '';
     foreach ($oss as $status) {
         $order_status[$status->id] = $status->title;
     }
     assign_to_template(array('order_status' => $order_status));
 }
Esempio n. 2
0
 public function getDefaultOrderStatus()
 {
     $os = new order_status();
     $oss = $os->find('first', 'is_default=1');
     //eDebug($ots,true);
     return $oss->id;
 }
Esempio n. 3
0
 function order_report()
 {
     // stub function. I'm sure eventually we can pull up exising reports to pre-populate our form.
     $os = new order_status();
     $oss = $os->find('all');
     $order_status = array();
     $order_status[-1] = '';
     foreach ($oss as $status) {
         $order_status[$status->id] = $status->title;
     }
     $ot = new order_type();
     $ots = $ot->find('all');
     $order_type = array();
     $order_type[-1] = '';
     foreach ($ots as $orderType) {
         $order_type[$orderType->id] = $orderType->title;
     }
     $dis = new discounts();
     $diss = $dis->find('all');
     $discounts = array();
     $discounts[-1] = '';
     foreach ($diss as $dkey => $discount) {
         $discounts[$discount->id] = $discount->coupon_code;
     }
     /*$geo = new geoRegion();
       $geos = $geo->find('all');        
       $states = array();
       $states[-1] = '';
       foreach ($geos as $skey=>$state)
       {
           $states[$skey] = $state->name;
       } */
     $payment_methods = billingmethod::$payment_types;
     $payment_methods[-1] = "";
     ksort($payment_methods);
     //array('-1'=>'', 'V'=>'Visa','MC'=>'Mastercard','D'=>'Discover','AMEX'=>'American Express','PP'=>'PayPal','GC'=>'Google Checkout','Other'=>'Other');
     //eDebug(mktime(0,0,0,(strftime("%m")-1),1,strftime("%Y")));
     $prev_month = strftime("%A, %d %B %Y", mktime(0, 0, 0, strftime("%m") - 1, 1, strftime("%Y")));
     //eDebug(strftime("%A, %d %B %Y", mktime(0,0,0,(strftime("%m")-1),1,strftime("%Y"))));
     $now_date = strftime("%A, %d %B %Y");
     $now_hour = strftime("%I");
     $now_min = strftime("%M");
     $now_ampm = strftime("%p");
     assign_to_template(array('prev_month' => $prev_month, 'now_date' => $now_date, 'now_hour' => $now_hour, 'now_min' => $now_min, 'now_ampm' => $now_ampm));
     assign_to_template(array('order_status' => $order_status));
     assign_to_template(array('discounts' => $discounts));
     //assign_to_template(array('states'=>$states));
     assign_to_template(array('order_type' => $order_type));
     assign_to_template(array('payment_methods' => $payment_methods));
 }