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.
do you use the storefront API or the administration API?
I am new to shopware, with API I dont understand what do you mean. I have read product entity via DAL.
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.
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.