1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 SpreadShirt Integration [Solved]

Discussion in 'XenForo Questions and Support' started by DarkKitarist, Apr 1, 2016.

  1. DarkKitarist

    DarkKitarist Member


    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:
    <div id="myshop"></div>
        var spread_shop_config= {
            "shopName" : "SugarBombed Shop",
            "locale" : "en_US",
            "prefix" : "//shop.spreadshirt.com",
            "baseId" : "100050964"
    <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.
  2. Evaelis

    Evaelis Member

    I'm not sure about the request but do you want a tab as :
    If so, a simple addon can easily enable you to do it.
    DarkKitarist likes this.
  3. DarkKitarist

    DarkKitarist Member

    Well a simple addon is a great idea. Yeah I already added a tab, which currently just opens a new page and the shop on spreadshirt.com.

    What's the addon called?
  4. Martok

    Martok Well-Known Member

    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/
    DarkKitarist likes this.
  5. DarkKitarist

    DarkKitarist Member

    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

Share This Page