$product = {"id":7369158000739,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - Snoopy 史努比 - 夏日活動","handle":"iphone-14-plus-mod-nx-printable-pl61","description":null,"published_at":"2024-06-11T16:13:28+08:00","created_at":"2024-04-23T15:35:23+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Snoopy 史努比","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-snoopy","device-iPhone 14 Plus","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-snoopy","Top50","type-Mod NX Printable"],"price":90000,"price_min":90000,"price_max":90000,"available":true,"price_varies":false,"compare_at_price":null,"compare_at_price_min":0,"compare_at_price_max":0,"compare_at_price_varies":false,"variants":[{"id":41793127383139,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PL61","requires_shipping":true,"taxable":true,"featured_image":{"id":31386939916387,"product_id":7369158000739,"position":5,"created_at":"2024-04-23T15:35:36+08:00","updated_at":"2024-04-23T15:35:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b1883ba78a69a4a137983b63d2cbeb0eb39f701_5b86640c-44c4-402f-a073-dc9f1f16c052.webp?v=1713857736","variant_ids":[41793127383139]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - Snoopy 史努比 - 夏日活動 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0126124-PL61","featured_media":{"alt":null,"id":23789178028131,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b1883ba78a69a4a137983b63d2cbeb0eb39f701_5b86640c-44c4-402f-a073-dc9f1f16c052.webp?v=1713857736"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5aa73cd473d60d29987fd2ec1b87eac795902091_d4516c80-b018-4b0e-ad2f-9334c7f9695f.webp?v=1713857725","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9218821eac7775534e5d761fe28adadd8f1191ce_9ecf892c-c5bb-4c86-af51-24282c9975e9.webp?v=1713857728","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b0418de190dee710220c3c5b799c7f4c2ec0394_ad972caf-81ae-4ac1-a3c5-c23e7e6dfa84.webp?v=1713857731","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51c6fcba2249a42b6dcf6985be66d1711ce4e12b_617ef11d-1454-43ce-b4f4-2f65b901555c.webp?v=1713857733","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b1883ba78a69a4a137983b63d2cbeb0eb39f701_5b86640c-44c4-402f-a073-dc9f1f16c052.webp?v=1713857736","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ab58255ad38fae1078dd90a4bc6cb5f6850414f_111d91f7-9ae4-49ae-bbd7-673851501d9b.webp?v=1713857738","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/beda45fed9d0360f923e5179183fb06f28922bb9_1dada999-bd5f-4123-8ee4-db1f879c5781.webp?v=1713857741","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/359a3461d69a5cd069ee8b83f0492ed447563e67_16a26baf-b0e8-4926-bd9e-d28bffec09da.webp?v=1713857743","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ad39616b838d2eba77a51e29a78b366ed0d2775_6fd781dd-0948-4292-a7d5-b94de9c3b4b8.webp?v=1713857746","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02cdd4e12406ce5ee0e545af877c464e320d7146_b50b29f2-ba45-4511-8ad4-4d13569209ab.webp?v=1713857748"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5aa73cd473d60d29987fd2ec1b87eac795902091_d4516c80-b018-4b0e-ad2f-9334c7f9695f.webp?v=1713857725","options":["color"],"media":[{"alt":null,"id":23789174849635,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5aa73cd473d60d29987fd2ec1b87eac795902091_d4516c80-b018-4b0e-ad2f-9334c7f9695f.webp?v=1713857725"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5aa73cd473d60d29987fd2ec1b87eac795902091_d4516c80-b018-4b0e-ad2f-9334c7f9695f.webp?v=1713857725","width":2000},{"alt":null,"id":23789175472227,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9218821eac7775534e5d761fe28adadd8f1191ce_9ecf892c-c5bb-4c86-af51-24282c9975e9.webp?v=1713857728"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9218821eac7775534e5d761fe28adadd8f1191ce_9ecf892c-c5bb-4c86-af51-24282c9975e9.webp?v=1713857728","width":2000},{"alt":null,"id":23789176356963,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b0418de190dee710220c3c5b799c7f4c2ec0394_ad972caf-81ae-4ac1-a3c5-c23e7e6dfa84.webp?v=1713857731"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b0418de190dee710220c3c5b799c7f4c2ec0394_ad972caf-81ae-4ac1-a3c5-c23e7e6dfa84.webp?v=1713857731","width":2000},{"alt":null,"id":23789177143395,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51c6fcba2249a42b6dcf6985be66d1711ce4e12b_617ef11d-1454-43ce-b4f4-2f65b901555c.webp?v=1713857733"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51c6fcba2249a42b6dcf6985be66d1711ce4e12b_617ef11d-1454-43ce-b4f4-2f65b901555c.webp?v=1713857733","width":2000},{"alt":null,"id":23789178028131,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b1883ba78a69a4a137983b63d2cbeb0eb39f701_5b86640c-44c4-402f-a073-dc9f1f16c052.webp?v=1713857736"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b1883ba78a69a4a137983b63d2cbeb0eb39f701_5b86640c-44c4-402f-a073-dc9f1f16c052.webp?v=1713857736","width":2000},{"alt":null,"id":23789178650723,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ab58255ad38fae1078dd90a4bc6cb5f6850414f_111d91f7-9ae4-49ae-bbd7-673851501d9b.webp?v=1713857738"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ab58255ad38fae1078dd90a4bc6cb5f6850414f_111d91f7-9ae4-49ae-bbd7-673851501d9b.webp?v=1713857738","width":2000},{"alt":null,"id":23789179142243,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/beda45fed9d0360f923e5179183fb06f28922bb9_1dada999-bd5f-4123-8ee4-db1f879c5781.webp?v=1713857741"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/beda45fed9d0360f923e5179183fb06f28922bb9_1dada999-bd5f-4123-8ee4-db1f879c5781.webp?v=1713857741","width":2000},{"alt":null,"id":23789180092515,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/359a3461d69a5cd069ee8b83f0492ed447563e67_16a26baf-b0e8-4926-bd9e-d28bffec09da.webp?v=1713857743"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/359a3461d69a5cd069ee8b83f0492ed447563e67_16a26baf-b0e8-4926-bd9e-d28bffec09da.webp?v=1713857743","width":2000},{"alt":null,"id":23789180584035,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ad39616b838d2eba77a51e29a78b366ed0d2775_6fd781dd-0948-4292-a7d5-b94de9c3b4b8.webp?v=1713857746"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ad39616b838d2eba77a51e29a78b366ed0d2775_6fd781dd-0948-4292-a7d5-b94de9c3b4b8.webp?v=1713857746","width":2000},{"alt":null,"id":23789181534307,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02cdd4e12406ce5ee0e545af877c464e320d7146_b50b29f2-ba45-4511-8ad4-4d13569209ab.webp?v=1713857748"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02cdd4e12406ce5ee0e545af877c464e320d7146_b50b29f2-ba45-4511-8ad4-4d13569209ab.webp?v=1713857748","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41793127383139,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PL61","requires_shipping":true,"taxable":true,"featured_image":{"id":31386939916387,"product_id":7369158000739,"position":5,"created_at":"2024-04-23T15:35:36+08:00","updated_at":"2024-04-23T15:35:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b1883ba78a69a4a137983b63d2cbeb0eb39f701_5b86640c-44c4-402f-a073-dc9f1f16c052.webp?v=1713857736","variant_ids":[41793127383139]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - Snoopy 史努比 - 夏日活動 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0126124-PL61","featured_media":{"alt":null,"id":23789178028131,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b1883ba78a69a4a137983b63d2cbeb0eb39f701_5b86640c-44c4-402f-a073-dc9f1f16c052.webp?v=1713857736"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41793127383139,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PL61","requires_shipping":true,"taxable":true,"featured_image":{"id":31386939916387,"product_id":7369158000739,"position":5,"created_at":"2024-04-23T15:35:36+08:00","updated_at":"2024-04-23T15:35:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b1883ba78a69a4a137983b63d2cbeb0eb39f701_5b86640c-44c4-402f-a073-dc9f1f16c052.webp?v=1713857736","variant_ids":[41793127383139]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - Snoopy 史努比 - 夏日活動 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0126124-PL61","featured_media":{"alt":null,"id":23789178028131,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b1883ba78a69a4a137983b63d2cbeb0eb39f701_5b86640c-44c4-402f-a073-dc9f1f16c052.webp?v=1713857736"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null; $brand_handle = null; $type = ""; var sellingStatus // 只有設計款(SKU 含 '-')才需要合圖 if ($isMerge && $defaultVariant.sku.includes('-')) { $(document).ready(function() { var productImg = $product.images[0]; var bumperImg = window.getProductImageUrl($defaultVariant.sku.split('-')[0]); var layers = ($type === 'mod-nx-backplate' || $type === 'mod-backplate') ? [productImg, bumperImg] : [bumperImg, productImg]; window.mergeProductImages(layers).then(function (mergedImg) { $('.merged-img').attr('src', mergedImg); }); }); }; var sellingStatusData window.fetchSellingStatus().then(data => { try { sellingStatusData = data; } catch (error) { sellingStatusData = null console.error('Unable to parse selling status', error) } $(document).ready(function() { handleSellingStatus($defaultVariant.sku); }); }) function handleSellingStatus(currentSku) { if (!sellingStatusData) { console.error('No selling status available!') return } const sellingStatusElement = document.getElementById('selling-status') const addToCartButton = document.getElementById('AddToCart-product-template') const currentProductSku = currentSku.replace(/-(.*)$/, '-') if ($variants) { const flattenedSellingStatus = [...sellingStatusData.pending, ...sellingStatusData.preorder] const matchSellingStatusProduct = flattenedSellingStatus.filter(product => currentProductSku === product.sku) if (matchSellingStatusProduct.length > 0) { const isProductPending = matchSellingStatusProduct[0].status === 'pending' const matchDate = matchSellingStatusProduct[0].date sellingStatus = isProductPending ? "缺貨中" : "預購完成出貨日:" + matchDate sellingStatusElement.textContent = sellingStatus if (sellingStatus.includes("缺貨中")){ addToCartButton.disabled ='true'; addToCartButton.textContent = "缺貨中無法加入購物車" } else { addToCartButton.textContent = "加到購物車" } } else { sellingStatusElement.textContent = '' addToCartButton.textContent = "加到購物車" }; }; }; document.addEventListener('DOMContentLoaded', function () { var currentVariantSelect = document.getElementById('SingleOptionSelector-0') currentVariantSelect.addEventListener('change', function() { var currentSku = $('#current_sku').text() var skuElement = document.getElementById('current-sku') skuElement.textContent = currentSku handleSellingStatus(currentSku) }); });
// Override default values of shop.strings for each template. // Alternate product templates can change values of // add to cart button, sold out, and unavailable states here. theme.productStrings = { addToCart: "加到購物車", soldOut: "售完", unavailable: "停產" }