PHP Script for embedding a full 360 degree product view into a webpage using just the product images. No need for 3DRT Setup Utility. Perfect for projects with hundreds of products.
- No need to use the 3DRT Setup Utility, create rotation just by uploading the product images.
- One central location for the rotatetool.js engine. If there is a new version, you can upgrade all rotations by just replacing one file.
- One central location for the player theme/skin. You can change the look of the player for all rotations by just changing one variable.
- Configure settings for a product (or group of products) by editing a single settings.ini file
Download from here.
Free for all 3DRT PRO WL, 3DRT ENTERPRISE WL users.
1) Install the PHP Script
Unpack the downloaded yofla_3drt folder into your web root (or its subdirectory)
2) Upload Product Images
Place product photos into a directory within the “products folder”, e.g. “yofla_3drt/products/backpack“.
It is possible to use a separate set of high-resolution images. Then use these folder names
– “yofla_3drt/products/backpack/images” for normal images (e.g. 400×300)
– “yofla_3drt/products/backpack/imageslarge” for hi-res images (e.g. 1024×768)
You can also use a nested directory structure, e.g.
3) Use in your PHP script
3.1) Include the Library with:
3.2) Use a simple php command to embed the 360 Product view;
– cache : generated config.js files and html files are stored here
– lib : php source files
– products : place your product images inside this directory
– templates : template files for iframe tag and iframe page
– themes : themes/skins to customize the look of the 360° product player
Rotate_Tool::get_iframe( $path, $options=null )
Returns iframe html embed code.
$path : The relative path to the directory with images (relative to products folder)
$options : Optional parameter. Is an array with options. Currently these options are supported:
– “width” [number] : width of the iframe
– “height” [number] : height of the iframe
echo Rotate_Tool::get_iframe('jewels/neck/jewel-03', array("width"=>640,"height"=>480));
The default settings (including iframe styles) are defined in “yofla_3drt/settings.ini” file.
Returns an array of all products placed in the “yofla_3drt/products”” directory
Sample Array Structure:
 => Array
[dir_name] => deuter
[path] => deuter
[iframe_url] => http://example.com/yofla_3drt/cache/pages/deuter_iframe.html
[config_url] => http://example.com/yofla_3drt/cache/configs/deuter_config.js
[product_name] => Deuter Backpack
Scans the “yofla_3drt/products” directory for products and creates:
1) Cached config.js and iframe html pages for all products in yofla_3drt/cache directory
2) A list of products stored in yofla_3drt/cache/products.dat
Run this command each time you add/remove/modify a product.
There is one gobal settings.ini file in the yofla_3drt directory. Each product inherits these settings. Each product, or parent directory of a group of products can have it’s own settings.ini file defined that overrides the global settings. It is enough to enter only the values you want to override.
; configuration file for 3D Rotate Tool PHP Script
; comment starts with ';'
;default width and height of the rotateTool movie
width = 500
height = 375
iframeStyle = "max-width: 100%; border: 1px solid silver;"
rotatetoolUrl = ;optionally enter custom url for rotatetool.js engine, e.g. "http://example.com/rotatetool.js"
theme = "inverted"
;CONFIG FILE SETTINGS
bounce = False
rotatePeriod = 3
rotateDirection = 1
rotate = "true" ;string values ["true"|"once"|"false"]
maxZoom = 500
dragSpeed = 0.5
reverseDrag = True
color1 = #FF0000
type = 'wave' ;enter 'default' for percentage preloader
;user iterface settings
showToggleFullscreenButton = False
showZoombar = False
showArrows = True