$product = {"id":7407680094307,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-噴漆白","handle":"iphone-14-plus-mod-nx-printable-pb04","description":null,"published_at":"2024-06-11T16:21:53+08:00","created_at":"2024-05-03T10:40:45+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 14 Plus","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-star-wars","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":41877560262755,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB04","requires_shipping":true,"taxable":true,"featured_image":{"id":31470207271011,"product_id":7407680094307,"position":7,"created_at":"2024-05-03T10:41:03+08:00","updated_at":"2024-05-03T10:41:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76d54d8631a8568066cafe8c75afc284cdebc60a_00d3bc59-31ba-4a79-a253-2f0db2d38aab.webp?v=1714704063","variant_ids":[41877560262755]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-噴漆白 - 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-PB04","featured_media":{"alt":null,"id":23875110273123,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76d54d8631a8568066cafe8c75afc284cdebc60a_00d3bc59-31ba-4a79-a253-2f0db2d38aab.webp?v=1714704063"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ce1698bd1d556611e91529fe603bf1fc59c64abf_25f410c3-96c6-41eb-9943-eb10184e3e56.webp?v=1714704048","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3547579bd1b26aa7f0731c7d73ac77a2e16c1ad1_61cb73f4-5715-4c50-a8b4-dd7997a082ef.webp?v=1714704050","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fc7e0fde3569ed3828e490475815996a875fe7c_4bff7350-6159-4ece-890e-05d12060d5ba.webp?v=1714704053","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/600ccd8e5385280c6a411b09ac803ae2004c1a14_afb9182e-a28b-4a7f-8287-6828d20f247f.webp?v=1714704056","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e20f4b924aec7b621143cafefabf6ca6c4d2b71c_247d29ed-1dfe-43df-880b-61ffa7fee9b5.webp?v=1714704058","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e32874fe4187882959807cd2a73e8ae626a038b3_ca64d633-a599-446e-be31-2fec9d6b89f5.webp?v=1714704061","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76d54d8631a8568066cafe8c75afc284cdebc60a_00d3bc59-31ba-4a79-a253-2f0db2d38aab.webp?v=1714704063","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98a70ddf34f25f07339873af15721f4e09f1922a_7387c4df-3ff7-462e-96b4-382b38631013.webp?v=1714704066","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e866562374bc8928f398130b68e4cc8853b97bb0_fa05073f-d225-4dbb-8c6c-0b697684ddcc.webp?v=1714704069","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2f6bf8442b11f1ecc31526d9c40c5362904fb50_2ba3c956-e9fb-4464-9393-2fced75cc9a0.webp?v=1714704071"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ce1698bd1d556611e91529fe603bf1fc59c64abf_25f410c3-96c6-41eb-9943-eb10184e3e56.webp?v=1714704048","options":["color"],"media":[{"alt":null,"id":23875106177123,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ce1698bd1d556611e91529fe603bf1fc59c64abf_25f410c3-96c6-41eb-9943-eb10184e3e56.webp?v=1714704048"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ce1698bd1d556611e91529fe603bf1fc59c64abf_25f410c3-96c6-41eb-9943-eb10184e3e56.webp?v=1714704048","width":2000},{"alt":null,"id":23875106898019,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3547579bd1b26aa7f0731c7d73ac77a2e16c1ad1_61cb73f4-5715-4c50-a8b4-dd7997a082ef.webp?v=1714704050"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3547579bd1b26aa7f0731c7d73ac77a2e16c1ad1_61cb73f4-5715-4c50-a8b4-dd7997a082ef.webp?v=1714704050","width":2000},{"alt":null,"id":23875107487843,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fc7e0fde3569ed3828e490475815996a875fe7c_4bff7350-6159-4ece-890e-05d12060d5ba.webp?v=1714704053"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fc7e0fde3569ed3828e490475815996a875fe7c_4bff7350-6159-4ece-890e-05d12060d5ba.webp?v=1714704053","width":2000},{"alt":null,"id":23875108077667,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/600ccd8e5385280c6a411b09ac803ae2004c1a14_afb9182e-a28b-4a7f-8287-6828d20f247f.webp?v=1714704056"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/600ccd8e5385280c6a411b09ac803ae2004c1a14_afb9182e-a28b-4a7f-8287-6828d20f247f.webp?v=1714704056","width":2000},{"alt":null,"id":23875109060707,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e20f4b924aec7b621143cafefabf6ca6c4d2b71c_247d29ed-1dfe-43df-880b-61ffa7fee9b5.webp?v=1714704058"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e20f4b924aec7b621143cafefabf6ca6c4d2b71c_247d29ed-1dfe-43df-880b-61ffa7fee9b5.webp?v=1714704058","width":2000},{"alt":null,"id":23875109683299,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e32874fe4187882959807cd2a73e8ae626a038b3_ca64d633-a599-446e-be31-2fec9d6b89f5.webp?v=1714704061"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e32874fe4187882959807cd2a73e8ae626a038b3_ca64d633-a599-446e-be31-2fec9d6b89f5.webp?v=1714704061","width":2000},{"alt":null,"id":23875110273123,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76d54d8631a8568066cafe8c75afc284cdebc60a_00d3bc59-31ba-4a79-a253-2f0db2d38aab.webp?v=1714704063"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76d54d8631a8568066cafe8c75afc284cdebc60a_00d3bc59-31ba-4a79-a253-2f0db2d38aab.webp?v=1714704063","width":2000},{"alt":null,"id":23875110830179,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98a70ddf34f25f07339873af15721f4e09f1922a_7387c4df-3ff7-462e-96b4-382b38631013.webp?v=1714704066"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98a70ddf34f25f07339873af15721f4e09f1922a_7387c4df-3ff7-462e-96b4-382b38631013.webp?v=1714704066","width":2000},{"alt":null,"id":23875111616611,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e866562374bc8928f398130b68e4cc8853b97bb0_fa05073f-d225-4dbb-8c6c-0b697684ddcc.webp?v=1714704069"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e866562374bc8928f398130b68e4cc8853b97bb0_fa05073f-d225-4dbb-8c6c-0b697684ddcc.webp?v=1714704069","width":2000},{"alt":null,"id":23875112271971,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2f6bf8442b11f1ecc31526d9c40c5362904fb50_2ba3c956-e9fb-4464-9393-2fced75cc9a0.webp?v=1714704071"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2f6bf8442b11f1ecc31526d9c40c5362904fb50_2ba3c956-e9fb-4464-9393-2fced75cc9a0.webp?v=1714704071","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41877560262755,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB04","requires_shipping":true,"taxable":true,"featured_image":{"id":31470207271011,"product_id":7407680094307,"position":7,"created_at":"2024-05-03T10:41:03+08:00","updated_at":"2024-05-03T10:41:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76d54d8631a8568066cafe8c75afc284cdebc60a_00d3bc59-31ba-4a79-a253-2f0db2d38aab.webp?v=1714704063","variant_ids":[41877560262755]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-噴漆白 - 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-PB04","featured_media":{"alt":null,"id":23875110273123,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76d54d8631a8568066cafe8c75afc284cdebc60a_00d3bc59-31ba-4a79-a253-2f0db2d38aab.webp?v=1714704063"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41877560262755,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB04","requires_shipping":true,"taxable":true,"featured_image":{"id":31470207271011,"product_id":7407680094307,"position":7,"created_at":"2024-05-03T10:41:03+08:00","updated_at":"2024-05-03T10:41:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76d54d8631a8568066cafe8c75afc284cdebc60a_00d3bc59-31ba-4a79-a253-2f0db2d38aab.webp?v=1714704063","variant_ids":[41877560262755]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-噴漆白 - 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-PB04","featured_media":{"alt":null,"id":23875110273123,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76d54d8631a8568066cafe8c75afc284cdebc60a_00d3bc59-31ba-4a79-a253-2f0db2d38aab.webp?v=1714704063"}},"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: "停產" }