Smile-SA / elasticsuite

Smile ElasticSuite - Magento 2 merchandising and search engine built on ElasticSearch
https://elasticsuite.io
Open Software License 3.0
761 stars 340 forks source link

Price filter gets negative price #3300

Open ioweb-gr opened 3 months ago

ioweb-gr commented 3 months ago

Every now and then in some categories, the price slider starts to show negative prices in the lowest margin. The upper boundary is correct.

Preconditions

Magento Version : 2.4.6-p4 CE

ElasticSuite Version :2.11.5.1

Environment : Production mode

Third party modules :

Steps to reproduce

  1. I'm not sure how to reproduce this but I keep getting negative prices in the price filter.

Expected result

  1. The price filter starts from the minimum price in the product listing.

Actual result

image

vahonc commented 3 months ago

Hello @ioweb-gr,

It's more likely that this problem is related to your environment and its settings. I'm not sure that we can reproduce it without fully understanding how everything is configured.

Are you sure that there are no established discounts or catalog price rules, in other words, something that could affect on a negative price?

BR, Vadym

ioweb-gr commented 3 months ago

Hi @vahonc We don't actualy use any catalog rules

image

As far as the filter is concerned it's behaving really weird

Check what happens as I change the price slider

https://github.com/Smile-SA/elasticsuite/assets/20220341/9d0d0729-0b03-48bb-80f8-2fc2ee9cb664

I'm not really sure where to start to provide the require info.

Any ideas what I should check and provide the necessary info?

vahonc commented 3 months ago

@ioweb-gr,

What is the status of this setting?

Screenshot from 2024-06-19 15-17-03

What about your fronted theme? Is there fully compatibility (based on) with default Luma theme? If it possible try to switch to Luma theme.

Have you checked the price of your products or discount rules?

BR, Vadym

ioweb-gr commented 3 months ago

It's set to Yes

image

I've sampled a lot of them, and they appear proper. Moreover, when I sort them by price Ascending, no product appears with a negative price on the catalog and everything is purchaseable properly at the displayed price.

romainruaud commented 3 months ago

can you enable the debug mode of Elasticsuite and give us the query it's generating ?

if you can replay this query via cerebro (if you're familiar with it), I'd like to be able to show the results as well.

Regards

ioweb-gr commented 3 months ago

I'm not familiar with cerebro. I'll try to check the debug mode when there's a bit less traffic

ioweb-gr commented 3 months ago

What about your fronted theme? Is there fully compatibility (based on) with default Luma theme? If it possible try to switch to Luma theme.

Forgot to answer this is the LUMA theme, we just changed styles

github-actions[bot] commented 2 months ago

This issue was waiting update from the author for too long. Without any update, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away! Thanks for your contribution.

ioweb-gr commented 1 month ago

Just an update here I think we're suffering from this

https://github.com/magento/magento2/issues/24953 https://github.com/magento/magento2/issues/15609

vahonc commented 1 month ago

@ioweb-gr,

Are you able to reproduce this issue without (disabled) ElasticSuite module?

can you enable the debug mode of Elasticsuite and give us the query it's generating ?

Have you found something that can help us to understand your problem?

BR, Vadym

ioweb-gr commented 1 month ago

Hi

Yes actually I tested further and the negative prices appear after removing elastic suite as well so it's not the reason the indexes are created wrong but the core itself.

What I haven't been able to determine because I cannot remove it for a prolonged period of time is whether the prices in the configurable products are created because the elastic suite is enabled or not

The culprit however is that configurable products suddenly have prices stored in the db which create a problem in the indexer.