elasticsuite
elasticsuite copied to clipboard
Configurable products shown in virtual category as discounted products, when they are not
Configurable products shown in virtual category as discounted products, when they are not
Preconditions
Magento Version : 2.2.3 ElasticSuite Version : 2.5.4 Environment : Production mode
Steps to reproduce
- Create a configurable product with different sizes. The price needs to be different per simple product.
- Create a virtual category where you have all products which are in stock & are discounted.
Expected result
- Configurable products where the simple price is different and which do not have a special price should not be shown in the virtual category.
Actual result
- Products are shown in the virtual category.

Confirmed when simple price are not all equals.
Not sure how we could fix this one easily.
For now we rely on the catalog_product_index_price table and this does not seem to be enough to differentiate these 2 cases :
-
product has many children of different prices. These children have no special price. => should NOT have
is_discounted. This is the case submitted in this issue. -
one of the children product has a special price. => product should have
is_discounted
any advice @afoucret ?
Hello, any fix planned for this? or any work around available for now ?
Hi @moejoee91,
I am currently braimstorming on this one. The technical part is quite easy but this bug highlight a functional issue I will explained later. Without a clean functional solution it will be useless to solve this issue.
We had this issues mentioned in #1140 and https://magento.stackexchange.com/questions/247097/price-filter-returns-wrong-results-price-ist-stored-as-0-insteal-of-null-and-i with the price index in 2.1.6 -- now we are on 2.1.8 and believe the price index is in a bit better shape
Simples work fine now, but configurables are wrongly tagged as is_discounted
- min_price and max_price seem to be right
- but price is now 0 in the index for configurables.
and is_discounted becomes true, which it should not.
The question we are asking ourselves now is, what should be the price for configurables in the price index -- actually I think "0" is quite correct, because normally a configurable does not have a price. But how could the is_discounted indexing then work of elastic suite?
ping @romainruaud ;-)
ElasticSuite is assuming that the price (actual price) is in min_price in the index and original price is in max_price in the index.
I think this is a basic design problem: If I have a configurable T-Shirts where S cost 9 € and M costs 10€ of course min_price is 9 and max_price is 10 --> then elasticsuite is assuming we have a discounted product.
I am currently braimstorming on this one. The technical part is quite easy but this bug highlight a functional issue I will explained later. Without a clean functional solution it will be useless to solve this issue.
@afoucret Was there any result of the brainstorming :-D
I am trying to tackle this but have problems to debug into
\Smile\ElasticsuiteCatalog\Model\Product\Indexer\Fulltext\Datasource\PriceData::addData
Does anybody have a hint to to write a test which triggers that one? Currently I am saving a product and run the cron which is super cumbersome.... Trying to write an integration test for that but have to understand the architecture more
@romainruaud @dverkade I developed a patch for this https://github.com/Smile-SA/elasticsuite/pull/1411
Hello @afoucret,
I'm currently facing this issue, and I saw that you mentioned braimstorming about the problem (https://github.com/Smile-SA/elasticsuite/issues/866#issuecomment-388730916)
It's a bit old, but do you remember the conclusion?
Have a good weekend,
Maybe a stupid question, but why you don't look inside the table catalogrule_product or catalogrule_product_price to get if a product has a catalog rule applied?
Can someone reviewing my pull request? I think is better than previous one and for now works as expected on few production environments.