Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Buy button says 'Code Removed'


AriSquare

Question

Hi, 

I really hope somebody can help me fix this issue. I added a Shopify Buy button on my website and it showed and worked fine. No it shows 'code removed'. I re-inserted it, doesn't help. I have now idea why the code stopped working. 

Anybody has or had the same issue? 

Link to comment
  • Answers 5
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

Posted Images

5 answers to this question

Recommended Posts

  • 0

It sounds like you may have added the code during the free trial and then signed up for a Personal Plan. Is that right?

Personal Plans are not suitable for selling because they don’t allow code.

If you are on a Personal Plan you will need to upgrade to a Business Plan. 

sf-digital-signature-logo-email145.png.46606a2288a2847f44d81b9b7b58f3a5.png
Hi! I'm Paul, an independent Squarespace Consultant since 2007 and founder of SF Digital, building the features that Squarespace didn't include. Our mini-extensions allow you to pick dates in any format, show prices in other currencies, take orders without payment or improve your cartI value honesty, integrity, transparency and respect . Links in my posts may refer to SF Digital products or may be affiliate links.

Link to comment
  • 0
3 hours ago, AriSquare said:

Hi, 

I really hope somebody can help me fix this issue. I added a Shopify Buy button on my website and it showed and worked fine. No it shows 'code removed'. I re-inserted it, doesn't help. I have now idea why the code stopped working. 

Anybody has or had the same issue? 

Sharing your site with the protected password could help us to check your issue more easily.

Site-wide passwords – Squarespace Help

Greeting, it's BaNgan from BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Youtube Gallery for Squarespace
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment
  • 0

Hello! I am also having the same issue. Is this a new problem? I signed up for Shopify to see if I could make it work with my Squarespace site, but everything I try just says "code removed". Please let me know how to fix this. Thank you!

Link to comment
  • 0

@bangank36

Thanks for responding! I put my site live so you can acces it > https://www.brutdeboerchampagne.nl/

The page with the buy button is question is > https://www.brutdeboerchampagne.nl/defles

But as said I only see 'Code Removed' (Code verwijderd in Dutch, see screenshot) in Squarespace editing.

 

The code I got from Shopify and which previously worked is: 

<div id='product-component-1634794249983'></div>
<script type="text/javascript">
/*<![CDATA[*/
(function () {
  var scriptURL = 'https://sdks.shopifycdn.com/buy-button/latest/buy-button-storefront.min.js';
  if (window.ShopifyBuy) {
    if (window.ShopifyBuy.UI) {
      ShopifyBuyInit();
    } else {
      loadScript();
    }
  } else {
    loadScript();
  }
  function loadScript() {
    var script = document.createElement('script');
    script.async = true;
    script.src = scriptURL;
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(script);
    script.onload = ShopifyBuyInit;
  }
  function ShopifyBuyInit() {
    var client = ShopifyBuy.buildClient({
      domain: 'brutdeboer.myshopify.com',
      storefrontAccessToken: '512582b2c550edbec7fc49129d1a28fb',
    });
    ShopifyBuy.UI.onReady(client).then(function (ui) {
      ui.createComponent('product', {
        id: '7330218049768',
        node: document.getElementById('product-component-1634794249983'),
        moneyFormat: '%E2%82%AC%7B%7Bamount_with_comma_separator%7D%7D',
        options: {
  "product": {
    "styles": {
      "product": {
        "@media (min-width: 601px)": {
          "max-width": "100%",
          "margin-left": "0",
          "margin-bottom": "50px"
        },
        "text-align": "left"
      },
      "title": {
        "font-family": "Montserrat, sans-serif",
        "font-size": "26px",
        "color": "#fcf9f9"
      },
      "button": {
        "font-family": "Montserrat, sans-serif",
        ":hover": {
          "background-color": "#d75961"
        },
        "background-color": "#ef636c",
        ":focus": {
          "background-color": "#d75961"
        },
        "border-radius": "0px"
      },
      "price": {
        "font-family": "Lato, sans-serif",
        "font-size": "18px",
        "color": "#fdfcfc"
      },
      "compareAt": {
        "font-family": "Lato, sans-serif",
        "font-size": "15.299999999999999px",
        "color": "#fdfcfc"
      },
      "unitPrice": {
        "font-family": "Lato, sans-serif",
        "font-size": "15.299999999999999px",
        "color": "#fdfcfc"
      },
      "description": {
        "font-family": "Lato, sans-serif",
        "color": "#fdfafa"
      }
    },
    "buttonDestination": "checkout",
    "layout": "horizontal",
    "contents": {
      "img": false,
      "imgWithCarousel": true,
      "button": false,
      "buttonWithQuantity": true,
      "description": true
    },
    "width": "100%",
    "text": {
      "button": "Pre order nu."
    },
    "googleFonts": [
      "Montserrat",
      "Lato"
    ]
  },
  "productSet": {
    "styles": {
      "products": {
        "@media (min-width: 601px)": {
          "margin-left": "-20px"
        }
      }
    }
  },
  "modalProduct": {
    "contents": {
      "img": false,
      "imgWithCarousel": true,
      "button": false,
      "buttonWithQuantity": true
    },
    "styles": {
      "product": {
        "@media (min-width: 601px)": {
          "max-width": "100%",
          "margin-left": "0px",
          "margin-bottom": "0px"
        }
      },
      "button": {
        "font-family": "Montserrat, sans-serif",
        ":hover": {
          "background-color": "#d75961"
        },
        "background-color": "#ef636c",
        ":focus": {
          "background-color": "#d75961"
        },
        "border-radius": "0px"
      },
      "title": {
        "font-family": "Helvetica Neue, sans-serif",
        "font-weight": "bold",
        "font-size": "26px",
        "color": "#4c4c4c"
      },
      "price": {
        "font-family": "Helvetica Neue, sans-serif",
        "font-weight": "normal",
        "font-size": "18px",
        "color": "#4c4c4c"
      },
      "compareAt": {
        "font-family": "Helvetica Neue, sans-serif",
        "font-weight": "normal",
        "font-size": "15.299999999999999px",
        "color": "#4c4c4c"
      },
      "unitPrice": {
        "font-family": "Helvetica Neue, sans-serif",
        "font-weight": "normal",
        "font-size": "15.299999999999999px",
        "color": "#4c4c4c"
      },
      "description": {
        "font-family": "Helvetica Neue, sans-serif",
        "font-weight": "normal",
        "font-size": "14px",
        "color": "#4c4c4c"
      }
    },
    "googleFonts": [
      "Montserrat"
    ],
    "text": {
      "button": "Add to cart"
    }
  },
  "option": {},
  "cart": {
    "styles": {
      "button": {
        "font-family": "Montserrat, sans-serif",
        ":hover": {
          "background-color": "#d75961"
        },
        "background-color": "#ef636c",
        ":focus": {
          "background-color": "#d75961"
        },
        "border-radius": "0px"
      }
    },
    "text": {
      "total": "Subtotal",
      "button": "Checkout"
    },
    "googleFonts": [
      "Montserrat"
    ]
  },
  "toggle": {
    "styles": {
      "toggle": {
        "font-family": "Montserrat, sans-serif",
        "background-color": "#ef636c",
        ":hover": {
          "background-color": "#d75961"
        },
        ":focus": {
          "background-color": "#d75961"
        }
      }
    },
    "googleFonts": [
      "Montserrat"
    ]
  }
},
      });
    });
  }
})();
/*]]>*/
</script>

269339661_ScreenShot2021-10-21at07_28_17.thumb.png.dfed4ed05dadea506162c8e9466dd7f2.png

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...