News:

Support the VirtueMart project and become a member

Main Menu

Set order status by payment method ?

Started by dmb, January 29, 2018, 18:40:04 PM

Previous topic - Next topic

dmb

J3.8.2
VM3.0.16

I created a "Free" payment method that applies to a couple of our products a couple of years ago with the maximum price of 0.01 and the "Order Status for Pending transactions" to "Confirmed by shopper".

This has been working perfectly ever since for thousands of orders but I noticed that it stopped working in early January. By this I mean that all orders for Free (zero-priced) products now appear with the status of Pending. Is there anything that would prevent the payment method configuration from being applied ?

I assume I changed something back then but I have no idea what that might be - no recollection of any work on the site in fact ! However I must have done something and I can't figure out what ...

Thanks for any ideas at all, this is causing me some real headaches  :-[

David

dmb

#1
This is driving me nuts ... I'm not sure what to do except keep checking the orders page and manually updating the order status  :'( Maybe I'll set up a cron job to do it ...

If it helps I just noticed that the payment method for these orders on the order page is blank, where it used to be "Free" (the name of the payment method), maybe it's not picking up the payment method at checkout ... hmm ...

Update: I also noticed that the product is left in the cart after checkout, even though the order goes through (albeit with pending status) ... now I'm worried that something is really broken here  :-\

dmb

I've deleted the Free payment method and re-created it from scratch - still no joy :(

The symptoms are:

1. Customer buys free product (e.g. a free seminar where we need to know who's coming and how many of them);
2. The order is processed and has a status of "Pending", even though the "Order Status for Pending transactions" is set to "Confirmed by shopper" in the payment method config.
3. The product stays in the customer's cart, so they may accidentally end up buying it twice - now we don;t know if they bought it accidentally or for a friend (how many people are going to turn up ?)

Even a hint of where to start looking would be great ... I'm about to start putting debug traces in the VM source code at this stage :(

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

dmb

Thanks for taking the time to check out your settings, much appreciated.

It looks similar to what I have (attached) except the payment method is different - I just have "Standard" available in the list but maybe it's been renamed in versions after mine (VM 3.0.16) ?

Also I have a minimum amount of £0.01, though it strikes me that maybe I should be using the Maximum amount. However I don't know if my payment method is actually being called at all - the Payment method on the order screens is blank (see below).

I'll keep digging. Any insights very welcome !

David

jenkinhill

#5
Your settings should work, but you mentioned VM3.0.16.  Joomla 3.7 and later versions require that the installed VirtueMart version be at least 3.2.2  VM3.0.16 is also known to have security issues, so an update is recommended anyway. Current latest version is available on http://forum.virtuemart.net/index.php?topic=139652.0  this is a VM3.2.4 pre-release.

Test update on a backup copy of the site as there are more configuration options since 3.0.16  and you may need to edit some template overrides if using them - see http://forum.virtuemart.net/index.php?topic=135402.0

Other people with issues have found them fixed after updating.
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

Jörgen

You should set MAXIMUM order ammount to 0,01 not MINIMUM

regards

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

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

dmb

#8
Yes, I was thinking that in my earlier post, but tried it and it made no difference, still the same effects.

I don't think the payment method is being called at all, or maybe it's crashing somewhere ... it looks as if the checkout process isn't being completed as the product is left in the shopping cart even when the "thank you for your purchase" page is shown, and the payment method is blank on the order pages (see attached).

Maybe it's a clash with the versions of Joomla and VM I have installed, I guess I need to start planning an update to VM 3.2, though the thought frankly terrifies me as it took months to get it all working last time :)


Jörgen

#9
What happened in early january ?

New Joomla version?
New extension installed ?
New php version ?
Extensions updated ?
Site hacked ? Check for unknown admins. Your versions ar unsafe.

Nothing happens by itself.

Updating to latest should not be that hard, there has been changes in templates and how front page works, but the rest should be easy. You already have almost updated Joomla Going to 3.8.6 would be easy.

One more thing, if the payment method does not fulfill its requirements it should not be used and therefore would not be visible in back end. Have You checked this ? A link would be nice :)


regards

Jörgen @ Kreativ Fotografi

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

dmb

I'm absolutely sure you're right Jurgen, it's almost certainly something I changed. I think the two changes I made around that time were to remove a component (Rewardpoints for Vm) and probably a Joomla upgrade as well. Either could easily be the reason.

However it's probably a case of fixing-forward at this point, my VM is the only component that's a long way out of date so I should sort that out anyway even if it is a nightmare. Unfortunately having tried to install the latest version of the VM AIO on a test copy of our website yesterday I immediately got an error 500  ::) Going to be a long week ahead I think ...

I'm not sure what you mean by "One more thing, if the payment method does not fulfill its requirements it should not be used and therefore would not be visible in back end. Have You checked this ? A link would be nice :)", could you explain it a little more ? Both what I would check, and what link would be helpful ?

Thanks for your reply !

David


jenkinhill

To me it looks like you upgraded Joomla around that time with a version that requires VM 3.2.2 or later. 

Re the 500 errror I hope you installed the latest VM main component before installing the aio package, both components should have the same release number. 
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

Jörgen

If the requirements for the payment isn´t fulfilled i.e order == 0 and requirement greater than 0,01 you will not get this option to show in the checkout and it should not be able to checkout. What is chosen during checkout that gives "    " as result in order list ?

A link www.yourwebsite.xxx would be nice to see more.

And as Jenkins sais, please use VM and VM aio of the same version.

regards

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

dmb

#13
Yes both - I was stupid :) I thought to install them in the order they were in the zip - tcpdf, aio, main but then tried the main one first and it was fine.

I now have a test copy of our site (test.oups.org.uk), and have Joomla 3.8.4 with VM upgraded to 3.2.12 (no other configuration changes or changes to overrides) but I see the same problem with Free products. The product is accessed from the "Events" link in the top menu.

The product is set up so that the base price is £35 with an override of £0 and "Override final" checked. This gives the checkout screen below, with no options for payment as it's a free product. This used to automatically use the "Free" payment method but I'm not sure if it still does.

Again the payment method is blank in the orders screen, with a status of Pending, and the product is not removed from the shopping cart.

Thanks for taking the time to help, I appreciate it.

David

dmb

#14
In case anyone ever has the same problem ... of course it was a change I'd made :-[ I went back through old site backups until I tracked it down to a plugin I'd installed to handle Stripe payments.

When this one is published all the symptoms appear - Free orders are left in a Pending state (and the Thank you screen says "Your order is being processed" instead of showing the order number, the backend shows "Pending" instead of "Confirmed by shopper" with a blank payment method etc. etc.). Unpublish it and Free works (though I then can't take credit/debit cards). Also the virtuemart_paymentmethod_id in the virtuemart_orders table is set to 0 with a NULL currency_id.

I don't know how payment methods are chained, but even though the checkout page correctly shows no payment methods (as Free doesn't need any), it's as if the order processing runs the order through the Stripe plugin, hits some "zero is a weird amount" check and bales out leaving the order to be sorted out manually.

I've raised a ticket with the developers who have been very helpful to date, fingers crossed it's not a complicated fix.

Thanks for all who helped me with this ... upgrade planning in progress ;)

David