Web
caution
We are updated some points on plugin.
- Most change is entagration is handled by url. Therefore, There is no need to update your app or website frequently. Improvements and new features are reached immediately.
- Second change is apply function. No more need to enter color information or anything else.The only needed information is product category and product name. this give us to flexiblity of improvement on better visual results.
- Comminacation on web is handled by
postMessage
function because of url usage.
caution
Photo makeup and Photo nailpolish usages are very similar but there is some small differences on function names and parameters.
#
1. Importing pluginYou can directly import plugin into your project. No need to import any file to your projects. Just insert iframe with below configurations.
src
: url of our website.allow
: camera permission must be given. Otherwise camera can not be open. Visitor choose only model or pick image from device.onload
: Some informations are must be provided to webview. These informations are defined in ^below.
#
2. StructureBasically we need one iframe and color buttons. Any design can be created with this plugin. We uses product names to apply them. Product informations are stored in our pms system. To apply any product, The only information you need is product name. To ensure product name is unique, product name is consist of three name.
When iframe loaded some informations are must be provided. Comminication between iframe and your site provided by post messages.Post message contents are includes function name and parameters. It can be tested on your localhost. But you need to give us your domain name for production. Unrecorded subdomains are not allowed for security issues.
!!!Info Info You can use any hex color to get result. But it is not recomended for production. Our results are getting better day by day. And we developing algorithms for product base.
#
3. FunctionsYou can see very simple usage of our plugin. Iframe is center of page and color buttons below. When web page is loaded init
function runs with api-key
, website_id
and initial_product
parameters. Without these information plugin does not works.
!!!Info Info Functions are used
Will be used on iframe load
postMessage
is must be called to execute functions in iframe. Setting api key and initProducts is simple.
set_initial_product
takes string parameter as product name.
caution
info "Info" There is option to use and design your own camera ui. In this scenario you can create camera ui. And only result is shown by our ui.
Only use result screen
In this scenario when page load or photo captured, photo must be provided with below function.
loadimgBase64
takes one argument which is base64 representation of captured photo.
#
You can customize our iframeChange Background Color
Change Try Label
Change Take Photo Button and Color Label (It changes DESKTOP Take Photo buttonβs color and label)
Change Choose Model Button Color and Label
Change Mobile Take a Photo Color and Label
Disable Buttons Hover Action
Apply To Selected Model (If you want to use different models, you can contact us.)
Hide Choose Model Button (If you want to use your models, you should hide our choose model button)
Hide Mobile Take Photo Button If you want to use mobile devices camera application for take photo, you should hide mobile take photo button. You can perform your operation by sending the photo taken from the device camera to the loadImgBase64 function in base64 format.
Show Before After Labels (If you want to see before and after labels on your photo or selected model, you can use this function)
Hide Take Photo Button For Desktop If you want to hide take a photo button for desktop, you can use this function
Will be used on product selection
applyProduct
takes product name. Product name must be name of product that recorded on our pms.applyColorNailPolish
takes hex color in string format.removeProduct
takes only category name.
#
Plugin filesMail us to to get web and api-key. You can get contact from [email protected]