rusticc3 Posted January 18, 2014 Share Posted January 18, 2014 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 Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 18, 2014 Share Posted January 18, 2014 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. Quote Link to comment Share on other sites More sharing options...
rusticc3 Posted January 18, 2014 Author Share Posted January 18, 2014 Thank you that is great, will I have to change this again when 5.2.6 version upgrade comes along or will it be there forever? Quote Link to comment Share on other sites More sharing options...
rusticc3 Posted January 18, 2014 Author Share Posted January 18, 2014 Well I have added the code and nothing has changed, I have f5 each page, changed the order status etc and still no dispatch date. Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 18, 2014 Share Posted January 18, 2014 Can you tell us if phpMyAdmin is now working for you? If it is, then please look at the Structure of the CubeCart_order_summary table. Is there a column named 'ship_date'? Quote Link to comment Share on other sites More sharing options...
rusticc3 Posted January 18, 2014 Author Share Posted January 18, 2014 I am looking now at my phpadmin. Yes there is a ship date column. Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 18, 2014 Share Posted January 18, 2014 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"); Quote Link to comment Share on other sites More sharing options...
rusticc3 Posted January 19, 2014 Author Share Posted January 19, 2014 bsmither, thank you for your patience and help, the invoice date is now automatically insert when order staus changes to complete. I would like it without the time but I can live with it. thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.