Embedding a Ecwid store

Hello,
I’m a new user of Write.as. I’ve been trying to embed a store I got on Ecwid but haven’t gotten it to work. I don’t know if I’m doing something wrong or if it isn’t possible, but if someone can let me know I would be thankful!

Here’s a link to what the embed code looks like: https://support.ecwid.com/hc/en-us/articles/115004678945-Ecwid-for-any-website#adding-ecwid-store-to-any-custom-built-website-0-1

Hi @Peter! This is possible but you’ll need a Pro subscription to accomplish this so we can access Custom JavaScript for your blog.

So we need to break down the embed code in a couple of steps. So first you have the embed code they gave you. This is an example embed from the link:

<div id="my-store-1003"></div>
<div>
<script data-cfasync="false" type="text/javascript" src="https://app.ecwid.com/script.js?1003&data_platform=code" charset="utf-8"></script><script type="text/javascript"> xProductBrowser("id=my-store-1003");</script>
</div>

Go to the Customize page of your blog and scroll down to “Custom JavaScript.” Take the src link & code below that and add it to the Custom JS like so (make sure to swap out the store id with your own in the src link and code):

// src: https://app.ecwid.com/script.js?1003&data_platform=code

xProductBrowser("id=my-store-1003");

Once that is added you can save the changes. After this you can go to the post you want your embed to be and add the top HTML code in like so:

# Fake Title

<div id="my-store-1003"></div>

Once you save this should do the trick.

Let me know if that works for you. Might have to do some other things to get it working but should be doable.

Thanks for the help! I tried it out but it didn’t work yet. Nothing showed up. Do you happen to have any ideas of any other way to do it?