If you’ve encountered issues with adding variants to the cart, we’ll walk you through a fix.
Note: This fix is for older versions of Loft and it happens only if the variant's title has a quotation in the name.
- Access your themes section
- Open the Loft theme code
- Edit code
1. Access your themes section
Login to your Shopify admin, and then click “Online Store” (on the left side of the admin). This takes you to the “themes” area of your Shopify store.
Example themes section
2. Open the Loft theme code
Next, click the button that says “Actions” - followed by “Edit code” which will load the live code editor. It consists of a left hand sidebar, which lists all the files on Loft, along with a right hand code editing panel.
Shopify code editor
3. Edit code
The proper solution for this issue is to modify the opId variables in the _initMultiOpSelect function (within theme.js.liquid). The modification will make the script globally read the quotation as a string instead.
Do the following steps:
- Search for the "Assets" folder
- Open the "theme.js.liquid" file
- Go around line 1155 or hit ctrl+f(windows)/command+f(mac) on your keyboard and type the word "opId"
- You need to replace the two old opId variables with this block of code:
- Click "Save"