I have a problem with the buy button code of Shopify

Here is what I did:

To get around the 5,000 character limit for the new shopify code, you’ll need to:

  1. copy your shopify embed code from shopify
  2. paste it into something like notepad, textedit or pastebin.com
  3. now cut (CMD + X or CTRL + X) all of the code between the tags
  4. go to http://www.minifier.org/ and paste your code in there
  5. click on minify
  6. copy that new compressed code
  7. paste that code back in between the tags inside of your notepad, textedit or pastebin.com
  8. copy all of that code and paste that into your Webflow embed component

basically you’re removing the unneeded spaces that shopify adds to the code.

NEXT…

do a CMD + F or CTRL + F in your browser to find id: and replace the ID with the ID dynamic field

on the same line, change the getElementById('') with the name dynamic field:

lastly (phew), change the div ID in the first line to the name dynamic field:

1 Like