jka Posted February 13, 2017 Share Posted February 13, 2017 Is there an extension or modification available for us to get a bit more information on the un-settled orders? For example it would be nice to drill down or see the details of the order such as Product Id, QTY etc. Thanks. Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 13, 2017 Share Posted February 13, 2017 There is the Edit icon. But I think you are wanting something there, on the Dashboard? Quote Link to comment Share on other sites More sharing options...
jka Posted February 13, 2017 Author Share Posted February 13, 2017 Hello BSmither, I am just trying to get a snapshot on the pending orders on the Dashboard. It shows the order number but a product Id listing would be great. FYI, I don't see an edit button on the dashboard. Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 13, 2017 Share Posted February 13, 2017 The Unsettled Orders tab... the list has: Order Number | Cust Type | Name | Status | date | Total | Print, Edit , Delete icons. Quote Link to comment Share on other sites More sharing options...
jka Posted February 13, 2017 Author Share Posted February 13, 2017 Got it. I see that. But was wondering if we can have a listing based on Product Id in the Unsettled Orders. This way we can get a snapshot on the product orders. (ours is a made to order shop) Quote Link to comment Share on other sites More sharing options...
bsmither Posted February 13, 2017 Share Posted February 13, 2017 I see. Let me work on that. Quote Link to comment Share on other sites More sharing options...
jka Posted June 13, 2017 Author Share Posted June 13, 2017 Hello bsmither, Any nibbles? Its a drag when you have 30 orders on your dashboard but cant see the product details unless you open each one of them. Would be great to have something. Quote Link to comment Share on other sites More sharing options...
jka Posted July 9, 2017 Author Share Posted July 9, 2017 BSmither, On a different note, I have possibly figured out how to add a line on the un-settled orders to also show 'product_code'. The product code is is in _order_inventory table. Here is a code from /admin-folder/sources/dashboard.index.inc.php. If we can add code to also get data from the order_inventory table, we will be able to then display the Product_Code for each order in the dashboard. ## Pending Orders Tab $page = (isset($_GET['orders'])) ? $_GET['orders'] : 1; $unsettled_count = $GLOBALS['db']->count('CubeCart_order_summary', 'cart_order_id', array('status' => array(1, 2))); $results_per_page = 25; $unsettled_orders = $GLOBALS['db']->select('CubeCart_order_summary', array('cart_order_id', 'name', 'first_name', 'last_name', 'order_date', 'customer_id', 'total', 'status'), 'status IN (1,2) OR `dashboard` = 1', '`dashboard` DESC, `status` DESC,`order_date` ASC', $results_per_page, $page); Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 9, 2017 Share Posted July 9, 2017 Unless something has changed in the Database class, creating a JOIN query gets sort of tricky. The alternative is to iterate through the $unsettled_orders array and query for the inventory based on cart_order_id. Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 9, 2017 Share Posted July 9, 2017 Try this: In dashboard.index.inc.php, near line 263, find: $GLOBALS['smarty']->assign('ORDERS', $orders); ABOVE that, add: if(($inventories = $GLOBALS['db']->select('CubeCart_order_inventory', '`cart_order_id`,`product_code`', array('cart_order_id' => $cart_order_ids))) !== false){ foreach($inventories as $inventory){ $order_inventory[$inventory['cart_order_id']]['inventory'][] = $inventory; } $orders = merge_array($orders,$order_inventory); } In the template dashboard.index.php, find near line 160: <td>{$order.date}</td> AFTER that, add: <td>{foreach $order.inventory as $prod}{$prod.product_code}{/foreach}</td> Find near line 137: <td>{$LANG.common.date}</td> AFTER that, add: <td>Inventory</td> You now have a column holding product codes for each respective order. I will leave it up to you to style the list of product codes in the table cell. (I was thinking about a drop-down list if more than one item in the order.) Quote Link to comment Share on other sites More sharing options...
jka Posted July 9, 2017 Author Share Posted July 9, 2017 Thanks & Thanks to you BSmither. It works great. I did this for the multiple products in an order and it works great. <td> {foreach $order.inventory as $prod} <div class = row> {$prod.product_code} {/foreach} </div> </td> Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 9, 2017 Share Posted July 9, 2017 Not to nitpick, but the {foreach} and the <div> tags are not nested properly. Quote Link to comment Share on other sites More sharing options...
jka Posted July 10, 2017 Author Share Posted July 10, 2017 Thanks. Fixed it now. 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.