File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
public_html/storefront/model/account Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -318,4 +318,29 @@ public function prepareExtendedFields(array $list = [])
318318 }
319319 return $ output ;
320320 }
321+
322+ /**
323+ * @param int $order_id
324+ *
325+ * @return array
326+ * @throws AException
327+ */
328+ public function getOrderStatusStepper (int $ order_id )
329+ {
330+ if (!$ order_id ){
331+ return [];
332+ }
333+ $ language_id = (int ) $ this ->config ->get ('storefront_language_id ' );
334+ $ query = $ this ->db ->query (
335+ "SELECT os.name AS status, oh.order_status_id, max(oh.date_added) AS date_added
336+ FROM " . $ this ->db ->table ("order_history " ) . " oh
337+ LEFT JOIN " . $ this ->db ->table ("order_statuses " ) . " os
338+ ON oh.order_status_id = os.order_status_id
339+ WHERE oh.order_id = ' " . $ order_id . "'
340+ AND os.language_id = ' " . $ language_id . "'
341+ GROUP BY oh.order_status_id, status
342+ ORDER BY max(oh.date_added) "
343+ );
344+ return $ query ->rows ;
345+ }
321346}
You can’t perform that action at this time.
0 commit comments