Jump to content

Dispatch date on the Invoice


rusticc3

Recommended Posts

The Shipping information on the bottom of my invoices shows

Gateway - Correct

Dispatch Date - Blank

Shipping Method - Correct

Tracking Code - I do not use.

 

How do I get the dispatch date filied in, I was hoping that when I changed the order status to complete this would then fill in the dispatch date, but no.

 

Any help would be useful

 

Rustic

Link to comment
Share on other sites

When viewing the order in admin, Orders, bring up an order for editing, Delivery tab, enter the date in the Dispatch Date field. Clicking in the field pops up a calender.

 

Updating the Order Summary by including the current date when moving the order status to Complete is not automatic.

 

Would you like it to be automatic?

 

If so, try this:

 

In the file /classes/order.class.php, near line 286, find:

    unset($content);
  }
break;

case self::ORDER_DECLINED:

On a new blank line just above the line having break;, add:

$data['ship_date'] = strftime("%F");

We are adding an element to the array $data that will eventually be used to update the order summary record near line 310.
 

Link to comment
Share on other sites

Apparently, the %F format code is not available on Windows operating systems (and maybe other operating systems).

 

PHP documentation is nice enough to not have mentioned it.

 

Replace this statement:

$data['ship_date'] = strftime("%F");

 

with:

$data['ship_date'] = strftime("%Y-%m-%d");

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...