Added JS code to promotions to reduce the need for multiple unnecessary queries