Better managing lots of product variants for storefront & admin-ui #5004
Unanswered
pepijn-vanvlaanderen
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wanted to open a discussion around the Product Variants. At the moment the storefront NextJs Medusa Starter provides a way to handle this already. It pulls in the product and its variants and then loops over the options to expose them as select options on the product detail page. Also the Admin UI loads all the product variants as well on the Product Detail Edit page.
In a theoretical scenario where you can have lots of variants. Let's say you have a Product with the following options width x height x color, where for example there are 10 different widths, 6 different heights and 8 colors. This already will result into 10 * 6 * 8 = 480 Product Variants. This can quickly increase if you have more options.
I think it is probably not desirable to have the storefront and Admin UI product endpoint query all those different variants. Currently all variants are loaded and not paginated, which can result in a bulky response. So I was wondering if any other solution will be implemented in the future to handle such a scenario.
Current workarounds I see:
Beta Was this translation helpful? Give feedback.
All reactions