#2585 - Making variable price JS logic more isolated