You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Price sub-collection should maybe not be a sub collection.
Is your feature request related to a problem? Please describe.
Use case : I've 1000 products in my stores and want to display them 20 by 20.
So I do a pagination system and fetch first 20 items with some filters and where conditions. As price are inside a sub-collection I should do 20 others reads to get prices.
Is this a good practice ? And also how to fetch and order by price / promotion?
I saw this issue #79 It was closed because "most SaaS offerings have less than five tiers (products) and rather want to be able to filter & sort prices, so I think the current sub-collection setup serves them well" and "... [price could] have lots of pricing options that will need to be filtered (like lots of currencies, perhaps),".
Feel like it's a bit light as technical justification, maybe they is a more technical reasons behind that and I would like to know more if possible.
With your knowledge today, is it still good practice to have this sub-collection ?
Having prices inside the main collection doesn't make above Saas example impossible and it simplify it and reduce read costs.
Having this change could help e-commerce apps.
Maybe I miss something, if so please explain :) !
Describe the solution you'd like
Merge price sub-collection into main collection.
Describe alternatives you've considered
Actually i fetch products and then fetch price. I'm little sad about the double reads.
Additional context
E-commerce apps.
The text was updated successfully, but these errors were encountered:
EArminjon
changed the title
[Price inside main collection] Price sub collection is really a good practice ?
[Prices] Price sub collection is really a good practice ?
May 27, 2024
EArminjon
changed the title
[Prices] Price sub collection is really a good practice ?
Price sub collection is really a good practice ?
May 30, 2024
This is a good format because it makes it more flexible if you ever want to make pricing changes. Often it's a good idea to fetch a product, then display all the ways to pay for it.
If it's not good in your situation, did you consider using a collectionGroup so you can query prices directly?
Feature request
Price sub-collection should maybe not be a sub collection.
Is your feature request related to a problem? Please describe.
Use case : I've 1000 products in my stores and want to display them 20 by 20.
So I do a pagination system and fetch first 20 items with some filters and where conditions. As price are inside a sub-collection I should do 20 others reads to get prices.
Is this a good practice ? And also how to fetch and order by price / promotion?
I saw this issue #79 It was closed because "most SaaS offerings have less than five tiers (products) and rather want to be able to filter & sort prices, so I think the current sub-collection setup serves them well" and "... [price could] have lots of pricing options that will need to be filtered (like lots of currencies, perhaps),".
Feel like it's a bit light as technical justification, maybe they is a more technical reasons behind that and I would like to know more if possible.
With your knowledge today, is it still good practice to have this sub-collection ?
Maybe I miss something, if so please explain :) !
Describe the solution you'd like
Merge price sub-collection into main collection.
Describe alternatives you've considered
Actually i fetch products and then fetch price. I'm little sad about the double reads.
Additional context
E-commerce apps.
The text was updated successfully, but these errors were encountered: