XF 1.5 SpreadShirt Integration [Solved]

Hello,

Soo... Yesterday I started to play around with adding a shop(SpreadShirt) to our forum, to sell some t-shirts with our design. Adding the shop link was a straight forward process, I just edited the navigation file in templates. But then I thought it would be cool to integrate the shop directly into the website.

The good people at speadshirt have added some integration code, which is a js script:
Code:
<div id="myshop"></div>

<script>
    var spread_shop_config= {
        "shopName" : "SugarBombed Shop",
        "locale" : "en_US",
        "prefix" : "//shop.spreadshirt.com",
        "baseId" : "100050964"
};
</script>
<script type="text/javascript" src="//shop.spreadshirt.com/shopfiles/shopclient/shopclient.nocache.js"></script>

So my question is how to integrate the shop in a way so that when a user chooses the "Shop" from the navigation tab the shop opens within the page. Instead of the tab going to a Forum or Sub-Forum(or the shop itself outside the Forum) it would just open and show the div with shop.

I've been experimenting myself, but if someone knows how to do already do this it would be super awesome :D

PS. I've been searching the forums and found a thread talking about integration, but the only thing that thread told me was that it's possible and people have already done it with no actual pointers towards how to do it.
 
I'm not sure about the request but do you want a tab as :
f24295ab5a.png

If so, a simple addon can easily enable you to do it.
 
I've added Spreadshirt to my site. I did the following:

  1. Create a page node (which you can choose to display or not in the forum list, I've chosen to display mine)
  2. Add the code from the Spreadshirt shop to the page node (not the one you have I don't think, there should be another one for embedding the shop that they provide. Note I am still using the old style shop, there's now a new one which I'll get around to changing at some stage)
  3. Use Nodes as Tabs add-on to add a link to the page node in the navigation bar (mine is a sublink but you can have it as a main link)

That's it.

You can check out the shop on my site if you want to see it in action: http://www.seniorgamers.net/pages/shop/
 
I've added Spreadshirt to my site. I did the following:

  1. Create a page node (which you can choose to display or not in the forum list, I've chosen to display mine)
  2. Add the code from the Spreadshirt shop to the page node (not the one you have I don't think, there should be another one for embedding the shop that they provide. Note I am still using the old style shop, there's now a new one which I'll get around to changing at some stage)
  3. Use Nodes as Tabs add-on to add a link to the page node in the navigation bar (mine is a sublink but you can have it as a main link)

That's it.

You can check out the shop on my site if you want to see it in action: http://www.seniorgamers.net/pages/shop/
OMG! Thanks :D That was super easy! Already have the shop running on our beta site!

And yeah the code was an old version used the new one and it worked right away!

Thanks for the answers.

A mod or admin can close the thread as the answer above gave the complete and working solution to my question :D
 
I've added Spreadshirt to my site.
Already have the shop running on our beta site!

Anyone else using Spreadshirt embedded into an XF page? Has it also stopped working for you?

I'm using HTML with JS, as detailed above using a PAGE node. The HTML/JS is as listed on the Spreadshirt website too as their instructions for embedding. This used to work, until recently. I'm thinking a bug/change introduced into XF 1.5.15

When you access your page node URL (eg. /pages/shop/ ) as soon as the JS loads, your automatically redirected to your site home page with a URL of /#!/

@Martok I see yours has stopped working with the same experience on your site too.
 
@Mouth thanks for the heads-up, I hadn't noticed the issue.

I've checked my Spreadshirt embed code and it's the same as they are saying to use, so that's not changed. I've also checked with a completely unedited default style with all add-ons disabled and the problem still occurs.
 
@Mouth I've just put the Spreadshirt code into a default local copy of XenForo which is running version 1.5.11 (released November 2016) and the issue persists there. I think we'd have noticed the shop broken on our sites well before this if it was a XenForo issue. I'd guess then that Spreadshirt have done something that's causing the embed now not to work.
 
@Mouth I've just put the Spreadshirt code into a default local copy of XenForo which is running version 1.5.11 (released November 2016) and the issue persists there. I think we'd have noticed the shop broken on our sites well before this if it was a XenForo issue. I'd guess then that Spreadshirt have done something that's causing the embed now not to work.
Thanks, great testing too.
I've contacted Spreadshirt and told them of the issue and experience. Hope to heard back from them soon.
 
Top Bottom