fix js on purchase views