magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.54k stars 9.32k forks source link

Zero subtotal checkout and order status problem #12671

Closed asrenzo closed 3 years ago

asrenzo commented 6 years ago

Magento 2.1.10 version

Preconditions

  1. Enable zero subtotal checkout
  2. Set new order status to processing
  3. Create a cart rule with 100% rebate and free shipping

Steps to reproduce

  1. Add some matching items into cart
  2. Apply coupon to cart
  3. Go to checkout last step
  4. Place order

Expected result

  1. A zero subtotal order is created with processing status

Actual result

  1. Whatever level zeo subtotal checkout is configured (default config, website) the order status remains pending.

I tried every combination of cache cleaning, flushing, di:compile, upgrade without any success.

Here is my mysql core_config_data rows for payment/free infos:

+-----------+----------+----------+------------------------------+----------------------------------------+ | config_id | scope | scope_id | path | value | +-----------+----------+----------+------------------------------+----------------------------------------+ | 350 | websites | 1 | payment/free/active | 1 | | 351 | websites | 1 | payment/free/title | Aucune information de paiement requise | | 352 | websites | 1 | payment/free/order_status | processing | | 353 | websites | 1 | payment/free/sort_order | 0 | | 527 | default | 0 | payment/free/order_status | processing | | 528 | default | 0 | payment/free/specificcountry | NULL | | 547 | default | 0 | payment/free/active | 1 | +-----------+----------+----------+------------------------------+----------------------------------------+

magento-engcom-team commented 6 years ago

@asrenzo, thank you for your report. We've created internal ticket(s) MAGETWO-85657 to track progress on the issue.

RomaKis commented 6 years ago

Working on this.

RomaKis commented 6 years ago

@asrenzo, this is not a bug. This is just a incompleteness of configuration. When you are creating new order, order has state "new" and only "pending" status is assigned to this state by default. So Magento take the default status for the state. To resolve your problem you should assign order status "processing" to state "new". Steps to resolve:

  1. Go to Stores -> Settings -> Order Statuses.
  2. Press button "Assign Status to State".
  3. "Order Status" = "Processing" "Order State" = "Pending"
  4. Click "Save Status Assignment".

If I missed something, please correct me. @magento-engcom-team, I think you can close this ticket.

asrenzo commented 6 years ago

Hi,

I can not change default status of orders because I have an observer on status change to processing for every order.

Zero subtotal checkout is only used for spécific accounts and all others orders are paid via an credit card payment (Monetico).

Once payment is validated by bank's system, orders, which are in pending status before payment, pass in processing status. Then some actions are done by my observer.

Moreover, Zero Subtotal Chekout form is clear : "New Order Status" is the dropdown label. Thus a new order should pass to processing status whatever the default status of an order is.

If not, this means this dropdown has no reasno to be.

Regards,

Laurent

Le 15/12/2017 à 10:59, Roman K. a écrit :

@asrenzo https://github.com/asrenzo, this is not a bug. This is just a incompleteness of configuration. When you are creating new order, order has state "new" and only "pending" status is assigned to this state by default. So Magento take the default status for the state. To resolve your problem you should assign order status "processing" to state "new". Steps to resolve:

  1. Go to Stores -> Settings -> Order Statuses.
  2. Press button "Assign Status to State".
  3. "Order Status" = "Processing" "Order State" = "Pending"
  4. Click "Save Status Assignment".

If I missed something, please correct me.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/magento/magento2/issues/12671#issuecomment-351964132, or mute the thread https://github.com/notifications/unsubscribe-auth/AAsiuHoAoNVqVJ2fkg61f0E6yPW8V52Cks5tAkLlgaJpZM4RAoIS.

RomaKis commented 6 years ago

@asrenzo, you don't need to change default status. You just need to add for state "new" status "processing" by the steps I provided above. It will give ability to Magento create order with "Processing" status.

asrenzo commented 6 years ago

OK.

But will this change affect every order whatever the payment method is.

If the answer is yes this is not an option. I don't want every order, even canceled or on hold, or no info from payment system, to pass in processing status.

I just want paid or free ones to get processing status.

Regards,

Le 15/12/2017 à 11:26, Roman K. a écrit :

You don't need to change default status. You just need to add for state "new" status "processing" by the steps I provided above. It will give ability to Magento create order with "Processing" status.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/magento/magento2/issues/12671#issuecomment-351970280, or mute the thread https://github.com/notifications/unsubscribe-auth/AAsiuED8j29_KZGPScfnfTjyiF_GpSL5ks5tAklugaJpZM4RAoIS.

RomaKis commented 6 years ago

@asrenzo, yes, it will affect every order whatever the payment method is. But you have configuration for each payment method "New Order Status"(Stores -> Configuration -> Sales -> Payment methods). So if you change it to "processing" only for zero subtotal, all other created orders will be in pending status.

magento-engcom-team commented 6 years ago

@asrenzo, thank you for your report. This seems to be correct Magento behavior. Please refer to the Community Forums or the Magento Stack Exchange site for advice or general discussion about this. Otherwise you may submit Pull Request with the suggested changes.

asrenzo commented 6 years ago

This is NOT a correct Magento behaviour.

The is the behaviour you want to describe as normal.

I want orders to keep the pending status as long as they are not considered as paid. I don't think this is something I'm the only one to see achieved by Magento.

Then I want to be able to pass these orders in processing status when they are paid. Once again this is not a stupid decision.

Could you explain me why every other payment solutions (even external extensions) are able to act this way and why a core module of Magento wouldn't ?

Maybe we should have someone's else point of view in this case. I don't think you understand the multiple effects your workaround could produce.

Regards,

Le 15/12/2017 à 13:12, Magento Community Engineering a écrit :

@asrenzo https://github.com/asrenzo, thank you for your report. This seems to be correct Magento behavior. Please refer to the Community Forums https://community.magento.com/ or the Magento Stack Exchange https://magento.stackexchange.com/ site for advice or general discussion about this. Otherwise you may submit Pull Request with the suggested changes.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/magento/magento2/issues/12671#issuecomment-351991318, or mute the thread https://github.com/notifications/unsubscribe-auth/AAsiuH1AYhIw1m05Dj8D4jMMx7VVdWcVks5tAmJAgaJpZM4RAoIS.

asrenzo commented 6 years ago

Moreover, if the only solution for having this dropdown to work properly was to change default configuration of Magento before being able to use it correctly, this means that if this is not a bug (but we both know it is a bug) an explanation is required.

And could you please read Magento's official documentation before closing a ticket please : http://docs.magento.com/m2/ce/user_guide/payment/zero-subtotal-checkout.html

Regards,

asrenzo commented 6 years ago

Could someone reopen this ticket and reaffect it as an issue in all Magento 2 versions please. Regarding your own documentation this is not a feature.

asrenzo commented 6 years ago

@RomaKis Could you please read my last post and Magento's official documentation about zero subtotal checkout and reopen this issue in the state you found it please.

Your workaround is not a solution.

magento-engcom-team commented 6 years ago

Hi, @asrenzo. We are now reviewing Your issue again and soon will be back with the results.

magento-engcom-team commented 6 years ago

Please @asrenzo, let us know if the following possibilities would suite You. If we have understood You correctly You need Processing Status to be assign only to the orders that has become considered as paid. So when You chose Processing status for a new order status in Zero Checkout the possibility to Automatically Invoice All Items becomes available. If You chose it Your zero amount order will automatically be invoiced after having been placed and it will be then considered as payed. Accordingly its status thus will be Processing from the very begging. Also You may not need to chose Automatically Invoice All Items, but, as it has already been mentioned above, to assign Processing status to Pending state of an order. Then for all the payment methods where till that only the Pending status was available new order now becomes available with two statuses: either with Pending or with Processing. Please, notice, in both cases the the State of the order remains pending. So if after that assignment You switch new order status for Zero Checkout from Pending to Processing having done nothing to the other payment methods it will affect only Zero amount orders that will be created after this change.

asrenzo commented 6 years ago

I can not invoice zero subtotal checkout orders when a coupon is used because invoices are created by an external system (SAP). Thus, I need the order to behave like every other orders paid with another payment solutions.

Can you explain me why to use a core module of Magento a described in his documentation I should have to change Magento's default settings ?

Once again the text in front of the drop down is : New Order Status

Documentation also speaks about status and not state.

I'm sorry but in my use case, changing default behaviour to bypass a bug is not a solution. It can only be named a workaround.

magento-engcom-team commented 6 years ago

Thank You @asrenzo. We admit this issue is about not the correct behavior, so internal ticket(s) MAGETWO-85657 created to track the progress on the issue has been somewhat modified is remains actual.

asrenzo commented 6 years ago

Thanks

asrenzo commented 6 years ago

Any progress about this problem ?

asrenzo commented 6 years ago

Any progress about this problem ?

magento-engcom-team commented 6 years ago

@asrenzo This ticket is going to be updated in case of any status changes.

Robert-Sheahan commented 4 years ago

Just updated to 2.3.3 and this problem is still an issue. When you add a free item ($0) to the shopping cart there is no way to checkout. Only the PayPal options come up and any selection is rejected due to the $0 amount. Worked fine in 1.9.x? It has been reported years ago! Did anyone find a workaround other than charging the customer $0.01? The feature is used to attract new customers, requiring then to sign up, capture their Email address for future newsletters and let them try out the free downloaded file(s) prior to making a purchase.

amenk commented 4 years ago

What is missing in the steps to reproduce is that "automatically invoice all items" has to be set to "no". If it is set to yes, the status becomes processing as expected after checkout. Is also still reproducible in 2.4-develop (see the duplicate issue #28359)

pernielsentikaer commented 4 years ago

What is missing in the steps to reproduce is that "automatically invoice all items" has to be set to "no". If it is set to yes, the status becomes processing as expected after checkout. Is also still reproducible in 2.4-develop (see the duplicate issue #28359)

I can confirm this, would be nice to have that fixed.

xpoback commented 3 years ago

@ asrenzo, this is not a bug. If I missed something, please correct me.

Well, when something doesn't work as expected until an action is taken, this is a bug.

xpoback commented 3 years ago

Magento 2.3.6, the problem is still there.

sdzhepa commented 3 years ago

Should be re-verified and confirmed on the latest 2.4-develop

m2-assistant[bot] commented 3 years ago

Hi @engcom-Alfa. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Alfa commented 3 years ago

Hi @asrenzo. Thank you for your report! We are not able to reproduce the issue on a fresh 2.4-develop instance. Looks like the problem has already been fixed.

Actual Result: :heavy_check_mark: A zero subtotal order is created with processing status

2021-02-10_10-05

So, we have to close it. Please feel free to comment, reopen or create new ticket according to the Issue reporting guidelines if you are still facing this issue on the latest 2.4-develop branch. Thank you for collaboration.

amenk commented 3 years ago

@engcom-Alfa Can you please document the full testing procedure with all steps? Or - if this was fixed - link to the according PR?

Robert-Sheahan commented 3 years ago

Alexander,

I am trying to get my website updated to 2.4.2 so that I can test it. The requirement for Elastic Search has created a huge problem out here, hosting services saying we need to update service to our own servers at a cost $6X the current one. If and when I can get the new revision up and running I will be able to test it in minutes.

In the mean time, just make any [downloadable] product “Free” with a cost of $0, go to the website and add that to the cart and try to check out. The software does not give you the option to proceed nor does Paypal allow for $0 payments. For a year or so now, my “free” stuff cost $.08 just to get over the hump. But the Paypal fees cost more than what I get, so I lose money.

I am looking into the AWS Elastic Search Service but few developers know what it is and how to apply it.

Thanks Bob

From: Alexander Menk Sent: Friday, February 19, 2021 5:22 AM To: magento/magento2 Cc: Robert-Sheahan; Comment Subject: Re: [magento/magento2] Zero subtotal checkout and order status problem (#12671)

@engcom-Alfa Can you please document the full testing procedure with all steps? Or - if this was fixed - link to the according PR? — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.