Author Topic: View Orders By "Confirmed" by default  (Read 482 times)

samlf3rd

  • Jr. Member
  • **
  • Posts: 115
View Orders By "Confirmed" by default
« 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

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27496
  • Always on vacation
    • Jenkin Hill Internet
Re: View Orders By "Confirmed" by default
« Reply #1 on: February 04, 2019, 18:38:24 pm »
Have you tried unpublishing the order status you don't require?
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM 3.6.1.10121 on Joomla 3.9.11 PHP 7.0.33
Testing 3.6.1.10129 on Joomla 3.9.11

samlf3rd

  • Jr. Member
  • **
  • Posts: 115
Re: View Orders By "Confirmed" by default
« Reply #2 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.

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2943
  • VirtueMart Version: 3.6.0
Re: View Orders By "Confirmed" by default
« Reply #3 on: February 11, 2019, 11:18:40 am »
This would need some code customisation
regards
A

Joomla 3.9.8
php 7.1

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3974
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: View Orders By "Confirmed" by default
« Reply #4 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

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9912
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: View Orders By "Confirmed" by default
« Reply #5 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
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/