Orders Listing

From PhpCOIN Documentation

Jump to: navigation, search

The orders listing can be viewed by a logged-in admin, or by a logged-in client. It allows an admin to see a listing of all your orders in one place, while a client can see all their own orders in one place.

You can specify how may orders should be listed per page via Admin -> Parameters -> common -> orders -> Listing Items Per Page for: Orders

You can also specify if the Product description will be displayed on Orders Listings instead of the default Vendor / Product Name columns. The option is chosen via Admin -> Parameters -> common -> orders -> Orders Listing Show Prod. Description

The default listing sort is by Order Date in DESCending order. You can edit the source code to change what the sort is, as well as the order. In file /coin_modules/orders/orders_funcs.php find the function do_view_orders(). Within that function is the following code block:

# Set Order ASC / DESC part of sort
	IF (!$adata['so'])		{$adata['so'] = 'D';}
	IF ($adata['so'] == 'A')	{$order_AD = ' ASC';}
	IF ($adata['so'] == 'D')	{$order_AD = ' DESC';}

Set the first line to A or D, depending on whether you want ASCending or DESCending sort

Immediately below that block is:

# Set Order
IF (!$adata['sb'] )			{$adata['sb']='3';}
IF ($adata['sb'] =='1') {$_order = ' ORDER BY '.$_DBCFG['orders'].'.ord_id '.$order_AD;}
IF ($adata['sb'] =='2') {$_order = ' ORDER BY '.$_DBCFG['orders'].'.ord_status 
'.$order_AD;}
IF ($adata['sb'] =='3') {$_order = ' ORDER BY '.$_DBCFG['orders'].'.ord_ts '.$order_AD;}
IF ($adata['sb'] =='4') {$_order = ' ORDER BY '.$_DBCFG['orders'].'.ord_domain 
'.$order_AD;}
IF ($adata['sb'] =='5') {$_order = ' ORDER BY '.$_DBCFG['vendors'].'.vendor_name 
'.$order_AD;}
IF ($adata['sb'] =='6') {$_order = ' ORDER BY '.$_DBCFG['products'].'.prod_name 
'.$order_AD;}
IF ($adata['sb'] =='7') {$_order = ' ORDER BY '.$_DBCFG['products'].'.prod_desc 
'.$order_AD;}
IF ($adata['sb'] =='8') {$_order = ' ORDER BY '.$_DBCFG['orders'].'.ord_name_last 
'.$order_AD.', '.$_DBCFG['orders'].'.ord_name_first '.$order_AD;}

Set the first line to the number of the ORDER BY fields that you want.

Personal tools

Inscrita el Registro Mercantil de Mallorca Tomo 2140, Hoja No. PM-51034, Folio 135
This website owned and operated by: Technology Services RPVW S.L. CIF# B57345084
Avda Constitucion 48 Bajos Alaro 07340 Baleares SPAIN
Tel:+34 971518362    Fax: +34 971518368    eMail: support@phpcoin.com