B
B
burgutov2019-04-03 00:20:34
Joomla
burgutov, 2019-04-03 00:20:34

Virtuemart order status update?

Hello. respected programmers. The question is: "Where or how to understand that the required order has changed its status?". In general, integration with one service (cashback) and when ordering, the order status is transmitted, let's say "expected". Then in the admin we change the status to "Confirmed", and I need to send the service automatically that the status is confirmed. But I don't understand how exactly to do it. It turns out that in the database the status of the order changes is understandable. Two nuances, not every order can be with a cashback (it turns out, under certain conditions, everything is done through the url, data is received that the client came from the service. And I need to understand that it was my desired order that changed the status.
I'm a beginner programmer, maybe I'm missing something. Not even a big hint would be happy. You can't check the status of the "necessary" order every second with a code (like a loop :D ).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Nikolaev, 2019-07-18
@nikolaevevge

I think that the order status is in this table of the virtuemart_orders database .
Whether the order status update has a trigger or the ability to process this event with a plugin, I can’t say, because I didn’t understand this particular algorithm.
Alternatively, you can use cron to get order statuses that need to be tracked, in short, it's something like this:
$db = JFactory::getDBO();
$q = "SELECT * FROM #__virtuemart_orders __WHERE_conditions_on_query_if_need__;";
$db->setQuery($q);
$db->query();
then you check the information whether the status of the orders you are tracking has changed and if so, perform your logic with them.
That is, somewhere else you save orders that have already been processed, so as not to pull them and keep track of all new ones.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question