FitPhoto Developer Documentation

Quick start

User guides

Integration

First, install between <head> the FitPhoto Javascript library using your CustomerID :
<script src="http://fitphoto.youarethemodel.com/js/CustomerID/FitPhoto.js"></script>
* Refer to FittingBox Team to know your CustomerID, otherwise you can use demo for your tests.
Place a <div> tag identified by a uniq id into the <body> :
<div id="myFitPhoto"></div>
Then, call Fb.FitPhoto.GetInstance method to set your FitPhoto into #myFitPhoto HTML element :
<script type="text/javascript">
    window.onload = function()
    {
        FitPhoto = Fb.FitPhoto.GetInstance(
            {
                FitPhoto:
                {
                    container: '#myFitPhoto'
                }
            }
        );
    }
</script>

Set frame

SetFrame method is used in order to set the frame to try on.
<input type="button" value="Try On" onclick="FitPhoto.SetFrame('FrameID')" />
or
<input type="button" value="Try On" id="TryOnButton" rel="FrameID" />
<script type="text/javascript">
    window.onload = function()
    {
        var TryButton = document.getElementById('TryOnButton');
        
        TryButton.onclick = function()
        {
            var FrameID = this.getAttribute('rel');
            FitPhoto.SetFrame(FrameID);
        }
    }
</script>
* Refer to FittingBox Team to know the list of FrameID you got, otherwise you can use 0684024001341988878 for your tests.

Examples