Can multiple buy buttons be stored in one JavaScript file?

Hi all,

I am currently writing some blogs on my shopify website, and I have been including buy buttons, but the number of them are growing drastically as I am using the blog as a way to showcase different products. I fear that the blog will load slowly as I am nearing 20+ buy buttons.

Is it possible to have all these buy button scripts in a separate JavaScript file that I can keep in my Assets folder, and then simply link to them? Something like ? Can I have multiple buy buttons in this one file, or do they all need there own individual .js files.

Thanks!

Hi @Jonathan_ezApps ,

Are you trying to load buy buttons with ajax?

Please send your site and if your site is password protected, please send me the password. I will check it.