Getting Started with Camweara Virtual Try On API

Example code snippet

   <script onload="loadTryOnButton({
      psku:'earring6',
      page:'product',
      company:'Teststore',
      buynow:{enable:'true'}
      prependButton:{class:'product-form'},
      MBprependButton:{class:'product-main_div'},
      styles:{
      tryonbutton:{backgroundColor:'white',color:'black',border:'1px solid black',borderRadius:'25px'},
      tryonbuttonHover:{backgroundColor:'black',color:'white',border:'none',borderRadius:'25px'},
      MBtryonbutton:{width:'100%',borderRadius:'25px'}
      },
      tryonButtonData:{text:'Virtual Try-On',faIcon:'fa fa-camera'},
      });"
      src="https://camweara.com/integrations/camweara_api.js"></script>

loadTryOnButton function arguments

psku:{'string'}

ex: psku:{'sku name'}
company:{'string'}

ex: ex: company:{'company name'}
page:{'string'}

ex: page:{'listing'}
buynow:{object}

buynow object arguments

ex: buynow:{enable:'true', productIdShopify:'{{ pid1 }}'}

note: pass true or false to enable or disable buynow button, productIdShopify is required for adding to cart only for shopify stores.

buynowCallback:{'functionName'}

ex: buynowCallback:{'mycallbackfunctionName'}

note: page or accepts listing or product as of now

appendButton:{'object'}

ex-1: appendButton:{id:'id of the element'}  //to append the tryon button

ex-2: appendButton:{class:'class of the element'}  //to append the tryon button

Note: you can only pass id if page:{‘listing’}

Note: appendButton will place the tryon button after div

MBappendButton:{'object'}
ex-1: MBappendButton:{id:'id of the element'}  //to append the tryon button for mobile if needed at different position

ex-2: MBappendButton:{class:'class of the element'}  //to append the tryon button for mobile if needed at different position
    Note:  styles:{MBtryonbutton:'styles'} is mandatory if MBappendButton/MBprependButton is used
    Note: class is only applicable if page:{'product'}
    Note: appendButton will place the tryon button after div
prependButton:{'object'}

ex-1: prependButton:{id:'id of the element'}  //to prepend the tryon button

ex-2: prependButton:{class:'class of the element'}  //to prepend the tryon button

Note: you can only pass id if page:{‘listing’}

Note:prependButton will place the tryon button before div

MBprependButton:{'object'}
ex-1: MBprependButton:{id:'id of the element'}  //to prepend the tryon button
for mobile if needed at different position

ex-2: MBprependButton:{class:'class of the element'}  //to prepend the tryon button for mobile if needed at different position
    Note:  styles:{MBtryonbutton:'styles'} is mandatory if MBappendButton/MBprependButton is used
    Note: class is only applicable if page:{'product'}
    Note:prependButton will place the tryon button before div

styles:{'object'}

styles object arguments

tryonbutton:{styles}

ex: styles:{tryonbutton:width:'100%',borderRadius:'25px'}  //styles for tryon button

tryonbuttonHover:{styles}

ex: styles:{tryonbuttonHover:backgroundColor:'black',borderRadius:'15px'}  //styles for tryon button on Hover

styles for mobile screen size

MBtryonbutton:{styles}

ex: styles:{MBtryonbutton:width:'100%',borderRadius:'25px'}  //styles for tryon button for mobile width

MBtryonbuttonHover:{styles}

ex: styles:{MBtryonbuttonHover:backgroundColor:'black',borderRadius:'15px'}  //styles for tryon button on Hover for mobile width

tryonbuttonData:{object}

tryonbuttonData object arguments

text:{string}

ex: tryonbuttonData:{text:'Try virtualy'}  //text shows on tryon button

faIcon:{string}

ex: tryonbuttonData:{faIcon:'fa fa-camera'}  //only fontawasome classname

note: faIcon only accepts Font Awesome 4 Icon classes

Thank You

Reach us at info@modakatech.com for any questions.