How can I refresh the orders view page?

  • Posts: 107
  • Thank you received: 3
11 years 9 months ago #89057

Hi. I'm using a code that updates the invoice date and number in the orders table when I change the order status to confirmed, but I must refresh manually the orders listing page to see the changes. Can I put some code anywhere to make this process automatically?

Thanks.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 9 months ago #89118

Hi,

I think that you can use the function "onAfterOrderUpdate" in you plugin and in this function just call the address of the order listing. by this way it should refresh the page.

Please Log in or Create an account to join the conversation.

  • Posts: 107
  • Thank you received: 3
11 years 9 months ago #89133

Hi, thanks for the answer, but I'm not using any plugin. I've modified the code in order.php to set the invoice date (if the invoice number is empty) when I change the state to Confirmed or other 'invoice' state, and the code works fine, but I must refresh the page manually to see the new data in the orders listing.

Please, Can you tell me where may I put the 'refresh page' code?

Thanks.

Last edit: 11 years 9 months ago by lanzanet.

Please Log in or Create an account to join the conversation.

  • Posts: 82796
  • Thank you received: 13357
  • MODERATOR
11 years 9 months ago #89345

Hi,

You will need to modify the function _terminate of the controllers/order.php file to modify the JS which closes the popup in order to add a javascript window.location in order to refresh the page.

Please Log in or Create an account to join the conversation.

Time to create page: 0.081 seconds
Powered by Kunena Forum