4 € RABAIS
COMMANDES 34€+
CODE: Fall4
6 € RABAIS
COMMANDES 56€+
CODE: Fall6
10 € RABAIS
COMMANDES 72€+
CODE: Fall10

Spotify Glass Scannable Spotify Code personnalisé Musique Chanson Plaque Cadre Cadeau de Noël pour petit ami

SKU : CBS110
Économiser
Partager
EXPÉDITION À
Devoluciones los 60 días
60 DAYS Return/Exchange Policy
We support a 60-day return policy, if you purchase an warranty, you can extend this period to 180 days

Return & Exchange Service Procedure

  • STEP 1 Contact Customer Service and Request Return Detail. Email: service@namenecklace.com
  • STEP 2 Customer will receive an email notification once your request is approved.
  • STEP 3 The customer packs the package and sends it.
  • STEP 4 Get Refund or Replacement after we receive the products.

FULL COVERAGE Return/Exchange Policy

  • The following reasons are covered by our 60 day FULL COVERAGE Return/Exchange Policy. (We will be responsible for the return postage fees and replacement fees)
  • 1. The product customization information does not match or an error in customization.
  • 2. We sent the wrong order or item(s), you received any broken items, or the quality of the products you received is poor/defective.
  • 3. Unclear pictures rendering or lettering
  • 4. Wrong or mismatched size.

NO RETURN & EXCHANGE

  • The following reasons are NOT covered by our 60 day return policy. We are not liable for these issues.
  • 1. Products that exceed the return processing time limit (60 days after the order is signed).
  • 2. The non-quality issue for personalized products.
  • 3. Product damaged by misuse, mishandling, or poor maintenance.
  • 4. Items that have been washed, worn, or soiled and damaged resulting from customer's handling. For safety and hygiene reasons, personal items such as underwear, swimwear, socks, etc.
  • 5. Chose the wrong size for the product.
  • 6. Personal Reasons due to personal taste, change of mind etc.
  • 7. Partial returns or exchange of products from a set item is not acceptable.

Precautions for return and exchange

  • 1. Items that are being returned should be new and unworn. They should be kept in its original condition in which you received them in.
  • 2. Coupon codes expires after use and cannot be restored after return.
  • 3. For personalized products, if you need to cancel or replace the product or replace the personalized content, you will have to pay 30% of the product price as the customization fee. (Special note: Even if you contact us immediately after placing the order to cancel/modify the order, we will charge the corresponding production fee because the customized product will be produced immediately once the order is placed in order to ensure a timely production and delivery. Thanks for you understanding.)
  • 4. We reserve the right to make any changes to this policy at any time. Notification of any changes will be posted on this page. If you have any questions about cancellations or any of our other policies, please contact our customer service.
\n
\n
\n
\n\n
\nTRANSLATE with \n
\n
\n
COPY THE URL BELOW
\n
\n \n
\n\n \n
\n
\n
\nEMBED THE SNIPPET BELOW IN YOUR SITE \n
\n
\n
Enable collaborative features and customize widget: Bing Webmaster Portal
\n\n
\n\n","featured_image":{"alt":"","id":"6811464544448439388","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-a70978e1-c1e0-40ff-8367-75d210c05d77-1.png?w=1000&h=1000","variants":[],"width":1000},"featured_media":{"alt":"","id":"6811464544448439388","media_type":"image","position":1,"preview_image":{"alt":"","id":"6811464544448439388","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-a70978e1-c1e0-40ff-8367-75d210c05d77-1.png?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-a70978e1-c1e0-40ff-8367-75d210c05d77-1.png?w=1000&h=1000","variants":[],"width":1000},"first_available_variant":{"available":true,"barcode":null,"compare_at_price":2300,"featured_image":null,"featured_media":null,"id":"18068114645463993369504095","image":null,"option1":null,"option2":null,"option3":null,"option4":null,"option5":null,"options":null,"price":1595,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CBS110","taxable":false,"title":null,"url":"/products/spotify-glass-scannable-spotify-code-personnalise-musique-chanson-plaque-cadre-cadeau-de-noel-pour-petit-ami?sku=18068114645463993369504095","weight_in_unit":"0.05","weight_unit":"kg","inventory_management":true,"inventory_policy":"deny","inventory_quantity":999960,"quantity_rule":{"increment":1,"min":1,"max":null}},"handle":"spotify-glass-scannable-spotify-code-personnalise-musique-chanson-plaque-cadre-cadeau-de-noel-pour-petit-ami","has_only_default_variant":true,"images":[{"alt":"","id":"6811464544448439388","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-a70978e1-c1e0-40ff-8367-75d210c05d77-1.png?w=1000&h=1000","variants":[],"width":1000},{"alt":"","id":"6811464544448439389","media_type":"image","position":2,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-1.png?w=1000&h=1000","variants":[],"width":1000},{"alt":"","id":"6811464544448439390","media_type":"image","position":3,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/d0eb4566038a89f74655c15a912bbfa0-268c51a2-e94d-4cdf-8a5d-3cf580e2f021-1-1.png?w=1000&h=1000","variants":[],"width":1000}],"media":[{"alt":"","id":"6811464544448439388","media_type":"image","position":1,"preview_image":{"alt":"","id":"6811464544448439388","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-a70978e1-c1e0-40ff-8367-75d210c05d77-1.png?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-a70978e1-c1e0-40ff-8367-75d210c05d77-1.png?w=1000&h=1000","variants":[],"width":1000,"variant_image":false},{"alt":"","id":"6811464544448439389","media_type":"image","position":2,"preview_image":{"alt":"","id":"6811464544448439389","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-1.png?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-1.png?w=1000&h=1000","variants":[],"width":1000,"variant_image":false},{"alt":"","id":"6811464544448439390","media_type":"image","position":3,"preview_image":{"alt":"","id":"6811464544448439390","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/d0eb4566038a89f74655c15a912bbfa0-268c51a2-e94d-4cdf-8a5d-3cf580e2f021-1-1.png?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/d0eb4566038a89f74655c15a912bbfa0-268c51a2-e94d-4cdf-8a5d-3cf580e2f021-1-1.png?w=1000&h=1000","variants":[],"width":1000,"variant_image":false}],"options":[],"options_by_name":{},"options_with_values":[],"price":1595,"price_max":1595,"price_min":1595,"price_varies":true,"requires_selling_plan":false,"selected_variant":null,"selected_or_first_available_variant":{"available":true,"barcode":null,"compare_at_price":2300,"featured_image":null,"featured_media":null,"id":"18068114645463993369504095","image":null,"option1":null,"option2":null,"option3":null,"option4":null,"option5":null,"options":null,"price":1595,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CBS110","taxable":false,"title":null,"url":"/products/spotify-glass-scannable-spotify-code-personnalise-musique-chanson-plaque-cadre-cadeau-de-noel-pour-petit-ami?sku=18068114645463993369504095","weight_in_unit":"0.05","weight_unit":"kg","inventory_management":true,"inventory_policy":"deny","inventory_quantity":999960,"quantity_rule":{"increment":1,"min":1,"max":null}},"tags":["custom-spotify-code","custom-sunzi-spotify-code","custom-sunzi-vip","delivery-guaranteed","pla-google-2","pla-google1"],"variants":[{"available":true,"barcode":null,"compare_at_price":2300,"featured_image":null,"featured_media":null,"id":"18068114645463993369504095","image":null,"option1":null,"option2":null,"option3":null,"option4":null,"option5":null,"options":null,"price":1595,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CBS110","taxable":false,"title":null,"url":"/products/spotify-glass-scannable-spotify-code-personnalise-musique-chanson-plaque-cadre-cadeau-de-noel-pour-petit-ami?sku=18068114645463993369504095","weight_in_unit":"0.05","weight_unit":"kg","inventory_management":true,"inventory_policy":"deny","inventory_quantity":999960,"quantity_rule":{"increment":1,"min":1,"max":null}}]}
\n
\n\n
\n
\n
\nTRANSLATE with \n
\n
\n
COPY THE URL BELOW
\n
\n \n
\n\n \n
\n
\n
\nEMBED THE SNIPPET BELOW IN YOUR SITE \n
\n
\n
Enable collaborative features and customize widget: Bing Webmaster Portal
\n\n
\n\n","featured_image":{"alt":"","id":"6811464544448439388","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-a70978e1-c1e0-40ff-8367-75d210c05d77-1.png?w=1000&h=1000","variants":[],"width":1000},"featured_media":{"alt":"","id":"6811464544448439388","media_type":"image","position":1,"preview_image":{"alt":"","id":"6811464544448439388","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-a70978e1-c1e0-40ff-8367-75d210c05d77-1.png?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-a70978e1-c1e0-40ff-8367-75d210c05d77-1.png?w=1000&h=1000","variants":[],"width":1000},"first_available_variant":{"available":true,"barcode":null,"compare_at_price":2300,"featured_image":null,"featured_media":null,"id":"18068114645463993369504095","image":null,"option1":null,"option2":null,"option3":null,"option4":null,"option5":null,"options":null,"price":1595,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CBS110","taxable":false,"title":null,"url":"/products/spotify-glass-scannable-spotify-code-personnalise-musique-chanson-plaque-cadre-cadeau-de-noel-pour-petit-ami?sku=18068114645463993369504095","weight_in_unit":"0.05","weight_unit":"kg","inventory_management":true,"inventory_policy":"deny","inventory_quantity":999960,"quantity_rule":{"increment":1,"min":1,"max":null}},"handle":"spotify-glass-scannable-spotify-code-personnalise-musique-chanson-plaque-cadre-cadeau-de-noel-pour-petit-ami","has_only_default_variant":true,"images":[{"alt":"","id":"6811464544448439388","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-a70978e1-c1e0-40ff-8367-75d210c05d77-1.png?w=1000&h=1000","variants":[],"width":1000},{"alt":"","id":"6811464544448439389","media_type":"image","position":2,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-1.png?w=1000&h=1000","variants":[],"width":1000},{"alt":"","id":"6811464544448439390","media_type":"image","position":3,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/d0eb4566038a89f74655c15a912bbfa0-268c51a2-e94d-4cdf-8a5d-3cf580e2f021-1-1.png?w=1000&h=1000","variants":[],"width":1000}],"media":[{"alt":"","id":"6811464544448439388","media_type":"image","position":1,"preview_image":{"alt":"","id":"6811464544448439388","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-a70978e1-c1e0-40ff-8367-75d210c05d77-1.png?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-a70978e1-c1e0-40ff-8367-75d210c05d77-1.png?w=1000&h=1000","variants":[],"width":1000,"variant_image":false},{"alt":"","id":"6811464544448439389","media_type":"image","position":2,"preview_image":{"alt":"","id":"6811464544448439389","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-1.png?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-1.png?w=1000&h=1000","variants":[],"width":1000,"variant_image":false},{"alt":"","id":"6811464544448439390","media_type":"image","position":3,"preview_image":{"alt":"","id":"6811464544448439390","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/d0eb4566038a89f74655c15a912bbfa0-268c51a2-e94d-4cdf-8a5d-3cf580e2f021-1-1.png?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/d0eb4566038a89f74655c15a912bbfa0-268c51a2-e94d-4cdf-8a5d-3cf580e2f021-1-1.png?w=1000&h=1000","variants":[],"width":1000,"variant_image":false}],"options":[],"options_by_name":{},"options_with_values":[],"price":1595,"price_max":1595,"price_min":1595,"price_varies":true,"requires_selling_plan":false,"selected_variant":null,"selected_or_first_available_variant":{"available":true,"barcode":null,"compare_at_price":2300,"featured_image":null,"featured_media":null,"id":"18068114645463993369504095","image":null,"option1":null,"option2":null,"option3":null,"option4":null,"option5":null,"options":null,"price":1595,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CBS110","taxable":false,"title":null,"url":"/products/spotify-glass-scannable-spotify-code-personnalise-musique-chanson-plaque-cadre-cadeau-de-noel-pour-petit-ami?sku=18068114645463993369504095","weight_in_unit":"0.05","weight_unit":"kg","inventory_management":true,"inventory_policy":"deny","inventory_quantity":999960,"quantity_rule":{"increment":1,"min":1,"max":null}},"tags":["custom-spotify-code","custom-sunzi-spotify-code","custom-sunzi-vip","delivery-guaranteed","pla-google-2","pla-google1"],"variants":[{"available":true,"barcode":null,"compare_at_price":2300,"featured_image":null,"featured_media":null,"id":"18068114645463993369504095","image":null,"option1":null,"option2":null,"option3":null,"option4":null,"option5":null,"options":null,"price":1595,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CBS110","taxable":false,"title":null,"url":"/products/spotify-glass-scannable-spotify-code-personnalise-musique-chanson-plaque-cadre-cadeau-de-noel-pour-petit-ami?sku=18068114645463993369504095","weight_in_unit":"0.05","weight_unit":"kg","inventory_management":true,"inventory_policy":"deny","inventory_quantity":999960,"quantity_rule":{"increment":1,"min":1,"max":null}}]}; // 唤醒定制框 $('#sunzi-modal').show(0, function() { ReactDOM.render( React.createElement(component, { price: product.price, title: product.title, ..._sunzi_response, onClose: modalClose, onConfirm: function(...data) { modalClose(); onConfirmCallback(...data); } }, null), document.getElementById('sunzi-node') ); }); // 模态框关闭 function modalClose() { $('#sunzi-modal').hide(); _sunzi_unlock(); onCloseCallback(); } } /** sunzi 屏幕锁定 **/ function _sunzi_lock() { const root = $('html, body'); _sunzi_offset = root.scrollTop(); root.addClass('lock'); const system = _getSystem(); if (system.name === 'IOS' && system.version === 15) root.addClass('compatible-IOS15'); root.scrollTop(0); } /** sunzi 屏幕解锁 **/ function _sunzi_unlock() { const root = $('html, body'); root.removeClass('lock'); root.removeClass('compatible-IOS15'); root.scrollTop(_sunzi_offset); } /** sunzi 寻找变体元素 **/ function _sunzi_find_variant(variant, formClass = _sunzi_global_data.domLabel.form, selectClass = _sunzi_global_data.domLabel.select) { if(isNaN(variant)) { return _sunzi_find_variant_name(variant, formClass, selectClass); } else { return _sunzi_find_variant_index(variant, formClass, selectClass); } } /** sunzi 寻找变体元素-根据变体名称 **/ function _sunzi_find_variant_name(name, formClass = _sunzi_global_data.domLabel.form, selectClass = _sunzi_global_data.domLabel.select) { var selects = $(formClass).find(selectClass); for (var i = 0; i < selects.length; i++) { // 去掉2边的空格 var variantName = $(selects[i]).find(_sunzi_global_data.domLabel.label).html().replace(/(^\s*)|(\s*$)/g, ""); if (variantName.indexOf(name) > -1) return $(selects[i]); } } /** sunzi 寻找变体元素-根据变体索引值 **/ function _sunzi_find_variant_index(index, formClass = _sunzi_global_data.domLabel.form, selectClass = _sunzi_global_data.domLabel.select) { var selects = $(formClass).find(selectClass); return selects && selects.eq(index); } /** sunzi 改变变体值 **/ function _sunzi_variant_change(variant, value) { if(isNaN(variant)) { _sunzi_variant_change_name(variant, value); } else { _sunzi_variant_change_index(variant, value); } } /** sunzi 改变变体值-根据变体名称 **/ function _sunzi_variant_change_name(name, value) { var selectedVariant = _sunzi_find_variant_name(name); if(_sunzi_global_data.domLabel.type == 'select') { selectedVariant && selectedVariant.find("select").val(value); selectedVariant && selectedVariant.find("select").change(); const variantSelects = selectedVariant.parent("variant-selects")[0]; if(variantSelects) variantSelects.onVariantChange(); } else { selectedVariant.length > 0 && selectedVariant.find("input[value='" + value + "']").get(0).click(); } } /** sunzi 改变变体值-根据变体索引值 **/ function _sunzi_variant_change_index (index = 0, value) { var selectedVariant = _sunzi_find_variant_index(index); if(_sunzi_global_data.domLabel.type == 'select') { selectedVariant && selectedVariant.find("select").val(value); selectedVariant && selectedVariant.find("select").change(); const variantSelects = selectedVariant.parent("variant-selects")[0]; if(variantSelects && variantSelects.onVariantChange) variantSelects.onVariantChange(); } else if (_sunzi_global_data.domLabel.type == 'div') { // 获取所有变体值 var options = $(selectedVariant).find(_sunzi_global_data.domLabel.option); options.each((optionIndex, item) => { // 如果option里面还有标签则匹配里面的value,没有则匹配option的value var optionValue = item.children.length ? $(item.children).text().replace(/(^\s*)|(\s*$)/g, "") : $(item).text().replace(/(^\s*)|(\s*$)/g, ""); // 如果option本身是active 则不触发 if (optionValue == value && !$(item).hasClass('active')) { item.click(); return false; } }) } else { selectedVariant.length > 0 && selectedVariant.find("input[value='" + value + "']").get(0).click(); } } /** sunzi 改变变体-根据option索引值 **/ function _sunzi_variant_change_order(index, value, type = _sunzi_global_data.domLabel.type) { var selectedVariant = _sunzi_find_variant(index); if(selectedVariant.length == 0) return; if(type == 'select') { var selectDom = selectedVariant.find("select"); var curValue = selectDom.find("option").eq(value).val(); selectDom.val(curValue).change(); const variantSelects = selectedVariant.parent("variant-selects")[0]; if(variantSelects) variantSelects.onVariantChange(); } else if(type == 'radio'){ var curValue = selectedVariant.find("input").eq(value).val(); var selectDom = selectedVariant.find("input[value='" + curValue + "']"); selectDom.get(0).click(); } } /** sunzi 根据索引值获取变体值 type 0 返回选中值, 1返回索引值 **/ function _sunzi_variant_value (index = 0, type = 0) { // 注释原写法,进行shopline平台修复,变体下拉是用div实现的,而不是select。修改为查找选中的div类名.select-item.active - lyt // 0905 hotfix: 由于2.1模板商城更改变体dom结构,此处更新了select类名,index获取方式 var selectType = _sunzi_global_data.domLabel.type === "radio" ? "input:checked" : ".field__input--classic"; var dom = _sunzi_find_variant(index).find(selectType); // 如果传入1,返回选中索引值 if(type == 1) { var selectedVariantIndex; dom.children().each((index, child)=>{ if(dom.val() == child.value){ selectedVariantIndex = index } }) return selectType == ".field__input--classic" ? selectedVariantIndex : _sunzi_find_variant(index).find("input").index(dom); } else { // 默认返回选中值 if (selectType == ".field__input--classic") { var textDom = dom.find(".select-text") if(textDom.length) return textDom.data("select-text") } return dom.val(); } } /** sunzi 根据索引值获取变体值 type 0 返回选中值, 1返回索引值 **/ // function _sunzi_variant_value (index = 0, type = 0) { // // 注释原写法,进行shopline平台修复,变体下拉是用div实现的,而不是select。修改为查找选中的div类名.select-item.active - lyt // // var selectType = _sunzi_global_data.domLabel.type === "radio" ? "input:checked" : "select"; // var selectType = _sunzi_global_data.domLabel.type === "radio" ? "input:checked" : ".select-item.active"; // var dom = _sunzi_find_variant(index).find(selectType); // // 如果传入1,返回选中索引值 // if(type == 1) { // // return selectType == "select" ? dom.prop('selectedIndex') : _sunzi_find_variant(index).find("input").index(dom); // return selectType == ".select-item.active" ? dom.data('index') : _sunzi_find_variant(index).find("input").index(dom); // } else { // // 默认返回选中值 // if (selectType == ".select-item.active") { // var textDom = dom.find(".select-text") // if(textDom) return textDom.data("select-text") // } // return dom.val(); // } // } /** sunzi 隐藏变体 * 如果index为undefined 隐藏所有变体 * 个别站点变体dom并非一种,可以在sunzi-config-customize中设置hideDom **/ function _sunzi_variant_hide(index) { // 如果没有参数,隐藏所有变体dom if(index == undefined) { var hideDomStr = _sunzi_global_data.domLabel.select; Array.isArray(_sunzi_global_data.hideDom) && _sunzi_global_data.hideDom.forEach(item => hideDomStr += `, ${item}`); $(hideDomStr).each((index, item) => { $(item).hide(); $(item).removeClass('show'); }); } else { var variantDom = _sunzi_find_variant(index); if(variantDom) { variantDom.hide(); variantDom.removeClass('show'); } } } /** sunzi 显示变体 **/ function _sunzi_variant_show(index) { // 如果没有参数,显示所有变体dom if(index == undefined) { var hideDomStr = _sunzi_global_data.domLabel.select; Array.isArray(_sunzi_global_data.hideDom) && _sunzi_global_data.hideDom.forEach(item => hideDomStr += `, ${item}`); $(hideDomStr).each((index, item) => { $(item).show(); $(item).addClass('show'); }); } else { var variantDom = _sunzi_find_variant(index); if(variantDom) { variantDom.show(); variantDom.addClass('show'); } } } /** sunzi 显示loading **/ function _sunzi_loading() { $('.sunzi-loading').show(); } /** sunzi 隐藏loading **/ function _sunzi_hide_loading() { $('.sunzi-loading').hide(); } /** sunzi 禁用select第一个装饰用option,有些站点需要 **/ function _sunzi_disable_option_first(variantName) { if(variantName) { option_hide(_sunzi_find_variant(variantName).find('option').eq(0)); } else { } function option_hide(optionDom) { if(!optionDom.val()) { var _select = optionDom.parent(); _select.val(_select.find('option').eq(1).val()); _select.change(); optionDom.hide(); } } } /* sunzi 通用加车方法 **/ async function _sunzi_add_to_cart(params, quantity) { var data = params || _form.serialize(); // 如果data是空,则手动加入表单中的数据 if (!data) { var dataNew = Object.assign({}, {quantity: quantity || 1}); // 获取变体id dataNew.id = getCurProduct().id; // 构建自定义产品的加车参数 if($(_sunzi_global_data.domLabel.form).find('[name*="properties"]').length > 0){ const propertiesItem = []; $(_sunzi_global_data.domLabel.form).find('[name*="properties"]').each(function(){ let pName = $(this).attr('name').replace("properties[","").replace("]",""); if($(this).val()) propertiesItem.push({type: "text", name: pName, value: $(this).val()}); }); dataNew.properties = propertiesItem; } data = dataNew; } else { data.quantity = quantity || 1; } addCommonProperties(data) addVariantFeaturedImage(data) return new Promise(function(resolve, reject) { $.ajax({ type: "POST", url: "/api/carts/ajax-cart/add.js", data: JSON.stringify({ items: [data] }), contentType: 'application/json', dataType: "json", context: this, success: async (item) => { Cart.refresh() resolve(item); }, error: (error) => { reject(error); } }) }) } // 多产品加车 data是数组 function _sunzi_add_to_cart_multi(data) { if (data.length === 0) return; addCommonProdcut(data) data.forEach((item) => { addCommonProperties(item); addVariantFeaturedImage(item) }) return new Promise((resolve, reject) => { $.ajax({ type: "POST", url: "/api/carts/ajax-cart/add.js", data: JSON.stringify({ items: data }), contentType: 'application/json', dataType: 'json', context: this, success: async (response) => { // refresh cart data Cart.refresh(); // show success drawer var quantityHtml=` x ${$("#Quantity-main-product-info").val()} `; $(".trade-cart-sku-item-info-title.body2").html($(".title.shopline-element-title").text()+quantityHtml); $("#cart-select").addClass("top-drawer--open").show(); $('.top-drawer__mask').bind("click",function(e){ if($(e.target).closest("#cart-select").length == 1){ $("#cart-select").removeClass("top-drawer--open").hide(); } }) $(".trade-cart-banner--close").on("click",function(){ $("#cart-select").removeClass("top-drawer--open").hide(); }) resolve(response); }, error: (request, status) => { reject(request, status); } }) }) } // 添加通用Properties function addCommonProperties(mainProduct) { const host = window.location.host // soufeel补充language参数 if (host.includes("r39x33kmubdcsvja9i") || host.includes("soufeel")) { const language = mainProduct.properties.find(item => item.name === "language") if (language) return; mainProduct.properties = [ ...mainProduct.properties, { type: 'text', name: 'language', value: _sunzi_global_data["shop-v1"].language, } ] } } // 更改加车参数主图字段为变体图 function addVariantFeaturedImage(mainProduct){ mainProduct.properties.forEach((property)=>{ if(property.name == 'featured_image'){ property.value = getCurProduct('featuredImage') } }) } // 寻找主产品 function findMainProduct(data) { let mainProduct = undefined; let mainProductId = undefined; if (data.length === 1) { mainProduct = data[0]; const bindId = mainProduct.properties.find(item => item.name === "_bind") if (bindId) mainProductId = bindId.value; else { mainProductId = _create_uuid(); mainProduct.properties = [ ...mainProduct.properties, { type: 'text', name: '_bind', value: mainProductId, } ] } } else { data.some((productItem) => { const bindId = productItem.properties.find(item => item.name === "_bind") if (bindId) { mainProduct = productItem; mainProductId = bindId.value; return true; } else return false; }) } return {mainProduct, mainProductId} } // 添加通用加购 function addCommonProdcut(data) { // 新版追销参数 // 数量控制 var chaseBindQuantity = { "allow": 101, "not_allow": 102, "follow": 103 } // 删除控制 var chaseBindAloneDelete = { "allow": 201, "not_allow": 202 } // 寻找主产品 const { mainProduct, mainProductId } = findMainProduct(data) if (mainProduct && mainProductId) { // 补充properties const host = window.location.host // soufeel补充language参数 if (host.includes("r39x33kmubdcsvja9i") || host.includes("soufeel")) { mainProduct.properties = [ ...mainProduct.properties, { type: 'text', name: 'language', value: _sunzi_global_data["shop-v1"].language, } ] } // 判断加购 const isChecked = $('#insuranceBox').prop('checked'); let queue=[] if (isChecked) { const value = $('#insuranceBox').val(); // let _sunzi_related_productsItem= data[0].properties.find(item=>{ // return item.name==='_sunzi_related_products' // }) // if(_sunzi_related_productsItem){ // let _value=JSON.parse(data[0].properties['_sunzi_related_products'].value) // data[0].properties['_sunzi_related_products']={ // ...data[0].properties['_sunzi_related_products'], // value:JSON.stringify(_value.push(uuid)) // } // } // else{ // data[0].properties.push({ // type: "text", // name: "_sunzi_related_products", // value: JSON.stringify([uuid]) // }) // } queue.unshift({ "id":value, properties:[{ type: 'text', name: '_bindTo', value: mainProductId, }, { type: 'text', name: '_bindQuantity', value: chaseBindQuantity.not_allow, }, { type: 'text', name: '_bindAloneDelete', value: chaseBindAloneDelete.allow, }], "quantity": 1, }); } data.push(...queue) } } /** sunzi 获取当前产品sku **/ function _sunzi_get_sku(callback) { return _sunzi_get_product_info().sku; } function getCurProduct(type) { return _sunzi_get_product_info(type); } /** sunzi 获取当前产品信息 **/ function _sunzi_get_product_info(type) { // 产品数据 var product = {"brand":"votrecollierprenomfr","created_at":"2025-01-08T15:57:13.704+08:00","gift_card":false,"id":"16068114645458624660154095","published_at":"2025-01-08T15:57:13.769+08:00","title":"Spotify Glass Scannable Spotify Code personnalisé Musique Chanson Plaque Cadre Cadeau de Noël pour petit ami","type":"spotify frame","url":"/products/spotify-glass-scannable-spotify-code-personnalise-musique-chanson-plaque-cadre-cadeau-de-noel-pour-petit-ami","vendor":"votrecollierprenomfr","available":true,"compare_at_price":2300,"compare_at_price_max":2300,"compare_at_price_min":2300,"compare_at_price_varies":true,"description":"

Cette belle lampe LED acrylique est le meilleur cadeau parfait pour lui à Noël.
Choisissez votre chanson / album préféré et transformez-le en une belle lampe de chanson personnalisée.
Vous pouvez ajouter un code Spotify! Dès que vous scannez le code sur Spotify, votre chanson commencera instantanément à jouer
Veuillez télécharger vers le titre de la chanson, le nom de l'artiste, la photo que vous souhaitez ajouter au verre.
Light photo est une lampe originale avec votre photo.
Il peut être utilisé comme veilleuse ou comme décoration intérieure.
La base amovible vous permettra de changer la photo si nécessaire.

\n

Taille:4.7IN X 6.3IN

\n \n
\n
\n
\nTRANSLATE with x\n
\n
\n\n\n
\n\n
\n
\n
\nTRANSLATE with \n
\n
\n
COPY THE URL BELOW
\n
\n \n
\n\n \n
\n
\n
\nEMBED THE SNIPPET BELOW IN YOUR SITE \n
\n
\n
Enable collaborative features and customize widget: Bing Webmaster Portal
\n\n
\n\n
","featured_image":{"alt":"","id":"6811464544448439388","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-a70978e1-c1e0-40ff-8367-75d210c05d77-1.png?w=1000&h=1000","variants":[],"width":1000},"featured_media":{"alt":"","id":"6811464544448439388","media_type":"image","position":1,"preview_image":{"alt":"","id":"6811464544448439388","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-a70978e1-c1e0-40ff-8367-75d210c05d77-1.png?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-a70978e1-c1e0-40ff-8367-75d210c05d77-1.png?w=1000&h=1000","variants":[],"width":1000},"first_available_variant":{"available":true,"barcode":null,"compare_at_price":2300,"featured_image":null,"featured_media":null,"id":"18068114645463993369504095","image":null,"option1":null,"option2":null,"option3":null,"option4":null,"option5":null,"options":null,"price":1595,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CBS110","taxable":false,"title":null,"url":"/products/spotify-glass-scannable-spotify-code-personnalise-musique-chanson-plaque-cadre-cadeau-de-noel-pour-petit-ami?sku=18068114645463993369504095","weight_in_unit":"0.05","weight_unit":"kg","inventory_management":true,"inventory_policy":"deny","inventory_quantity":999960,"quantity_rule":{"increment":1,"min":1,"max":null}},"handle":"spotify-glass-scannable-spotify-code-personnalise-musique-chanson-plaque-cadre-cadeau-de-noel-pour-petit-ami","has_only_default_variant":true,"images":[{"alt":"","id":"6811464544448439388","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-a70978e1-c1e0-40ff-8367-75d210c05d77-1.png?w=1000&h=1000","variants":[],"width":1000},{"alt":"","id":"6811464544448439389","media_type":"image","position":2,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-1.png?w=1000&h=1000","variants":[],"width":1000},{"alt":"","id":"6811464544448439390","media_type":"image","position":3,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/d0eb4566038a89f74655c15a912bbfa0-268c51a2-e94d-4cdf-8a5d-3cf580e2f021-1-1.png?w=1000&h=1000","variants":[],"width":1000}],"media":[{"alt":"","id":"6811464544448439388","media_type":"image","position":1,"preview_image":{"alt":"","id":"6811464544448439388","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-a70978e1-c1e0-40ff-8367-75d210c05d77-1.png?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-a70978e1-c1e0-40ff-8367-75d210c05d77-1.png?w=1000&h=1000","variants":[],"width":1000,"variant_image":false},{"alt":"","id":"6811464544448439389","media_type":"image","position":2,"preview_image":{"alt":"","id":"6811464544448439389","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-1.png?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-1.png?w=1000&h=1000","variants":[],"width":1000,"variant_image":false},{"alt":"","id":"6811464544448439390","media_type":"image","position":3,"preview_image":{"alt":"","id":"6811464544448439390","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/d0eb4566038a89f74655c15a912bbfa0-268c51a2-e94d-4cdf-8a5d-3cf580e2f021-1-1.png?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/d0eb4566038a89f74655c15a912bbfa0-268c51a2-e94d-4cdf-8a5d-3cf580e2f021-1-1.png?w=1000&h=1000","variants":[],"width":1000,"variant_image":false}],"options":[],"options_by_name":{},"options_with_values":[],"price":1595,"price_max":1595,"price_min":1595,"price_varies":true,"requires_selling_plan":false,"selected_variant":null,"selected_or_first_available_variant":{"available":true,"barcode":null,"compare_at_price":2300,"featured_image":null,"featured_media":null,"id":"18068114645463993369504095","image":null,"option1":null,"option2":null,"option3":null,"option4":null,"option5":null,"options":null,"price":1595,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CBS110","taxable":false,"title":null,"url":"/products/spotify-glass-scannable-spotify-code-personnalise-musique-chanson-plaque-cadre-cadeau-de-noel-pour-petit-ami?sku=18068114645463993369504095","weight_in_unit":"0.05","weight_unit":"kg","inventory_management":true,"inventory_policy":"deny","inventory_quantity":999960,"quantity_rule":{"increment":1,"min":1,"max":null}},"tags":["custom-spotify-code","custom-sunzi-spotify-code","custom-sunzi-vip","delivery-guaranteed","pla-google-2","pla-google1"],"variants":[{"available":true,"barcode":null,"compare_at_price":2300,"featured_image":null,"featured_media":null,"id":"18068114645463993369504095","image":null,"option1":null,"option2":null,"option3":null,"option4":null,"option5":null,"options":null,"price":1595,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CBS110","taxable":false,"title":null,"url":"/products/spotify-glass-scannable-spotify-code-personnalise-musique-chanson-plaque-cadre-cadeau-de-noel-pour-petit-ami?sku=18068114645463993369504095","weight_in_unit":"0.05","weight_unit":"kg","inventory_management":true,"inventory_policy":"deny","inventory_quantity":999960,"quantity_rule":{"increment":1,"min":1,"max":null}}]}; //console.log("pd",product) // 当前产品id var queryId = getQueryVariable('sku'); //console.log("varId",[$('[name="id"]').val(), queryId, product.variants[0].id]) var variantId = undefined; var curProduct = undefined; if($('[name="id"]').val() || queryId) { variantId = $('[name="id"]').val() || queryId; curProduct = product.variants.find(item => item.id == variantId); } else if ($(".shopline-element-sku-trade-select .select-item.active").length > 0) { variantIndex = $($(".shopline-element-sku-trade-select .select-item.active")[0]).data("index"); curProduct = product.variants[variantIndex]; } else { variantId = product.variants[0].id; curProduct = product.variants.find(item => item.id == variantId); } //console.log("curProduct",curProduct) var result = '' switch(type) { case 'featuredImage': var _image = curProduct.featured_image ? curProduct.featured_image.src : product.featured_image.src; // result = _image.replace(/\?[a-zA-Z0-9=]+/, ''); result = _image.split('?')[0] break; case 'price': result = Number((curProduct.price / 100).toFixed(2)); break; case 'originPrice': var originPrice = curProduct.compare_at_price; result = originPrice ? Number((originPrice / 100).toFixed(2)) : 100; break; case 'sku': result = curProduct.sku break; default: result = curProduct; } return result; } // 获取变体加价 function _sunzi_get_markup_price(variantIndex) { var addPrice = 0; var curProduct = _sunzi_get_product_info(); var productJSON = {"brand":"votrecollierprenomfr","created_at":"2025-01-08T15:57:13.704+08:00","gift_card":false,"id":"16068114645458624660154095","published_at":"2025-01-08T15:57:13.769+08:00","title":"Spotify Glass Scannable Spotify Code personnalisé Musique Chanson Plaque Cadre Cadeau de Noël pour petit ami","type":"spotify frame","url":"/products/spotify-glass-scannable-spotify-code-personnalise-musique-chanson-plaque-cadre-cadeau-de-noel-pour-petit-ami","vendor":"votrecollierprenomfr","available":true,"compare_at_price":2300,"compare_at_price_max":2300,"compare_at_price_min":2300,"compare_at_price_varies":true,"description":"

Cette belle lampe LED acrylique est le meilleur cadeau parfait pour lui à Noël.
Choisissez votre chanson / album préféré et transformez-le en une belle lampe de chanson personnalisée.
Vous pouvez ajouter un code Spotify! Dès que vous scannez le code sur Spotify, votre chanson commencera instantanément à jouer
Veuillez télécharger vers le titre de la chanson, le nom de l'artiste, la photo que vous souhaitez ajouter au verre.
Light photo est une lampe originale avec votre photo.
Il peut être utilisé comme veilleuse ou comme décoration intérieure.
La base amovible vous permettra de changer la photo si nécessaire.

\n

Taille:4.7IN X 6.3IN

\n \n
\n
\n
\nTRANSLATE with x\n
\n
\n\n\n
\n\n
\n
\n
\nTRANSLATE with \n
\n
\n
COPY THE URL BELOW
\n
\n \n
\n\n \n
\n
\n
\nEMBED THE SNIPPET BELOW IN YOUR SITE \n
\n
\n
Enable collaborative features and customize widget: Bing Webmaster Portal
\n\n
\n\n
","featured_image":{"alt":"","id":"6811464544448439388","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-a70978e1-c1e0-40ff-8367-75d210c05d77-1.png?w=1000&h=1000","variants":[],"width":1000},"featured_media":{"alt":"","id":"6811464544448439388","media_type":"image","position":1,"preview_image":{"alt":"","id":"6811464544448439388","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-a70978e1-c1e0-40ff-8367-75d210c05d77-1.png?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-a70978e1-c1e0-40ff-8367-75d210c05d77-1.png?w=1000&h=1000","variants":[],"width":1000},"first_available_variant":{"available":true,"barcode":null,"compare_at_price":2300,"featured_image":null,"featured_media":null,"id":"18068114645463993369504095","image":null,"option1":null,"option2":null,"option3":null,"option4":null,"option5":null,"options":null,"price":1595,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CBS110","taxable":false,"title":null,"url":"/products/spotify-glass-scannable-spotify-code-personnalise-musique-chanson-plaque-cadre-cadeau-de-noel-pour-petit-ami?sku=18068114645463993369504095","weight_in_unit":"0.05","weight_unit":"kg","inventory_management":true,"inventory_policy":"deny","inventory_quantity":999960,"quantity_rule":{"increment":1,"min":1,"max":null}},"handle":"spotify-glass-scannable-spotify-code-personnalise-musique-chanson-plaque-cadre-cadeau-de-noel-pour-petit-ami","has_only_default_variant":true,"images":[{"alt":"","id":"6811464544448439388","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-a70978e1-c1e0-40ff-8367-75d210c05d77-1.png?w=1000&h=1000","variants":[],"width":1000},{"alt":"","id":"6811464544448439389","media_type":"image","position":2,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-1.png?w=1000&h=1000","variants":[],"width":1000},{"alt":"","id":"6811464544448439390","media_type":"image","position":3,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/d0eb4566038a89f74655c15a912bbfa0-268c51a2-e94d-4cdf-8a5d-3cf580e2f021-1-1.png?w=1000&h=1000","variants":[],"width":1000}],"media":[{"alt":"","id":"6811464544448439388","media_type":"image","position":1,"preview_image":{"alt":"","id":"6811464544448439388","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-a70978e1-c1e0-40ff-8367-75d210c05d77-1.png?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-a70978e1-c1e0-40ff-8367-75d210c05d77-1.png?w=1000&h=1000","variants":[],"width":1000,"variant_image":false},{"alt":"","id":"6811464544448439389","media_type":"image","position":2,"preview_image":{"alt":"","id":"6811464544448439389","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-1.png?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-1.png?w=1000&h=1000","variants":[],"width":1000,"variant_image":false},{"alt":"","id":"6811464544448439390","media_type":"image","position":3,"preview_image":{"alt":"","id":"6811464544448439390","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/d0eb4566038a89f74655c15a912bbfa0-268c51a2-e94d-4cdf-8a5d-3cf580e2f021-1-1.png?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/d0eb4566038a89f74655c15a912bbfa0-268c51a2-e94d-4cdf-8a5d-3cf580e2f021-1-1.png?w=1000&h=1000","variants":[],"width":1000,"variant_image":false}],"options":[],"options_by_name":{},"options_with_values":[],"price":1595,"price_max":1595,"price_min":1595,"price_varies":true,"requires_selling_plan":false,"selected_variant":null,"selected_or_first_available_variant":{"available":true,"barcode":null,"compare_at_price":2300,"featured_image":null,"featured_media":null,"id":"18068114645463993369504095","image":null,"option1":null,"option2":null,"option3":null,"option4":null,"option5":null,"options":null,"price":1595,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CBS110","taxable":false,"title":null,"url":"/products/spotify-glass-scannable-spotify-code-personnalise-musique-chanson-plaque-cadre-cadeau-de-noel-pour-petit-ami?sku=18068114645463993369504095","weight_in_unit":"0.05","weight_unit":"kg","inventory_management":true,"inventory_policy":"deny","inventory_quantity":999960,"quantity_rule":{"increment":1,"min":1,"max":null}},"tags":["custom-spotify-code","custom-sunzi-spotify-code","custom-sunzi-vip","delivery-guaranteed","pla-google-2","pla-google1"],"variants":[{"available":true,"barcode":null,"compare_at_price":2300,"featured_image":null,"featured_media":null,"id":"18068114645463993369504095","image":null,"option1":null,"option2":null,"option3":null,"option4":null,"option5":null,"options":null,"price":1595,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CBS110","taxable":false,"title":null,"url":"/products/spotify-glass-scannable-spotify-code-personnalise-musique-chanson-plaque-cadre-cadeau-de-noel-pour-petit-ami?sku=18068114645463993369504095","weight_in_unit":"0.05","weight_unit":"kg","inventory_management":true,"inventory_policy":"deny","inventory_quantity":999960,"quantity_rule":{"increment":1,"min":1,"max":null}}]}; var compareProduct = productJSON.variants.find(variant => { return curProduct.options.every((option, index) => { if(index == variantIndex) { return variant.options[index] !== option; } else { return variant.options[index] == option; } }); }); if(compareProduct) { price = (curProduct.price - compareProduct.price) / 100; addPrice = Math.abs(price.toFixed(2)); } return addPrice; } // 获取地址栏参数 function getQueryVariable(variable) { var query = window.location.search.substring(1); var vars = query.split("&"); for (var i=0;i 0) { const reg = /android [\d._]+/gi; const v_info = _agent.match(reg); version = `${v_info}`.replace(/[^0-9|_.]/gi, '').replace(/_/gi, '.'); // 得到版本号4.2.2 version = parseInt(version.split('.')[0]); // 得到版本号第一位 } return version; } /** 获取ios版本 **/ function _getIosVersion(){ var _agent = window.navigator.userAgent.toLowerCase(); let version = false; if (_agent.indexOf('like mac os x') > 0) { const reg = /os [\d._]+/gi; const v_info = _agent.match(reg); version = `${v_info}`.replace(/[^0-9|_.]/gi, '').replace(/_/gi, '.'); // 得到版本号9.3.2或者9.0 version = parseInt(version.split('.')[0]); // 得到版本号第一位 } return version; }; /** 商城生成随机数方法 **/ function _sunzi_cateTempVip(){ //var t = jQuery('[name="id"]').val(); var productSkuParam = new URL(window.location.href) var t = productSkuParam.searchParams.get('sku') ? productSkuParam.searchParams.get('sku') : jQuery('#product-sku-trade-data_productDetail').attr('data-selectsku') document.querySelectorAll("[name^='properties[']").forEach(function(e,item){ var n = "radio" !== e.type || e.checked; ("properties[_tempId]" != e.name && "properties[_tempVip]" != e.name) && "" != e.value && n && (t += e.name + ":" + e.value + ",") }) var e, n, r, i = 0; for (e = 0, r = t.length; e < r; e++){ n = t.charCodeAt(e), i = (i << 5) - i + n, i |= 0; } return Math.abs(i); }
\n\n\n
\n\n
\nTRANSLATE with \n
\n
\n
COPY THE URL BELOW
\n
\n \n
\n\n \n
\n
\n
\nEMBED THE SNIPPET BELOW IN YOUR SITE \n
\n
\n
Enable collaborative features and customize widget: Bing Webmaster Portal
\n\n
\n\n","featured_image":{"alt":"","id":"6811464544448439388","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-a70978e1-c1e0-40ff-8367-75d210c05d77-1.png?w=1000&h=1000","variants":[],"width":1000},"featured_media":{"alt":"","id":"6811464544448439388","media_type":"image","position":1,"preview_image":{"alt":"","id":"6811464544448439388","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-a70978e1-c1e0-40ff-8367-75d210c05d77-1.png?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-a70978e1-c1e0-40ff-8367-75d210c05d77-1.png?w=1000&h=1000","variants":[],"width":1000},"first_available_variant":{"available":true,"barcode":null,"compare_at_price":2300,"featured_image":null,"featured_media":null,"id":"18068114645463993369504095","image":null,"option1":null,"option2":null,"option3":null,"option4":null,"option5":null,"options":null,"price":1595,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CBS110","taxable":false,"title":null,"url":"/products/spotify-glass-scannable-spotify-code-personnalise-musique-chanson-plaque-cadre-cadeau-de-noel-pour-petit-ami?sku=18068114645463993369504095","weight_in_unit":"0.05","weight_unit":"kg","inventory_management":true,"inventory_policy":"deny","inventory_quantity":999960,"quantity_rule":{"increment":1,"min":1,"max":null}},"handle":"spotify-glass-scannable-spotify-code-personnalise-musique-chanson-plaque-cadre-cadeau-de-noel-pour-petit-ami","has_only_default_variant":true,"images":[{"alt":"","id":"6811464544448439388","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-a70978e1-c1e0-40ff-8367-75d210c05d77-1.png?w=1000&h=1000","variants":[],"width":1000},{"alt":"","id":"6811464544448439389","media_type":"image","position":2,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-1.png?w=1000&h=1000","variants":[],"width":1000},{"alt":"","id":"6811464544448439390","media_type":"image","position":3,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/d0eb4566038a89f74655c15a912bbfa0-268c51a2-e94d-4cdf-8a5d-3cf580e2f021-1-1.png?w=1000&h=1000","variants":[],"width":1000}],"media":[{"alt":"","id":"6811464544448439388","media_type":"image","position":1,"preview_image":{"alt":"","id":"6811464544448439388","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-a70978e1-c1e0-40ff-8367-75d210c05d77-1.png?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-a70978e1-c1e0-40ff-8367-75d210c05d77-1.png?w=1000&h=1000","variants":[],"width":1000,"variant_image":false},{"alt":"","id":"6811464544448439389","media_type":"image","position":2,"preview_image":{"alt":"","id":"6811464544448439389","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-1.png?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/CBS110-DTC1-1.png?w=1000&h=1000","variants":[],"width":1000,"variant_image":false},{"alt":"","id":"6811464544448439390","media_type":"image","position":3,"preview_image":{"alt":"","id":"6811464544448439390","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/d0eb4566038a89f74655c15a912bbfa0-268c51a2-e94d-4cdf-8a5d-3cf580e2f021-1-1.png?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0","attached_to_variant":false,"height":1000,"product_id":"16068114645458624660154095","src":"https://img.myshopline.com/image/store/1736214930012/d0eb4566038a89f74655c15a912bbfa0-268c51a2-e94d-4cdf-8a5d-3cf580e2f021-1-1.png?w=1000&h=1000","variants":[],"width":1000,"variant_image":false}],"options":[],"options_by_name":{},"options_with_values":[],"price":1595,"price_max":1595,"price_min":1595,"price_varies":true,"requires_selling_plan":false,"selected_variant":null,"selected_or_first_available_variant":{"available":true,"barcode":null,"compare_at_price":2300,"featured_image":null,"featured_media":null,"id":"18068114645463993369504095","image":null,"option1":null,"option2":null,"option3":null,"option4":null,"option5":null,"options":null,"price":1595,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CBS110","taxable":false,"title":null,"url":"/products/spotify-glass-scannable-spotify-code-personnalise-musique-chanson-plaque-cadre-cadeau-de-noel-pour-petit-ami?sku=18068114645463993369504095","weight_in_unit":"0.05","weight_unit":"kg","inventory_management":true,"inventory_policy":"deny","inventory_quantity":999960,"quantity_rule":{"increment":1,"min":1,"max":null}},"tags":["custom-spotify-code","custom-sunzi-spotify-code","custom-sunzi-vip","delivery-guaranteed","pla-google-2","pla-google1"],"variants":[{"available":true,"barcode":null,"compare_at_price":2300,"featured_image":null,"featured_media":null,"id":"18068114645463993369504095","image":null,"option1":null,"option2":null,"option3":null,"option4":null,"option5":null,"options":null,"price":1595,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CBS110","taxable":false,"title":null,"url":"/products/spotify-glass-scannable-spotify-code-personnalise-musique-chanson-plaque-cadre-cadeau-de-noel-pour-petit-ami?sku=18068114645463993369504095","weight_in_unit":"0.05","weight_unit":"kg","inventory_management":true,"inventory_policy":"deny","inventory_quantity":999960,"quantity_rule":{"increment":1,"min":1,"max":null}}]} var relatedProducts = []; var mainProductBindId = _create_uuid() // 加车完清除掉定制化信息 clearSunziForm(); $('#sunzi-cart').val(JSON.stringify({ 'image': [ effect ] })); var output = { '_sunzi_source': data.source, '_sunzi_text': { value: `${data.color.value}|${data.track.name}|${data.track.artists}|${data.track.uri}|${SpotifyCode.formatTime(data.track.duration_ms)}` }, '_sunzi_effect': _sunzi_get_product_info("featuredImage"), '_sunzi_compose': [{ 'rule': 19, 'data': data, }], }; var promiseArr = []; // 根据vip添加虚拟产品 or 关联产品 if(vip) { var tempvip = _sunzi_cateTempVip(); // soufeel购物车只识别number类型,勿改 // 关联产品 if(vip.thumbnail) { relatedProducts.push(tempvip); promiseArr.push({ "id": vip.virtualId, "properties": [ { type: 'text', name: '_bindTo', value: mainProductBindId, }, { type: 'text', name: '_bindQuantity', value: chaseBindQuantity.not_allow, }, { type: 'text', name: '_bindAloneDelete', value: chaseBindAloneDelete.not_allow, }] }); } // vip产品 else { promiseArr.push({ "id": vip.virtualId, "properties": [ { type: 'text', name: '_bindTo', value: mainProductBindId, }, { type: 'text', name: '_bindQuantity', value: chaseBindQuantity.not_allow, }, { type: 'text', name: '_bindAloneDelete', value: chaseBindAloneDelete.not_allow, }, { type: "text", name: "_tempVip", value: tempvip }], mask: 'body', refresh: true, }); $('#_tempVip').val(tempvip); $('#sunzi-vip').val('VIP Service'); } } else { $('#sunzi-vip').val(''); } // 刻字加价信息 if (data.layout.lineTextCoord && data.layout.lineTextCoord.value) { // 添加音轨刻字信息 output['_sunzi_spotify_text'] = [{ value: data.layout.lineTextCoord.value, font: data.layout.lineTextCoord.font.name, }]; } // 19.2 group 多个刻字信息 else if(data.layout.children) { data.layout.children.forEach(item => { if(item.lineTextCoord){ var textData = { value: item.lineTextCoord.value, font: item.lineTextCoord.font.name, } output['_sunzi_spotify_text'] ? output['_sunzi_spotify_text'].push(textData) : (output['_sunzi_spotify_text'] = [textData]); } }); } // 19.8 图片多个刻字信息 else if(data.layout.albumCoord && data.layout.albumCoord.lineTextCoord) { data.layout.albumCoord.lineTextCoord.forEach(item => { var textData = { value: item.value, font: item.font.name, } output['_sunzi_spotify_text'] ? output['_sunzi_spotify_text'].push(textData) : (output['_sunzi_spotify_text'] = [textData]); }); } // 刻字加价产品加车 if(data.layout.lineTextCoord && data.layout.lineTextCoord.increase && data.layout.lineTextCoord.increase.virtualId && data.layout.lineTextCoord.value) { var code = _create_uuid(); $('#_sunzi_add_text').val(code); promiseArr.push({ "id": data.layout.lineTextCoord.increase.virtualId, properties: [ { type: 'text', name: '_bindTo', value: mainProductBindId, }, { type: 'text', name: '_bindQuantity', value: chaseBindQuantity.not_allow, }, { type: 'text', name: '_bindAloneDelete', value: chaseBindAloneDelete.not_allow, }, { type: "text", name: "_sunzi_add_text", value: code }], mask: 'body', refresh: true, }); } $('#sunzi-input').val(JSON.stringify(output)); //$('#sunzi-related-products').val(JSON.stringify(relatedProducts)); const mainProductProperties = [ { type: 'text', name: "customInfo", value: JSON.stringify(output), }, { type: 'text', name: "_from", value: "sunzi-spotify-code", }, { type: 'text', name: "_sunzi_cart", value: JSON.stringify({ 'image': [ effect ] }) }, //更新新版绑定参数_bind,取消旧绑定 //{ // type: "text", // name: "_sunzi_related_products", // value: JSON.stringify(relatedProducts) //}, { type: 'text', name: "featured_image", value: product.featured_image.src, } ]; // 如有追销,主产品加绑定_bind if(vip || relatedProducts.length || data.layout.lineTextCoord && data.layout.lineTextCoord.increase && data.layout.lineTextCoord.increase.virtualId && data.layout.lineTextCoord.value){ mainProductProperties.push( { type: 'text', name: '_bind', value: mainProductBindId } ) } // 获取定制参数 const currentVariantInfo = getCurProduct(); // 加车主产品 promiseArr.push({ id: currentVariantInfo.id, properties: mainProductProperties, }); await _sunzi_add_to_cart_multi(promiseArr.map(item => Object.assign({ quantity: 1 }, item))); _sunzi_hide_loading(); } ); }); // 绑定变体切换事件 $('div[id^="sunzi-variant-item"]').each(function(index) { $(this).find('.sunzi-variant-options-item').on('click', function() { if($(this).hasClass('active')) return; $(`#sunzi-variant-item-${index} .sunzi-variant-options-item`).removeClass('active'); $(this).addClass('active'); _sunzi_variant_change(index, $(this).data('value')); }); }); // 清除孙子定制化信息 function clearSunziForm() { $('#sunzi-bind, #sunzi-vip, #_tempVip').val(''); // 如果有的站验证custominfo不能为空的 $('#sunzi-input').val("{}"); } /** 其他自定义函数 end **/