# How to get the calculated listing price?

**URL:** <https://forum.shopware.com/t/how-to-get-the-calculated-listing-price/63186>\
**Category:** Programmierung\
**Created:** [26. November 2019 um 11:03 UTC](https://forum.shopware.com/t/how-to-get-the-calculated-listing-price/63186 "2019-11-26T11:03:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sameenq](https://avatars.discourse-cdn.com/v4/letter/s/b19c9b/32.png) [@sameenq](https://forum.shopware.com/u/sameenq)\
**Post date:** [26. November 2019 um 11:03 UTC](https://forum.shopware.com/t/how-to-get-the-calculated-listing-price/63186/1 "2019-11-26T11:03:11Z")

</div>

Hello,

I have created a command for exporting product details, for that I need product prices. The problem is, if I fetch price from the product entity , it will return all the listing price. I only need the price which is displayed in the storefront. Any suggestion or help is much appreciated.

Thanks.

---

<div class="post-metadata">

**Author:** ![Krispin](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/krispin/32/12849_2.png) [@Krispin](https://forum.shopware.com/u/Krispin)\
**Post date:** [26. November 2019 um 13:15 UTC](https://forum.shopware.com/t/how-to-get-the-calculated-listing-price/63186/2 "2019-11-26T13:15:57Z")

</div>

Hi sameenq,

do you use the storefront API or the administration API?

Best Regards,

Krispin

---

<div class="post-metadata">

**Author:** ![sameenq](https://avatars.discourse-cdn.com/v4/letter/s/b19c9b/32.png) [@sameenq](https://forum.shopware.com/u/sameenq)\
**Post date:** [26. November 2019 um 13:22 UTC](https://forum.shopware.com/t/how-to-get-the-calculated-listing-price/63186/3 "2019-11-26T13:22:31Z")

</div>

Hi Krispin,

I am new to shopware, with API I dont understand what do you mean. I have read product entity via DAL.

Kind Regards,

Sameen

---

<div class="post-metadata">

**Author:** ![Krispin](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/krispin/32/12849_2.png) [@Krispin](https://forum.shopware.com/u/Krispin)\
**Post date:** [26. November 2019 um 14:16 UTC](https://forum.shopware.com/t/how-to-get-the-calculated-listing-price/63186/4 "2019-11-26T14:16:04Z")

</div>

Hi sameenq,

the shown price in the storefront depends on the price rules and the graduation of the product.  
If you want the product prices from a explicit storefront, may you can use the ProductSearchGateway.

Best Regards,

Krispin

---

<div class="post-metadata">

**Author:** ![sameenq](https://avatars.discourse-cdn.com/v4/letter/s/b19c9b/32.png) [@sameenq](https://forum.shopware.com/u/sameenq)\
**Post date:** [2. Dezember 2019 um 09:09 UTC](https://forum.shopware.com/t/how-to-get-the-calculated-listing-price/63186/5 "2019-12-02T09:09:57Z")

</div>

Hi Krispin,

Thank you for your reply.

In order to use the ProductSearchGateway, I need SalesChannelContext . I dont have access to the SalesChannelContext as I am executing a commad. Is there any way to create SalesChannelContext? Please correct me if I understand something wrong.

Regards,

Sameen

&nbsp;
