coupon code php backend works, frontend js needs tweaking