Is it expensive ?If yes ,take it to the place where you bought and ask if they can repair it . Otherwise just get yourself a new pair . The repaired sunglasses can be uncomfortable to wear and look a little weird ,I guess.
I think if there is crck on the lens of your sunglasses, it will affect your vision to some degree. They can't protect your eyes from harmful UV rays. You'd better throw them away and buy a pair of new sunglasses. The sunglasses sold online are much cheaper than that sold in any physical shops. So you can have a look first. Good luck!
Maybe you can ask the optician to replace the lenses for you. A crck means the glasses was broken. And it is different from scratches on lenses so that there is no way to get rid of them except replace the lens.
You can take your sunglasses to any eyeglasses stores to see whether they can fix your sunglasses or not. If they can't do that for you, you can buy a pair of new sunglasses on this website. http://www.firmoo.com/wrap-around-rx-sunglasses.html I know that all the sunglasses sold on this website are with UV protection. If you don't believe it, you can consult the customer services online. Hope this helped!