News:

Looking for documentation? Take a look on our wiki

Main Menu

Order status' getting automaticcaly changed

Started by Kuubs, May 07, 2016, 15:05:29 PM

Previous topic - Next topic

Kuubs

Hello,

I've got a problem with the newest version of Virtuemart. Suddenly order are getting switched from a custom made order status to the "Confirmed" order status. This leads to errors and a not synced administration of the orders, plus the customer also get the confirmed order status email again. Is this a known problem or does anyone has an explanation for this?

Thank you.

Jörgen

What errors?
What gets out ouf sync ?
What oconfirmed order status email is sent again? The same mail twice ?

Try this for starters:
http://forum.virtuemart.net/index.php?topic=79799.0


regards

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Kuubs

Quote from: Jörgen on May 07, 2016, 17:06:32 PM
What errors?
What gets out ouf sync ?
What oconfirmed order status email is sent again? The same mail twice ?

Try this for starters:
http://forum.virtuemart.net/index.php?topic=79799.0


regards

Jörgen @ Kreativ Fotografi

If I sent an order out and puts the status on Shipped, and a few days later the status is suddenly Confirmed, my adminsitration is out of sync. The product is actually already sent out, but the software changes the status out of the blue. These are administrative errors I'm talking about.

If the status jumps back to Confirmed I assume the confirmed order email is sent out again. This is a crucial bug and really messes up my workflow because I need to double check everything (I cannot trust the software to do its job)

Jörgen

OK lets try this again
http://forum.virtuemart.net/index.php?topic=79799.0

What You are saying is like calling an auto repair and say my car doesn not work, do You know what is the trouble ?

Additional questions.

New VM install ?
Migrated install ?
Updated install ?
Third party template ?

The problem You are experiencing has to Do with something in Your site, but without more info, it is impossible the figure out what has happened.

regards

Jörgen @ Kreativ Fotografi


Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

GJC Web Design

have u checked that there are not multiple IPN's being sent from the payment gateway and /or say Googlebot testing harvested urls?

I have seen this trigger poorly coded payment plugins to set orders back to C

but as u provide so little info.. e.g. what payment gateway.. then who knows...
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Kuubs

Quote from: Jörgen on May 08, 2016, 13:28:42 PM
OK lets try this again
http://forum.virtuemart.net/index.php?topic=79799.0

What You are saying is like calling an auto repair and say my car doesn not work, do You know what is the trouble ?

Additional questions.

New VM install ?
Migrated install ?
Updated install ?
Third party template ?

The problem You are experiencing has to Do with something in Your site, but without more info, it is impossible the figure out what has happened.

regards

Jörgen @ Kreativ Fotografi




Don't want to sound like a prick, but I told you already. This is a clean install which has worked for a very long time. I can always update the installation without any issues, and this issue is for me very unclear as well. I'm just asking if someone knows this bug or experienced the same issue as mine. I cannot give out any more information because there isn't any more general information available.

Quote from: GJC Web Design on May 08, 2016, 18:07:04 PM
have u checked that there are not multiple IPN's being sent from the payment gateway and /or say Googlebot testing harvested urls?

I have seen this trigger poorly coded payment plugins to set orders back to C

but as u provide so little info.. e.g. what payment gateway.. then who knows...

That is something I need to check, thanks for the answer. I use a iDeal payment plugin from ideal-checkout.nl it's a free plugin, which is used very widespread. I'm gonna check if there lies the problem. Regarding the Googlebot, how can I disable the bot on these particular urls?, so that this issue won't happen again.


jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

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

GJC Web Design

QuoteI've got a problem with the newest version of Virtuemart

means nothing -- after a few 1000 replies you learn never to trust what a poster says.. esp. newest version...

happens dozens of times the poster thinks 2.0.16 is the newest etc

I really don't think it is too much to ask that people seeking free help at least give the complete particulars of their install when asking...

At the very minimum it makes them actually LOOK at what they have


QuoteI'm gonna check if there lies the problem

find the ipn call for a particular order in your server access logs .. search for e.g. pm=

set that order to Shipped

copy/paste the IPN url in a browser and go there...  and see if the order sets back to 'C'

then u know its the payment plug not checking the status b4 setting the status
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Kuubs

Quote from: GJC Web Design on May 09, 2016, 19:08:57 PM

QuoteI'm gonna check if there lies the problem

find the ipn call for a particular order in your server access logs .. search for e.g. pm=

set that order to Shipped

copy/paste the IPN url in a browser and go there...  and see if the order sets back to 'C'

then u know its the payment plug not checking the status b4 setting the status

Ok, I think I've foudn the problem. It's in the payment plugin, it verifies the payment with the bank, but it does that 2 times, and the second time when it gets confirmed it changes the status back to Confirmed. So what is my best course of action now?

Jörgen

Talk with the developer of the iDEAL plugin and tell them of Your problems. Or look for another iDEAL plugin instead.

regards

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

GJC Web Design

Quoteit verifies the payment with the bank, but it does that 2 times

yes.. one of my clients using this reports the same problem .. 2 confirms .. meaning two of everything incl. emails etc..

the client is using the CCideal plugin (paid for) and reports no problems  - he contacted the free developer multiple times with no results

and can confirm the free one doesn't check the current status before setting it leading to double status changes

If you want to try and fix this look at the

plugins\vmpayment\idealcheckoutideal\idealcheckoutideal.php

around line around line 296
public function plgVmOnPaymentResponseReceived(&$html)

at line 362

function to update order & send the email

elseif(method_exists($oModelOrder, 'updateStatusForOneOrder'))
{
$aOrder = array();
$aOrder['order_status'] = 'C';
$aOrder['virtuemart_order_id'] = $virtuemart_order_id;
$aOrder['customer_notified'] = 1;

$date = JFactory::getDate();
$aOrder['comments'] = ('Transaction status recieved from PSP: ' . $result->transaction_status);

$oModelOrder->updateStatusForOneOrder($virtuemart_order_id, $aOrder, true);
}


this is where I would FIRST check the current status of the order

so if it is already "C"  don't send again.. basic stuff

this is the sort of thing I do in my payment plugins


$theorder = VirtueMartModelOrders::getOrder($virtuemart_order_id);

$currentstatus = $theorder['order_status'];


elseif(method_exists($oModelOrder, 'updateStatusForOneOrder') && $currentstatus != 'C') // or any other status u don't want checked
{

etc etc -- so nothing happens if the order is already C

I have no way to test this as we aren't using it now - and ideally (ha ha) the would stop the double confirm ipn from their end
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Kuubs

#11
Quote from: Jörgen on May 19, 2016, 10:05:41 AM
Talk with the developer of the iDEAL plugin and tell them of Your problems. Or look for another iDEAL plugin instead.

regards

Jörgen @ Kreativ Fotografi

Yes, I'm in talk with the developer at the moment. I'll keep this post updated if there is a solution.

Quote from: GJC Web Design on May 19, 2016, 11:46:53 AM
Quoteit verifies the payment with the bank, but it does that 2 times

yes.. one of my clients using this reports the same problem .. 2 confirms .. meaning two of everything incl. emails etc..

the client is using the CCideal plugin (paid for) and reports no problems  - he contacted the free developer multiple times with no results

and can confirm the free one doesn't check the current status before setting it leading to double status changes

If you want to try and fix this look at the

plugins\vmpayment\idealcheckoutideal\idealcheckoutideal.php

around line around line 296
public function plgVmOnPaymentResponseReceived(&$html)

at line 362

function to update order & send the email

elseif(method_exists($oModelOrder, 'updateStatusForOneOrder'))
{
$aOrder = array();
$aOrder['order_status'] = 'C';
$aOrder['virtuemart_order_id'] = $virtuemart_order_id;
$aOrder['customer_notified'] = 1;

$date = JFactory::getDate();
$aOrder['comments'] = ('Transaction status recieved from PSP: ' . $result->transaction_status);

$oModelOrder->updateStatusForOneOrder($virtuemart_order_id, $aOrder, true);
}


this is where I would FIRST check the current status of the order

so if it is already "C"  don't send again.. basic stuff

this is the sort of thing I do in my payment plugins


$theorder = VirtueMartModelOrders::getOrder($virtuemart_order_id);

$currentstatus = $theorder['order_status'];


elseif(method_exists($oModelOrder, 'updateStatusForOneOrder') && $currentstatus != 'C') // or any other status u don't want checked
{

etc etc -- so nothing happens if the order is already C

I have no way to test this as we aren't using it now - and ideally (ha ha) the would stop the double confirm ipn from their end

Thank you for the reply. I'm gonna inform the plugin developer of the problem.