Cannot Embed HTML Spreadshop into Wordpress site

I need help

I’m trying to embed my Spreadshirt shop into my site using the HTML code onto our band page
HOWEVER it keeps displaying this below:

var spread_shop_config = { shopName: ‘coldeclipse’, locale: ‘en_GB’, prefix: ‘ …etc

AND NOT the actual store. Can anyone help what am I doing wrong?

If you are using Wordpress with the Gutenburg editor, make sure the “block” is defined as HTML and that you are not simply pasting into a standard text area.

I did this by mistake recently and experienced exactly the same thing - I deleted what I had pasted and then changed the block type to html and pasted back in the code and it worked fine - hope this helps.

1 Like

Please post the URL so we can have a look and do check out what @User_NA-b812ab78 said :slight_smile:

Still ongoing issue. My domain is: coldeclipse.com

  • I created a page on Wordpress called “Store”
    I then copied the Spreadshirt Embed code
    Returned to my Wordpress site.
    Added a custom HTML Block
    Pasted the Spreadshirt Embed HTML and Hit return after entering it
    Clicked on Preview at the top of the custom HTML block - success
    I can see my Spreadshirt shop
    I then click Publish
    Then click view page
    and STILL get an error where my shop doesn’t display.
    Please see below:

I need your HELP. Why can I view it fine in Preview but its still not viewable on my site “Store” page

for some reason single quotes on your code converted to html special characters
The easy solution suggested by me to convert single quotes to double quotes
Your store code will be like this

<div id="myShop">
    <a href="https://shop.spreadshirt.co.uk/coldeclipse">coldeclipse</a>
</div>

<script>
    var spread_shop_config = {
        shopName: "coldeclipse",
        locale: "en_GB",
        prefix: "https://shop.spreadshirt.co.uk",
        baseId: "myShop"
    };
</script>

<script type="text/javascript"
        src="https://shop.spreadshirt.co.uk/shopfiles/shopclient/shopclient.nocache.js">
</script>

Thanks for replying.

I still have the same issue.
I copied your HTML

Replaced the existing HTML in Block editor. I can Preview fine but when I visit the page same error.
Added to classic editor under text section next. Still same issue. When I click Preview it works but then when I visit the page same error.

What can I do to resolve. Its a little bit frustrating.

Are you using the block editor? There you can define the type of the block to “code”.

Or if you don’t have any coding experience then we recommend you use the Spreadshop Wordpress plugin. But if choose the the Plugin route you have to set the block to “Shortcode” and add the related shortcode there!

Generally this is definitely the solution we propose!

Last alternative:

installing the Classic WP Editor as a plugin

and paste the JS code

@theblackrifles
Try this
When you copy the code, paste it into a text editor, for example Notepad, then copy it again and paste it into WordPress.

I was using the Block editor option. Had semi success with Custom HTML and not the code option. Will try Code option now and see what results are. All I want is a copy and paste code to work. So shouldn’t need coding to copy and paste. Should be straightforward no?

BTW I’m on a Mac not Windows machine.

Still no luck with Block Editor using “CODE”

Why can I preview it when I use HTML option but then when I view published page it NEVER loads. Surely there is something wrong with the way Wordpress/Spreadshirt deliver/embed the code. Thanks for all your help to no avail?

See attachment

Figured it out. WORDPRESS Blocks you from linking a store for e-commerce if you don’t pay for a business account. So even if you pay monthly for a personal account they require a business account and not a personal one.

May move to Wix or someone out there who allows you to run html without having to upgrade and pay £20 a month.

Hey there!
I have one guess and one tip.
Guess 1) you are using Wordpress.com instead of the free version Wordpress.org.
Make sure to switch to wordpress.org. This is fully functional and provide you with everything you need to get your own website started. And yes, it’s free. :slight_smile:

Tip:
If you have problems with embedding the shop script by using the in-built Gutenberg Editor, you can simply use our Spreadshop Wordpress Plugin
Or download the following “Classic Editor” plugin from Wordpress.
This will install the former page editor and you can simply add the shop js. script to any page.

Hey Thomas. As I already have built our site into Wordpress.com plus linked to our .com domain is it possible to migrate all of these easily to Wordpress.org? So I can use the embed feature?

How I understand your approach, the choice of which Content Management System you are going to use is not a blocker.
Simply set up your new domain and website on the wordpress.org and make sure to embedd the shop as usual.
Lastly set your redict (in the shopadmin) to that new URL if needed. Or if the URL does not change, leave it as it is.
The shop only needs to know where it should be loaded. Not which CMS you are using. :slight_smile:

Good luck!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.