Skip to main content

How can I refresh the orders view page?

13 years 9 months ago #89057 by lanzanet
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.

13 years 9 months ago #89118 by Xavier
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.

13 years 9 months ago - 13 years 9 months ago #89133 by lanzanet
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: 13 years 9 months ago by lanzanet.

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

13 years 9 months ago #89345 by nicolas
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.046 seconds
Powered by Kunena Forum