Web
#
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 or product codes to apply them. Product informations are stored in our CMS 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.
#
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 website_id
parameters. Without these information plugin does not works.
Will be used on iframe load
postMessage
is must be called to execute functions in iframe.
You must initialize plugin first. Initialization takes your website and it can be usable for only your domain or package.
You can set first product in 2 different ways.
You can use product code
set_active_products_by code
takes json string parameter active product.makeupMode
: This is an optional parameter. Default value of parameter is zero. There is two makeup mode. Give 0 for use with single product apply and give 1 for use with multi product apply.Market Place Code
specialProductId
: Takes 13-digit integer value which is the global id of this product provided by us.specialBrandCodeName
: Code that special for brand. This code help us to give special product code to brand.
caution
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.
caution
If you want to use different blusher or eyeliner type, You must add key value pair to activeProduct dict.
#
You can select different style for eyeliner and blusher#
Eyeliner
#
Blusher
Only use result screen
In this scenario when page load or photo captured, photo must be provided with below function.
Will be used on product selection
There is two option to apply any product. You can use product code or product name that consist of brand name, product name and color name.
applyProduct
takes two argument. Category is can be "Lipstick", "Blusher", "Eyeliner", "Foundation", "Eyeshadow", "Eyepencil", "Concealer". Key must be name of product that recorded on our pms.
applyProductWithCode
takes one argument. Product code is unique id that matches with product. You should integrate our product code list to your app or website. Product code list will be shared.
removeProduct
takes only category name.
#
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)
Will be used for UI integration
You can decide to choose your own icons for back button and slider button. Simply hide our button and put your icon. Post message when clicked your button.
- Hide slider button.
- Click slider button.
- Hide back button.
- Click back button.
#
Plugin filesMail us to to get website-id and our plugin URL. You can get contact from [email protected]