Walmart can do this for you. The costs depends on the styles, brand name and the types of lenses (add-ons /coatings, sunch as UV pretection coatings, polarized lenses,tinted lenses, etc.) that you choose. But the prices are much cheaper than that of brick and mortor stores.
I haven't get sunglasses from Walmart yet.So I don't know whether they can replace the lenses for you and I don't know the price of the glasses, either. You can go to Walmart to ask the worker about the detail information.