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
Related
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.
There is a choice of “SALE” or “AUTHORISATION” in the Magento Paypal settings. We ideally wish to stay with “SALE” as that covers 99.9% of anything we do (we always have goods in stock). The “Authorisation” option worries me with the 3 day limit, plus it adds an extra “capture” step that could go wrong later.
So…….
“SALE" works fine but in Magento it automatically creates an INVOICE in the system. Other payment systems we use such as Sofort AG make this setting optional and for a very good reason.
Magento is set so that once you have produced an INVOICE and a SHIPMENT it automatically marks any order as COMPLETE.
We create UPS labels, with a tracking number which of course is added to the SHIPMENT details. So my problem is:
As soon as we try to create a UPS label (without even printing) Magento sets the Paypal orders to COMPLETE. This is because it has seen an INVOICE
and a SHIPMENT for an order.
We need to disable a Paypal “SALE” from producing an invoice. We can easily produce and send the invoice once the shipment has been produced
and sent, and then set it finally to Complete.
Is there a setting I have missed to disable this forced invoice? I can see a company used to make a module for this purpose but it is out of date for Magento 1.9. (I did try it just in case!!)
http://www.magentocommerce.com/magento-connect/disable-automatic-generation-of-invoice.html
No, there is no setting to fix this: paypal create an object called transaction and this kind of object should be created with the object invoice. It's not a good practice to don't create invoice and I suggest you to stay away to any component that don't create a transaction.
Probably it works well, but in the flow of order creation when you will evalutate to play with order status. Anyway there is not a setting to do this.
Objective: Give a discount to my clients when they buy 2 , 3 or + 4 products. I have successfully modified the cart to show a discount line and a modified total cart price.
The issue is that when the client pressed Checkout or Paypal the total price shown is the original one , not the modified for me in cart.liquid.
I have been looking around for a solution but found nothing clear enough. As far as I could read Ajax is required.
Could anyone help me? I am new to Ajax so please do not leave anything out in the explanation.
Thanks
You should have read up on using Shopify first. You cannot modify prices as you wish. There is no API possibility to do so. If you want to offer discounts you will have to follow the same patterns as every other Shopify merchant that has come before you. Typically, you can monitor the contents of a cart, and if you believe it to be enough to merit a discount, you can expose a discount code for the customer. It is not foolproof to monkey business, but it does work for most.
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.
I have a subscription service that people pay monthly for, so I’ve setup a “Virtual Product” with a Recurring Profile. At the same time, I want to have it so they can add different one time products. To accomplish this I’ve tried creating a “Bundled Product” with all the different one time products and adding the “Virtual Product” to that “Bundled Product”.
However, when I go to checkout it says “Nominal item can be purchased standalone only. To proceed please remove other items from the quote.” How do I allow people to subscribe to the service and purchase the products at the same time?
Note: I am using Paypal Website Payment Pro as my merchant account.
Here's the comment from Magento code:
/**
* Temporary workaround for purchase process: it is too dangerous to purchase more than one nominal item
* or a mixture of nominal and non-nominal items, although technically possible.
*
* The problem is that currently it is implemented as sequential submission of nominal items and order, by one click.
* It makes logically impossible to make the process of the purchase failsafe.
* Proper solution is to submit items one by one with customer confirmation each time.
*/
Actually you can remove the code below:
if ($item->isNominal() && $this->hasItems() || $this->hasNominalItems()) {
Mage::throwException(Mage::helper('sales')->__('Nominal item can be purchased standalone only. To proceed please remove other items from the quote.'));
}
Magento still handles multiple nominal products, however, you use that with your own risk.
Unfortunately this is a hardcoded restriction in the Mage_Paypal code.
You can see in Mage_Sales_Model_Service_Quote::submitAll() that it executes submitNominalItems() which contains:
$this->_validate();
$this->_submitRecurringPaymentProfiles();
$this->_inactivateQuote();
$this->_deleteNominalItems();
So, it kills the Cart after submitting nominal items. I'm not exactly sure why it does that, but I assume it's due to the way that subscriptions are created at Paypal.
Here is the code that prevents adding items to a cart that contains nominals in Mage_Sales_Model_Quote::addItem():
if ($item->isNominal() && $this->hasItems() || $this->hasNominalItems()) {
Mage::throwException(Mage::helper('sales')->__('Nominal item can be purchased standalone only. To proceed please remove other items from the quote.'));
}
I'm working on using Magento's Recurring Profiles for other payment providers at the moment (its a background task: Magento Recurring Profiles with non-Paypal payment method) and it is possible to checkout both nominal (aka subscription) and real products at the same time, but it does make it quite a bit more complex.
If this is a big deal, it should be possible to refactor the Mage_Paypal code to do this, but it's a complicated task that can't really be answered in a single post.