Embalaje de regalo de cara personalizada— feliz navidad

SKU : CGP033-S
20% DTO.
","handle":"custom-face-gift-wrap-merry-christmas","has_only_default_variant":false,"price":1595,"price_max":1995,"price_min":1595,"price_varies":false,"requires_selling_plan":false,"quantity_price_breaks_configured":false,"options":["Talla"],"tags":["custom-unify-crop-carving-twoface","custom-unify2024","custom-croppic","custom-show-twoface","custom-twoface","custom-vip-product","wrapimage"],"featured_image":{"alt":null,"id":"6415955428945001490","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":640,"product_id":"16064159554296380207523965","src":"https://img-va.myshopline.com/image/store/1711614876027/61611109-418070205456760-4670420094218552213-n-wps.jpg?w=640&h=640","width":640,"variants":[]},"first_available_variant":{"available":true,"barcode":null,"compare_at_price":2000,"featured_image":null,"featured_media":null,"id":"18064159554301748916803965","image":null,"inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"option1":"55CM x 90CM","option2":null,"option3":null,"option4":null,"option5":null,"price":1595,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"sku":"CGP033-S","taxable":false,"title":"55CM x 90CM","weight_in_unit":"0.13","weight_unit":"kg","quantity_price_breaks":null,"url":"/products/custom-face-gift-wrap-merry-christmas?sku=18064159554301748916803965","selling_plan_allocations":[],"options":["55CM x 90CM"],"metafields":{},"quantity_rule":{"increment":1,"min":1,"max":null}},"images":[{"alt":null,"id":"6415955428945001490","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":640,"product_id":"16064159554296380207523965","src":"https://img-va.myshopline.com/image/store/1711614876027/61611109-418070205456760-4670420094218552213-n-wps.jpg?w=640&h=640","width":640,"variants":[]},{"alt":null,"id":"6415955428945001491","media_type":"image","position":2,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1280,"product_id":"16064159554296380207523965","src":"https://img-va.myshopline.com/image/store/1711614876027/CGP033.jpg?w=1280&h=1280","width":1280,"variants":[]}],"featured_media":{"alt":null,"id":"6415955428945001490","media_type":"image","position":1,"aspect_ratio":"1.0000","attached_to_variant":false,"height":640,"product_id":"16064159554296380207523965","src":"https://img-va.myshopline.com/image/store/1711614876027/61611109-418070205456760-4670420094218552213-n-wps.jpg?w=640&h=640","width":640,"variants":[],"preview_image":{"alt":null,"id":"6415955428945001490","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":640,"product_id":"16064159554296380207523965","src":"https://img-va.myshopline.com/image/store/1711614876027/61611109-418070205456760-4670420094218552213-n-wps.jpg?w=640&h=640","width":640,"variants":[]}},"selected_variant":null,"selected_or_first_available_variant":{"available":true,"barcode":null,"compare_at_price":2000,"featured_image":null,"featured_media":null,"id":"18064159554301748916803965","image":null,"inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"option1":"55CM x 90CM","option2":null,"option3":null,"option4":null,"option5":null,"price":1595,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"sku":"CGP033-S","taxable":false,"title":"55CM x 90CM","weight_in_unit":"0.13","weight_unit":"kg","quantity_price_breaks":null,"url":"/products/custom-face-gift-wrap-merry-christmas?sku=18064159554301748916803965","selling_plan_allocations":[],"options":["55CM x 90CM"],"metafields":{},"quantity_rule":{"increment":1,"min":1,"max":null}},"variants":[{"available":true,"barcode":null,"compare_at_price":2000,"featured_image":null,"featured_media":null,"id":"18064159554301748916803965","image":null,"inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"option1":"55CM x 90CM","option2":null,"option3":null,"option4":null,"option5":null,"price":1595,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"sku":"CGP033-S","taxable":false,"title":"55CM x 90CM","weight_in_unit":"0.13","weight_unit":"kg","quantity_price_breaks":null,"url":"/products/custom-face-gift-wrap-merry-christmas?sku=18064159554301748916803965","selling_plan_allocations":[],"options":["55CM x 90CM"],"metafields":{},"quantity_rule":{"increment":1,"min":1,"max":null}},{"available":true,"barcode":null,"compare_at_price":3200,"featured_image":null,"featured_media":null,"id":"18064159554301748916863965","image":null,"inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"option1":"55CM x 150CM","option2":null,"option3":null,"option4":null,"option5":null,"price":1795,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"sku":"CGP033-M","taxable":false,"title":"55CM x 150CM","weight_in_unit":"0.13","weight_unit":"kg","quantity_price_breaks":null,"url":"/products/custom-face-gift-wrap-merry-christmas?sku=18064159554301748916863965","selling_plan_allocations":[],"options":["55CM x 150CM"],"metafields":{},"quantity_rule":{"increment":1,"min":1,"max":null}},{"available":true,"barcode":null,"compare_at_price":4000,"featured_image":null,"featured_media":null,"id":"18064159554301748916913965","image":null,"inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"option1":"55CM x 300CM","option2":null,"option3":null,"option4":null,"option5":null,"price":1995,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"sku":"CGP033-L","taxable":false,"title":"55CM x 300CM","weight_in_unit":"0.13","weight_unit":"kg","quantity_price_breaks":null,"url":"/products/custom-face-gift-wrap-merry-christmas?sku=18064159554301748916913965","selling_plan_allocations":[],"options":["55CM x 300CM"],"metafields":{},"quantity_rule":{"increment":1,"min":1,"max":null}}],"media":[{"alt":null,"id":"6415955428945001490","media_type":"image","position":1,"aspect_ratio":"1.0000","attached_to_variant":false,"height":640,"product_id":"16064159554296380207523965","src":"https://img-va.myshopline.com/image/store/1711614876027/61611109-418070205456760-4670420094218552213-n-wps.jpg?w=640&h=640","width":640,"variants":[],"preview_image":{"alt":null,"id":"6415955428945001490","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":640,"product_id":"16064159554296380207523965","src":"https://img-va.myshopline.com/image/store/1711614876027/61611109-418070205456760-4670420094218552213-n-wps.jpg?w=640&h=640","width":640,"variants":[]}},{"alt":null,"id":"6415955428945001491","media_type":"image","position":2,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1280,"product_id":"16064159554296380207523965","src":"https://img-va.myshopline.com/image/store/1711614876027/CGP033.jpg?w=1280&h=1280","width":1280,"variants":[],"preview_image":{"alt":null,"id":"6415955428945001491","media_type":"image","position":2,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1280,"product_id":"16064159554296380207523965","src":"https://img-va.myshopline.com/image/store/1711614876027/CGP033.jpg?w=1280&h=1280","width":1280,"variants":[]}}],"options_by_name":{"Talla":{"name":"Talla","position":0,"selected_value":null,"values":["55CM x 90CM","55CM x 150CM","55CM x 300CM"],"values_images":[{"value":"55CM x 90CM","image":null},{"value":"55CM x 150CM","image":null},{"value":"55CM x 300CM","image":null}]}},"options_with_values":[{"name":"Talla","position":0,"selected_value":null,"specName":"Talla","values":["55CM x 90CM","55CM x 150CM","55CM x 300CM"],"values_images":[{"value":"55CM x 90CM","image":null},{"value":"55CM x 150CM","image":null},{"value":"55CM x 300CM","image":null}]}],"template_suffix":null}; curOptions[optionPos] = 1; let onefaceOptionsStr = curOptions.join('/'); let onefaceProduct = product.variants.find(item => item.title == onefaceOptionsStr); let currencyString = '€{{amount_with_comma_separator}}'.replace(/<[a-z =/]+>/g, ''); curOptions[optionPos] = 2; let twofaceOptionsStr = curOptions.join('/'); let twofaceProduct = product.variants.find(item => item.title == twofaceOptionsStr); if(typeof twofaceProduct != 'undefined'){ let addPrice = (twofaceProduct.price - onefaceProduct.price) / 100; twofacePrice = ' +'+currencyString.replace(/[{]{2}.*[}}]/, Math.abs(addPrice.toFixed(2))); } curOptions[optionPos] = 3; let carvingOptionsStr = curOptions.join('/'); let carvingProduct = product.variants.find(item => item.title == carvingOptionsStr); if(typeof carvingProduct != 'undefined'){ let addPrice = (carvingProduct.price - onefaceProduct.price) / 100; carvingPrice = ' +'+currencyString.replace(/[{]{2}.*[}}]/, Math.abs(addPrice.toFixed(2))); } } if(isTwoFace == true){ let productOption = [{"name":"Talla","position":0,"selected_value":null,"specName":"Talla","values":["55CM x 90CM","55CM x 150CM","55CM x 300CM"],"values_images":[{"value":"55CM x 90CM","image":null},{"value":"55CM x 150CM","image":null},{"value":"55CM x 300CM","image":null}]}]; let markupOption = productOption.find(item => item.name == "TwoFace"); let optionPos = markupOption.position; let curOptions = ["55CM x 90CM"]; let product = {"brand":"My Face Socks ES","created_at":"2024-04-10T19:34:13.333+08:00","gift_card":false,"id":"16064159554296380207523965","published_at":"2024-04-10T19:34:13.432+08:00","title":"Embalaje de regalo de cara personalizada— feliz navidad","type":"photo","url":"/products/custom-face-gift-wrap-merry-christmas","vendor":"My Face Socks ES","available":true,"compare_at_price":2000,"compare_at_price_max":4000,"compare_at_price_min":2000,"compare_at_price_varies":false,"description":"

Pon tu cara en el embalaje de regalo de cara personalizada. ¡El regalo perfecto necesita el papel perfecto!

\n

Diseño personalizado: el grupo de nuestro diseño trabaja mucho para recortar tu cara desde la foto que has subido.

\n

3 tamaños disponibles: 22\"x 35\" (55cm x 90cm), 22\"x 60\" (55cm x 150cm), 22\"x 120\" (55cm x 300cm)

\n

Imprimimos en papel brillante y impermeable para tu creación dura más tiempo.

\n

Tiempo de producción: 3~5 días laborales Libre de impuestos

\n

SKU: CGP033

\n
    \n
      \n
        \n
        \n","handle":"custom-face-gift-wrap-merry-christmas","has_only_default_variant":false,"price":1595,"price_max":1995,"price_min":1595,"price_varies":false,"requires_selling_plan":false,"quantity_price_breaks_configured":false,"options":["Talla"],"tags":["custom-unify-crop-carving-twoface","custom-unify2024","custom-croppic","custom-show-twoface","custom-twoface","custom-vip-product","wrapimage"],"featured_image":{"alt":null,"id":"6415955428945001490","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":640,"product_id":"16064159554296380207523965","src":"https://img-va.myshopline.com/image/store/1711614876027/61611109-418070205456760-4670420094218552213-n-wps.jpg?w=640&h=640","width":640,"variants":[]},"first_available_variant":{"available":true,"barcode":null,"compare_at_price":2000,"featured_image":null,"featured_media":null,"id":"18064159554301748916803965","image":null,"inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"option1":"55CM x 90CM","option2":null,"option3":null,"option4":null,"option5":null,"price":1595,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"sku":"CGP033-S","taxable":false,"title":"55CM x 90CM","weight_in_unit":"0.13","weight_unit":"kg","quantity_price_breaks":null,"url":"/products/custom-face-gift-wrap-merry-christmas?sku=18064159554301748916803965","selling_plan_allocations":[],"options":["55CM x 90CM"],"metafields":{},"quantity_rule":{"increment":1,"min":1,"max":null}},"images":[{"alt":null,"id":"6415955428945001490","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":640,"product_id":"16064159554296380207523965","src":"https://img-va.myshopline.com/image/store/1711614876027/61611109-418070205456760-4670420094218552213-n-wps.jpg?w=640&h=640","width":640,"variants":[]},{"alt":null,"id":"6415955428945001491","media_type":"image","position":2,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1280,"product_id":"16064159554296380207523965","src":"https://img-va.myshopline.com/image/store/1711614876027/CGP033.jpg?w=1280&h=1280","width":1280,"variants":[]}],"featured_media":{"alt":null,"id":"6415955428945001490","media_type":"image","position":1,"aspect_ratio":"1.0000","attached_to_variant":false,"height":640,"product_id":"16064159554296380207523965","src":"https://img-va.myshopline.com/image/store/1711614876027/61611109-418070205456760-4670420094218552213-n-wps.jpg?w=640&h=640","width":640,"variants":[],"preview_image":{"alt":null,"id":"6415955428945001490","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":640,"product_id":"16064159554296380207523965","src":"https://img-va.myshopline.com/image/store/1711614876027/61611109-418070205456760-4670420094218552213-n-wps.jpg?w=640&h=640","width":640,"variants":[]}},"selected_variant":null,"selected_or_first_available_variant":{"available":true,"barcode":null,"compare_at_price":2000,"featured_image":null,"featured_media":null,"id":"18064159554301748916803965","image":null,"inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"option1":"55CM x 90CM","option2":null,"option3":null,"option4":null,"option5":null,"price":1595,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"sku":"CGP033-S","taxable":false,"title":"55CM x 90CM","weight_in_unit":"0.13","weight_unit":"kg","quantity_price_breaks":null,"url":"/products/custom-face-gift-wrap-merry-christmas?sku=18064159554301748916803965","selling_plan_allocations":[],"options":["55CM x 90CM"],"metafields":{},"quantity_rule":{"increment":1,"min":1,"max":null}},"template_suffix":null,"variants":[{"available":true,"barcode":null,"compare_at_price":2000,"featured_image":null,"featured_media":null,"id":"18064159554301748916803965","image":null,"inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"option1":"55CM x 90CM","option2":null,"option3":null,"option4":null,"option5":null,"price":1595,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"sku":"CGP033-S","taxable":false,"title":"55CM x 90CM","weight_in_unit":"0.13","weight_unit":"kg","quantity_price_breaks":null,"url":"/products/custom-face-gift-wrap-merry-christmas?sku=18064159554301748916803965","selling_plan_allocations":[],"options":["55CM x 90CM"],"metafields":{},"quantity_rule":{"increment":1,"min":1,"max":null}},{"available":true,"barcode":null,"compare_at_price":3200,"featured_image":null,"featured_media":null,"id":"18064159554301748916863965","image":null,"inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"option1":"55CM x 150CM","option2":null,"option3":null,"option4":null,"option5":null,"price":1795,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"sku":"CGP033-M","taxable":false,"title":"55CM x 150CM","weight_in_unit":"0.13","weight_unit":"kg","quantity_price_breaks":null,"url":"/products/custom-face-gift-wrap-merry-christmas?sku=18064159554301748916863965","selling_plan_allocations":[],"options":["55CM x 150CM"],"metafields":{},"quantity_rule":{"increment":1,"min":1,"max":null}},{"available":true,"barcode":null,"compare_at_price":4000,"featured_image":null,"featured_media":null,"id":"18064159554301748916913965","image":null,"inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"option1":"55CM x 300CM","option2":null,"option3":null,"option4":null,"option5":null,"price":1995,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"sku":"CGP033-L","taxable":false,"title":"55CM x 300CM","weight_in_unit":"0.13","weight_unit":"kg","quantity_price_breaks":null,"url":"/products/custom-face-gift-wrap-merry-christmas?sku=18064159554301748916913965","selling_plan_allocations":[],"options":["55CM x 300CM"],"metafields":{},"quantity_rule":{"increment":1,"min":1,"max":null}}],"media":[{"alt":null,"id":"6415955428945001490","media_type":"image","position":1,"aspect_ratio":"1.0000","attached_to_variant":false,"height":640,"product_id":"16064159554296380207523965","src":"https://img-va.myshopline.com/image/store/1711614876027/61611109-418070205456760-4670420094218552213-n-wps.jpg?w=640&h=640","width":640,"variants":[],"preview_image":{"alt":null,"id":"6415955428945001490","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":640,"product_id":"16064159554296380207523965","src":"https://img-va.myshopline.com/image/store/1711614876027/61611109-418070205456760-4670420094218552213-n-wps.jpg?w=640&h=640","width":640,"variants":[]}},{"alt":null,"id":"6415955428945001491","media_type":"image","position":2,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1280,"product_id":"16064159554296380207523965","src":"https://img-va.myshopline.com/image/store/1711614876027/CGP033.jpg?w=1280&h=1280","width":1280,"variants":[],"preview_image":{"alt":null,"id":"6415955428945001491","media_type":"image","position":2,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1280,"product_id":"16064159554296380207523965","src":"https://img-va.myshopline.com/image/store/1711614876027/CGP033.jpg?w=1280&h=1280","width":1280,"variants":[]}}],"options_by_name":{"Talla":{"name":"Talla","position":0,"selected_value":null,"values":["55CM x 90CM","55CM x 150CM","55CM x 300CM"],"values_images":[{"value":"55CM x 90CM","image":null},{"value":"55CM x 150CM","image":null},{"value":"55CM x 300CM","image":null}]}},"options_with_values":[{"name":"Talla","position":0,"selected_value":null,"specName":"Talla","values":["55CM x 90CM","55CM x 150CM","55CM x 300CM"],"values_images":[{"value":"55CM x 90CM","image":null},{"value":"55CM x 150CM","image":null},{"value":"55CM x 300CM","image":null}]}]}; curOptions[optionPos] = 0; let onefaceOptionsStr = curOptions.join('/'); let onefaceProduct = product.variants.find(item => item.title == onefaceOptionsStr); let currencyString = '€{{amount_with_comma_separator}}'.replace(/<[a-z =/]+>/g, ''); curOptions[optionPos] = 1; let twofaceOptionsStr = curOptions.join('/'); let twofaceProduct = product.variants.find(item => item.title == twofaceOptionsStr); if(typeof twofaceProduct != 'undefined'){ let addPrice = (twofaceProduct.price - onefaceProduct.price) / 100; twofacePrice = ' +'+currencyString.replace(/[{]{2}.*[}}]/, Math.abs(addPrice.toFixed(2))); } } /* auto price */ } var productImage = typeof customJson.productImage != 'undefined' ? customJson.productImage : 0; var productVariantImage = ""; if(productImage == 1 && productVariantImage != ''){ var productImageUrl = ""; }else{ var productImageUrl = "https://img-va.myshopline.com/image/store/1711614876027/61611109-418070205456760-4670420094218552213-n-wps.jpg?w=640&h=640"; } var isCarvingExample = typeof customJson.isCarvingExample != 'undefined' ? customJson.isCarvingExample : true; var _flag = true; var _zenEngravingSizeOptions = []; var _zenEngravingFontOptions = []; var cropStyle = 0; var aspectRatio = 0; var _items = []; var zenCoors = []; var carvingExampleImg = (isCarvingExample == true) ? 'https://spic.qn.cdn.imaiyuan.com/assets/images/custom-example-CWZ001Y.jpg' : ''; var carvingExampleText = (isCarvingExample == true) ? "Ejemplo de añadir texto" : ''; var carvingPrompt = (isCarvingExample == true) ? "¡El 80% de los clientes prefieren agregar texto personalizado para hacer regalos perfectos!" : ''; var defaultFont = "TimesNewRoman"; //默认字体 var selectBtnText = "Agregar texto"; var isUploadExample = false; var uploadExampleImg = ''; if(typeof customJson.crop != 'undefined'){ if(typeof customJson.crop.isUploadExample != 'undefined' && typeof customJson.crop.uploadExampleImg != 'undefined'){ isUploadExample = customJson.crop.isUploadExample; uploadExampleImg = customJson.crop.uploadExampleImg; } if(typeof customJson.crop.style != 'undefined'){ cropStyle = customJson.crop.style; } var cropConfig = customJson.crop.data; cropConfig.forEach(function(item,index){ if(item.width > 0){ aspectRatio = item.width / item.height; } if(typeof item.selectBtnText != 'undefined'){ selectBtnText = item.selectBtnText; } var cropItem = { label: item.label || '', bgimg: item.bgimg || 'front-view.png', btnUploadText: item.uploadText || "custom.zen.general.upload", hasCarving: item.hasCarving || false, noSelect: item.noSelect || false, isRequire: item.isRequire || false, //isCRequire: item.isCRequire || false, crop: "", cropOrigin: "", engravingCrop: "", engravingText: [], engravingSize: "", engravingFont: "", hasCropOrigin: true }; _items.push(cropItem); }); } if(typeof customJson.coors != 'undefined'){ if(typeof customJson.coors.data[0].carvingExampleImg != 'undefined'){ carvingExampleImg = customJson.coors.data[0].carvingExampleImg; } if(typeof customJson.coors.data[0].font != 'undefined'){ defaultFont = customJson.coors.data[0].font; } var coorsConfig = customJson.coors.data; coorsConfig.forEach(function(item,index){ var coorItem = { label: item.label || "", placeholder: item.placeholder || "Por favor ingrese su texto personalizado aquí ...", left: 249, top: 357, limit: item.limit || "30", angle: "0", size: 20, textColor: "black", shadowColor: "white", direction: "", banDrag: "0", lineHeight: "1", isRequire: true, textDanger: false } zenCoors.push(coorItem); }); } var _zenConfig = { sku: "CGP033-S", selectBtnText: selectBtnText + carvingPrice, carvingExampleText: carvingExampleText, //刻字示例文案 carvingExampleImg: carvingExampleImg, //刻字示例图片 ifSelectExample: true,//true:在选择是否刻字时展示刻字示例图片 不设置该参数则示例图片展示在刻字弹窗 carvingPrompt: carvingPrompt,//刻字示例说明文案 in: "facegiftsgeneral-IN.png", out: "facegiftsgeneral-OUT.png", enableCanvas: false, //是否显示刻字画布 engravingSizeOptions: _zenEngravingSizeOptions, engravingFontOptions: _zenEngravingFontOptions, enableAddon: true, //显示附加信息 cropPrompt: "", //刻字弹层提示文字, 选填 defaultFont: defaultFont, //默认字体 defaultSize: 20, //默认字体 ethnicityOptions: [], maxLength: 90, //设置输入框最大值 isMarkup: true, cropTextUploadButton: "Subir", //单行上传表单,上传按钮文字 cropConfirmText:"Confirmar",//切图传图确认按钮文案 cropCancelText:"Cancelar",//切图传图取消按钮文案 confirmText:"Confirmar", cancelText:"Cancelar", previewLabel:"Tu diseño", uploadPreviwLabel: "Añadir imágen", //单行上传文件控件预览文字 cropTextUploadButton: "Subir", //单行上传表单,上传按钮文字 cropStyle: cropStyle, //单行上传图片样式 addonTitle: "¿1 cara o 2?", //附加信息 addonDesc: "Marque esta casilla si su foto cargada incluye dos o más caras.", addonLabel: "Dos caras ($ 2.99)", selectOrText:"O", withoutBtnText: "Sin texto", coors: zenCoors, aspectRatio:aspectRatio, items: [ { label: '', data: _items }, ] }; function addOnCallback(value){ //附加选项回调 let addon = document.getElementsByClassName("el-checkbox__original")[0].checked; var _markup = getShopifyVariant(markupTitle); var _twoface = getShopifyVariant(twofaceTitle); let _markupVal = '' if(_twoface !== ''){ _markupVal = addon ? 1 : 0; setShopifyVariant(twofaceTitle, _markupVal); }else{ if(_markup==1 || _markup==2){ //不刻字 _markupVal = addon ? 2 : 1; }else{ _markupVal = addon ? 4 : 3; } setShopifyVariant(markupTitle, _markupVal); } } function carvingCallback(value=1){ //刻字回调 var _markup = getShopifyVariant(markupTitle); let _markupVal = '' if(_markup){ if(value==0){ if(_markup==1 || _markup==3){ _markupVal = 1; }else{ _markupVal = 2; } }else{ if(_markup==1 || _markup==3){ _markupVal = 3; }else{ _markupVal = 4; } } setShopifyVariant(markupTitle, _markupVal); } } //有刻字信息的情况,纠正markup变体的值 function updateEngraving(value){ var _markup = getShopifyVariant(markupTitle); if(_markup){ let cValue = ''; if(value == 1){ if($('.product-addon .is-checked').length > 0 || $('#twoFaceOption').val() == 1){ cValue = 4; }else{ cValue = 3; } }else{ if($('.product-addon .is-checked').length > 0 || $('#twoFaceOption').val() == 1){ cValue = 2; }else{ cValue = 1; } } if(cValue != _markup){ setShopifyVariant(markupTitle, cValue); } } } function updateTwoFace(obj){ var tVal = $(obj).val(); var _markup = getShopifyVariant(markupTitle); var _twoface = getShopifyVariant(twofaceTitle); let _markupVal = '' if(_twoface !== ''){ _markupVal = (tVal == 1) ? 1 : 0; setShopifyVariant(twofaceTitle, _markupVal); }else{ if(_markup==1 || _markup==2){ //不刻字 _markupVal = (tVal == 1) ? 2 : 1; }else{ _markupVal = (tVal == 1) ? 4 : 3; } setShopifyVariant(markupTitle, _markupVal); } if(tVal == 1){ $('#app .custom-design-row .uploader-box:last').show(); }else{ $('#app .custom-design-row .uploader-box:last').hide(); } } var _zenSku = "CGP033-S"; async function zenValidateForm(){ //验证定制化必填字段 var zenInfo = document.getElementsByClassName("zen-require")[0].value; var zenFlag = true; if(!_flag){ $('.crop-rectangle-container').css("border-color","red"); return false; }else{ $('.crop-rectangle-container').css("border-color","black"); } if(zenInfo){ var zenInfo = JSON.parse(zenInfo); var cropCount = 0; var customInfo ={}; customInfo['_sunzi_sources'] = []; zenInfo.crop.forEach(function(v,i) { v.forEach(function(_v,_i) { var isShow = $('.uploader-box').eq(_i).is(':visible'); if((isShow && _v.isRequire && !_v.picture) || (_v.isCRequire && (typeof _v.engravingText != 'string' || !_v.engravingText)) ) { zenFlag = false; }else{ if(isShow){ cropCount ++; customInfo['_sunzi_sources'].push(_v.picture); } if(typeof _v.engravingText == 'string' && _v.engravingText){ customInfo['_sunzi_text'] = {}; customInfo['_sunzi_text']['value'] = _v.engravingText; } } //如果有刻字信息,检验markup变体值是否正确,不正确则修改 if($.trim(_v.engravingText)){ updateEngraving(1); } }) }); if(cropCount > 1){ customInfo['_sunzi_source'] = await imageMerge(customInfo['_sunzi_sources']); delete customInfo['_sunzi_sources']; }else{ customInfo['_sunzi_source'] = customInfo['_sunzi_sources'][0]; delete customInfo['_sunzi_sources']; } customInfo['_sunzi_effect'] = productImageUrl; }else{ console.log('flag-flase'); zenFlag = false; } if(!zenFlag){ alert("¡Diseñe primero!"); $('.bobbleheads-one-carving .avatar-uploader .el-upload').css("border-color","red"); }else{ $('.bobbleheads-one-carving .avatar-uploader .el-upload').css("border-color","white"); $('#customInfo').val(JSON.stringify(customInfo)); } //console.log("zenFlag:", zenFlag); return zenFlag; } $(function(){ //刚进入页面将markup的值改为1,即:不刻字 没有twoface let markupValue = getShopifyVariant(markupTitle); if(markupValue !== ''){ setShopifyVariant(markupTitle, 1); } let twofaceValue = getShopifyVariant(twofaceTitle); if(twofaceValue !== ''){ // $('.field__input--classic[data-sku-item-name="'+twofaceTitle+'"]').parent().parent().hide(); setShopifyVariant(twofaceTitle, 0); } $('.zen-require').attr('name','customVal'); }) window.addEventListener('EVENT_CROP_SAVE_AFTER', function(event){ $('.preview-thumbnail').show(); _flag = true; }) function setShopifyVariant(markup, val){ $('.field__input--classic[data-sku-item-name="'+markup+'"]').val(val); let markupId = $('.field__input--classic[data-sku-item-name="'+markup+'"]').attr('id'); let markupElement = document.getElementById(markupId); markupElement.dispatchEvent(new Event('change', { bubbles: true })); } function getShopifyVariant(markup){ var resultVal = '' if($('.field__input--classic[data-sku-item-name="'+markup+'"]').length > 0){ resultVal = $('.field__input--classic[data-sku-item-name="'+markup+'"]').val(); } return resultVal; } window.addEventListener('EVENT_CROP_SAVE_AFTER', function(event){ if(cropStyle == 0){ jQuery('.el-upload.el-upload--text').html("Cambiar"); } $(".crop-rectangle-container").addClass("height_yellow"); }); window.addEventListener('VARIANT_CHANGE', function(event){ var variant = event.detail; //如果设置变体图则读取变体图作为主图 if(productImage == 1 && variant.featured_image){ productImageUrl = variant.featured_image.src; } }) /* * Others: Multiple images combined into one image * Parame: ["src1","src2","src3"...] * Author: Coman 420500235@qq.com * Date: 2021.11.30 */ async function imageMerge(arcArr, folderName){ var convertBase64ToBlob = function (base64){ var base64Arr = base64.split(','); var imgtype = ''; var base64String = ''; if(base64Arr.length > 1){ base64String = base64Arr[1]; imgtype = base64Arr[0].substring(base64Arr[0].indexOf(':')+1,base64Arr[0].indexOf(';')); } var bytes = atob(base64String); var bytesCode = new ArrayBuffer(bytes.length); var byteArray = new Uint8Array(bytesCode); for (var i = 0; i < bytes.length; i++) { byteArray[i] = bytes.charCodeAt(i); } return new Blob( [bytesCode] , {type : imgtype}); } var cdnAsyncUpload = function (picurl){ var token; $.ajax({ type: "POST", async:false, url: picurl + "assist/uptoken", dataType: 'json', success: function(data){ token = data.token; } }); return token; } var randomString = function (len){ var len = len || 32; var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'; var maxPos = $chars.length; var randomstr = ''; for (i = 0; i < len; i++) { randomstr += $chars.charAt(Math.floor(Math.random() * maxPos)); } return randomstr; } folderName = folderName || 'scrop'; let qiniuRegion; if(typeof qiniu=='undefined'){ qiniuRegion = ''; }else{ qiniuRegion = qiniu.region.na0; } let putExtra = { fname: "", params: {}, mimeType: null }; let config = { region:qiniuRegion, concurrentRequestLimit:3 }; let mergeSrc; let cdnurl = "https://spic.qn.cdn.imaiyuan.com/"; let picurl = "https://pic.stylelab.com/"; let tmpCanvas = new fabric.Canvas(); // 合成图画布 let previewHeight = 0; let top = 0; let w = 500; let h = 400; let obj = []; let ihArr = []; try { $.each(arcArr, (i, v)=>{ previewHeight+=h; ihArr.push(h); }); tmpCanvas.setWidth(w).setHeight(previewHeight); $.each(arcArr, (i, v)=>{ var p1 = new Promise(function (resolve, reject) { let src = v; fabric.Image.fromURL(src, function (oImg) { oImg.scaleToWidth(w); tmpCanvas.add(oImg); tmpCanvas.moveTo(oImg, i); // Multiple images fixed hierarchy tmpCanvas.renderAll(); resolve(); }.bind(this),{crossOrigin: 'anonymous',top:top}); }); obj.push(p1); top+=ihArr[i]; }); if(top > 0){ await new Promise((resolve1, reject)=>{ top = 0; Promise.all(obj).then(async (results) => { $.each(tmpCanvas.getObjects(), (i, v)=>{ // crop Reallocating height tmpCanvas.item(i).set('top',top); top+=v.height*v.scaleX; }); tmpCanvas.setHeight(top); tmpCanvas.renderAll(); let base64 = tmpCanvas.toDataURL({format: 'png',quality: 0.8}); let blob = convertBase64ToBlob(base64); let filename = folderName + '/' + new Date().Format("yyyyMMdd") + '/' + randomString(6); let key = filename + '-'+_zenSku+'.png'; let token = cdnAsyncUpload(picurl); let res = new Promise((resolve, reject)=>{ var observer = { next(result){ // jQuery(".sbar").text(parseInt(result.total.percent) + "%"); // jQuery('.sbar').css({'width': parseInt(result.total.percent) + '%'}); }, error(err){ console.log(err.message); }, complete(res){ mergeSrc = cdnurl + res.key; resolve(); resolve1(); } }; var observable = qiniu.upload(blob, key, token, putExtra, config); observable.subscribe(observer); }); }); }); return mergeSrc; }else{ return false; } } catch(e) { console.log('error:',e); return false; } Date.prototype.Format = function(fmt){ var o = { "M+": this.getMonth() + 1, "d+": this.getDate(), "h+": this.getHours(), "m+": this.getMinutes(), "s+": this.getSeconds(), "q+": Math.floor((this.getMonth() + 3) / 3), "S": this.getMilliseconds() }; if (/(y+)/.test(fmt)) { fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)); } for (var k in o) if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); return fmt; }; }
        Disfrute de la política de cambio/devolución de MyFaceSocks durante 180 días.
        EMBARCAR HACIA:

        Pon tu cara en el embalaje de regalo de cara personalizada. ¡El regalo perfecto necesita el papel perfecto!

        Diseño personalizado: el grupo de nuestro diseño trabaja mucho para recortar tu cara desde la foto que has subido.

        3 tamaños disponibles: 22"x 35" (55cm x 90cm), 22"x 60" (55cm x 150cm), 22"x 120" (55cm x 300cm)

        Imprimimos en papel brillante y impermeable para tu creación dura más tiempo.

        Tiempo de producción: 3~5 días laborales Libre de impuestos

        SKU: CGP033

              ENVÍO GRATIS ES
              over 59€
              diseño exclusivo
              Por los mejores diseñadores del mundo
              100% seguro
              Pago
              Genuine
              Comfortable Material
              90 días
              Devoluciones
              ","handle":"custom-face-gift-wrap-merry-christmas","has_only_default_variant":false,"price":1595,"price_max":1995,"price_min":1595,"price_varies":false,"requires_selling_plan":false,"quantity_price_breaks_configured":false,"options":["Talla"],"tags":["custom-unify-crop-carving-twoface","custom-unify2024","custom-croppic","custom-show-twoface","custom-twoface","custom-vip-product","wrapimage"],"featured_image":{"alt":null,"id":"6415955428945001490","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":640,"product_id":"16064159554296380207523965","src":"https://img-va.myshopline.com/image/store/1711614876027/61611109-418070205456760-4670420094218552213-n-wps.jpg?w=640&h=640","width":640,"variants":[]},"first_available_variant":{"available":true,"barcode":null,"compare_at_price":2000,"featured_image":null,"featured_media":null,"id":"18064159554301748916803965","image":null,"inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"option1":"55CM x 90CM","option2":null,"option3":null,"option4":null,"option5":null,"price":1595,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"sku":"CGP033-S","taxable":false,"title":"55CM x 90CM","weight_in_unit":"0.13","weight_unit":"kg","quantity_price_breaks":null,"url":"/products/custom-face-gift-wrap-merry-christmas?sku=18064159554301748916803965","selling_plan_allocations":[],"options":["55CM x 90CM"],"metafields":{},"quantity_rule":{"increment":1,"min":1,"max":null}},"images":[{"alt":null,"id":"6415955428945001490","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":640,"product_id":"16064159554296380207523965","src":"https://img-va.myshopline.com/image/store/1711614876027/61611109-418070205456760-4670420094218552213-n-wps.jpg?w=640&h=640","width":640,"variants":[]},{"alt":null,"id":"6415955428945001491","media_type":"image","position":2,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1280,"product_id":"16064159554296380207523965","src":"https://img-va.myshopline.com/image/store/1711614876027/CGP033.jpg?w=1280&h=1280","width":1280,"variants":[]}],"featured_media":{"alt":null,"id":"6415955428945001490","media_type":"image","position":1,"aspect_ratio":"1.0000","attached_to_variant":false,"height":640,"product_id":"16064159554296380207523965","src":"https://img-va.myshopline.com/image/store/1711614876027/61611109-418070205456760-4670420094218552213-n-wps.jpg?w=640&h=640","width":640,"variants":[],"preview_image":{"alt":null,"id":"6415955428945001490","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":640,"product_id":"16064159554296380207523965","src":"https://img-va.myshopline.com/image/store/1711614876027/61611109-418070205456760-4670420094218552213-n-wps.jpg?w=640&h=640","width":640,"variants":[]}},"selected_variant":null,"selected_or_first_available_variant":{"available":true,"barcode":null,"compare_at_price":2000,"featured_image":null,"featured_media":null,"id":"18064159554301748916803965","image":null,"inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"option1":"55CM x 90CM","option2":null,"option3":null,"option4":null,"option5":null,"price":1595,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"sku":"CGP033-S","taxable":false,"title":"55CM x 90CM","weight_in_unit":"0.13","weight_unit":"kg","quantity_price_breaks":null,"url":"/products/custom-face-gift-wrap-merry-christmas?sku=18064159554301748916803965","selling_plan_allocations":[],"options":["55CM x 90CM"],"metafields":{},"quantity_rule":{"increment":1,"min":1,"max":null}},"template_suffix":null,"variants":[{"available":true,"barcode":null,"compare_at_price":2000,"featured_image":null,"featured_media":null,"id":"18064159554301748916803965","image":null,"inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"option1":"55CM x 90CM","option2":null,"option3":null,"option4":null,"option5":null,"price":1595,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"sku":"CGP033-S","taxable":false,"title":"55CM x 90CM","weight_in_unit":"0.13","weight_unit":"kg","quantity_price_breaks":null,"url":"/products/custom-face-gift-wrap-merry-christmas?sku=18064159554301748916803965","index":1,"total":3,"isFirst":true,"isLast":false,"selling_plan_allocations":[],"options":["55CM x 90CM"],"metafields":{},"quantity_rule":{"increment":1,"min":1,"max":null}},{"available":true,"barcode":null,"compare_at_price":3200,"featured_image":null,"featured_media":null,"id":"18064159554301748916863965","image":null,"inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"option1":"55CM x 150CM","option2":null,"option3":null,"option4":null,"option5":null,"price":1795,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"sku":"CGP033-M","taxable":false,"title":"55CM x 150CM","weight_in_unit":"0.13","weight_unit":"kg","quantity_price_breaks":null,"url":"/products/custom-face-gift-wrap-merry-christmas?sku=18064159554301748916863965","index":2,"total":3,"isFirst":false,"isLast":false,"selling_plan_allocations":[],"options":["55CM x 150CM"],"metafields":{},"quantity_rule":{"increment":1,"min":1,"max":null}},{"available":true,"barcode":null,"compare_at_price":4000,"featured_image":null,"featured_media":null,"id":"18064159554301748916913965","image":null,"inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"option1":"55CM x 300CM","option2":null,"option3":null,"option4":null,"option5":null,"price":1995,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"sku":"CGP033-L","taxable":false,"title":"55CM x 300CM","weight_in_unit":"0.13","weight_unit":"kg","quantity_price_breaks":null,"url":"/products/custom-face-gift-wrap-merry-christmas?sku=18064159554301748916913965","index":3,"total":3,"isFirst":false,"isLast":true,"selling_plan_allocations":[],"options":["55CM x 300CM"],"metafields":{},"quantity_rule":{"increment":1,"min":1,"max":null}}],"media":[{"alt":null,"id":"6415955428945001490","media_type":"image","position":1,"aspect_ratio":"1.0000","attached_to_variant":false,"height":640,"product_id":"16064159554296380207523965","src":"https://img-va.myshopline.com/image/store/1711614876027/61611109-418070205456760-4670420094218552213-n-wps.jpg?w=640&h=640","width":640,"variant_image":false,"variants":[],"preview_image":{"alt":null,"id":"6415955428945001490","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":640,"product_id":"16064159554296380207523965","src":"https://img-va.myshopline.com/image/store/1711614876027/61611109-418070205456760-4670420094218552213-n-wps.jpg?w=640&h=640","width":640,"variants":[]}},{"alt":null,"id":"6415955428945001491","media_type":"image","position":2,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1280,"product_id":"16064159554296380207523965","src":"https://img-va.myshopline.com/image/store/1711614876027/CGP033.jpg?w=1280&h=1280","width":1280,"variant_image":false,"variants":[],"preview_image":{"alt":null,"id":"6415955428945001491","media_type":"image","position":2,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1280,"product_id":"16064159554296380207523965","src":"https://img-va.myshopline.com/image/store/1711614876027/CGP033.jpg?w=1280&h=1280","width":1280,"variants":[]}}],"options_by_name":{"Talla":{"name":"Talla","position":0,"selected_value":null,"values":["55CM x 90CM","55CM x 150CM","55CM x 300CM"],"values_images":[{"value":"55CM x 90CM","image":null},{"value":"55CM x 150CM","image":null},{"value":"55CM x 300CM","image":null}]}},"options_with_values":[{"name":"Talla","position":0,"selected_value":null,"specName":"Talla","values":["55CM x 90CM","55CM x 150CM","55CM x 300CM"],"values_images":[{"value":"55CM x 90CM","image":null},{"value":"55CM x 150CM","image":null},{"value":"55CM x 300CM","image":null}]}]}