Price filter returns wrong results - Price is stored as 0 instead of null and is set to special_price The Next CEO of Stack OverflowMagento 2: How to show Prices for OUT of stock productsPrice removal from Product Page with .xml or .php OR stop GOOGLE indexing itMagento 2 CE and ElasticSearch integrationMagento 2 Commerce Enable Elastic SearchDo I need a production database to run integration tests?Newsletter observer for Magento 2.2.2Change order price display incl. tax and excl. taxMagento 2 Install error: “There is no such engine:”Catalog Price Rules not being appliedElasticsearch Error - call_user_func_array() expects parameter 1 to be a valid callback

I believe this to be a fraud - hired, then asked to cash check and send cash as Bitcoin

Are police here, aren't itthey?

Is it okay to majorly distort historical facts while writing a fiction story?

What flight has the highest ratio of time difference to flight time?

How a 64-bit process virtual address space is divided in Linux?

Powershell. How to parse gci Name?

Rotate a column

Why is my new battery behaving weirdly?

What connection does MS Office have to Netscape Navigator?

Method for adding error messages to a dictionary given a key

Running a General Election and the European Elections together

Can we say or write : "No, it'sn't"?

Why does the flight controls check come before arming the autobrake on the A320?

Why do remote US companies require working in the US?

Is it possible to replace duplicates of a character with one character using tr

How to place nodes around a circle from some initial angle?

If Nick Fury and Coulson already knew about aliens (Kree and Skrull) why did they wait until Thor's appearance to start making weapons?

Why does standard notation not preserve intervals (visually)

How many extra stops do monopods offer for tele photographs?

Is micro rebar a better way to reinforce concrete than rebar?

RigExpert AA-35 - Interpreting The Information

Is it my responsibility to learn a new technology in my own time my employer wants to implement?

Why is quantifier elimination desirable for a given theory?

What was the first Unix version to run on a microcomputer?



Price filter returns wrong results - Price is stored as 0 instead of null and is set to special_price



The Next CEO of Stack OverflowMagento 2: How to show Prices for OUT of stock productsPrice removal from Product Page with .xml or .php OR stop GOOGLE indexing itMagento 2 CE and ElasticSearch integrationMagento 2 Commerce Enable Elastic SearchDo I need a production database to run integration tests?Newsletter observer for Magento 2.2.2Change order price display incl. tax and excl. taxMagento 2 Install error: “There is no such engine:”Catalog Price Rules not being appliedElasticsearch Error - call_user_func_array() expects parameter 1 to be a valid callback










4















We have a problem with our price filter. We are using magento 2.2.6 and Smile-SA/elasticsuite 2.6.x-dev.



When I go to a category and set a price range filter 0-0,99 I get results with a higher price. The URL looks like: /baelle/?price=0-1 Categories with filter example
When I query the ElasticSearch manually for one of the given SKUs the price looks always as the following for all customer groups:



price: [

price: "0.0000",
original_price: "79.9500",
is_discount: true,
customer_group_id: "0"

],


In the backend the product is configured with a price of 79.95 and no advanced pricing. In the catalog__product_index_price table it's stored like this:catalog_products_index_price



But when I set special_price in the backend the price in ElasticSearch changes to the according special_price. Similar to the entries in catalog_product_index_price it looks now like this:catalog_product_index_price with special price



All of this happens to configurable and simple products alike and we have no idea where or what the problem could be.



Any ideas why the price filter is not working as expected?



Update



I figured out we have some products where the indexer is working as expected but for the majority it is not. CatalogModelResourceModelProductIndexerPriceDefaultPrice::prepareFinalPriceDataForType()
Is not beeing called either way.



I executed php bin/magento dev:tests:run unit to see if maybe an test for the indexer is failing but only one test failed and it has nothing to do with the indexer.



I tried to find a pattern which products are working as expected and which don't but I had no luck with it.



Update 2



I started to disable all third party modules. After disabling all, clearing all caches and executing bin/magento setup:di:compile there is still no difference.



Update 3



I have tried to run the dev/tests/integration/testsuite/Magento/Catalog/Model/Indexer/Product/Price integrations tests in order to figure out some more details but the tests fail straight away with the following error:




Error in fixture: "dev/tests/integration/testsuite/Magento/Catalog/_files/product_simple.php".
Unable to save Stock Item




Could this error lead into a wrong index?










share|improve this question
























  • Not sure if it is a Magento core bug or ElasticSuite is assuming a behaviour that is not true for Magento

    – Alex
    Oct 19 '18 at 9:32















4















We have a problem with our price filter. We are using magento 2.2.6 and Smile-SA/elasticsuite 2.6.x-dev.



When I go to a category and set a price range filter 0-0,99 I get results with a higher price. The URL looks like: /baelle/?price=0-1 Categories with filter example
When I query the ElasticSearch manually for one of the given SKUs the price looks always as the following for all customer groups:



price: [

price: "0.0000",
original_price: "79.9500",
is_discount: true,
customer_group_id: "0"

],


In the backend the product is configured with a price of 79.95 and no advanced pricing. In the catalog__product_index_price table it's stored like this:catalog_products_index_price



But when I set special_price in the backend the price in ElasticSearch changes to the according special_price. Similar to the entries in catalog_product_index_price it looks now like this:catalog_product_index_price with special price



All of this happens to configurable and simple products alike and we have no idea where or what the problem could be.



Any ideas why the price filter is not working as expected?



Update



I figured out we have some products where the indexer is working as expected but for the majority it is not. CatalogModelResourceModelProductIndexerPriceDefaultPrice::prepareFinalPriceDataForType()
Is not beeing called either way.



I executed php bin/magento dev:tests:run unit to see if maybe an test for the indexer is failing but only one test failed and it has nothing to do with the indexer.



I tried to find a pattern which products are working as expected and which don't but I had no luck with it.



Update 2



I started to disable all third party modules. After disabling all, clearing all caches and executing bin/magento setup:di:compile there is still no difference.



Update 3



I have tried to run the dev/tests/integration/testsuite/Magento/Catalog/Model/Indexer/Product/Price integrations tests in order to figure out some more details but the tests fail straight away with the following error:




Error in fixture: "dev/tests/integration/testsuite/Magento/Catalog/_files/product_simple.php".
Unable to save Stock Item




Could this error lead into a wrong index?










share|improve this question
























  • Not sure if it is a Magento core bug or ElasticSuite is assuming a behaviour that is not true for Magento

    – Alex
    Oct 19 '18 at 9:32













4












4








4


1






We have a problem with our price filter. We are using magento 2.2.6 and Smile-SA/elasticsuite 2.6.x-dev.



When I go to a category and set a price range filter 0-0,99 I get results with a higher price. The URL looks like: /baelle/?price=0-1 Categories with filter example
When I query the ElasticSearch manually for one of the given SKUs the price looks always as the following for all customer groups:



price: [

price: "0.0000",
original_price: "79.9500",
is_discount: true,
customer_group_id: "0"

],


In the backend the product is configured with a price of 79.95 and no advanced pricing. In the catalog__product_index_price table it's stored like this:catalog_products_index_price



But when I set special_price in the backend the price in ElasticSearch changes to the according special_price. Similar to the entries in catalog_product_index_price it looks now like this:catalog_product_index_price with special price



All of this happens to configurable and simple products alike and we have no idea where or what the problem could be.



Any ideas why the price filter is not working as expected?



Update



I figured out we have some products where the indexer is working as expected but for the majority it is not. CatalogModelResourceModelProductIndexerPriceDefaultPrice::prepareFinalPriceDataForType()
Is not beeing called either way.



I executed php bin/magento dev:tests:run unit to see if maybe an test for the indexer is failing but only one test failed and it has nothing to do with the indexer.



I tried to find a pattern which products are working as expected and which don't but I had no luck with it.



Update 2



I started to disable all third party modules. After disabling all, clearing all caches and executing bin/magento setup:di:compile there is still no difference.



Update 3



I have tried to run the dev/tests/integration/testsuite/Magento/Catalog/Model/Indexer/Product/Price integrations tests in order to figure out some more details but the tests fail straight away with the following error:




Error in fixture: "dev/tests/integration/testsuite/Magento/Catalog/_files/product_simple.php".
Unable to save Stock Item




Could this error lead into a wrong index?










share|improve this question
















We have a problem with our price filter. We are using magento 2.2.6 and Smile-SA/elasticsuite 2.6.x-dev.



When I go to a category and set a price range filter 0-0,99 I get results with a higher price. The URL looks like: /baelle/?price=0-1 Categories with filter example
When I query the ElasticSearch manually for one of the given SKUs the price looks always as the following for all customer groups:



price: [

price: "0.0000",
original_price: "79.9500",
is_discount: true,
customer_group_id: "0"

],


In the backend the product is configured with a price of 79.95 and no advanced pricing. In the catalog__product_index_price table it's stored like this:catalog_products_index_price



But when I set special_price in the backend the price in ElasticSearch changes to the according special_price. Similar to the entries in catalog_product_index_price it looks now like this:catalog_product_index_price with special price



All of this happens to configurable and simple products alike and we have no idea where or what the problem could be.



Any ideas why the price filter is not working as expected?



Update



I figured out we have some products where the indexer is working as expected but for the majority it is not. CatalogModelResourceModelProductIndexerPriceDefaultPrice::prepareFinalPriceDataForType()
Is not beeing called either way.



I executed php bin/magento dev:tests:run unit to see if maybe an test for the indexer is failing but only one test failed and it has nothing to do with the indexer.



I tried to find a pattern which products are working as expected and which don't but I had no luck with it.



Update 2



I started to disable all third party modules. After disabling all, clearing all caches and executing bin/magento setup:di:compile there is still no difference.



Update 3



I have tried to run the dev/tests/integration/testsuite/Magento/Catalog/Model/Indexer/Product/Price integrations tests in order to figure out some more details but the tests fail straight away with the following error:




Error in fixture: "dev/tests/integration/testsuite/Magento/Catalog/_files/product_simple.php".
Unable to save Stock Item




Could this error lead into a wrong index?







magento2.2 product-prices elasticsearch catalog-product-price-index






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 16 '18 at 14:28







Daniel

















asked Oct 19 '18 at 8:41









DanielDaniel

189213




189213












  • Not sure if it is a Magento core bug or ElasticSuite is assuming a behaviour that is not true for Magento

    – Alex
    Oct 19 '18 at 9:32

















  • Not sure if it is a Magento core bug or ElasticSuite is assuming a behaviour that is not true for Magento

    – Alex
    Oct 19 '18 at 9:32
















Not sure if it is a Magento core bug or ElasticSuite is assuming a behaviour that is not true for Magento

– Alex
Oct 19 '18 at 9:32





Not sure if it is a Magento core bug or ElasticSuite is assuming a behaviour that is not true for Magento

– Alex
Oct 19 '18 at 9:32










2 Answers
2






active

oldest

votes


















2














It definitely looks like the price indexer is not working properly. I've checked it on Magento 2.2.6 vanilla and final_price, min_price and max_price have the same value as the price column.



The moment I change the price in admin all the values are changed (indexer set to on save). Maybe some extension is messing the indexer?



Without access to the code is hard to say but I would suggest to start debugging from



MagentoCatalogModelResourceModelProductIndexerPriceDefaultPrice::prepareFinalPriceDataForType()


function - it is a function that prepares the final price data for certain product type. In this function you can find a call to getSelect() which generates an sql query for getting the data. Check if this function is called, maybe some extension is overriding it. If it's called check the data that the query gets. Good luck!






share|improve this answer

























  • this function is not even called in my case i compared with a vanilla and it is called. Any idea to figure out what is overriding this method?

    – Daniel
    Oct 23 '18 at 7:12











  • i ran php bin/magento dev:tests:run unit in order to see if an indexer test fails but they all worked

    – Daniel
    Oct 23 '18 at 7:35











  • the question is, is this particular class overrided or maybe some other. You can search with you IDE for a phrase MagentoCatalogModelResourceModelProductIndexerPriceDefaultPrice and check is there any reference of it in some 3rd party modules di.xml files. If no, you can check MagentoCatalogModelIndexerProductPriceActionFull::execute - this is the function that is runned when you launch price indexer from CLI. This function uses _defaultIndexerResource var which in vanilla is the defaultprice class. Check what class it uses.

    – Sebastian
    Oct 23 '18 at 7:52











  • And the last option, you can disable 3rd party modules and check when it starts to work ;)

    – Sebastian
    Oct 23 '18 at 7:52











  • I updated the question again. I did disabled all third party modules and still have the same issue that really confusing.

    – Daniel
    Oct 24 '18 at 15:50


















0














The problem here was about the catalog_product_price index being built wrong. If a product has special_from_date set but no special_price set the indexer will set the final_price, min_price and max_price to 0.0000.

This behavior corrupts the prices for configurable products and the elasticsearch index alike.



To fix it make sure if no special_price is set there is not set a special_from_date either.

Or apply this commit as patch.






share|improve this answer























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "479"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f247097%2fprice-filter-returns-wrong-results-price-is-stored-as-0-instead-of-null-and-is%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    It definitely looks like the price indexer is not working properly. I've checked it on Magento 2.2.6 vanilla and final_price, min_price and max_price have the same value as the price column.



    The moment I change the price in admin all the values are changed (indexer set to on save). Maybe some extension is messing the indexer?



    Without access to the code is hard to say but I would suggest to start debugging from



    MagentoCatalogModelResourceModelProductIndexerPriceDefaultPrice::prepareFinalPriceDataForType()


    function - it is a function that prepares the final price data for certain product type. In this function you can find a call to getSelect() which generates an sql query for getting the data. Check if this function is called, maybe some extension is overriding it. If it's called check the data that the query gets. Good luck!






    share|improve this answer

























    • this function is not even called in my case i compared with a vanilla and it is called. Any idea to figure out what is overriding this method?

      – Daniel
      Oct 23 '18 at 7:12











    • i ran php bin/magento dev:tests:run unit in order to see if an indexer test fails but they all worked

      – Daniel
      Oct 23 '18 at 7:35











    • the question is, is this particular class overrided or maybe some other. You can search with you IDE for a phrase MagentoCatalogModelResourceModelProductIndexerPriceDefaultPrice and check is there any reference of it in some 3rd party modules di.xml files. If no, you can check MagentoCatalogModelIndexerProductPriceActionFull::execute - this is the function that is runned when you launch price indexer from CLI. This function uses _defaultIndexerResource var which in vanilla is the defaultprice class. Check what class it uses.

      – Sebastian
      Oct 23 '18 at 7:52











    • And the last option, you can disable 3rd party modules and check when it starts to work ;)

      – Sebastian
      Oct 23 '18 at 7:52











    • I updated the question again. I did disabled all third party modules and still have the same issue that really confusing.

      – Daniel
      Oct 24 '18 at 15:50















    2














    It definitely looks like the price indexer is not working properly. I've checked it on Magento 2.2.6 vanilla and final_price, min_price and max_price have the same value as the price column.



    The moment I change the price in admin all the values are changed (indexer set to on save). Maybe some extension is messing the indexer?



    Without access to the code is hard to say but I would suggest to start debugging from



    MagentoCatalogModelResourceModelProductIndexerPriceDefaultPrice::prepareFinalPriceDataForType()


    function - it is a function that prepares the final price data for certain product type. In this function you can find a call to getSelect() which generates an sql query for getting the data. Check if this function is called, maybe some extension is overriding it. If it's called check the data that the query gets. Good luck!






    share|improve this answer

























    • this function is not even called in my case i compared with a vanilla and it is called. Any idea to figure out what is overriding this method?

      – Daniel
      Oct 23 '18 at 7:12











    • i ran php bin/magento dev:tests:run unit in order to see if an indexer test fails but they all worked

      – Daniel
      Oct 23 '18 at 7:35











    • the question is, is this particular class overrided or maybe some other. You can search with you IDE for a phrase MagentoCatalogModelResourceModelProductIndexerPriceDefaultPrice and check is there any reference of it in some 3rd party modules di.xml files. If no, you can check MagentoCatalogModelIndexerProductPriceActionFull::execute - this is the function that is runned when you launch price indexer from CLI. This function uses _defaultIndexerResource var which in vanilla is the defaultprice class. Check what class it uses.

      – Sebastian
      Oct 23 '18 at 7:52











    • And the last option, you can disable 3rd party modules and check when it starts to work ;)

      – Sebastian
      Oct 23 '18 at 7:52











    • I updated the question again. I did disabled all third party modules and still have the same issue that really confusing.

      – Daniel
      Oct 24 '18 at 15:50













    2












    2








    2







    It definitely looks like the price indexer is not working properly. I've checked it on Magento 2.2.6 vanilla and final_price, min_price and max_price have the same value as the price column.



    The moment I change the price in admin all the values are changed (indexer set to on save). Maybe some extension is messing the indexer?



    Without access to the code is hard to say but I would suggest to start debugging from



    MagentoCatalogModelResourceModelProductIndexerPriceDefaultPrice::prepareFinalPriceDataForType()


    function - it is a function that prepares the final price data for certain product type. In this function you can find a call to getSelect() which generates an sql query for getting the data. Check if this function is called, maybe some extension is overriding it. If it's called check the data that the query gets. Good luck!






    share|improve this answer















    It definitely looks like the price indexer is not working properly. I've checked it on Magento 2.2.6 vanilla and final_price, min_price and max_price have the same value as the price column.



    The moment I change the price in admin all the values are changed (indexer set to on save). Maybe some extension is messing the indexer?



    Without access to the code is hard to say but I would suggest to start debugging from



    MagentoCatalogModelResourceModelProductIndexerPriceDefaultPrice::prepareFinalPriceDataForType()


    function - it is a function that prepares the final price data for certain product type. In this function you can find a call to getSelect() which generates an sql query for getting the data. Check if this function is called, maybe some extension is overriding it. If it's called check the data that the query gets. Good luck!







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Nov 27 '18 at 17:19









    Kirti Nariya

    1,041415




    1,041415










    answered Oct 19 '18 at 22:13









    SebastianSebastian

    1687




    1687












    • this function is not even called in my case i compared with a vanilla and it is called. Any idea to figure out what is overriding this method?

      – Daniel
      Oct 23 '18 at 7:12











    • i ran php bin/magento dev:tests:run unit in order to see if an indexer test fails but they all worked

      – Daniel
      Oct 23 '18 at 7:35











    • the question is, is this particular class overrided or maybe some other. You can search with you IDE for a phrase MagentoCatalogModelResourceModelProductIndexerPriceDefaultPrice and check is there any reference of it in some 3rd party modules di.xml files. If no, you can check MagentoCatalogModelIndexerProductPriceActionFull::execute - this is the function that is runned when you launch price indexer from CLI. This function uses _defaultIndexerResource var which in vanilla is the defaultprice class. Check what class it uses.

      – Sebastian
      Oct 23 '18 at 7:52











    • And the last option, you can disable 3rd party modules and check when it starts to work ;)

      – Sebastian
      Oct 23 '18 at 7:52











    • I updated the question again. I did disabled all third party modules and still have the same issue that really confusing.

      – Daniel
      Oct 24 '18 at 15:50

















    • this function is not even called in my case i compared with a vanilla and it is called. Any idea to figure out what is overriding this method?

      – Daniel
      Oct 23 '18 at 7:12











    • i ran php bin/magento dev:tests:run unit in order to see if an indexer test fails but they all worked

      – Daniel
      Oct 23 '18 at 7:35











    • the question is, is this particular class overrided or maybe some other. You can search with you IDE for a phrase MagentoCatalogModelResourceModelProductIndexerPriceDefaultPrice and check is there any reference of it in some 3rd party modules di.xml files. If no, you can check MagentoCatalogModelIndexerProductPriceActionFull::execute - this is the function that is runned when you launch price indexer from CLI. This function uses _defaultIndexerResource var which in vanilla is the defaultprice class. Check what class it uses.

      – Sebastian
      Oct 23 '18 at 7:52











    • And the last option, you can disable 3rd party modules and check when it starts to work ;)

      – Sebastian
      Oct 23 '18 at 7:52











    • I updated the question again. I did disabled all third party modules and still have the same issue that really confusing.

      – Daniel
      Oct 24 '18 at 15:50
















    this function is not even called in my case i compared with a vanilla and it is called. Any idea to figure out what is overriding this method?

    – Daniel
    Oct 23 '18 at 7:12





    this function is not even called in my case i compared with a vanilla and it is called. Any idea to figure out what is overriding this method?

    – Daniel
    Oct 23 '18 at 7:12













    i ran php bin/magento dev:tests:run unit in order to see if an indexer test fails but they all worked

    – Daniel
    Oct 23 '18 at 7:35





    i ran php bin/magento dev:tests:run unit in order to see if an indexer test fails but they all worked

    – Daniel
    Oct 23 '18 at 7:35













    the question is, is this particular class overrided or maybe some other. You can search with you IDE for a phrase MagentoCatalogModelResourceModelProductIndexerPriceDefaultPrice and check is there any reference of it in some 3rd party modules di.xml files. If no, you can check MagentoCatalogModelIndexerProductPriceActionFull::execute - this is the function that is runned when you launch price indexer from CLI. This function uses _defaultIndexerResource var which in vanilla is the defaultprice class. Check what class it uses.

    – Sebastian
    Oct 23 '18 at 7:52





    the question is, is this particular class overrided or maybe some other. You can search with you IDE for a phrase MagentoCatalogModelResourceModelProductIndexerPriceDefaultPrice and check is there any reference of it in some 3rd party modules di.xml files. If no, you can check MagentoCatalogModelIndexerProductPriceActionFull::execute - this is the function that is runned when you launch price indexer from CLI. This function uses _defaultIndexerResource var which in vanilla is the defaultprice class. Check what class it uses.

    – Sebastian
    Oct 23 '18 at 7:52













    And the last option, you can disable 3rd party modules and check when it starts to work ;)

    – Sebastian
    Oct 23 '18 at 7:52





    And the last option, you can disable 3rd party modules and check when it starts to work ;)

    – Sebastian
    Oct 23 '18 at 7:52













    I updated the question again. I did disabled all third party modules and still have the same issue that really confusing.

    – Daniel
    Oct 24 '18 at 15:50





    I updated the question again. I did disabled all third party modules and still have the same issue that really confusing.

    – Daniel
    Oct 24 '18 at 15:50













    0














    The problem here was about the catalog_product_price index being built wrong. If a product has special_from_date set but no special_price set the indexer will set the final_price, min_price and max_price to 0.0000.

    This behavior corrupts the prices for configurable products and the elasticsearch index alike.



    To fix it make sure if no special_price is set there is not set a special_from_date either.

    Or apply this commit as patch.






    share|improve this answer



























      0














      The problem here was about the catalog_product_price index being built wrong. If a product has special_from_date set but no special_price set the indexer will set the final_price, min_price and max_price to 0.0000.

      This behavior corrupts the prices for configurable products and the elasticsearch index alike.



      To fix it make sure if no special_price is set there is not set a special_from_date either.

      Or apply this commit as patch.






      share|improve this answer

























        0












        0








        0







        The problem here was about the catalog_product_price index being built wrong. If a product has special_from_date set but no special_price set the indexer will set the final_price, min_price and max_price to 0.0000.

        This behavior corrupts the prices for configurable products and the elasticsearch index alike.



        To fix it make sure if no special_price is set there is not set a special_from_date either.

        Or apply this commit as patch.






        share|improve this answer













        The problem here was about the catalog_product_price index being built wrong. If a product has special_from_date set but no special_price set the indexer will set the final_price, min_price and max_price to 0.0000.

        This behavior corrupts the prices for configurable products and the elasticsearch index alike.



        To fix it make sure if no special_price is set there is not set a special_from_date either.

        Or apply this commit as patch.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 2 days ago









        DanielDaniel

        189213




        189213



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Magento Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f247097%2fprice-filter-returns-wrong-results-price-is-stored-as-0-instead-of-null-and-is%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Sum ergo cogito? 1 nng

            419 nièngy_Soadمي 19bal1.5o_g

            Queiggey Chernihivv 9NnOo i Zw X QqKk LpB