Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@aaronjudd
Copy link
Contributor

Resolves #846
Resolves #870

  • ReactionProduct.getProductPriceRange().priceRange updated to return
    range, min, max.
  • denormalize function updated to add price range, min, max
  • PriceRange added to product schema
  • Add filtering to the tags, as originally conceived for
    code injection, integration with reaction-filtration #743
    — allow for multiple tags in query params

The format is:

http://localhost:3000/reaction/tag/shop?price.min=100&price.max=200

regex text search of title, description:

http://localhost:3000/?query=%22Copy%2010%22

Resolves #846
Resolves #870

- ReactionProduct.getProductPriceRange().priceRange updated to return
range, min, max.
- denormalize function updated to add price range, min, max
- PriceRange added to product schema
- Add filtering to the tags, as originally conceived for
#743
— allow for multiple tags in query params

The format is:
http://localhost:3000/reaction/tag/shop?price.min=100&price.max=200
aaronjudd added 5 commits March 7, 2016 23:09
this.stop isn’t mocked, but we’ll rerun with publication later
I’m on the fence about the debug statements, they could come in handy,
but a Publications are the one thing that can really slow things down..
it’s probably a good practice to keep them as lean as possible.
@aaronjudd
Copy link
Contributor Author

This is now complete and ready for merge. All tests passing.

// set "0" if no variants in product. If all variants were removed.
const priceRange = ReactionCore.getProductPriceRange(id) || 0;
Object.assign(update, { price: priceRange });
const priceObject = ReactionCore.getProductPriceRange(id) || 0;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this won't cause an issue if this isn't an object but an integer? (if it's 0)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, agreed the defaults should be removed.

aaronjudd added 2 commits March 8, 2016 14:18
- response should be object now
sorting is actually done here: Template.productGrid.helpers

and needs to be refactored with position logic if we’re moving into
publications
aaronjudd pushed a commit that referenced this pull request Mar 8, 2016
@aaronjudd aaronjudd merged commit 438b0bc into development Mar 8, 2016
@aaronjudd aaronjudd deleted the tag-filtration branch March 8, 2016 23:20
@ramusus
Copy link
Contributor

ramusus commented Mar 9, 2016

@aaronjudd I see in this PR has many ideas and some code from this PR #743
Do you intend to implement filtration as external package? If yes I'm ready to update this package for last development and make new PR for supporting flattened schema. I was thinking to make dependancy from tmeasday:publish-counts optional or just for admins. And add some settings about visibility of filters to dashboard

And question about price range attribute - do we still need it in DB in case that we can always make it on the fly from price min and max values?

@newsiberian
Copy link
Contributor

The goal of using denormalized price range inside doc is to get speed benefit from it. getProductPriceRange is a function with a number of computations.
I suggest to think about product grid how about bottleneck of all reaction. We should do all we can to make in work smooth and fast. This is what I believe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants