I think you should be doing this with Liquid. It was made for that. You want the speed of server-side data generation for optimal user experience. Using Javascript like you are is just asking for a slow shop, and lots of troubles. Just my two cents, your mileage may vary of course.
↧