Negative price filter in layered navigationMultiselect price filter attribute in layered navigationDisplay filter by price on layered navigationLayered navigation: intval on price filterLayered navigation, going to other page doesnt workPrice filter - override default behaviour to not subtract 0.01 from maximum priceLayered Navigation: Price filter on custom collectionPrice filter not showing on layered navigationcustomize layered price filter?Magento 2 layered navigation price filter issueNegative price filter in Layered Nav Magento 2.2

How can I close a gap between my fence and my neighbor's that's on his side of the property line?

Does a card have a keyword if it has the same effect as said keyword?

Can an isometry leave entropy invariant?

What to use instead of cling film to wrap pastry

Why is B♯ higher than C♭ in 31-ET?

Getting a W on your transcript for grad school applications

Multi-channel audio upsampling interpolation

Understanding trademark infringements in a world where many dictionary words are trademarks?

How does this change to the opportunity attack rule impact combat?

Why Isn’t SQL More Refactorable?

Can hackers enable the camera after the user disabled it?

On which topic did Indiana Jones write his doctoral thesis?

Why wasn't the Night King naked in S08E03?

Why do money exchangers give different rates to different bills?

Why was the battle set up *outside* Winterfell?

Did we get closer to another plane than we were supposed to, or was the pilot just protecting our delicate sensibilities?

Randomness of Python's random

I need a disease

If I readied a spell with the trigger "When I take damage", do I have to make a constitution saving throw to avoid losing Concentration?

Manager is threatening to grade me poorly if I don't complete the project

Why do people keep telling me that I am a bad photographer?

Pressure inside an infinite ocean?

Where can I go to avoid planes overhead?

How can I support myself financially as a 17 year old with a loan?



Negative price filter in layered navigation


Multiselect price filter attribute in layered navigationDisplay filter by price on layered navigationLayered navigation: intval on price filterLayered navigation, going to other page doesnt workPrice filter - override default behaviour to not subtract 0.01 from maximum priceLayered Navigation: Price filter on custom collectionPrice filter not showing on layered navigationcustomize layered price filter?Magento 2 layered navigation price filter issueNegative price filter in Layered Nav Magento 2.2






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








3















I'm experiencing a strange issue here where the price navigation filter (layered navigation) somehow came up with negative price ranges.



negative price range



If I flush the price tables it seems to solve the problem, until next time prices get re-indexed. Then the negative price ranges re-appear.



Another issue is that the price ranges are not even accurate. It would show the following: CA$0.00 - CA$9.99 (2) - as if there are 2 items within this price range. But we do not have any items priced within this price range...



inaccurate price range



Help please!!










share|improve this question






















  • magento 1 or 2? custom layered navigation or default? etc

    – CompactCode
    Mar 18 '18 at 12:18

















3















I'm experiencing a strange issue here where the price navigation filter (layered navigation) somehow came up with negative price ranges.



negative price range



If I flush the price tables it seems to solve the problem, until next time prices get re-indexed. Then the negative price ranges re-appear.



Another issue is that the price ranges are not even accurate. It would show the following: CA$0.00 - CA$9.99 (2) - as if there are 2 items within this price range. But we do not have any items priced within this price range...



inaccurate price range



Help please!!










share|improve this question






















  • magento 1 or 2? custom layered navigation or default? etc

    – CompactCode
    Mar 18 '18 at 12:18













3












3








3


1






I'm experiencing a strange issue here where the price navigation filter (layered navigation) somehow came up with negative price ranges.



negative price range



If I flush the price tables it seems to solve the problem, until next time prices get re-indexed. Then the negative price ranges re-appear.



Another issue is that the price ranges are not even accurate. It would show the following: CA$0.00 - CA$9.99 (2) - as if there are 2 items within this price range. But we do not have any items priced within this price range...



inaccurate price range



Help please!!










share|improve this question














I'm experiencing a strange issue here where the price navigation filter (layered navigation) somehow came up with negative price ranges.



negative price range



If I flush the price tables it seems to solve the problem, until next time prices get re-indexed. Then the negative price ranges re-appear.



Another issue is that the price ranges are not even accurate. It would show the following: CA$0.00 - CA$9.99 (2) - as if there are 2 items within this price range. But we do not have any items priced within this price range...



inaccurate price range



Help please!!







price layered-navigation






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 12 '17 at 19:38









oblivion00oblivion00

161




161












  • magento 1 or 2? custom layered navigation or default? etc

    – CompactCode
    Mar 18 '18 at 12:18

















  • magento 1 or 2? custom layered navigation or default? etc

    – CompactCode
    Mar 18 '18 at 12:18
















magento 1 or 2? custom layered navigation or default? etc

– CompactCode
Mar 18 '18 at 12:18





magento 1 or 2? custom layered navigation or default? etc

– CompactCode
Mar 18 '18 at 12:18










2 Answers
2






active

oldest

votes


















0














The solution documented here works for me, although I didn't test it thoroughly:



Rewrite the following file using the correct class rewrite procedure, and perform an price reindex subsequently.



File:
vendor/magento/module-configurable-product/Model/ResourceModel/Product/Indexer/Price/Configurable.php



Method:
_applyConfigurableOption()



Replace:



$select->columns(
[
'min_price' => new Zend_Db_Expr('i.min_price - i.orig_price + io.min_price'),
'max_price' => new Zend_Db_Expr('i.max_price - i.orig_price + io.max_price'),
'tier_price' => 'io.tier_price',
]
);


With:



$select->columns(
[
'min_price' => new Zend_Db_Expr('io.min_price'),
'max_price' => new Zend_Db_Expr('io.max_price'),
'tier_price' => 'io.tier_price'
]
);





share|improve this answer






























    0














    For Magento 2.2.x



    This is not a code but a data issue. In most cases it can appears when you use direct (used SQL queries) product import tools.
    I've taken one configurable product with negative min_price and max_price, imported with special prices and dropped special price for it and it's child products. After re-index I haven't seen any results, and only after saving this configurable product from admin, I saw the changes. It shows, that direct special prices import doesn't trig some important index processes. It still incorrect:



    enter image description here



    but it shows a bug.
    E.g. I took another product without any special prices for itself and its' child products, and set it special price for some option. After re-index everything looked fine:



    enter image description here



    So, check that products that you import don't have special price (at least configurable products), or change your import tool.






    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%2f201102%2fnegative-price-filter-in-layered-navigation%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









      0














      The solution documented here works for me, although I didn't test it thoroughly:



      Rewrite the following file using the correct class rewrite procedure, and perform an price reindex subsequently.



      File:
      vendor/magento/module-configurable-product/Model/ResourceModel/Product/Indexer/Price/Configurable.php



      Method:
      _applyConfigurableOption()



      Replace:



      $select->columns(
      [
      'min_price' => new Zend_Db_Expr('i.min_price - i.orig_price + io.min_price'),
      'max_price' => new Zend_Db_Expr('i.max_price - i.orig_price + io.max_price'),
      'tier_price' => 'io.tier_price',
      ]
      );


      With:



      $select->columns(
      [
      'min_price' => new Zend_Db_Expr('io.min_price'),
      'max_price' => new Zend_Db_Expr('io.max_price'),
      'tier_price' => 'io.tier_price'
      ]
      );





      share|improve this answer



























        0














        The solution documented here works for me, although I didn't test it thoroughly:



        Rewrite the following file using the correct class rewrite procedure, and perform an price reindex subsequently.



        File:
        vendor/magento/module-configurable-product/Model/ResourceModel/Product/Indexer/Price/Configurable.php



        Method:
        _applyConfigurableOption()



        Replace:



        $select->columns(
        [
        'min_price' => new Zend_Db_Expr('i.min_price - i.orig_price + io.min_price'),
        'max_price' => new Zend_Db_Expr('i.max_price - i.orig_price + io.max_price'),
        'tier_price' => 'io.tier_price',
        ]
        );


        With:



        $select->columns(
        [
        'min_price' => new Zend_Db_Expr('io.min_price'),
        'max_price' => new Zend_Db_Expr('io.max_price'),
        'tier_price' => 'io.tier_price'
        ]
        );





        share|improve this answer

























          0












          0








          0







          The solution documented here works for me, although I didn't test it thoroughly:



          Rewrite the following file using the correct class rewrite procedure, and perform an price reindex subsequently.



          File:
          vendor/magento/module-configurable-product/Model/ResourceModel/Product/Indexer/Price/Configurable.php



          Method:
          _applyConfigurableOption()



          Replace:



          $select->columns(
          [
          'min_price' => new Zend_Db_Expr('i.min_price - i.orig_price + io.min_price'),
          'max_price' => new Zend_Db_Expr('i.max_price - i.orig_price + io.max_price'),
          'tier_price' => 'io.tier_price',
          ]
          );


          With:



          $select->columns(
          [
          'min_price' => new Zend_Db_Expr('io.min_price'),
          'max_price' => new Zend_Db_Expr('io.max_price'),
          'tier_price' => 'io.tier_price'
          ]
          );





          share|improve this answer













          The solution documented here works for me, although I didn't test it thoroughly:



          Rewrite the following file using the correct class rewrite procedure, and perform an price reindex subsequently.



          File:
          vendor/magento/module-configurable-product/Model/ResourceModel/Product/Indexer/Price/Configurable.php



          Method:
          _applyConfigurableOption()



          Replace:



          $select->columns(
          [
          'min_price' => new Zend_Db_Expr('i.min_price - i.orig_price + io.min_price'),
          'max_price' => new Zend_Db_Expr('i.max_price - i.orig_price + io.max_price'),
          'tier_price' => 'io.tier_price',
          ]
          );


          With:



          $select->columns(
          [
          'min_price' => new Zend_Db_Expr('io.min_price'),
          'max_price' => new Zend_Db_Expr('io.max_price'),
          'tier_price' => 'io.tier_price'
          ]
          );






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Aug 21 '18 at 11:56









          vladPavlovvladPavlov

          3592514




          3592514























              0














              For Magento 2.2.x



              This is not a code but a data issue. In most cases it can appears when you use direct (used SQL queries) product import tools.
              I've taken one configurable product with negative min_price and max_price, imported with special prices and dropped special price for it and it's child products. After re-index I haven't seen any results, and only after saving this configurable product from admin, I saw the changes. It shows, that direct special prices import doesn't trig some important index processes. It still incorrect:



              enter image description here



              but it shows a bug.
              E.g. I took another product without any special prices for itself and its' child products, and set it special price for some option. After re-index everything looked fine:



              enter image description here



              So, check that products that you import don't have special price (at least configurable products), or change your import tool.






              share|improve this answer



























                0














                For Magento 2.2.x



                This is not a code but a data issue. In most cases it can appears when you use direct (used SQL queries) product import tools.
                I've taken one configurable product with negative min_price and max_price, imported with special prices and dropped special price for it and it's child products. After re-index I haven't seen any results, and only after saving this configurable product from admin, I saw the changes. It shows, that direct special prices import doesn't trig some important index processes. It still incorrect:



                enter image description here



                but it shows a bug.
                E.g. I took another product without any special prices for itself and its' child products, and set it special price for some option. After re-index everything looked fine:



                enter image description here



                So, check that products that you import don't have special price (at least configurable products), or change your import tool.






                share|improve this answer

























                  0












                  0








                  0







                  For Magento 2.2.x



                  This is not a code but a data issue. In most cases it can appears when you use direct (used SQL queries) product import tools.
                  I've taken one configurable product with negative min_price and max_price, imported with special prices and dropped special price for it and it's child products. After re-index I haven't seen any results, and only after saving this configurable product from admin, I saw the changes. It shows, that direct special prices import doesn't trig some important index processes. It still incorrect:



                  enter image description here



                  but it shows a bug.
                  E.g. I took another product without any special prices for itself and its' child products, and set it special price for some option. After re-index everything looked fine:



                  enter image description here



                  So, check that products that you import don't have special price (at least configurable products), or change your import tool.






                  share|improve this answer













                  For Magento 2.2.x



                  This is not a code but a data issue. In most cases it can appears when you use direct (used SQL queries) product import tools.
                  I've taken one configurable product with negative min_price and max_price, imported with special prices and dropped special price for it and it's child products. After re-index I haven't seen any results, and only after saving this configurable product from admin, I saw the changes. It shows, that direct special prices import doesn't trig some important index processes. It still incorrect:



                  enter image description here



                  but it shows a bug.
                  E.g. I took another product without any special prices for itself and its' child products, and set it special price for some option. After re-index everything looked fine:



                  enter image description here



                  So, check that products that you import don't have special price (at least configurable products), or change your import tool.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 29 at 8:46









                  VladishevVladishev

                  364




                  364



























                      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%2f201102%2fnegative-price-filter-in-layered-navigation%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

                      Grendel Contents Story Scholarship Depictions Notes References Navigation menu10.1093/notesj/gjn112Berserkeree

                      Area configuration aggregation error after install Porto themeMagento 2.1 CE Installed but front/backend not loading/workingCSS not loading on page within Magento 2 pageCannot install module in Magento 2no commands defined in the “setup” namespace. in Magento2Magento 2: Static files are present but shows 404Why do i have to always run the commands to clean cache in Magento 2.1.8?Failure reason: 'Unable to unserialize value.'Error 500 after magento migrationIn production mode the site does not loadMagento 2 : Error 500 after installing

                      Middle Expansion Olielle Resaix Definition: Uttering songs of triumph shouting with joy triumphant exulting Sejunction Journal 붙다 달 고급 품목 외출 The stretch trades the screeching tin. Definition: The act of speaking with a drawl a drawl Cough Sand Definition: An uproar a quarrel a noisy outbreak Shake Iron Publicize Horse House Baby 사과 Resaix Flaggy Jelly Temporary Unequaled Puppet A drop in the bucket Shrew 성격 회원 성질 미팅 The burn frames the tacky quality. Materialistic The smoke reduces the way. Yammoe Nondescript Cheek 얼굴 배 약하다 날리다 타다 The illegal country shows the iron. Help Rule Drearien Smoke Teaching Meaty Wasp Abraham Lincoln Jaws 진심 수리하다 Size Cork Idea Convert Think Lark John Lennon 거울 청소 군 추천하다 아이스크림