Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimal Price in GraphQl is incorrect when special_to_date & special_from_date are not used in query #32394

Closed
5 tasks
lewisvoncken opened this issue Mar 8, 2021 · 3 comments

Comments

@lewisvoncken
Copy link
Contributor

lewisvoncken commented Mar 8, 2021

Preconditions (*)

  1. Magento 2.3.6

Steps to reproduce (*)

  1. Create a simple product
  2. Fill in the special_to_date and special_from_date with a date in the past
  3. Set the default price 10 and the sales price to 5
  4. use the following GraphQl query to retrieve product Details
query productDetail($urlKey: String) {
    productDetail: products(filter: {url_key: {eq: $urlKey}}) {
        items {
            __typename
            description {
                html
                __typename
            }

            short_description {
                html
                __typename
            }
            id
            media_gallery_entries {
                label
                position
                disabled
                file
                video_content {
                    media_type
                    video_description
                    video_metadata
                    video_provider
                    video_title
                    video_url
                    __typename
                }
                __typename
            }
            product_specifications {
                label
                value
                __typename
            }
            meta_description
            name
            price_range {
                maximum_price {
                    final_price {
                        currency
                        value
                        __typename
                    }
                    __typename
                }
                minimum_price {
                    regular_price {
                        value
                        currency
                        __typename
                    }
                    final_price {
                        currency
                        value
                        __typename
                    }
                    __typename
                }
                __typename
            }
            price_tiers {
                quantity
                final_price {
                    currency
                    value
                    __typename
                }
                discount {
                    percent_off
                    __typename
                }
                __typename
            }
            sku
            small_image {
                url
                __typename
            }
            url_key
        }
    }
}

Expected result (*)

"price_range": {
                        "maximum_price": {
                            "final_price": {
                                "currency": "EUR",
                                "value": 10,
                                "__typename": "Money"
                            },
                            "__typename": "ProductPrice"
                        },
                        "minimum_price": {
                            "regular_price": {
                                "value": 10,
                                "currency": "EUR",
                                "__typename": "Money"
                            },
                            "final_price": {
                                "currency": "EUR",
                                "value": 10,
                                "__typename": "Money"
                            },
                            "__typename": "ProductPrice"
                        },
                        "__typename": "PriceRange"
                    },

Actual result (*)

"price_range": {
                        "maximum_price": {
                            "final_price": {
                                "currency": "EUR",
                                "value": 5,
                                "__typename": "Money"
                            },
                            "__typename": "ProductPrice"
                        },
                        "minimum_price": {
                            "regular_price": {
                                "value": 10
                                "currency": "EUR",
                                "__typename": "Money"
                            },
                            "final_price": {
                                "currency": "EUR",
                                "value": 5,
                                "__typename": "Money"
                            },
                            "__typename": "ProductPrice"
                        },
                        "__typename": "PriceRange"
                    },

NOTE:

When you do add special_to_date and special_from date to the query then it will give the correct result


Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • 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”.
@m2-assistant
Copy link

m2-assistant bot commented Mar 8, 2021

Hi @lewisvoncken. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@lewisvoncken
Copy link
Contributor Author

@magento I am working on this

@eduard13
Copy link
Contributor

Hi @lewisvoncken, thank you for reporting this issue, but it seems to be already reported in #29631.
Closing this as duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants