VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: FrankHF on October 02, 2024, 09:50:15 AM

Title: -1 is added after user cancels order
Post by: FrankHF on October 02, 2024, 09:50:15 AM
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.

Title: Re: -1 is added after user cancels order
Post by: Jumbo! on October 02, 2024, 13:35:53 PM
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.
Title: Re: -1 is added after user cancels order
Post by: FrankHF on October 04, 2024, 12:35:06 PM
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.
Title: Re: -1 is added after user cancels order
Post by: sabikeuk on December 17, 2024, 08:27:08 AM
Hello,

did somebody found solution to this issue ?
Title: Re: -1 is added after user cancels order
Post by: Milbo on January 04, 2025, 20:45:12 PM
The whole reuse order thing got removed. the only disadvantage you see any try to confirm an order as pending, But that also helps to find problems with the store.