Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 12-21-2018 02:09:20

sdn
Member
From: UK
Registered: 05-29-2007
Posts: 882

Add Shipping Method to 'Active - Shipping' Display

How can we include the Shipping Method to the page display at 'Dashboard / Store / Orders / Order Center / Active - Shipping'?


Simon

Offline

 

#2 12-21-2018 09:40:56

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Add Shipping Method to 'Active - Shipping' Display

The shipping method is stored with the order items, so it's not directly available in that view, which is listing data from the orders table.  That's not to be said this couldn't be done, though.  If you were to edit the file {private}/apps/ecom/ECOM_OrderMan/init/0900_initcustom.php, and in the exec() function, add this code (or similar):

Code:

$shipmethodmatch = array();
$shipmethoddisp  = '';

foreach ($order['items'] as $itemnum => $item) {

     if (empty($item['shipmethod'])) {continue;}

     $shipmethod = preg_replace('/ \(.*\)$/','',$item['shipmethod']);
     $shipmethodmatch[$shipmethod] = 1;

} // End of foreach statement.

if (!(empty($shipmethodmatch))) {foreach ($shipmethodmatch as $smmid => $smmone) {$shipmethoddisp .= $smmid . ', ';} $shipmethoddisp = preg_replace('/\, $/','',$shipmethoddisp);}
if (!(empty($shipmethoddisp)))  {if (!(empty($order['order']['commentsint']))) {$order['order']['commentsint'] .= ', ';} $order['order']['commentsint'] .= 'Delivery Method: ' . $shipmethoddisp;}

This will have the effect of adding the order item delivery method(s) to the internal order comments when the order is initiated.  The internal order comments are displayed in the Order Center order listings (like Active - Shipping).

Hope that helps.


Nick Hendler

Offline

 

#3 12-23-2018 04:45:25

sdn
Member
From: UK
Registered: 05-29-2007
Posts: 882

Re: Add Shipping Method to 'Active - Shipping' Display

Great, that works a treat. It is now easy to see if there are any express delivery orders that need to be processed urgently.

Wishing you a very merry Christmas.


Simon

Offline

 

#4 12-24-2018 08:26:35

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Add Shipping Method to 'Active - Shipping' Display

No problem.  Merry Christmas to you too!


Nick Hendler

Offline

 

Board footer