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;
I'm experiencing a strange issue here where the price navigation filter (layered navigation) somehow came up with negative price ranges.

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...

Help please!!
price layered-navigation
add a comment |
I'm experiencing a strange issue here where the price navigation filter (layered navigation) somehow came up with negative price ranges.

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...

Help please!!
price layered-navigation
magento 1 or 2? custom layered navigation or default? etc
– CompactCode
Mar 18 '18 at 12:18
add a comment |
I'm experiencing a strange issue here where the price navigation filter (layered navigation) somehow came up with negative price ranges.

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...

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

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...

Help please!!
price layered-navigation
price layered-navigation
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
add a comment |
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
add a comment |
2 Answers
2
active
oldest
votes
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'
]
);
add a comment |
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:

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:

So, check that products that you import don't have special price (at least configurable products), or change your import tool.
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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'
]
);
add a comment |
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'
]
);
add a comment |
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'
]
);
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'
]
);
answered Aug 21 '18 at 11:56
vladPavlovvladPavlov
3592514
3592514
add a comment |
add a comment |
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:

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:

So, check that products that you import don't have special price (at least configurable products), or change your import tool.
add a comment |
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:

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:

So, check that products that you import don't have special price (at least configurable products), or change your import tool.
add a comment |
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:

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:

So, check that products that you import don't have special price (at least configurable products), or change your import tool.
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:

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:

So, check that products that you import don't have special price (at least configurable products), or change your import tool.
answered Mar 29 at 8:46
VladishevVladishev
364
364
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
magento 1 or 2? custom layered navigation or default? etc
– CompactCode
Mar 18 '18 at 12:18