Islamic Ruling on Selling Items Inside the Mosque
It is makrooh to sell any items inside the mosque, but selling them outside the mosque is allowed.

Islamic scholars explain that buying and selling inside the mosque is not allowed. The Prophet Muhammad ﷺ said that if you see someone doing business in the mosque, you should say, “May Allah not give profit to your trade.” If someone brings coconuts or any other items from home and gives them as a gift to the mosque, they may be sold, but only outside the mosque. Selling inside the mosque is makrooh. According to the Shafi’i texts, business inside the mosque is not permitted, while selling in the areas outside the mosque is allowed if it does not harm the people of the mosque. This fatwa clearly states that selling must be done outside.
The short URL of the present article is: https://english.fikrokhabar.com/uorr