Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add new site preference for indexing out-of-stock products #218
base: develop
Are you sure you want to change the base?
feat: add new site preference for indexing out-of-stock products #218
Changes from 25 commits
1b3ddc4
fd6f0aa
a003010
edcd392
deeddea
3ce475d
225e26d
2ef8208
00b71c7
135082f
48cd8ab
ace7106
09aff99
50341fd
2f3185e
ad7ea14
437ccb3
c411c27
648ad10
dfe7048
5336413
064e74a
b4cab2b
663304d
07e9442
d05b4fa
921e61c
626cb02
13c9a33
d702d6f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can't work! As I explained in #218 (comment) your filtering function differs from the logic in
algoliaLocalizedProduct.js
You had improved the logic yourself in #217 to take into account master products!
For master products, your
isInStock
function ALWAYS returnsfalse
The consequence is that you ALWAYS end up in the
else
condition whereindexName
is not defined...So here is what you would have seen if you had just run the delta job one time:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really sorry for the back-and-forths and taking your time unnecessarily with these type errors. I will be more careful before requesting your review, and for each PR, I will create detailed test scenarios. Hopefully, it is working now. I also added my test scenarios; there is only two scenarios (similar) that we can think about, but I believe we can ignore them.
Please let me know what you think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks ok, but this part of the code is only run when the job is in variant-level mode AND there are no attributes computed from the base product.
When there are attributes computed from the base product such as
colorVariations
, we don't pass here, we enter in theif (paramRecordModel === MASTER_LEVEL || attributesComputedFromBaseProduct.length > 0) {
condition above.So the logic needs to be updated above too.