# How to get list of product variants

**URL:** <https://forum.shopware.com/t/how-to-get-list-of-product-variants/93729>\
**Category:** Programming (EN)\
**Created:** [30. März 2022 um 14:46 UTC](https://forum.shopware.com/t/how-to-get-list-of-product-variants/93729 "2022-03-30T14:46:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![euroxid](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/euroxid/32/15105_2.png) [@euroxid](https://forum.shopware.com/u/euroxid)\
**Post date:** [30. März 2022 um 14:46 UTC](https://forum.shopware.com/t/how-to-get-list-of-product-variants/93729/1 "2022-03-30T14:46:35Z")

</div>

Within a plugin, when handling a product object (ProductEntity), how can I get a list of its variants?  
getOption(), getVariation() etc. return all null.

---

<div class="post-metadata">

**Author:** ![ralfh](https://avatars.discourse-cdn.com/v4/letter/r/ee7513/32.png) [@ralfh](https://forum.shopware.com/u/ralfh)\
**Post date:** [27. Juli 2022 um 13:43 UTC](https://forum.shopware.com/t/how-to-get-list-of-product-variants/93729/2 "2022-07-27T13:43:59Z")

</div>

I’m looking for the same. Have you found a solution?

---

<div class="post-metadata">

**Author:** ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)\
**Post date:** [5. August 2022 um 10:53 UTC](https://forum.shopware.com/t/how-to-get-list-of-product-variants/93729/3 "2022-08-05T10:53:15Z")

</div>

productRepository, then search for parentId = products’s id.

---

<div class="post-metadata">

**Author:** ![ralfh](https://avatars.discourse-cdn.com/v4/letter/r/ee7513/32.png) [@ralfh](https://forum.shopware.com/u/ralfh)\
**Post date:** [5. August 2022 um 11:16 UTC](https://forum.shopware.com/t/how-to-get-list-of-product-variants/93729/4 "2022-08-05T11:16:31Z")

</div>

thanks, exactly what I have done meantime
