News:

Support the VirtueMart project and become a member

Main Menu

-1 is added after user cancels order

Started by FrankHF, October 02, 2024, 09:50:15 AM

Previous topic - Next topic

FrankHF

We use Joomla 4.4.8 and VM 4.2.12.

From the shopping cart page (OnePageCheckout), the customer is redirected to the payment page. This could be either iDEAL or PayPal. The customer can proceed with payment, and the process is handled normally.



However, when a customer cancels or closes the payment page without completing the payment and then returns to the shopping cart page to place a new order (or attempts the same order again), VirtueMart appends the order number with "-1" or "-2".

The order numbers before the dash remain the same.



iDEAL only accepts alphanumeric characters for payments and then generates an error message. PayPal, on the other hand, can handle these non-alphanumeric characters and does not show an error.



ERROR: {"errorCode":5017,"consumerMessage":"merchantOrderId should only contain alphanumeric characters"}



Problem: Why does VirtueMart create a new order number with that dash and incrementing number?

For example: QUJS03, QUJS03-1, QUJS03-2, QUJS03-3, etc.



The customer is also unable to place another order after that, as cookies or cache seem to remember the previous attempts.


Jumbo!

Open - administrator/components/com_virtuemart/virtuemart.cfg in your favourite text editor.

Scroll down and add the following at the end of the file.

reuseorders=0
Save the file.

Go to the VirtueMart Configuration and click the save button to apply the new hidden configuration. This should resolve the issue for you.

By the way, you should update to VirtueMart 4.2.18.

FrankHF

That did not work.

We set the payment method to send the order ID instead (in payment options).

Then, a number is used for the payment.

We hope this change can be made as an option in future releases.