We have built a JS config file that is a collection of items that make up a completed product. This file is included into the AddItem JS file. Each item has to have Variant ID, but since we have multiple sites, that Variant ID changes from site to site. I want to use SKU to simplify across all sites when building the JS config file.
Is there a way to convert SKU to Product ID just before submitting the cart.push command in the AddItem JS file?
I was thinking that we could query a collection and get the Variant ID based on the SKU. Then assign the Variant ID in the cart.push instead of the SKU.
Any thoughts on this?