Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #764866

    Hi there,
    I am trying to embed a t-shirt designer via javascript into my website. It works fine but always shows up at the bottom of the page, currently the code block should be the first item to see, followed by some text and the fotter, any ideas how to solve it?
    page: http://www.kleidung-gestalten.de/frauen-kleidung-gestalten/
    code: in private content or via source code
    Thanks!

    #766652

    Hey excel-indianer,

    Can you give us the full code that you’re using or give us temporary admin access to your website in the private content box below, so that we can have a closer look.

    Best regards,
    Victoria

    #766728

    Hi Victoria,
    Thanks. Full code and admin login in the private content.
    BR
    Michael

    #767924

    Hi,

    You need to add baseId parameter and then create a div container with an id attribute based on the value of the parameter. I implemented it in a test page but it’s not working properly so I think there’s a missing parameter. Could you please provide the login details to the spreadshirt site so that we can access the documentation?

    // https://help.spreadshirt.com/hc/en-us/articles/207487815-Website-integration-with-JavaScript

    Best regards,
    Ismael

    #767995

    Hi Ismael,
    further information and documentation can be found here: http://spreadshirt.github.io/apps/tablomat (this is where I got the code). I could as well provide you access to my account but I do not think there is something to change here, if you still think it is necessary, please let me know. Thanks.
    Best regards,
    Michael

    #769192

    Hey!

    Thank you for the info. Please add the “target” parameter.

    target: document.getElementById("someDiv"),
    

    “someDiv” is going to be the container.

    <div id="someDiv"></div>
    

    Regards,
    Ismael

    #769458

    Dear Ismael,

    Thanks for the reply, I still do not get it (sorry!). Try to use following code in the code block, but nothing shows up, example on http://www.kleidung-gestalten.de/frauen-kleidung-gestalten/

    <div id=”someDiv”></div>
    <script type=”text/javascript” src=”//spreadshirt.github.io/apps/spreadshirt.min.js”></script>
    <script type=”text/javascript”>
    spreadshirt.create(“tablomat”, {
    shopId: 1073659, // your shop id
    platform: “EU” // or NA
    target: document.getElementById(“someDiv”),
    }, function(err, app) {

    if (err) {
    // something went wrong
    console.log(err);
    } else {
    // cool I can control the application (see below)
    app.setProductTypeId(6);
    }
    });
    </script>

    #769726

    Hi!

    There’s a missing “comma” after the “platform” parameter. You can find a working example in the following test page.

    // http://www.kleidung-gestalten.de/t-shirt-script/

    Regards,
    Ismael

    #770620

    Sometimes the small things in life make the difference ;-) Great! Thanks a lot.

    #770652

    Hi,
    Glad Ismael was able to help, we will close this now. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Javascript Code Block always at the bottom’ is closed to new replies.