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

"Only discounted products" Virtual category rule is not reading "special from and to dates" in discounted products to load products #3430

Open
indunie opened this issue Oct 30, 2024 · 3 comments
Assignees

Comments

@indunie
Copy link

indunie commented Oct 30, 2024

Preconditions

Magento ver. 2.4.6-p7 and ElasticSuite Open Source ver. 2.11.9 (on elasticsearch ver. 8.15.1).
in both production and developer modes

Steps to reproduce

  1. Set up a discount for a product with a future date in the Special Price From and To fields.
  2. Create a virtual category with the virtual rule "Only discounted products".
  3. Verify if the product remains in your virtual category after the date in Special Price From has passed.
  4. Wait until the end of the sale period (as defined in the To field), and confirm that the product is no longer in your virtual category.

Expected result

  1. The product should appear in the category after the Special Price From date and disappear from the category after the To date

Actual result

  1. Discounted product is not disappear after the "special to date" passed.
    image
    It seems like Special Price From and To are not being used to verify if a discount is active.
    Screenshot from 2024-10-15 15-42-21
    Screenshot from 2024-10-15 15-44-23

The below issue is related to this but I couldn't find it as resolved.
#2928

@vahonc
Copy link
Collaborator

vahonc commented Nov 13, 2024

Hello @indunie,

I tried to reproduce your issue according to your steps. So, I create a virtual category with the virtual rule Only discounted products and set up a discount for some products (in my case three first) with a future date in the Special Price From and To fields, as from 8 to 11 November.

ScreenShot Tool -20241108190044

ScreenShot Tool -20241108190835

Screenshot from 2024-11-08 19-05-55

Indeed, when the "special to date" passed the discounted products did not disappear from the virtual category and the prices didn't change in the database. But after running reindex this issue was fixed, the products disappeared from the category, and catalog_product_index_price table was updated.

Screenshot from 2024-11-13 14-41-23

So you may need to check the Magento cron job to make sure that the price index updating is configured correctly.

Also, clarify what exactly version of Magento you are using, I mean OS, CE or EE.

BR,
Vadym

@vahonc vahonc assigned indunie and unassigned vahonc Nov 13, 2024
@indunie
Copy link
Author

indunie commented Nov 19, 2024

Hello @vahonc ,

Thank you for checking the issue.

The version I am using is Magento CE 2.4.6-p7.

Reindexing crons are working well, but it doesn't fix the issue.

@vahonc
Copy link
Collaborator

vahonc commented Nov 20, 2024

@indunie,

Reindexing crons are working well, but it doesn't fix the issue.

Have you tried to run a manual re-index?

This is very strange because I couldn't reproduce your issue on the fresh Magento, at least it was fixed by manual re-index, and products with the passes "special to date" disappeared from the virtual category.

Could you provide more details about your Magento instance, especially if you are using any third-party extension?

Also please provide an extract of the queries that are being sent to ES when you are browsing categories. You can get it from the system.log file if you activate the Debug mode of Elasticsuite in: Stores -> Configuration -> Elasticsuite -> Base settings -> Elasticsearch Client -> Enable Debug Mode.

BR,
Vadym

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

No branches or pull requests

2 participants