1
0
This repository has been archived on 2021-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
gallery3-contrib/3.0/modules/basket_plus/helpers/order_log.php
Jeroen ten kate 8eec645c40 Initial commit of modified Basket module
Additions: order status, customer object, e-mails for order status
changes, additional order view, webshop configuration options
2012-12-27 20:51:16 +01:00

47 lines
1.7 KiB
PHP

<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2011 Bharat Mediratta
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class order_log {
const ORDERED = 1;
const PAID = 2;
const LATE_PAYMENT = 3;
const COPY_SENT = 9;
const DELIVERED_NOTPAID = 10;
const DELIVERED = 20;
const EXPIRED = 30;
const CANCELLED = 99;
/**
* Add a log entry.
*
* @param string $category an arbitrary category we can use to filter log messages
* @param string $message a detailed log message
* @param integer $severity INFO, WARNING or ERROR
* @param string $html an html snippet presented alongside the log message to aid the admin
*/
static function log($order, $event) {
$log = ORM::factory("order_log");
$log->id = $order->id;
$log->status = $order->status;
$log->event = $event;
$log->timestamp = time();
$log->save();
}
}