magento2
magento2 copied to clipboard
We are not getting the base_grand_total value in order response
Preconditions and environment
Magento version:2.4
Steps to reproduce
We hit the below API https://www.texasjacks.com/rest/V1/orders?searchCriteria[filter_groups][0][filters][0][field]=entity_id&searchCriteria[filter_groups][0][filters][0][value]=36842&earchCriteria[filter_groups][0][filters][0][condition_type]=in
And received the below response, but in this response, we getting the "base_grand_total": 0 {"items":[{"base_currency_code":"USD","base_discount_amount":0,"base_discount_invoiced":0,"base_grand_total":0,"base_discount_tax_compensation_amount":0,"base_discount_tax_compensation_invoiced":0,"base_shipping_amount":0,"base_shipping_discount_amount":0,"base_shipping_discount_tax_compensation_amnt":0,"base_shipping_incl_tax":0,"base_shipping_invoiced":0,"base_shipping_tax_amount":0,"base_subtotal":5,"base_subtotal_incl_tax":5,"base_subtotal_invoiced":5,"base_tax_amount":0,"base_tax_invoiced":0,"base_total_due":0,"base_total_invoiced":0,"base_total_invoiced_cost":0,"base_total_paid":0,"base_to_global_rate":1,"base_to_order_rate":1,"billing_address_id":73412,"created_at":"2023-05-02 20:48:25","customer_email":"[email protected]","customer_firstname":"Thomas","customer_group_id":0,"customer_is_guest":1,"customer_lastname":"Bennett","customer_note_notify":0,"discount_amount":0,"discount_invoiced":0,"email_sent":1,"entity_id":36842,"global_currency_code":"USD","grand_total":0,"discount_tax_compensation_amount":0,"discount_tax_compensation_invoiced":0,"increment_id":"5000019136","is_virtual":1,"order_currency_code":"USD","protect_code":"01904d4ea21675f6f1cb38b6d72c9a22","quote_id":1213181,"remote_ip":"172.71.254.243","shipping_amount":0,"shipping_discount_amount":0,"shipping_discount_tax_compensation_amount":0,"shipping_incl_tax":0,"shipping_invoiced":0,"shipping_tax_amount":0,"state":"complete","status":"complete","store_currency_code":"USD","store_id":2,"store_name":"Texas Jacks\nTJ Store\nTJ View","store_to_base_rate":0,"store_to_order_rate":0,"subtotal":5,"subtotal_incl_tax":5,"subtotal_invoiced":5,"tax_amount":0,"tax_invoiced":0,"total_due":0,"total_invoiced":0,"total_item_count":1,"total_paid":0,"total_qty_ordered":1,"updated_at":"2023-05-02 20:49:05","weight":0,"x_forwarded_for":"68.235.43.92","items":[{"amount_refunded":0,"base_amount_refunded":0,"base_discount_amount":0,"base_discount_invoiced":0,"base_discount_tax_compensation_amount":0,"base_discount_tax_compensation_invoiced":0,"base_original_price":5,"base_price":5,"base_price_incl_tax":5,"base_row_invoiced":5,"base_row_total":5,"base_row_total_incl_tax":5,"base_tax_amount":0,"base_tax_invoiced":0,"created_at":"2023-05-02 20:48:25","discount_amount":0,"discount_invoiced":0,"discount_percent":0,"free_shipping":0,"discount_tax_compensation_amount":0,"discount_tax_compensation_invoiced":0,"is_qty_decimal":0,"is_virtual":1,"item_id":72980,"name":"Texas Jacks Gift Card","no_discount":0,"order_id":36842,"original_price":5,"price":5,"price_incl_tax":5,"product_id":21708,"product_type":"bss_giftcard","qty_canceled":0,"qty_invoiced":1,"qty_ordered":1,"qty_refunded":0,"qty_shipped":0,"quote_item_id":146877,"row_invoiced":5,"row_total":5,"row_total_incl_tax":5,"row_weight":0,"sku":"Texas Jacks Gift Card","store_id":2,"tax_amount":0,"tax_invoiced":0,"tax_percent":0,"updated_at":"2023-05-02 20:49:05","weee_tax_applied":"[]"}],"billing_address":{"address_type":"billing","city":"Franklin","country_id":"US","email":"[email protected]","entity_id":73412,"firstname":"Thomas","lastname":"Bennett","parent_id":36842,"postcode":"37067","region":"Tennessee","region_code":"TN","region_id":56,"street":["717 Glen Oaks Dr"],"telephone":"12345667888"},"payment":{"account_status":null,"additional_information":["0","VI","2028","3","747","",null,null,"9211","424631","Credit Card (Authorize.Net TJ)"],"amount_authorized":0,"amount_ordered":0,"amount_paid":0,"base_amount_authorized":0,"base_amount_ordered":0,"base_amount_paid":0,"base_amount_paid_online":0,"base_shipping_amount":0,"base_shipping_captured":0,"cc_exp_month":"3","cc_exp_year":"2028","cc_last4":"9211","cc_type":"VI","entity_id":36843,"method":"authnetcim","parent_id":36842,"shipping_amount":0,"shipping_captured":0,"extension_attributes":{"tokenbase_id":"535"}},"status_histories":[{"comment":"Captured amount of $0.00 online.","created_at":"2023-05-02 20:49:05","entity_id":99587,"entity_name":"invoice","is_customer_notified":null,"is_visible_on_front":0,"parent_id":36842,"status":"processing"},{"comment":"This is a BWG testing order","created_at":"2023-05-02 20:48:55","entity_id":99586,"entity_name":"order","is_customer_notified":0,"is_visible_on_front":0,"parent_id":36842,"status":"processing"},{"comment":null,"created_at":"2023-05-02 20:48:25","entity_id":99585,"entity_name":"order","is_customer_notified":null,"is_visible_on_front":0,"parent_id":36842,"status":"pending"},{"comment":"Authorized amount of $0.00.","created_at":"2023-05-02 20:48:25","entity_id":99584,"entity_name":"order","is_customer_notified":null,"is_visible_on_front":0,"parent_id":36842,"status":"processing"}],"extension_attributes":{"shipping_assignments":[{"shipping":{"total":{"base_shipping_amount":0,"base_shipping_discount_amount":0,"base_shipping_discount_tax_compensation_amnt":0,"base_shipping_incl_tax":0,"base_shipping_invoiced":0,"base_shipping_tax_amount":0,"shipping_amount":0,"shipping_discount_amount":0,"shipping_discount_tax_compensation_amount":0,"shipping_incl_tax":0,"shipping_invoiced":0,"shipping_tax_amount":0}},"items":[{"amount_refunded":0,"base_amount_refunded":0,"base_discount_amount":0,"base_discount_invoiced":0,"base_discount_tax_compensation_amount":0,"base_discount_tax_compensation_invoiced":0,"base_original_price":5,"base_price":5,"base_price_incl_tax":5,"base_row_invoiced":5,"base_row_total":5,"base_row_total_incl_tax":5,"base_tax_amount":0,"base_tax_invoiced":0,"created_at":"2023-05-02 20:48:25","discount_amount":0,"discount_invoiced":0,"discount_percent":0,"free_shipping":0,"discount_tax_compensation_amount":0,"discount_tax_compensation_invoiced":0,"is_qty_decimal":0,"is_virtual":1,"item_id":72980,"name":"Texas Jacks Gift Card","no_discount":0,"order_id":36842,"original_price":5,"price":5,"price_incl_tax":5,"product_id":21708,"product_type":"bss_giftcard","qty_canceled":0,"qty_invoiced":1,"qty_ordered":1,"qty_refunded":0,"qty_shipped":0,"quote_item_id":146877,"row_invoiced":5,"row_total":5,"row_total_incl_tax":5,"row_weight":0,"sku":"Texas Jacks Gift Card","store_id":2,"tax_amount":0,"tax_invoiced":0,"tax_percent":0,"updated_at":"2023-05-02 20:49:05","weee_tax_applied":"[]"}]}],"payment_additional_info":[{"key":"save","value":"0"},{"key":"cc_type","value":"VI"},{"key":"cc_exp_year","value":"2028"},{"key":"cc_exp_month","value":"3"},{"key":"cc_cid","value":"747"},{"key":"card_id","value":""},{"key":"acceptjs_key","value":"null"},{"key":"acceptjs_value","value":"null"},{"key":"cc_last4","value":"9211"},{"key":"cc_bin","value":"424631"},{"key":"method_title","value":"Credit Card (Authorize.Net TJ)"}],"applied_taxes":[],"item_applied_taxes":[]}}],"search_criteria":{"filter_groups":[{"filters":[{"field":"entity_id","value":"36842","condition_type":"eq"}]}]},"total_count":1}
Expected result
"base_grand_total" should not be 0
Actual result
"base_grand_total": 0
Additional information
No response
Release note
No response
Triage and priority
- [ ] Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- [X] Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- [ ] Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- [ ] Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- [ ] Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Hi @webgility-amazonapi. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
-
@magento give me 2.4-develop instance
- upcoming 2.4.x release - For more details, review the Magento Contributor Assistant documentation.
- Add a comment to assign the issue:
@magento I am working on this
- To learn more about issue processing workflow, refer to the Code Contributions.
Join Magento Community Engineering Slack and ask your questions in #github channel. :warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting. :clock10: You can find the schedule on the Magento Community Calendar page. :telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
Hi @engcom-Bravo. 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:
- [ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
- [ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
- [ ] 3. Add
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to. - [ ] 4. Verify that the issue is reproducible on
2.4-develop
branchDetails
- Add the comment@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on2.4-develop
branch, please, add the labelReproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here! - [ ] 5. Add label
Issue: Confirmed
once verification is complete. - [ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
@magento give me 2.4-develop instance
Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you.
Hi @engcom-Bravo, here is your Magento Instance: https://9413df49b17958fb025ce792ae5050c2.instances-prod.magento-community.engineering Admin access: https://9413df49b17958fb025ce792ae5050c2.instances-prod.magento-community.engineering/admin_51b7 Login: e89ae1d1 Password: e3213168068c
Hi @webgility-amazonapi,
Thanks for your update.
Verified the issue on Magento 2.4-develop instance and the issue is not reproducible.Kindly refer the screenshots.
Steps to reproduce
We are getting the value for the base_grand_total.
Kindly recheck the behaviour on Magento 2.4-develop instance and elaborate steps to reproduce if the issue is still reproducible.
Thanks.
Hi @engcom-Bravo Thanks for your reply, for your kind of information we also getting the base_grand_total from our store with other orders but our question is why we are not getting the base_grand_total for OrderId=36842. Please find the below request
https://www.texasjacks.com/rest/V1/orders?searchCriteria[filter_groups][0][filters][0][field]=entity_id&searchCriteria[filter_groups][0][filters][0][value]=36842&earchCriteria[filter_groups][0][filters][0][condition_type]=in](https://www.texasjacks.com/rest/V1/orders?searchCriteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B0%5D%5Bfield%5D=entity_id&searchCriteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B0%5D%5Bvalue%5D=36842&earchCriteria%5Bfilter_groups%5D%5B0%5D%5Bfilters%5D%5B0%5D%5Bcondition_type%5D=in)
Thanks & BR Webgility
I also want to add additional info for OrderId=36842 . In this order , user has purchased a gift item , in all other use cases where user is purchasing the other items we are getting correct grand_total. We want to understand what is workflow for gift orders? And also if you check the payment section , there amount_paid is also 0 but credit card info was available. By looking at this, we are unable to conclude that is it was a free giftcard or any discount has been applied. Need your guidance to understand the workflow for proper calculations for our customers.
@magento give me 2.4-develop instance
Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you.
Hi @engcom-Bravo, here is your Magento Instance: https://9413df49b17958fb025ce792ae5050c2.instances-prod.magento-community.engineering Admin access: https://9413df49b17958fb025ce792ae5050c2.instances-prod.magento-community.engineering/admin_f051 Login: fef53703 Password: b36b5e5aac50
HI @webgility-amazonapi,
Thanks for your update.
Here we have placed the order with the cart price rule and coupon code with 100% discount and we are getting the data in the response.
Could you please refer this link https://developer.adobe.com/commerce/webapi/rest/quick-reference/ regarding Rest Api's for Magento.
Kindly recheck the behaviour on Magento 2.4-develop instance and elaborate steps to reproduce if the issue is still reproducible.
Thanks.
Hi @webgility-amazonapi,
We have noticed that this issue has not been updated since long time. Hence we assume that this issue is fixed now, so we are closing it. Please feel to raise a fresh ticket or reopen this ticket if you need more assistance on this.
Thanks.