VirtueMart Forum

VirtueMart 2 + 3 => General Questions => Topic started by: samlf3rd on February 04, 2019, 17:38:40 pm

Title: View Orders By "Confirmed" by default
Post by: samlf3rd on February 04, 2019, 17:38:40 pm
Hello,
 Is there a way I can make the Admin Orders page show only Confirmed or Pending by default when I go to the orders page?

Don't want completed to show as they didn't make the payment...

Instead of showing all order status be default like only show Confirmed?
 Thank you in advance, I looked through the forums and on the net. I have also looked through the order view files but nothing...
 Sam
Title: Re: View Orders By "Confirmed" by default
Post by: jenkinhill on February 04, 2019, 18:38:24 pm
Have you tried unpublishing the order status you don't require?
Title: Re: View Orders By "Confirmed" by default
Post by: samlf3rd on February 04, 2019, 19:20:43 pm
Have you tried unpublishing the order status toy don't require?

Well just trying to make it easy. We still want to see the statuses, but by default I want to be able to just see orders that need to ship-not the ones that have been shipped or haven't been paid. I do want to see those just not by default.
Title: Re: View Orders By "Confirmed" by default
Post by: AH on February 11, 2019, 11:18:40 am
This would need some code customisation
Title: Re: View Orders By "Confirmed" by default
Post by: Studio 42 on February 11, 2019, 15:29:51 pm
Try to modify administrator/components/com_virtuemart/models/orders.php near line 427
      $order_status_code = vRequest::getString('order_status_code', false);
replace false with your default order_status_code eg. for Confirmed as default
$order_status_code = vRequest::getString('order_status_code', 'C');
Do same in administrator/components/com_virtuemart/views/orders/view.html.php
near line 190 change
          $orderstates = vRequest::getCmd('order_status_code','');
to
          $orderstates = vRequest::getCmd('order_status_code','C');
Of course on virtuemart update, you loose the change, so the team should add this as a virtuemart config value
Title: Re: View Orders By "Confirmed" by default
Post by: Milbo on February 11, 2019, 20:20:15 pm
It would also need a vm config setting and I just added a feature which sounds like 10 minutes, but was then almost an hour. Buy a membership and we add it https://extensions.virtuemart.net/support/virtuemart-supporter-membership-silver-detail