[微修改]後台增加訂單時間

By Hikari

無論是後台的Dashboard或是order分頁

訂單列表都只會顯示新增日期以及修改日期

但其實時間還算滿重要的,例如每日出貨截止時間為下午四點好了

如果後台沒有顯示時間,其實不太容易結單時間

客人打來跟你說他在幾點有匯錢或是刷卡,沒有時間顯示其實也不是很好對

但直接從資料庫進去看,會發現資料庫是有紀錄時間的

這只是單純OC的Controller沒有顯示而已

我們只要修改幾個檔案就可以讓後台顯示訂單時間


打開/var/www/html/admin/controller/sale/order.php 檔案
搜尋
'date_added'    => date($this->language->get('date_format_short'), strtotime($result['date_added'])),
 修改為
'date_added'    => date($this->language->get('date_format_short'), strtotime($result['date_added'])).' '.date($this->language->get('time_format'), strtotime($result['date_added'])),
搜尋
'date_modified' => date($this->language->get('date_format_short'), strtotime($result['date_modified'])),
 修改為
'date_modified' => date($this->language->get('date_format_short'), strtotime($result['date_modified'])).' '.date($this->language->get('time_format'), strtotime($result['date_ modified'])),

打開admin/controller/dashboard/recent.php檔案
搜尋
'date_added'    => date($this->language->get('date_format_short'), strtotime($result['date_added'])),
 修改為
'date_added'    => date($this->language->get('date_format_short'), strtotime($result['date_added'])).' '.date($this->language->get('time_format'), strtotime($result['date_added'])),
然後到後台看看,應該會像下面這個樣子(紅匡部分)
%e8%9e%a2%e5%b9%95%e5%bf%ab%e7%85%a7-2019-08-09-%e4%b8%8b%e5%8d%882-41-13
測試版本OC3, OC2全系列
 Category: Opencart購物車

2 Comments

  1. Reply

    Hey very nie web site!! Guy .. Beautiful .. Wonderful .. I’ll bookmark your
    blog and take the feeds also? I’m happy to seek outt a lot off
    useful info hwre in the post, we’d like work out more strategies in this regard, thanks for sharing.

    . . . . .

    1. Hikari
      Reply

      Hey very nie web site!! Guy .. Beautiful .. Wonderful .. I’ll bookmark your
      blog and take the feeds also? I’m happy to seek outt a lot off
      useful info hwre in the post, we’d like work out more strategies in this regard, thanks for sharing.

      . . . . .

Leave a Reply