Missing order number - magento

I`m using Magento 1.6.1.0 From time to time we have a missing order number.
For example:
100003354
100003353
100003351
100003350
So the 100003352 is missing. Nobody deletes the order number. We can not figure out how this can be happen. The only thing we detect is that the next number is the same order. This we know, because we wrote an extension that always sent us an E-Mail when an order is placed and before it is in the system. And so we get an E-Mail with the order number 100003352 but in the system it is missing. Minutes later comes the 100003353 with the same data. This behaviour is seldom and it also happened before we wrote the extension. Maybe someone has an idea? Thanks!
Sebastian

Failed credit card authorizations do this. The order gets assigned a SO number to go along with the request to the gateway for card authorization. If the authorization fails, it stays reserved for that order until a valid credit card is entered. The next order placed gets assigned a new number on the next order submission. This causes skips when people do not complete the order on failed authorizations and out of order invoice numbers when they complete these orders later.

You're getting abandoned carts. Check under Admin -> Reports -> Shopping Cart -> Abandoned Carts.

Related

Charge Payload different to Cart total (rounding)

I have isolated the reason why zip pay orders are cancelling on our system with the help of their support.
This is the response from the integrations team.
We have taken a look at the issue and it seems the issue occurs on your end and only when an order has 2 decimal places or more.
The reason the error is occurring is that there seems to be rounding on your end before we create the charge.
The reason this only affects Zip orders is that Zip checks to see if the order details match what is being passed to Zip and if it doesn't throw an error to ensure the customer is charged the correct amount.
Below you can see the product page which rounds to the nearest first decimal:
(product shows price as $2180)
​
And below you can see the cart page which doesn't round:
(shows price as 2179.98)
​
Zip takes the cart page information then compares this to the charge payload before creating the charge.
You can see below that the charge payload is rounded after the checkout which is causing the error:
(picture of code with charge as 2180)
​
You can also compare this to the checkout response below which has a different value:
(picutre of code with charge as 2179.98)
​
We aren't sure if there are any business rules applied on your end which is causing the behavior, however, the Zip plugin is functioning as intended.
I would recommend speaking to your developer as this doesn't seem to be the standard Magento rounding and it is causing the issue when charging the customer.
I am using OnePage checkout and can only think that this is the place causing issues.
Any suggestions on how to stop this from happening (ie stop it rounding after checkout on the charge payload)?!
I am happy to try anything.
Cheers
The answer to this was not simple. For some reason in our store the onepagecheckout was rounding to 4 places and the store was rounding to 2 places.
It was a matter of forcing all prices to round to one value. I ended up using an extension to achieve this and it worked. I know us zip, after, and paypal all in one happy environment.

Magento order with subtotal and grand total 0

I am observing the strange situation of orders with subtotal and grand total of 0, but with products in it. The products row have prices and no promo rules or discounts are being used. This happens sporadically and not only with one site. The version of Magento is 1.7.0.2. There are also no additional extensions installed. system.log and exception.log do not contain traces of errors that may have something to do with this problem.
At first i thought it may be because of server overload. I think this may have something to do with it but the last "0"-subtotal order happened when the server was not loaded at all.
Any ideas? Thanks!
I 've had the same problem with you guys and it was really annoying because I could not reproduce it and could not find a proper solution.
I started to believe that it was just another Magento bug caused by some bad timing in database operations.
Anthony's post really helped me and guide me to find a practical fix.
So here it is.
Indeed the error is caused by the trigger recollect flag that is set in markQuotesRecollect (for instance when a product is saved) and causes
all active quotes to recollect their totals.
I had to spent a lot of hours in debugging IWD OnepageCheckout code to understand that in Geo.php saveBilling function creates a new shipping address by cloning
the billing address (in case shipping is same as billing) and passes (almost) all data from billing address to the shipping address which later on is saved (through the parent quote save).
This way cached_items_* data are set and when Geo.php saves payment even if you intentionally set quote to recollect totals (i.e by setting collected flag to false) shipping totals
are not calculated correctly.
Eventually I had to add this lines of code in saveBilling method after line that writes:
$ship->addData($bill->getData());)
$ship->setSameAsBilling(1)->setShippingMethod($ship_method)->setCollectShippingRates(true);
$ship->unsetData('cached_items_nominal');
$ship->unsetData('cached_items_nonnominal');
$ship->unsetData('cached_items_all');
So far (after 10 days and around 1000 orders) had no random zero total orders.
Hope this helps you all
Kind Regards
Lefteris
I have had the same problem. And I have done some researches here.
I used IWD onepagecheckout module. And the issue was inside this module.
Lets consider situation. You are doing smth in adminpanel or cron is doing some tasks this products or you could apply some catalog rules. In any kind of these actions will be called event catalog_product_status_update or catalog_product_save_after.
So every time you're changing smth in products all current quotes will be updates by events.
ok, here you'll ask me - what does it mean?
It means that each quote changes the field trigger_recollect in sales_flat_quote table.
You can find it here
app/code/core/Mage/Sales/Model/Resource/Quote.php::[markQuotesRecollectOnCatalogRules and markQuotesRecollect methods] to get more in details.
The trigger_recollect field is a trigger/signal to recollect whole quote total sums. You can find this step here
app/code/Mage/Sales/Model/Quote.php::_afterLoad.
protected function _afterLoad()
{
// collect totals and save me, if required
if (1 == $this->getData('trigger_recollect')) {
$this->collectTotals()->save();
}
return parent::_afterLoad();
}
And accurate at this moment all current quote total sums became 0. The follow step is to get address collection and for some reason we have not product items it the address object now. Magento cannot recollect correct here. But it occur only when you or system are doing smth with a products and at the same time customer is pressing the button "send order". Why - I do not know yet. By the issue was occurred and catched.
Just check in the Configuration->Advanced->advanced->Disabled Module Outputs
Mage_Tax option is enabled or not.
Zero Subtotal Checkout
Using this
System > Configuration > Payment Methods > Zero Subtotal Checkout
More info to go hear

2 invoices generated for order. Order is canceled before payment

I have following problem:
We are running webshop and sometimes it happens that 2 invoices are generated for 1 order.
Moreover sometimes order gets canceled before even customer goes to payment-gateway.
I'v united those 2 questions, because I think they have some similar reason and perhaps some similar solution.
Our magento version is 1.5.1.0.
#Dez, yeah the timeout thing could do the thing. But unfortunately our gateway doesn't have one.
The problem I had was that Payment gateway generated 2 responses:
automatic, when user payed.
automatic, when user pressed back button.
So if magento was slow enough to not handle fast first response, the second one will generate second invoice.

Under what circumstances can a Magento Order Increment ID have duplicates?

I've been running into some odd problems of late with a Magento installation (1.4.2.0), whereby the same order increment ID is being reused for more than one order.
Screenshot
As you can see in the screenshot above, a full 45 minutes pass before the same customer makes a second order with different products and total value, only to have the increment ID reused.
This also happens occasionally where the orders are a couple of minutes apart, which could possibly be from a double submission on a payment gateway causing two callbacks to Magento.
I'm keen to get some insight on how these things could happen, as I would expect each order to be given a unique ID - under what circumstances can we get duplicate order increment IDs?
My first guess would be there's a third party extension, core hack, or maybe even core code, that isn't handling operations with the Order objects transactionally. That, combined with an unexpected exceptions somewhere between saving an order and the internal increment number being increased, could result in orders with the same number being created. I'd check your Error and Exception logs for problems, clean those problems up, and see if the problem continues.
Otherwise you're going to need to reproduce the conditions of the errors in a test environment and debug debug debug.

Multiple Payment options within the same order

I have a requirement to be able to accept different forms of payment within the same order - ie not just the usual credit card or paypal for the whole thing, but perhaps paypal for one item, cheque for another. I know this sounds quite crazy, but there is a good business reason for the requirement so I can't just push back.
The best way I can think of implementing it at the moment is to have kind of a hub page, where you can "launch off" into multiple flows for each of the payments by opening new windows. I can't figure out a way of doing this in a linear flow as for example you can't guarantee that a user will come back from paypal, so you'd then lose the user completely.
Is there a neater way of doing this that anyone can think of, or can anyone point me to an example of a site that does somethign similar for inspiration?
Even when opening several windows at once, there is no guarantee that the user will complete all payment methods. So you are most probably going to lose a few users or payments. Be sure to send automated e-mail follow-ups for missing payments to minimize this problem. The e-mails could contain links to your payment providers for easy accesss to their outstanding payment operations.
This is a difficult problem, but how many payment processors do you have to go offsite for? Should only be paypal.
In any case, I'd give the user all their payment options on one page, and let them fill in the amount for each processor or payment type. Then the next page would list those they chose, the amount for each, and a link to "Complete this payment".
The link would open in a new window.
You'll have to have a good back end and javascript, as well as user warnings so that the payment page gets updated as each payment is processed. Consider using popup dialogs to show that a payment has completed, or that the order has sat idle for more than 10-30 minutes without complete payment.
Also, consider sending emails and letting the user complete the payments through links in the emails. Send a new email each time a payment is completed, and a final email if all payments are complete and the order is moving forward.
Send an email one hour, and one day later for uncompleted orders with remaining payments required, that also give them the option of choosing different payment options for the remainder.
Email isn't best (lose more orders that way due to changing minds) but it's good for the type of transactions you're thinking about.
Personally, I'd do it like this:
Let the user fill their basket in the ususal way
Allow them to add payment types and amounts to a list (2nd basket almost)
When the payments balance against the basket, start processing the payments
For external sites, try a frame which has a progress indicator at the top.
In an ideal world it wouldn't be linear. But a lot of users might lose a spawned window, or get confused by the parallelism.
Better to stick to established IxD principals and rely on good feedback instead. Give the user control from the outset and keep it transparent.
Lastly, start the payment process with the most immediate (e.g. paypal) to reduce users giving up. (COD should come last!)
Hope this helps,
Tom
If possible, just separate your order into separate smaller orders based off of the payment selections of the user.
And don't do it linearly. If anything you could open up each payment processor in a separate window so that you maintain presence.
I would take an approach where the whole order is broken down into sub-orders for each of the necessary payment methods. You can load the PayPal portion, the check portion, etc. and process them separately. It's important for the user to know how much is being charged to each of their payment methods, so it makes sense in this case to present the whole order as broken down by payment method (versus displaying as a unified order).
Implementation would be easiest if it's always a certain subset of items that is forced to any payment method. If this differs by user, or if it's when the order reaches a certain amount, the situation could become much more complicated. Can you be more specific about your approach?
Processing Multiple Order Payments
Give the user the option to make a payment for a pending order using any of your payment types.
Let the user specify an (Amount <= [Order Total] - [Payments Received]), if that is part of your requirement.
If the order is still pending after you process the payment (see how below), take them back to step 1 to rinse and repeat.
How to store and process each payment made:
Use a Payments table to store all order payments, the PaymentMethod used and its Amount with its CurrencyCode.
When a payment is received for an order, store the payment and sum all received amounts converted into your base currency as [Payments Received].
If [Payments Received] >= [Order Total], mark the order as Paid. Or, if dealing with double-converted foreign exchange rates, check if it is correct to within a small-enough margin, eg 0.5%.
Optionally, convert any overpayment into prepaid credit for the client.

Resources