$product = {"id":7408503685219,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Look - 大自然的傑作(錫安國家公園)","handle":"iphone-12-pro-max-mod-nx-printable-af14","description":null,"published_at":"2024-06-11T16:39:05+08:00","created_at":"2024-05-03T15:39:29+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Look","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-look","device-iPhone 12 pro max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-look","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":41886222549091,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-AF14","requires_shipping":true,"taxable":true,"featured_image":{"id":31472446341219,"product_id":7408503685219,"position":6,"created_at":"2024-05-03T15:39:44+08:00","updated_at":"2024-05-03T15:39:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63603c429e0fd9962aa6749c91864e640d9657c8_7df9cf3c-723c-4065-9186-971980fc6195.webp?v=1714721984","variant_ids":[41886222549091]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Look - 大自然的傑作(錫安國家公園) - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118724-AF14","featured_media":{"alt":null,"id":23877363368035,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63603c429e0fd9962aa6749c91864e640d9657c8_7df9cf3c-723c-4065-9186-971980fc6195.webp?v=1714721984"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0c6ef2bf888dda168d479dab14b6b01996f092f_6c6816fe-483a-4a5e-8b71-3c37704cb9df.webp?v=1714721971","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec79bb21fa6717d292ad007bb1100bb7036c09fd_3638a6e6-9887-4647-82ba-48400a61ba2e.webp?v=1714721974","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95ddb5eaeca883419af419b43a5548b8626205aa_b1c283e4-d604-40f8-81c1-4f80647115fb.webp?v=1714721976","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a25ef7a05dcc45f82273881479cc76762929ebb7_c7b37965-ed9d-431e-86c6-b9a5e269afb9.webp?v=1714721979","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/593092a473a6d2bf75fee9dc8d5682a52621c4b1_52de04d7-b9c0-4ceb-9e7b-acd9e4476c49.webp?v=1714721981","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63603c429e0fd9962aa6749c91864e640d9657c8_7df9cf3c-723c-4065-9186-971980fc6195.webp?v=1714721984","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab49521e53ccf3fd73607b9a681c79405cc0c066_c27dbeb3-f6e6-4ac0-9fab-fb56ec71d358.webp?v=1714721986","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/576f2749e2fd4b87587e7b5385938197888357b5_b66a5c0b-fe06-43be-8c98-1f635941deb1.webp?v=1714721988","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02a6c611e801d9212b1d80b06c103e48c5c3f470_055250e4-f96c-43b0-9ef1-67e7d45ce615.webp?v=1714721991","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42f8f819d9ef18375f78dffa79361bb48b9f792b_56a6d4a0-c164-49ac-8ae6-1acdc5a48b56.webp?v=1714721993"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0c6ef2bf888dda168d479dab14b6b01996f092f_6c6816fe-483a-4a5e-8b71-3c37704cb9df.webp?v=1714721971","options":["color"],"media":[{"alt":null,"id":23877360386147,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0c6ef2bf888dda168d479dab14b6b01996f092f_6c6816fe-483a-4a5e-8b71-3c37704cb9df.webp?v=1714721971"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0c6ef2bf888dda168d479dab14b6b01996f092f_6c6816fe-483a-4a5e-8b71-3c37704cb9df.webp?v=1714721971","width":2000},{"alt":null,"id":23877360975971,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec79bb21fa6717d292ad007bb1100bb7036c09fd_3638a6e6-9887-4647-82ba-48400a61ba2e.webp?v=1714721974"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec79bb21fa6717d292ad007bb1100bb7036c09fd_3638a6e6-9887-4647-82ba-48400a61ba2e.webp?v=1714721974","width":2000},{"alt":null,"id":23877361500259,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95ddb5eaeca883419af419b43a5548b8626205aa_b1c283e4-d604-40f8-81c1-4f80647115fb.webp?v=1714721976"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95ddb5eaeca883419af419b43a5548b8626205aa_b1c283e4-d604-40f8-81c1-4f80647115fb.webp?v=1714721976","width":2000},{"alt":null,"id":23877362122851,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a25ef7a05dcc45f82273881479cc76762929ebb7_c7b37965-ed9d-431e-86c6-b9a5e269afb9.webp?v=1714721979"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a25ef7a05dcc45f82273881479cc76762929ebb7_c7b37965-ed9d-431e-86c6-b9a5e269afb9.webp?v=1714721979","width":2000},{"alt":null,"id":23877362745443,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/593092a473a6d2bf75fee9dc8d5682a52621c4b1_52de04d7-b9c0-4ceb-9e7b-acd9e4476c49.webp?v=1714721981"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/593092a473a6d2bf75fee9dc8d5682a52621c4b1_52de04d7-b9c0-4ceb-9e7b-acd9e4476c49.webp?v=1714721981","width":2000},{"alt":null,"id":23877363368035,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63603c429e0fd9962aa6749c91864e640d9657c8_7df9cf3c-723c-4065-9186-971980fc6195.webp?v=1714721984"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63603c429e0fd9962aa6749c91864e640d9657c8_7df9cf3c-723c-4065-9186-971980fc6195.webp?v=1714721984","width":2000},{"alt":null,"id":23877363925091,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab49521e53ccf3fd73607b9a681c79405cc0c066_c27dbeb3-f6e6-4ac0-9fab-fb56ec71d358.webp?v=1714721986"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab49521e53ccf3fd73607b9a681c79405cc0c066_c27dbeb3-f6e6-4ac0-9fab-fb56ec71d358.webp?v=1714721986","width":2000},{"alt":null,"id":23877364351075,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/576f2749e2fd4b87587e7b5385938197888357b5_b66a5c0b-fe06-43be-8c98-1f635941deb1.webp?v=1714721988"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/576f2749e2fd4b87587e7b5385938197888357b5_b66a5c0b-fe06-43be-8c98-1f635941deb1.webp?v=1714721988","width":2000},{"alt":null,"id":23877365039203,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02a6c611e801d9212b1d80b06c103e48c5c3f470_055250e4-f96c-43b0-9ef1-67e7d45ce615.webp?v=1714721991"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02a6c611e801d9212b1d80b06c103e48c5c3f470_055250e4-f96c-43b0-9ef1-67e7d45ce615.webp?v=1714721991","width":2000},{"alt":null,"id":23877365465187,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42f8f819d9ef18375f78dffa79361bb48b9f792b_56a6d4a0-c164-49ac-8ae6-1acdc5a48b56.webp?v=1714721993"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42f8f819d9ef18375f78dffa79361bb48b9f792b_56a6d4a0-c164-49ac-8ae6-1acdc5a48b56.webp?v=1714721993","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886222549091,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-AF14","requires_shipping":true,"taxable":true,"featured_image":{"id":31472446341219,"product_id":7408503685219,"position":6,"created_at":"2024-05-03T15:39:44+08:00","updated_at":"2024-05-03T15:39:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63603c429e0fd9962aa6749c91864e640d9657c8_7df9cf3c-723c-4065-9186-971980fc6195.webp?v=1714721984","variant_ids":[41886222549091]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Look - 大自然的傑作(錫安國家公園) - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118724-AF14","featured_media":{"alt":null,"id":23877363368035,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63603c429e0fd9962aa6749c91864e640d9657c8_7df9cf3c-723c-4065-9186-971980fc6195.webp?v=1714721984"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886222549091,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-AF14","requires_shipping":true,"taxable":true,"featured_image":{"id":31472446341219,"product_id":7408503685219,"position":6,"created_at":"2024-05-03T15:39:44+08:00","updated_at":"2024-05-03T15:39:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63603c429e0fd9962aa6749c91864e640d9657c8_7df9cf3c-723c-4065-9186-971980fc6195.webp?v=1714721984","variant_ids":[41886222549091]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Look - 大自然的傑作(錫安國家公園) - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118724-AF14","featured_media":{"alt":null,"id":23877363368035,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63603c429e0fd9962aa6749c91864e640d9657c8_7df9cf3c-723c-4065-9186-971980fc6195.webp?v=1714721984"}},"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: "停產" }