Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) relates: The Prophet (peace and blessings be upon him) was delivering the sermon on Friday when Dihyah bin Khalifah arrived (at the market) to sell his goods. The people who were in the mosque left, and only a few remained, while the Prophet (peace and blessings be upon him) was standing (delivering the sermon). So Allah Almighty revealed this verse: "And when they saw some trade or amusement, they rushed off to it and left you standing."
Al-Bazzar recorded it from his teacher Abdullah bin Shabib, who is da'if (weak).
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب التفسير / 11419