Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 26, 2012, 01:05:49 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Interested in joining the WebsiteBaker team?
For more Information read
here
or on our
new website
.
155538
Posts in
21712
Topics by
7769
Members
Latest Member:
deanmacullam
WebsiteBaker Community Forum
Bakery (WB shop module)
Bakery Deutsch
(Moderator:
freeSbee
)
Auftragsverwaltung anpassen
Pages: [
1
]
Go Down
Author
Topic: Auftragsverwaltung anpassen (Read 1254 times)
Lomex
Offline
Posts: 50
Auftragsverwaltung anpassen
«
on:
November 12, 2010, 04:26:54 PM »
Hallo,
ich würde gerne meine Auftragsverwaltung für meine Zwecke anpassen.
Leider ist es mit meinen PHP-Kenntnissen nicht so doll.
Also in der "modify_orders.php" möchte zusätzlich die die Werte:
Bezeichnung, Kurzbeschreibung und Menge der bestellten Artikel angezeigt bekommen.
und das ich die Ansicht sotieren kann, so wie im Lagerbestand. Noch schöner wäre es natürlich wenn man jede einzelne Spalte der Reihe nach sotieren könnte, ähnlich in einer Excel-Tabelle. (muss aber nicht)
Hab schon mal ein bißchen rumgebastelt, aber wie gesagt....php schreiben?...
Hab mal eine Grafik angehängt, wie es aussehen sollte.
Gruß
Axel
Logged
Der Kopf ist rund, damit das Denken die Richtung wechseln kann.
funas
Offline
Posts: 227
Re: Auftragsverwaltung anpassen
«
Reply #1 on:
November 12, 2010, 08:07:06 PM »
Und was ist, wenn jemand 3 verschiedene Artikel kauft? Soviel platz ist doch garnicht da, die Zusatzbeschreibunge
n anzugeben.
Logged
Lomex
Offline
Posts: 50
Re: Auftragsverwaltung anpassen
«
Reply #2 on:
November 12, 2010, 09:22:43 PM »
Die passt da schon rein, ist alles ziemlich kurz gehalten.
Logged
Der Kopf ist rund, damit das Denken die Richtung wechseln kann.
funas
Offline
Posts: 227
Re: Auftragsverwaltung anpassen
«
Reply #3 on:
November 12, 2010, 09:46:43 PM »
Das nach dem <td> und </td> in Zeile 161 eingeben:
Code:
<table>
$sql = "SELECT item_id FROM `".TABLE_PREFIX."mod_bakery_order` WHERE order_id = '".$costumer['order_id']."'";
$res = mysql_query($sql);
while($ds = mysql_fetch_assoc($res)){
$sql2 = "SELECT * FROM mod_bakery_items WHERE item_id = '".$ds['item_id']."'";
$res2 = mysql_query($sql2);
while($ds2 = mysql_fetch_assoc($res2)){
echo "<tr>";
echo "<td>" . $ds2['sku'] . "</td>";
echo "<td>" . $ds2['title'] . "</td>";
echo "</tr>";
}
}
?>
</table>
Bei mir läufts... Musst nur deine Datenbankfelder zwischen den [''] eingeben.
Logged
Lomex
Offline
Posts: 50
Re: Auftragsverwaltung anpassen
«
Reply #4 on:
November 12, 2010, 10:38:00 PM »
Hi,
sorry, glaube die Zeile 161 sieht bei mir anders aus. Kannst du mir das mal an entsprechender Stelle reinkopieren?
Code:
<?php
/*
Module developed for the Open Source Content Management System WebsiteBaker (http://websitebaker.org)
Copyright (C) 2010, Christoph Marti
LICENCE TERMS:
This module is free software. You can redistribute it and/or modify it
under the terms of the GNU General Public License - version 2 or later,
as published by the Free Software Foundation: http://www.gnu.org/licenses/gpl.html.
DISCLAIMER:
This module 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.
*/
require(
'../../config.php'
);
// Include WB admin wrapper script
require(
WB_PATH
.
'/modules/admin.php'
);
// Make use of the skinable backend themes of WB > 2.7
// Check if THEME_URL is supported otherwise use ADMIN_URL
if (!
defined
(
'THEME_URL'
)) {
define
(
'THEME_URL'
,
ADMIN_URL
);
}
// Look for language file
if (
LANGUAGE_LOADED
) {
require_once(
WB_PATH
.
'/modules/bakery/languages/EN.php'
);
if (
file_exists
(
WB_PATH
.
'/modules/bakery/languages/'
.
LANGUAGE
.
'.php'
)) {
require_once(
WB_PATH
.
'/modules/bakery/languages/'
.
LANGUAGE
.
'.php'
);
}
}
// Show current or archived orders
if (isset(
$_GET
[
'view'
])) {
$view
=
$_GET
[
'view'
];
}
else {
$view
=
'current'
;
}
// Get the time until the admin will be alerted if the invoice has not been payed
$query_payment_methods
=
$database
->
query
(
"SELECT value_2, value_3 FROM `"
.
TABLE_PREFIX
.
"mod_bakery_payment_methods` WHERE directory = 'invoice' LIMIT 1"
);
if (
$query_payment_methods
->
numRows
() >
0
) {
$payment_method
=
$query_payment_methods
->
fetchRow
();
$invoice_alert
=
is_numeric
(
$payment_method
[
'value_2'
]) ?
$payment_method
[
'value_2'
] :
0
;
$reminder_alert
=
is_numeric
(
$payment_method
[
'value_3'
]) ?
$payment_method
[
'value_3'
] :
0
;
}
// Make difference between current orders and archived orders
if (
$view
==
'current'
) {
$toggle
=
'archive'
;
$toggle_page
=
$MOD_BAKERY
[
'TXT_ORDER_ARCHIVED'
];
$current_page
=
$MOD_BAKERY
[
'TXT_ORDER_CURRENT'
];
$query_customer
=
$database
->
query
(
"SELECT * FROM `"
.
TABLE_PREFIX
.
"mod_bakery_customer` WHERE status != 'archived' AND submitted != 'no' ORDER BY order_date DESC"
);
}
else {
$toggle
=
'current'
;
$toggle_page
=
$MOD_BAKERY
[
'TXT_ORDER_CURRENT'
];
$current_page
=
$MOD_BAKERY
[
'TXT_ORDER_ARCHIVED'
];
$query_customer
=
$database
->
query
(
"SELECT * FROM `"
.
TABLE_PREFIX
.
"mod_bakery_customer` WHERE status = 'archived' AND submitted != 'no' ORDER BY order_date DESC"
);
}
echo
"<h2>
{
$MOD_BAKERY
[
'TXT_ORDER_ADMIN'
]}
: <br/>
$current_page
<span style='text-transform: lowercase;'>
{
$TEXT
[
'MODIFY'
]}
/
{
$TEXT
[
'DELETE'
]}
</span></h2>"
// Show buttons
?>
<script type="text/javascript">
function newInvoice(url) {
if (screen.availHeight) {
var invoiceWindowHeight = screen.availHeight;
}
else {
var invoiceWindowHeight = 800;
}
invoiceWindow = window.open(url + "#bottom", "", "width=750, height=" + invoiceWindowHeight + ", left=100, top=0, scrollbars=yes");
invoiceWindow.focus();
}
function showOrder(url) {
orderWindow = window.open(url, "", "width=600, height=500, left=150, top=100, scrollbars=yes");
orderWindow.focus();
}
</script>
<table width="98%" align="center" cellpadding="0" cellspacing="0">
<tr height="30" class="mod_bakery_submit_row_b">
<td align="left" width="50%" style="padding-left: 12px;">
<input type="button" value="
<?php
echo
$toggle_page
;
?>
" onclick="javascript: window.location = '
<?php
echo
WB_URL
;
?>
/modules/bakery/modify_orders.php?page_id=
<?php
echo
$page_id
;
?>
&view=
<?php
echo
$toggle
;
?>
';" />
</td>
<td align="right" width="50%" style="padding-right: 12px;">
<input type="button" value="
<?php
echo
$TEXT
[
'CANCEL'
];
?>
" onclick="javascript: window.location = '
<?php
echo
ADMIN_URL
;
?>
/pages/modify.php?page_id=
<?php
echo
$page_id
;
?>
';" />
</td>
</tr>
</table>
<br />
<?php
// Query customer table
if (
$query_customer
->
numRows
() >
0
) {
// Customer table header
?>
<form name="modify" action="
<?php
echo
WB_URL
;
?>
/modules/bakery/save_orders.php" method="post" style="margin: 0;">
<input type="hidden" name="section_id" value="
<?php
echo
$section_id
;
?>
" />
<input type="hidden" name="page_id" value="
<?php
echo
$page_id
;
?>
" />
<table cellpadding="2" cellspacing="0" border="0" width="98%" align="center">
<tr height="30" valign="bottom" class="mod_bakery_submit_row_b">
<th colspan="2" align="left"><span style="margin-left: 5px;">
<?php
echo
$MOD_BAKERY
[
'TXT_ORDER'
];
?>
</span></th>
<th colspan="2" align="left">
<?php
echo
$MOD_BAKERY
[
'TXT_CUSTOMER'
];
?>
</th>
<th align="left">
<?php
echo
$MOD_BAKERY
[
'TXT_ORDER_DATE'
];
?>
</th>
<th colspan="2" align="left">
<?php
echo
$MOD_BAKERY
[
'TXT_STATUS'
];
?>
</th>
<th colspan="3">
<?php
echo
$TEXT
[
'ACTIONS'
];
?>
</th>
</tr>
<?php
// List order table
$row
=
'a'
;
while (
$costumer
=
$query_customer
->
fetchRow
()) {
?>
<tr class="row_
<?php
echo
$row
;
?>
" height="20">
<td width="30" align="right">
<?php
echo
$costumer
[
'order_id'
];
?>
</td>
<td width="30" align="left">
<?php
// Show payment method icons
$payment_method
=
$costumer
[
'submitted'
];
// Include payment method info file
$info_file_path
=
WB_PATH
.
"/modules/bakery/payment_methods/
$payment_method
/info.php"
;
include(
$info_file_path
);
// Replace 'cod', 'advance' and 'invoice' by localisations
$payment_method_name
=
$payment_method
==
"cod"
?
$MOD_BAKERY
[
'TXT_PAYMENT_METHOD_COD'
] :
$payment_method_name
;
$payment_method_name
=
$payment_method
==
"advance"
?
$MOD_BAKERY
[
'TXT_PAYMENT_METHOD_ADVANCE'
] :
$payment_method_name
;
$payment_method_name
=
$payment_method
==
"invoice"
?
$MOD_BAKERY
[
'TXT_PAYMENT_METHOD_INVOICE'
] :
$payment_method_name
;
// Show icon
echo
"<img src='"
.
WB_URL
.
"/modules/bakery/payment_methods/
$payment_method
/icon.png' alt='
$payment_method_name
' title='
$payment_method_name
' border='0' />"
;
// Show email, customer name and order date
?>
</td>
<td width="18">
<a href="mailto:
<?php
echo
stripslashes
(
$costumer
[
'cust_email'
]);
?>
"><img src="
<?php
echo
WB_URL
;
?>
/modules/bakery/images/email.png" alt="
<?php
echo
$TEXT
[
'EMAIL'
];
?>
" title="
<?php
echo
$TEXT
[
'EMAIL'
].
" "
.
$TEXT
[
'TO'
].
" "
.
stripslashes
(
$costumer
[
'cust_email'
]);
?>
" style="margin-bottom: -3px;" border="0" /></a>
</td>
<td>
<a href="
<?php
echo
WB_URL
;
?>
/modules/bakery/view_order.php?page_id=
<?php
echo
$page_id
;
?>
§ion_id=
<?php
echo
$section_id
;
?>
&order_id=
<?php
echo
$costumer
[
'order_id'
];
?>
" onclick="showOrder(this.href); return false;">
<?php
echo
stripslashes
(
$costumer
[
'cust_first_name'
]).
" "
.
stripslashes
(
$costumer
[
'cust_last_name'
]);
?>
</a>
</td>
<td width="135">
<?php
echo
gmdate
(
DATE_FORMAT
.
', '
.
TIME_FORMAT
,
$costumer
[
'order_date'
]+
TIMEZONE
);
?>
</td>
<td width="22">
<?php
// Show colored images for status
$status_img_url
=
WB_URL
.
"/modules/bakery/images/status"
;
$status_img_style
=
"style='margin-bottom: -3px;' border='0'"
;
switch (
stripslashes
(
$costumer
[
'status'
])) {
case
'ordered'
: echo
"<img src='
$status_img_url
/ordered.gif' alt='
{
$MOD_BAKERY
[
'TXT_STATUS_ORDERED'
]}
' title='
{
$MOD_BAKERY
[
'TXT_STATUS_ORDERED'
]}
'
$status_img_style
/>"
; break;
case
'shipped'
: echo
"<img src='
$status_img_url
/shipped.gif' alt='
{
$MOD_BAKERY
[
'TXT_STATUS_SHIPPED'
]}
' title='
{
$MOD_BAKERY
[
'TXT_STATUS_SHIPPED'
]}
'
$status_img_style
/>"
; break;
case
'invoice'
:
// Invoice alert
if (
$costumer
[
'order_date'
] + (
60
*
60
*
24
*
$invoice_alert
) <
time
() &&
$invoice_alert
!=
0
) {
echo
"<img src='
$status_img_url
/alert.gif' alt='
{
$MOD_BAKERY
[
'TXT_STATUS_REMINDER'
]}
' title='
{
$MOD_BAKERY
[
'TXT_STATUS_REMINDER'
]}
'
$status_img_style
/>"
; break;
}
else {
echo
"<img src='
$status_img_url
/invoice.gif' alt='
{
$MOD_BAKERY
[
'TXT_STATUS_INVOICE'
]}
' title='
{
$MOD_BAKERY
[
'TXT_STATUS_INVOICE'
]}
'
$status_img_style
/>"
; break;
}
case
'reminder'
:
// Reminder alert
if (
$costumer
[
'order_date'
] + (
60
*
60
*
24
*
$reminder_alert
) <
time
() &&
$reminder_alert
!=
0
) {
echo
"<img src='
$status_img_url
/alert.gif' alt='
{
$MOD_BAKERY
[
'TXT_STATUS_REMINDER'
]}
' title='
{
$MOD_BAKERY
[
'TXT_STATUS_REMINDER'
]}
'
$status_img_style
/>"
; break;
}
else {
echo
"<img src='
$status_img_url
/reminder.gif' alt='
{
$MOD_BAKERY
[
'TXT_STATUS_REMINDER'
]}
' title='
{
$MOD_BAKERY
[
'TXT_STATUS_REMINDER'
]}
'
$status_img_style
/>"
; break;
}
case
'paid'
: echo
"<img src='
$status_img_url
/paid.gif' alt='
{
$MOD_BAKERY
[
'TXT_STATUS_PAID'
]}
' title='
{
$MOD_BAKERY
[
'TXT_STATUS_PAID'
]}
'
$status_img_style
/>"
; break;
case
'archived'
: echo
"<img src='
$status_img_url
/archived.gif' alt='
{
$MOD_BAKERY
[
'TXT_STATUS_ARCHIVED'
]}
' title='
{
$MOD_BAKERY
[
'TXT_STATUS_ARCHIVED'
]}
'
$status_img_style
/>"
; break;
}
echo
"</td>\n<td width='120'>"
;
// Show status select depending on the payment method
if (
stripslashes
(
$costumer
[
'status'
]) ==
"archived"
) {
echo
"
{
$MOD_BAKERY
[
'TXT_STATUS_ARCHIVED'
]}
"
;
} else {
switch (
stripslashes
(
$costumer
[
'submitted'
])) {
case
'advance'
:
$select_status
= array(
"ordered"
=>
$MOD_BAKERY
[
'TXT_STATUS_ORDERED'
],
"paid"
=>
$MOD_BAKERY
[
'TXT_STATUS_PAID'
],
"shipped"
=>
$MOD_BAKERY
[
'TXT_STATUS_SHIPPED'
],
"archived"
=>
$MOD_BAKERY
[
'TXT_STATUS_ARCHIVE'
]);
break;
case
'invoice'
:
$select_status
= array(
"ordered"
=>
$MOD_BAKERY
[
'TXT_STATUS_ORDERED'
],
"shipped"
=>
$MOD_BAKERY
[
'TXT_STATUS_SHIPPED'
],
"invoice"
=>
$MOD_BAKERY
[
'TXT_STATUS_INVOICE'
],
"reminder"
=>
$MOD_BAKERY
[
'TXT_STATUS_REMINDER'
],
"paid"
=>
$MOD_BAKERY
[
'TXT_STATUS_PAID'
],
"archived"
=>
$MOD_BAKERY
[
'TXT_STATUS_ARCHIVE'
]);
break;
default:
$select_status
= array(
"ordered"
=>
$MOD_BAKERY
[
'TXT_STATUS_ORDERED'
],
"shipped"
=>
$MOD_BAKERY
[
'TXT_STATUS_SHIPPED'
],
"archived"
=>
$MOD_BAKERY
[
'TXT_STATUS_ARCHIVE'
]);
}
// Generate status select
echo
" <select name='status[
{
$costumer
[
'order_id'
]}
]' style='width: 110px'>"
;
foreach (
$select_status
as
$option_value
=>
$option_text
) {
echo
"<option value='
$option_value
'"
;
echo
stripslashes
(
$costumer
[
'status'
]) ==
$option_value
?
" selected='selected'"
:
""
;
echo
">
$option_text
</option>\n"
;
}
echo
"</select>"
;
}
?>
</td>
<td width="22">
<a href="
<?php
echo
WB_URL
;
?>
/modules/bakery/view_invoice.php?page_id=
<?php
echo
$page_id
;
?>
§ion_id=
<?php
echo
$section_id
;
?>
&order_id=
<?php
echo
$costumer
[
'order_id'
];
?>
" onclick="newInvoice(this.href); return false;"><img src="
<?php
echo
WB_URL
;
?>
/modules/bakery/images/print.gif" alt="
<?php
echo
$MOD_BAKERY
[
'TXT_PRINT_INVOICE'
];
?>
" title="
<?php
echo
$MOD_BAKERY
[
'TXT_PRINT_INVOICE'
];
?>
" border="0" /></a>
</td>
<td width="22">
<a href="
<?php
echo
WB_URL
;
?>
/modules/bakery/view_order.php?page_id=
<?php
echo
$page_id
;
?>
§ion_id=
<?php
echo
$section_id
;
?>
&order_id=
<?php
echo
$costumer
[
'order_id'
];
?>
" onclick="showOrder(this.href); return false;" title="
<?php
echo
$TEXT
[
'VIEW_DETAILS'
];
?>
">
<img src="
<?php
echo
THEME_URL
;
?>
/images/view_16.png" alt="
<?php
echo
$MOD_BAKERY
[
'TXT_INVOICE'
].
" "
.
$TEXT
[
'VIEW_DETAILS'
];
?>
" border="0" />
</a>
</td>
<td width="22">
<a href="javascript: confirm_link('
<?php
echo
$TEXT
[
'ARE_YOU_SURE'
];
?>
', '
<?php
echo
WB_URL
;
?>
/modules/bakery/delete_order.php?page_id=
<?php
echo
$page_id
;
?>
§ion_id=
<?php
echo
$section_id
;
?>
&order_id=
<?php
echo
$costumer
[
'order_id'
];
?>
&view=
<?php
echo
$view
;
?>
');" title="
<?php
echo
$TEXT
[
'DELETE'
];
?>
">
<img src="
<?php
echo
THEME_URL
;
?>
/images/delete_16.png" border="0" alt="
<?php
echo
$TEXT
[
'DELETE'
];
?>
" />
</a>
</td>
</tr>
<?php
// Alternate row color
if (
$row
==
'a'
) {
$row
=
'b'
;
} else {
$row
=
'a'
;
}
}
?>
</table>
<?php
} else {
echo
$TEXT
[
'NONE_FOUND'
].
"<br /><br />"
;
}
// Show buttons if view is current
if (
$view
==
'current'
) {
?>
<table width="98%" align="center" cellpadding="0" cellspacing="0" class="mod_bakery_submit_row_b">
<tr valign="top">
<td height="30" align="left" style="padding-left: 12px;">
<input name="save" type="submit" value="
<?php
echo
$TEXT
[
'SAVE'
];
?>
" style="width: 100px; margin-top: 5px;" /></td>
<td height="30" align="right" style="padding-right: 12px;">
<input type="button" value="
<?php
echo
$TEXT
[
'CANCEL'
];
?>
" onclick="javascript: window.location = '
<?php
echo
ADMIN_URL
;
?>
/pages/modify.php?page_id=
<?php
echo
$page_id
;
?>
';" style="width: 100px; margin-top: 5px;" /></td>
</tr>
</table>
</form>
<?php
}
// Print admin footer
$admin
->
print_footer
();
?>
Danke
Gruß
Axel
Logged
Der Kopf ist rund, damit das Denken die Richtung wechseln kann.
sixfinger
Offline
Posts: 8
Re: Auftragsverwaltung anpassen
«
Reply #5 on:
November 12, 2010, 10:40:31 PM »
Ich gleube er meint in Zeile 55, in Zeile 54 hast du die besagt Stelle.
Verschieb alles um eine Zeile nach unten und füg das neue ab Zeile 55 mal ein.
Logged
funas
Offline
Posts: 227
Re: Auftragsverwaltung anpassen
«
Reply #6 on:
November 12, 2010, 10:47:04 PM »
Ja, kann sein, habe schon vorher daran herrumgewerkelt, dabei sind wahrscheinlich einige Zeilen verrutscht... Darauf sollte ich auch bei weiteren tipps achten
hier ist es eingefügt:
Code:
<?php
/*
Module developed for the Open Source Content Management System WebsiteBaker (http://websitebaker.org)
Copyright (C) 2010, Christoph Marti
LICENCE TERMS:
This module is free software. You can redistribute it and/or modify it
under the terms of the GNU General Public License - version 2 or later,
as published by the Free Software Foundation: http://www.gnu.org/licenses/gpl.html.
DISCLAIMER:
This module 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.
*/
require(
'../../config.php'
);
// Include WB admin wrapper script
require(
WB_PATH
.
'/modules/admin.php'
);
// Make use of the skinable backend themes of WB > 2.7
// Check if THEME_URL is supported otherwise use ADMIN_URL
if (!
defined
(
'THEME_URL'
)) {
define
(
'THEME_URL'
,
ADMIN_URL
);
}
// Look for language file
if (
LANGUAGE_LOADED
) {
require_once(
WB_PATH
.
'/modules/bakery/languages/EN.php'
);
if (
file_exists
(
WB_PATH
.
'/modules/bakery/languages/'
.
LANGUAGE
.
'.php'
)) {
require_once(
WB_PATH
.
'/modules/bakery/languages/'
.
LANGUAGE
.
'.php'
);
}
}
// Show current or archived orders
if (isset(
$_GET
[
'view'
])) {
$view
=
$_GET
[
'view'
];
}
else {
$view
=
'current'
;
}
// Get the time until the admin will be alerted if the invoice has not been payed
$query_payment_methods
=
$database
->
query
(
"SELECT value_2, value_3 FROM `"
.
TABLE_PREFIX
.
"mod_bakery_payment_methods` WHERE directory = 'invoice' LIMIT 1"
);
if (
$query_payment_methods
->
numRows
() >
0
) {
$payment_method
=
$query_payment_methods
->
fetchRow
();
$invoice_alert
=
is_numeric
(
$payment_method
[
'value_2'
]) ?
$payment_method
[
'value_2'
] :
0
;
$reminder_alert
=
is_numeric
(
$payment_method
[
'value_3'
]) ?
$payment_method
[
'value_3'
] :
0
;
}
// Make difference between current orders and archived orders
if (
$view
==
'current'
) {
$toggle
=
'archive'
;
$toggle_page
=
$MOD_BAKERY
[
'TXT_ORDER_ARCHIVED'
];
$current_page
=
$MOD_BAKERY
[
'TXT_ORDER_CURRENT'
];
$query_customer
=
$database
->
query
(
"SELECT * FROM `"
.
TABLE_PREFIX
.
"mod_bakery_customer` WHERE status != 'archived' AND submitted != 'no' ORDER BY order_date DESC"
);
}
else {
$toggle
=
'current'
;
$toggle_page
=
$MOD_BAKERY
[
'TXT_ORDER_CURRENT'
];
$current_page
=
$MOD_BAKERY
[
'TXT_ORDER_ARCHIVED'
];
$query_customer
=
$database
->
query
(
"SELECT * FROM `"
.
TABLE_PREFIX
.
"mod_bakery_customer` WHERE status = 'archived' AND submitted != 'no' ORDER BY order_date DESC"
);
}
echo
"<h2>
{
$MOD_BAKERY
[
'TXT_ORDER_ADMIN'
]}
: <br/>
$current_page
<span style='text-transform: lowercase;'>
{
$TEXT
[
'MODIFY'
]}
/
{
$TEXT
[
'DELETE'
]}
</span></h2>"
// Show buttons
?>
<script type="text/javascript">
function newInvoice(url) {
if (screen.availHeight) {
var invoiceWindowHeight = screen.availHeight;
}
else {
var invoiceWindowHeight = 800;
}
invoiceWindow = window.open(url + "#bottom", "", "width=750, height=" + invoiceWindowHeight + ", left=100, top=0, scrollbars=yes");
invoiceWindow.focus();
}
function showOrder(url) {
orderWindow = window.open(url, "", "width=600, height=500, left=150, top=100, scrollbars=yes");
orderWindow.focus();
}
</script>
<table width="98%" align="center" cellpadding="0" cellspacing="0">
<tr height="30" class="mod_bakery_submit_row_b">
<td align="left" width="50%" style="padding-left: 12px;">
<input type="button" value="
<?php
echo
$toggle_page
;
?>
" onclick="javascript: window.location = '
<?php
echo
WB_URL
;
?>
/modules/bakery/modify_orders.php?page_id=
<?php
echo
$page_id
;
?>
&view=
<?php
echo
$toggle
;
?>
';" />
</td>
<td align="right" width="50%" style="padding-right: 12px;">
<input type="button" value="
<?php
echo
$TEXT
[
'CANCEL'
];
?>
" onclick="javascript: window.location = '
<?php
echo
ADMIN_URL
;
?>
/pages/modify.php?page_id=
<?php
echo
$page_id
;
?>
';" />
</td>
</tr>
</table>
<br />
<?php
// Query customer table
if (
$query_customer
->
numRows
() >
0
) {
// Customer table header
?>
<form name="modify" action="
<?php
echo
WB_URL
;
?>
/modules/bakery/save_orders.php" method="post" style="margin: 0;">
<input type="hidden" name="section_id" value="
<?php
echo
$section_id
;
?>
" />
<input type="hidden" name="page_id" value="
<?php
echo
$page_id
;
?>
" />
<table cellpadding="2" cellspacing="0" border="0" width="98%" align="center">
<tr height="30" valign="bottom" class="mod_bakery_submit_row_b">
<th colspan="2" align="left"><span style="margin-left: 5px;">
<?php
echo
$MOD_BAKERY
[
'TXT_ORDER'
];
?>
</span></th>
<th colspan="2" align="left">
<?php
echo
$MOD_BAKERY
[
'TXT_CUSTOMER'
];
?>
</th>
<th align="left">
<?php
echo
$MOD_BAKERY
[
'TXT_ORDER_DATE'
];
?>
</th>
<th colspan="2" align="left">
<?php
echo
$MOD_BAKERY
[
'TXT_STATUS'
];
?>
</th>
<th colspan="3">
<?php
echo
$TEXT
[
'ACTIONS'
];
?>
</th>
</tr>
<?php
// List order table
$row
=
'a'
;
while (
$costumer
=
$query_customer
->
fetchRow
()) {
?>
<tr class="row_
<?php
echo
$row
;
?>
" height="20">
<td width="30" align="right">
<?php
echo
$costumer
[
'order_id'
];
?>
</td>
<td width="30" align="left">
<?php
// Show payment method icons
$payment_method
=
$costumer
[
'submitted'
];
// Include payment method info file
$info_file_path
=
WB_PATH
.
"/modules/bakery/payment_methods/
$payment_method
/info.php"
;
include(
$info_file_path
);
// Replace 'cod', 'advance' and 'invoice' by localisations
$payment_method_name
=
$payment_method
==
"cod"
?
$MOD_BAKERY
[
'TXT_PAYMENT_METHOD_COD'
] :
$payment_method_name
;
$payment_method_name
=
$payment_method
==
"advance"
?
$MOD_BAKERY
[
'TXT_PAYMENT_METHOD_ADVANCE'
] :
$payment_method_name
;
$payment_method_name
=
$payment_method
==
"invoice"
?
$MOD_BAKERY
[
'TXT_PAYMENT_METHOD_INVOICE'
] :
$payment_method_name
;
// Show icon
echo
"<img src='"
.
WB_URL
.
"/modules/bakery/payment_methods/
$payment_method
/icon.png' alt='
$payment_method_name
' title='
$payment_method_name
' border='0' />"
;
// Show email, customer name and order date
?>
</td>
<td width="18">
<a href="mailto:
<?php
echo
stripslashes
(
$costumer
[
'cust_email'
]);
?>
"><img src="
<?php
echo
WB_URL
;
?>
/modules/bakery/images/email.png" alt="
<?php
echo
$TEXT
[
'EMAIL'
];
?>
" title="
<?php
echo
$TEXT
[
'EMAIL'
].
" "
.
$TEXT
[
'TO'
].
" "
.
stripslashes
(
$costumer
[
'cust_email'
]);
?>
" style="margin-bottom: -3px;" border="0" /></a>
</td>
<td>
<a href="
<?php
echo
WB_URL
;
?>
/modules/bakery/view_order.php?page_id=
<?php
echo
$page_id
;
?>
§ion_id=
<?php
echo
$section_id
;
?>
&order_id=
<?php
echo
$costumer
[
'order_id'
];
?>
" onclick="showOrder(this.href); return false;">
<?php
echo
stripslashes
(
$costumer
[
'cust_first_name'
]).
" "
.
stripslashes
(
$costumer
[
'cust_last_name'
]);
?>
</a>
</td>
<td>
<table>
<?php
$sql
=
"SELECT item_id FROM `"
.
TABLE_PREFIX
.
"mod_bakery_order` WHERE order_id = '"
.
$costumer
[
'order_id'
].
"'"
;
$res
=
mysql_query
(
$sql
);
while(
$ds
=
mysql_fetch_assoc
(
$res
)){
$sql2
=
"SELECT * FROM mod_bakery_items WHERE item_id = '"
.
$ds
[
'item_id'
].
"'"
;
$res2
=
mysql_query
(
$sql2
);
while(
$ds2
=
mysql_fetch_assoc
(
$res2
)){
echo
"<tr>"
;
echo
"<td>"
.
$ds2
[
'sku'
] .
"</td>"
;
echo
"<td>"
.
$ds2
[
'title'
] .
"</td>"
;
echo
"</tr>"
;
}
}
?>
</table>
</td>
<td width="135">
<?php
echo
gmdate
(
DATE_FORMAT
.
', '
.
TIME_FORMAT
,
$costumer
[
'order_date'
]+
TIMEZONE
);
?>
</td>
<td width="22">
<?php
// Show colored images for status
$status_img_url
=
WB_URL
.
"/modules/bakery/images/status"
;
$status_img_style
=
"style='margin-bottom: -3px;' border='0'"
;
switch (
stripslashes
(
$costumer
[
'status'
])) {
case
'ordered'
: echo
"<img src='
$status_img_url
/ordered.gif' alt='
{
$MOD_BAKERY
[
'TXT_STATUS_ORDERED'
]}
' title='
{
$MOD_BAKERY
[
'TXT_STATUS_ORDERED'
]}
'
$status_img_style
/>"
; break;
case
'shipped'
: echo
"<img src='
$status_img_url
/shipped.gif' alt='
{
$MOD_BAKERY
[
'TXT_STATUS_SHIPPED'
]}
' title='
{
$MOD_BAKERY
[
'TXT_STATUS_SHIPPED'
]}
'
$status_img_style
/>"
; break;
case
'invoice'
:
// Invoice alert
if (
$costumer
[
'order_date'
] + (
60
*
60
*
24
*
$invoice_alert
) <
time
() &&
$invoice_alert
!=
0
) {
echo
"<img src='
$status_img_url
/alert.gif' alt='
{
$MOD_BAKERY
[
'TXT_STATUS_REMINDER'
]}
' title='
{
$MOD_BAKERY
[
'TXT_STATUS_REMINDER'
]}
'
$status_img_style
/>"
; break;
}
else {
echo
"<img src='
$status_img_url
/invoice.gif' alt='
{
$MOD_BAKERY
[
'TXT_STATUS_INVOICE'
]}
' title='
{
$MOD_BAKERY
[
'TXT_STATUS_INVOICE'
]}
'
$status_img_style
/>"
; break;
}
case
'reminder'
:
// Reminder alert
if (
$costumer
[
'order_date'
] + (
60
*
60
*
24
*
$reminder_alert
) <
time
() &&
$reminder_alert
!=
0
) {
echo
"<img src='
$status_img_url
/alert.gif' alt='
{
$MOD_BAKERY
[
'TXT_STATUS_REMINDER'
]}
' title='
{
$MOD_BAKERY
[
'TXT_STATUS_REMINDER'
]}
'
$status_img_style
/>"
; break;
}
else {
echo
"<img src='
$status_img_url
/reminder.gif' alt='
{
$MOD_BAKERY
[
'TXT_STATUS_REMINDER'
]}
' title='
{
$MOD_BAKERY
[
'TXT_STATUS_REMINDER'
]}
'
$status_img_style
/>"
; break;
}
case
'paid'
: echo
"<img src='
$status_img_url
/paid.gif' alt='
{
$MOD_BAKERY
[
'TXT_STATUS_PAID'
]}
' title='
{
$MOD_BAKERY
[
'TXT_STATUS_PAID'
]}
'
$status_img_style
/>"
; break;
case
'archived'
: echo
"<img src='
$status_img_url
/archived.gif' alt='
{
$MOD_BAKERY
[
'TXT_STATUS_ARCHIVED'
]}
' title='
{
$MOD_BAKERY
[
'TXT_STATUS_ARCHIVED'
]}
'
$status_img_style
/>"
; break;
}
echo
"</td>\n<td width='120'>"
;
// Show status select depending on the payment method
if (
stripslashes
(
$costumer
[
'status'
]) ==
"archived"
) {
echo
"
{
$MOD_BAKERY
[
'TXT_STATUS_ARCHIVED'
]}
"
;
} else {
switch (
stripslashes
(
$costumer
[
'submitted'
])) {
case
'advance'
:
$select_status
= array(
"ordered"
=>
$MOD_BAKERY
[
'TXT_STATUS_ORDERED'
],
"paid"
=>
$MOD_BAKERY
[
'TXT_STATUS_PAID'
],
"shipped"
=>
$MOD_BAKERY
[
'TXT_STATUS_SHIPPED'
],
"archived"
=>
$MOD_BAKERY
[
'TXT_STATUS_ARCHIVE'
]);
break;
case
'invoice'
:
$select_status
= array(
"ordered"
=>
$MOD_BAKERY
[
'TXT_STATUS_ORDERED'
],
"shipped"
=>
$MOD_BAKERY
[
'TXT_STATUS_SHIPPED'
],
"invoice"
=>
$MOD_BAKERY
[
'TXT_STATUS_INVOICE'
],
"reminder"
=>
$MOD_BAKERY
[
'TXT_STATUS_REMINDER'
],
"paid"
=>
$MOD_BAKERY
[
'TXT_STATUS_PAID'
],
"archived"
=>
$MOD_BAKERY
[
'TXT_STATUS_ARCHIVE'
]);
break;
default:
$select_status
= array(
"ordered"
=>
$MOD_BAKERY
[
'TXT_STATUS_ORDERED'
],
"shipped"
=>
$MOD_BAKERY
[
'TXT_STATUS_SHIPPED'
],
"archived"
=>
$MOD_BAKERY
[
'TXT_STATUS_ARCHIVE'
]);
}
// Generate status select
echo
" <select name='status[
{
$costumer
[
'order_id'
]}
]' style='width: 110px'>"
;
foreach (
$select_status
as
$option_value
=>
$option_text
) {
echo
"<option value='
$option_value
'"
;
echo
stripslashes
(
$costumer
[
'status'
]) ==
$option_value
?
" selected='selected'"
:
""
;
echo
">
$option_text
</option>\n"
;
}
echo
"</select>"
;
}
?>
</td>
<td width="22">
<a href="
<?php
echo
WB_URL
;
?>
/modules/bakery/view_invoice.php?page_id=
<?php
echo
$page_id
;
?>
§ion_id=
<?php
echo
$section_id
;
?>
&order_id=
<?php
echo
$costumer
[
'order_id'
];
?>
" onclick="newInvoice(this.href); return false;"><img src="
<?php
echo
WB_URL
;
?>
/modules/bakery/images/print.gif" alt="
<?php
echo
$MOD_BAKERY
[
'TXT_PRINT_INVOICE'
];
?>
" title="
<?php
echo
$MOD_BAKERY
[
'TXT_PRINT_INVOICE'
];
?>
" border="0" /></a>
</td>
<td width="22">
<a href="
<?php
echo
WB_URL
;
?>
/modules/bakery/view_order.php?page_id=
<?php
echo
$page_id
;
?>
§ion_id=
<?php
echo
$section_id
;
?>
&order_id=
<?php
echo
$costumer
[
'order_id'
];
?>
" onclick="showOrder(this.href); return false;" title="
<?php
echo
$TEXT
[
'VIEW_DETAILS'
];
?>
">
<img src="
<?php
echo
THEME_URL
;
?>
/images/view_16.png" alt="
<?php
echo
$MOD_BAKERY
[
'TXT_INVOICE'
].
" "
.
$TEXT
[
'VIEW_DETAILS'
];
?>
" border="0" />
</a>
</td>
<td width="22">
<a href="javascript: confirm_link('
<?php
echo
$TEXT
[
'ARE_YOU_SURE'
];
?>
', '
<?php
echo
WB_URL
;
?>
/modules/bakery/delete_order.php?page_id=
<?php
echo
$page_id
;
?>
§ion_id=
<?php
echo
$section_id
;
?>
&order_id=
<?php
echo
$costumer
[
'order_id'
];
?>
&view=
<?php
echo
$view
;
?>
');" title="
<?php
echo
$TEXT
[
'DELETE'
];
?>
">
<img src="
<?php
echo
THEME_URL
;
?>
/images/delete_16.png" border="0" alt="
<?php
echo
$TEXT
[
'DELETE'
];
?>
" />
</a>
</td>
</tr>
<?php
// Alternate row color
if (
$row
==
'a'
) {
$row
=
'b'
;
} else {
$row
=
'a'
;
}
}
?>
</table>
<?php
} else {
echo
$TEXT
[
'NONE_FOUND'
].
"<br /><br />"
;
}
// Show buttons if view is current
if (
$view
==
'current'
) {
?>
<table width="98%" align="center" cellpadding="0" cellspacing="0" class="mod_bakery_submit_row_b">
<tr valign="top">
<td height="30" align="left" style="padding-left: 12px;">
<input name="save" type="submit" value="
<?php
echo
$TEXT
[
'SAVE'
];
?>
" style="width: 100px; margin-top: 5px;" /></td>
<td height="30" align="right" style="padding-right: 12px;">
<input type="button" value="
<?php
echo
$TEXT
[
'CANCEL'
];
?>
" onclick="javascript: window.location = '
<?php
echo
ADMIN_URL
;
?>
/pages/modify.php?page_id=
<?php
echo
$page_id
;
?>
';" style="width: 100px; margin-top: 5px;" /></td>
</tr>
</table>
</form>
<?php
}
// Print admin footer
$admin
->
print_footer
();
?>
Logged
Lomex
Offline
Posts: 50
Re: Auftragsverwaltung anpassen
«
Reply #7 on:
November 12, 2010, 11:42:36 PM »
SUPER, wird angezeigt
Jetzt habe ich Bezeichnung und Art.Nr.
Code:
echo "<tr>";
echo "<td>" . $ds2['title'] . "</td>";
echo "<td>" . $ds2['sku'] . "</td>";
echo "</tr>";
möchte aber ja gerne Bezeichnung, Kurzbeschreibung und Menge. Jetzt wollte ich gerade mal nach den Werten gucken, aber nun hab ich mir irgendwie Xampp zerschossen
muss ich jetzt erstmal wieder neu machen
Logged
Der Kopf ist rund, damit das Denken die Richtung wechseln kann.
Lomex
Offline
Posts: 50
Re: Auftragsverwaltung anpassen
«
Reply #8 on:
November 13, 2010, 07:12:37 PM »
So, Xampp läuft wieder, aber die Werte hab ich immer noch nicht gefunden.
Liegen die vieleicht in einer anderen Tabelle?
Logged
Der Kopf ist rund, damit das Denken die Richtung wechseln kann.
funas
Offline
Posts: 227
Re: Auftragsverwaltung anpassen
«
Reply #9 on:
November 14, 2010, 11:41:18 AM »
Code:
echo "<tr>";
echo "<td>" . $ds2['title'] . "</td>";
echo "<td>" . $ds2['description'] . "</td>";
echo "<td>" . $ds['quantity'] . "</td>";
echo "</tr>";
Logged
Lomex
Offline
Posts: 50
Re: Auftragsverwaltung anpassen
«
Reply #10 on:
November 16, 2010, 03:28:43 PM »
Hallo,
ja, Bezeichnung und Kurzbeschreibung wird jetzt angezeigt.
Code:
echo "<td>" . $ds2['title'] . "</td>";
echo "<td>" . $ds2['description'] . "</td>";
aber die bestellte Menge leider noch nicht
Code:
echo "<td>" . $ds['quantity'] . "</td>";
und wie ich eben festgestellt habe auch nur lokal, online wird nichts angezeigt.
«
Last Edit: November 16, 2010, 03:47:15 PM by Lomex
»
Logged
Der Kopf ist rund, damit das Denken die Richtung wechseln kann.
Lomex
Offline
Posts: 50
Re: Auftragsverwaltung anpassen
«
Reply #11 on:
November 29, 2010, 06:27:09 PM »
Mal schauen, ob mir noch mal jemand hilft.
Also folgenden Code habe ich jetzt mal "modifiziert". Lokal in der Xampp-Testumgebung wird mir das gewünschte angezeigt, aber online leider noch.
Siehe Kommentar in Zeile 159, DAS ZEIGT ER MIR ONLINE NICHT AN
Code:
<?php
/*
Module developed for the Open Source Content Management System WebsiteBaker (http://websitebaker.org)
Copyright (C) 2010, Christoph Marti
LICENCE TERMS:
This module is free software. You can redistribute it and/or modify it
under the terms of the GNU General Public License - version 2 or later,
as published by the Free Software Foundation: http://www.gnu.org/licenses/gpl.html.
DISCLAIMER:
This module 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.
*/
require(
'../../config.php'
);
// Include WB admin wrapper script
require(
WB_PATH
.
'/modules/admin.php'
);
// Make use of the skinable backend themes of WB > 2.7
// Check if THEME_URL is supported otherwise use ADMIN_URL
if (!
defined
(
'THEME_URL'
)) {
define
(
'THEME_URL'
,
ADMIN_URL
);
}
// Look for language file
if (
LANGUAGE_LOADED
) {
require_once(
WB_PATH
.
'/modules/bakery/languages/EN.php'
);
if (
file_exists
(
WB_PATH
.
'/modules/bakery/languages/'
.
LANGUAGE
.
'.php'
)) {
require_once(
WB_PATH
.
'/modules/bakery/languages/'
.
LANGUAGE
.
'.php'
);
}
}
// Show current or archived orders
if (isset(
$_GET
[
'view'
])) {
$view
=
$_GET
[
'view'
];
}
else {
$view
=
'current'
;
}
// Get the time until the admin will be alerted if the invoice has not been payed
$query_payment_methods
=
$database
->
query
(
"SELECT value_2, value_3 FROM `"
.
TABLE_PREFIX
.
"mod_bakery_payment_methods` WHERE directory = 'invoice' LIMIT 1"
);
if (
$query_payment_methods
->
numRows
() >
0
) {
$payment_method
=
$query_payment_methods
->
fetchRow
();
$invoice_alert
=
is_numeric
(
$payment_method
[
'value_2'
]) ?
$payment_method
[
'value_2'
] :
0
;
$reminder_alert
=
is_numeric
(
$payment_method
[
'value_3'
]) ?
$payment_method
[
'value_3'
] :
0
;
}
// Make difference between current orders and archived orders
if (
$view
==
'current'
) {
$toggle
=
'archive'
;
$toggle_page
=
$MOD_BAKERY
[
'TXT_ORDER_ARCHIVED'
];
$current_page
=
$MOD_BAKERY
[
'TXT_ORDER_CURRENT'
];
$query_customer
=
$database
->
query
(
"SELECT * FROM `"
.
TABLE_PREFIX
.
"mod_bakery_customer` WHERE status != 'archived' AND submitted != 'no' ORDER BY order_date DESC"
);
}
else {
$toggle
=
'current'
;
$toggle_page
=
$MOD_BAKERY
[
'TXT_ORDER_CURRENT'
];
$current_page
=
$MOD_BAKERY
[
'TXT_ORDER_ARCHIVED'
];
$query_customer
=
$database
->
query
(
"SELECT * FROM `"
.
TABLE_PREFIX
.
"mod_bakery_customer` WHERE status = 'archived' AND submitted != 'no' ORDER BY order_date DESC"
);
}
echo
"<h2>
{
$MOD_BAKERY
[
'TXT_ORDER_ADMIN'
]}
: <br/>
$current_page
<span style='text-transform: lowercase;'>
{
$TEXT
[
'MODIFY'
]}
/
{
$TEXT
[
'DELETE'
]}
</span></h2>"
// Show buttons
?>
<script type="text/javascript">
function newInvoice(url) {
if (screen.availHeight) {
var invoiceWindowHeight = screen.availHeight;
}
else {
var invoiceWindowHeight = 800;
}
invoiceWindow = window.open(url + "#bottom", "", "width=750, height=" + invoiceWindowHeight + ", left=100, top=0, scrollbars=yes");
invoiceWindow.focus();
}
function showOrder(url) {
orderWindow = window.open(url, "", "width=600, height=500, left=150, top=100, scrollbars=yes");
orderWindow.focus();
}
</script>
<table width="98%" align="center" cellpadding="0" cellspacing="0">
<tr height="30" class="mod_bakery_submit_row_b">
<td align="left" width="50%" style="padding-left: 12px;">
<input type="button" value="
<?php
echo
$toggle_page
;
?>
" onclick="javascript: window.location = '
<?php
echo
WB_URL
;
?>
/modules/bakery/modify_orders.php?page_id=
<?php
echo
$page_id
;
?>
&view=
<?php
echo
$toggle
;
?>
';" />
</td>
<td align="right" width="50%" style="padding-right: 12px;">
<input type="button" value="
<?php
echo
$TEXT
[
'CANCEL'
];
?>
" onclick="javascript: window.location = '
<?php
echo
ADMIN_URL
;
?>
/pages/modify.php?page_id=
<?php
echo
$page_id
;
?>
';" />
</td>
</tr>
</table>
<br />
<?php
// Query customer table
if (
$query_customer
->
numRows
() >
0
) {
// Customer table header
?>
<form name="modify" action="
<?php
echo
WB_URL
;
?>
/modules/bakery/save_orders.php" method="post" style="margin: 0;">
<input type="hidden" name="section_id" value="
<?php
echo
$section_id
;
?>
" />
<input type="hidden" name="page_id" value="
<?php
echo
$page_id
;
?>
" />
<table cellpadding="2" cellspacing="0" border="1" width="950" align="center">
<tr height="30" valign="bottom" class="mod_bakery_submit_row_b">
<th colspan="2" align="left"><span style="margin-left: 5px;">
<?php
echo
$MOD_BAKERY
[
'TXT_ORDER'
];
?>
</span></th>
<th colspan="2" align="left">
<?php
echo
$MOD_BAKERY
[
'TXT_CUSTOMER'
];
?>
</th>
<th align="left">
<?php
echo
$MOD_BAKERY
[
'TXT_TISCH'
];
?>
</th>
<th align="left">
<?php
echo
$MOD_BAKERY
[
'TXT_ORDER_DATE'
];
?>
</th>
<th colspan="2" align="left">
<?php
echo
$MOD_BAKERY
[
'TXT_STATUS'
];
?>
</th>
<th colspan="3">
<?php
echo
$TEXT
[
'ACTIONS'
];
?>
</th>
</tr>
<?php
// List order table
$row
=
'a'
;
while (
$costumer
=
$query_customer
->
fetchRow
()) {
?>
<tr class="row_
<?php
echo
$row
;
?>
" height="20">
<td width="30" align="left">
<?php
// Show payment method icons
$payment_method
=
$costumer
[
'submitted'
];
// Include payment method info file
$info_file_path
=
WB_PATH
.
"/modules/bakery/payment_methods/
$payment_method
/info.php"
;
include(
$info_file_path
);
// Replace 'cod', 'advance' and 'invoice' by localisations
$payment_method_name
=
$payment_method
==
"cod"
?
$MOD_BAKERY
[
'TXT_PAYMENT_METHOD_COD'
] :
$payment_method_name
;
$payment_method_name
=
$payment_method
==
"advance"
?
$MOD_BAKERY
[
'TXT_PAYMENT_METHOD_ADVANCE'
] :
$payment_method_name
;
$payment_method_name
=
$payment_method
==
"invoice"
?
$MOD_BAKERY
[
'TXT_PAYMENT_METHOD_INVOICE'
] :
$payment_method_name
;
// Show icon
echo
"<img src='"
.
WB_URL
.
"/modules/bakery/payment_methods/
$payment_method
/icon.png' alt='
$payment_method_name
' title='
$payment_method_name
' border='0' />"
;
// Show email, customer name and order date
?>
</td>
<td width="30" align="right">
<?php
echo
$costumer
[
'order_id'
];
?>
</td>
<td width="18">
<a href="mailto:
<?php
echo
stripslashes
(
$costumer
[
'cust_email'
]);
?>
"><img src="
<?php
echo
WB_URL
;
?>
/modules/bakery/images/email.png" alt="
<?php
echo
$TEXT
[
'EMAIL'
];
?>
" title="
<?php
echo
$TEXT
[
'EMAIL'
].
" "
.
$TEXT
[
'TO'
].
" "
.
stripslashes
(
$costumer
[
'cust_email'
]);
?>
" style="margin-bottom: -3px;" border="0" /></a>
</td>
<td>
<a href="
<?php
echo
WB_URL
;
?>
/modules/bakery/view_order.php?page_id=
<?php
echo
$page_id
;
?>
§ion_id=
<?php
echo
$section_id
;
?>
&order_id=
<?php
echo
$costumer
[
'order_id'
];
?>
" onclick="showOrder(this.href); return false;">
<?php
echo
stripslashes
(
$costumer
[
'cust_last_name'
]).
" "
.
stripslashes
(
$costumer
[
'cust_first_name'
]);
?>
</a>
</td>
<td>
<table id="extratab" cellpadding="2" cellspacing="2" border="1">
<?php
// DAS ZEIGT ER MIR ONLINE NICHT AN Show email, customer name and order date
$sql
=
"SELECT * FROM `"
.
TABLE_PREFIX
.
"mod_bakery_order` WHERE order_id = '"
.
$costumer
[
'order_id'
].
"'"
;
$res
=
mysql_query
(
$sql
);
while(
$ds
=
mysql_fetch_assoc
(
$res
)){
$sql2
=
"SELECT * FROM mod_bakery_items WHERE item_id = '"
.
$ds
[
'item_id'
].
"'"
;
$res2
=
mysql_query
(
$sql2
);
while(
$ds2
=
mysql_fetch_assoc
(
$res2
)){
echo
"<tr>"
;
echo
"<td>"
.
$ds2
[
'sku'
] .
" </td>"
;
echo
"<td>"
.
$ds2
[
'title'
] .
"</td>"
;
echo
"<td>"
.
$ds
[
'quantity'
] .
"</td>"
;
echo
"</tr>"
;
}
}
?>
</table>
</td>
<td width="135">
<?php
echo
gmdate
(
DATE_FORMAT
.
', '
.
TIME_FORMAT
,
$costumer
[
'order_date'
]+
TIMEZONE
);
?>
</td>
<td width="22">
<?php
// Show colored images for status
$status_img_url
=
WB_URL
.
"/modules/bakery/images/status"
;
$status_img_style
=
"style='margin-bottom: -3px;' border='0'"
;
switch (
stripslashes
(
$costumer
[
'status'
])) {
case
'ordered'
: echo
"<img src='
$status_img_url
/ordered.gif' alt='
{
$MOD_BAKERY
[
'TXT_STATUS_ORDERED'
]}
' title='
{
$MOD_BAKERY
[
'TXT_STATUS_ORDERED'
]}
'
$status_img_style
/>"
; break;
case
'shipped'
: echo
"<img src='
$status_img_url
/shipped.gif' alt='
{
$MOD_BAKERY
[
'TXT_STATUS_SHIPPED'
]}
' title='
{
$MOD_BAKERY
[
'TXT_STATUS_SHIPPED'
]}
'
$status_img_style
/>"
; break;
case
'invoice'
:
// Invoice alert
if (
$costumer
[
'order_date'
] + (
60
*
60
*
24
*
$invoice_alert
) <
time
() &&
$invoice_alert
!=
0
) {
echo
"<img src='
$status_img_url
/alert.gif' alt='
{
$MOD_BAKERY
[
'TXT_STATUS_REMINDER'
]}
' title='
{
$MOD_BAKERY
[
'TXT_STATUS_REMINDER'
]}
'
$status_img_style
/>"
; break;
}
else {
echo
"<img src='
$status_img_url
/invoice.gif' alt='
{
$MOD_BAKERY
[
'TXT_STATUS_INVOICE'
]}
' title='
{
$MOD_BAKERY
[
'TXT_STATUS_INVOICE'
]}
'
$status_img_style
/>"
; break;
}
case
'reminder'
:
// Reminder alert
if (
$costumer
[
'order_date'
] + (
60
*
60
*
24
*
$reminder_alert
) <
time
() &&
$reminder_alert
!=
0
) {
echo
"<img src='
$status_img_url
/alert.gif' alt='
{
$MOD_BAKERY
[
'TXT_STATUS_REMINDER'
]}
' title='
{
$MOD_BAKERY
[
'TXT_STATUS_REMINDER'
]}
'
$status_img_style
/>"
; break;
}
else {
echo
"<img src='
$status_img_url
/reminder.gif' alt='
{
$MOD_BAKERY
[
'TXT_STATUS_REMINDER'
]}
' title='
{
$MOD_BAKERY
[
'TXT_STATUS_REMINDER'
]}
'
$status_img_style
/>"
; break;
}
case
'paid'
: echo
"<img src='
$status_img_url
/paid.gif' alt='
{
$MOD_BAKERY
[
'TXT_STATUS_PAID'
]}
' title='
{
$MOD_BAKERY
[
'TXT_STATUS_PAID'
]}
'
$status_img_style
/>"
; break;
case
'archived'
: echo
"<img src='
$status_img_url
/archived.gif' alt='
{
$MOD_BAKERY
[
'TXT_STATUS_ARCHIVED'
]}
' title='
{
$MOD_BAKERY
[
'TXT_STATUS_ARCHIVED'
]}
'
$status_img_style
/>"
; break;
}
echo
"</td>\n<td width='120'>"
;
// Show status select depending on the payment method
if (
stripslashes
(
$costumer
[
'status'
]) ==
"archived"
) {
echo
"
{
$MOD_BAKERY
[
'TXT_STATUS_ARCHIVED'
]}
"
;
} else {
switch (
stripslashes
(
$costumer
[
'submitted'
])) {
case
'advance'
:
$select_status
= array(
"ordered"
=>
$MOD_BAKERY
[
'TXT_STATUS_ORDERED'
],
"paid"
=>
$MOD_BAKERY
[
'TXT_STATUS_PAID'
],
"shipped"
=>
$MOD_BAKERY
[
'TXT_STATUS_SHIPPED'
],
"archived"
=>
$MOD_BAKERY
[
'TXT_STATUS_ARCHIVE'
]);
break;
case
'invoice'
:
$select_status
= array(
"ordered"
=>
$MOD_BAKERY
[
'TXT_STATUS_ORDERED'
],
"shipped"
=>
$MOD_BAKERY
[
'TXT_STATUS_SHIPPED'
],
"invoice"
=>
$MOD_BAKERY
[
'TXT_STATUS_INVOICE'
],
"reminder"
=>
$MOD_BAKERY
[
'TXT_STATUS_REMINDER'
],
"paid"
=>
$MOD_BAKERY
[
'TXT_STATUS_PAID'
],
"archived"
=>
$MOD_BAKERY
[
'TXT_STATUS_ARCHIVE'
]);
break;
default:
$select_status
= array(
"ordered"
=>
$MOD_BAKERY
[
'TXT_STATUS_ORDERED'
],
"shipped"
=>
$MOD_BAKERY
[
'TXT_STATUS_SHIPPED'
],
"archived"
=>
$MOD_BAKERY
[
'TXT_STATUS_ARCHIVE'
]);
}
// Generate status select
echo
" <select name='status[
{
$costumer
[
'order_id'
]}
]' style='width: 110px'>"
;
foreach (
$select_status
as
$option_value
=>
$option_text
) {
echo
"<option value='
$option_value
'"
;
echo
stripslashes
(
$costumer
[
'status'
]) ==
$option_value
?
" selected='selected'"
:
""
;
echo
">
$option_text
</option>\n"
;
}
echo
"</select>"
;
}
?>
</td>
<td width="22">
<a href="
<?php
echo
WB_URL
;
?>
/modules/bakery/view_invoice.php?page_id=
<?php
echo
$page_id
;
?>
§ion_id=
<?php
echo
$section_id
;
?>
&order_id=
<?php
echo
$costumer
[
'order_id'
];
?>
" onclick="newInvoice(this.href); return false;"><img src="
<?php
echo
WB_URL
;
?>
/modules/bakery/images/print.gif" alt="
<?php
echo
$MOD_BAKERY
[
'TXT_PRINT_INVOICE'
];
?>
" title="
<?php
echo
$MOD_BAKERY
[
'TXT_PRINT_INVOICE'
];
?>
" border="0" /></a>
</td>
<td width="22">
<a href="
<?php
echo
WB_URL
;
?>
/modules/bakery/view_order.php?page_id=
<?php
echo
$page_id
;
?>
§ion_id=
<?php
echo
$section_id
;
?>
&order_id=
<?php
echo
$costumer
[
'order_id'
];
?>
" onclick="showOrder(this.href); return false;" title="
<?php
echo
$TEXT
[
'VIEW_DETAILS'
];
?>
">
<img src="
<?php
echo
THEME_URL
;
?>
/images/view_16.png" alt="
<?php
echo
$MOD_BAKERY
[
'TXT_INVOICE'
].
" "
.
$TEXT
[
'VIEW_DETAILS'
];
?>
" border="0" />
</a>
</td>
<td width="22">
<a href="javascript: confirm_link('
<?php
echo
$TEXT
[
'ARE_YOU_SURE'
];
?>
', '
<?php
echo
WB_URL
;
?>
/modules/bakery/delete_order.php?page_id=
<?php
echo
$page_id
;
?>
§ion_id=
<?php
echo
$section_id
;
?>
&order_id=
<?php
echo
$costumer
[
'order_id'
];
?>
&view=
<?php
echo
$view
;
?>
');" title="
<?php
echo
$TEXT
[
'DELETE'
];
?>
">
<img src="
<?php
echo
THEME_URL
;
?>
/images/delete_16.png" border="0" alt="
<?php
echo
$TEXT
[
'DELETE'
];
?>
" />
</a>
</td>
</tr>
<?php
// Alternate row color
if (
$row
==
'a'
) {
$row
=
'b'
;
} else {
$row
=
'a'
;
}
}
?>
</table>
<?php
} else {
echo
$TEXT
[
'NONE_FOUND'
].
"<br /><br />"
;
}
// Show buttons if view is current
if (
$view
==
'current'
) {
?>
<table width="98%" align="center" cellpadding="0" cellspacing="0" class="mod_bakery_submit_row_b">
<tr valign="top">
<td height="30" align="left" style="padding-left: 12px;">
<input name="save" type="submit" value="
<?php
echo
$TEXT
[
'SAVE'
];
?>
" style="width: 100px; margin-top: 5px;" /></td>
<td height="30" align="right" style="padding-right: 12px;">
<input type="button" value="
<?php
echo
$TEXT
[
'CANCEL'
];
?>
" onclick="javascript: window.location = '
<?php
echo
ADMIN_URL
;
?>
/pages/modify.php?page_id=
<?php
echo
$page_id
;
?>
';" style="width: 100px; margin-top: 5px;" /></td>
</tr>
</table>
</form>
<?php
}
// Print admin footer
$admin
->
print_footer
();
?>
Logged
Der Kopf ist rund, damit das Denken die Richtung wechseln kann.
Pages: [
1
]
Go Up
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
=> Security Announcements
=> Documentation
=> WebsiteBaker Website Showcase
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.9
===> Announcements
===> Help/Support
=====> Modules / Extensions
===> Suggestions
===> Software bugs
=> Help & Support
=> Modules
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
=> jQuery
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
=> Archive (posts up to 2007)
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> WebsiteBaker 2.9
===> Ankündigungen
===> Hilfe/Support
=====> Module / Extensions
===> Vorschläge
===> Softwarefehler
===> Erfahrungs und Testberichte
=> Hilfe/Support
=> Module & Snippets
=> Templates & Design
=> Tutorials
=> jQuery
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
-----------------------------
Bakery (WB shop module)
-----------------------------
=> Bakery English
=> Bakery Deutsch
-----------------------------
KeepInTouch (Multi Contact Module)
-----------------------------
=> KeepInTouch English
=> KeepInTouch Deutsch
Loading...