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/flash/js/CustomerID/FitPhoto.js"></script>
* Refer to FittingBox Team to know your CustomerID, otherwise you can use demofitphoto for your tests. * Also, you can change the script location (default: us) by eu if your website location is far from US.
Place a <div> tag identified by a uniq id into the <body> :
<div id="myFitPhoto">
    <a href=”http://get.adobe.com/flashplayer/”>Please install latest version of Flash Player</a>
</div>
Then, call FitPhoto.create method to set your FitPhoto into #myFitPhoto HTML element :
<script type="text/javascript">
    window.onload = function()
    {
        FitPhoto.create('myFitPhoto',{width:315, glassID:'0684024001341988878'});
    }
</script>

Set tryon

tryOn method is used in order to set the frame to try on.
<input type="button" value="Try On" onclick="FitPhoto.tryOn('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.tryOn(FrameID);
        }
    }
</script>
* Refer to FittingBox Team to know the list of FrameID you got, otherwise you can use 0684024001341988878 for your tests.

Examples