For popular e-commerce platforms such as Shopify, BigCommerce, Magento 2, WooCommerce, or Walmart there are more check the platform-specific documentation
Integrate Customily on your site
<html>
<iframe src="https://preview-2.customily.com/productViewer?template=0313370a-e3d1-4b88-8640-f1027a78235d&set=53b7ddcc-880d-4303-a495-0338e1388ca2&shop=standalone.customily.com" width="100%" height="100%" >
</html>
This will render the preview and the option set:
The preview URL that you should enter as the iframe src can be generated in app.customily.com (Store->Link) as explained here
Connect Customily preview URLs with your store's products.
<html>
<script>
window.onload = function(){
const iframe = document.getElementById('iframeHTML');
iframe.src = {{customilySrc}}
}
</script>
<iframe width="100%" height="100%" id="iframeHTML">
</html>
Where customilySrc is a variable that represents the preview URL that you are now storing as a product attribute within your eCommerce Admin or as a javascript variable on each product page.
Now, the preview linked with your product (and its option set) will be visible on your product page. Here, your customers can customize and add the product to the cart.
How to obtain the personalization your shopper entered.
Once your customers click "Add to Cart" on the iframe, Customily will create a record on the Order dashboard with the information the user submitted. On the other hand, once this button is clicked you should make sure to redirect them to your checkout so they can complete the purchase of their product (entering credit card and shipping details, etc)
You'll be able to obtain the personalization details by going to your Order Dashboard (Store->Orders):
You'll see a list of all the records that were created after the shopper clicked on "Add to Cart"
Clicking "Go to details" will show all the personalization details your customer entered + a link to the ready-to-print file
How to grab the personalization information from the iframe (optional)
If you want to use your own order dashboard, you may want to grab the personalization details from the iframe.
When the user clicks on the “Add to Cart” button the iFrame will send a message through parent.postMessage to the parent (your site page) with a personalization GUID. To capture this event and add the product to your store’s cart you can use the following code:
window.addEventListener(“message”, function (event) {
if (event.data.action === ‘add-to-cart’) {
// Add the product to the cart, all the product information is
// on the ‘event.data’ object
}
}, false);
The data.action object contains the personalization GUID:
Object Key
|
Description
|
---|---|
personalizationGUID
|
Unique ID for this personalization
|