v1 to v2 Migration Guide

You're currently running our Online Sizing v1 widget? Great! We're glad to welcome a long time customer.

This guide shows you how to uninstall v1 and install v2. Let's get started!

Step 1: Remove onlineSizer config

Somewhere in your page you defined the onlineSizer config object which looks something like this:

{
api: {
username: "test",
password: "xxx"
},
bikeName: "E-Scale 720",
widgetUrl: "https://testing.onlinesizer.de/xhr-onlinesizer.html",
code: "7613368093183",
bikeImageUrl: "https://dummyimage.com/600x400/f5f5f5/d1d1d1"
}

You can remove that – but maybe copy paste it somewhere to pick parts from it in future steps.

tip

If you defined callback functions to i.e. select the frame size after the widget closes, you can keep those in place and continue to use them.

Step 2: Remove scripts

If you added jQuery to your shop back then just for Online Sizing, you can go ahead and safely remove that:

<!-- Remove this if it's only used by Online Sizing -->
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>

Then there's the actual onlinesizer.js script which can be safely removed as well:

<script src="https://[YOUR-ID].onlinesizer.de/assets/js/onlinesizer.js"></script>

Step 3: Remove HTML elements

Now you can go ahead and delete the last missing pieces of HTML from your product page related to OZ v1:

<!-- This is the element which will be populated with the onlineSizer HTML markup -->
<div class="smartfit-onlinesizing" id="onlinesizer-target"></div>
<!-- This is the button to show the onlineSizer after successful initialization -->
<button id="trigger-onlineSizer">Find your size</button>

You can keep the button if you like – we can use that for the new version of Online Sizing.

Step 4: Install the new widget

Now that you've uninstalled v1 you can follow our new Getting Started Guide to setup v2 🎉.