$product = {"id":7408428613731,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Sticker-藍","handle":"iphone-12-mini-mod-nx-printable-pb32","description":null,"published_at":"2024-06-11T16:36:59+08:00","created_at":"2024-05-03T15:24:53+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 12 mini","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":41885378019427,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB32","requires_shipping":true,"taxable":true,"featured_image":{"id":31472249208931,"product_id":7408428613731,"position":1,"created_at":"2024-05-03T15:24:56+08:00","updated_at":"2024-05-03T15:24:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f42c80400b0a9216c1a58e985b92d82ed6c88ddc_2675e5b1-a0e4-4fab-a12a-7aceef64bbb1.webp?v=1714721096","variant_ids":[41885378019427]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Sticker-藍 - 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":"NPB0118424-PB32","featured_media":{"alt":null,"id":23877165383779,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f42c80400b0a9216c1a58e985b92d82ed6c88ddc_2675e5b1-a0e4-4fab-a12a-7aceef64bbb1.webp?v=1714721096"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f42c80400b0a9216c1a58e985b92d82ed6c88ddc_2675e5b1-a0e4-4fab-a12a-7aceef64bbb1.webp?v=1714721096","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5da41dd8df287489ef243f71c523a2e579a389fc_1a80c1cc-c386-4e90-a884-e0be38edfad8.webp?v=1714721098","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1b2bb579ad2e8b0d4765e3c12fc3f885a06f439_af809eac-5b20-455d-8887-54accde456f3.webp?v=1714721100","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0cf9ae9f588f4ffec7caf9f61cd8a9f7dacf89de_afba21db-4ab7-47c4-82c6-3efa2deeeb6d.webp?v=1714721103","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba938b00eb179cab6dd43b5b7abd139e7d3c5ff3_6b2b8e52-c0e7-4880-aca0-df35807c0142.webp?v=1714721106","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/baf2917a33224249577c3fd60fb7eae6332e5451_86d1f0ab-decc-4c8b-9ac9-2c348394bf21.webp?v=1714721109","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f43f1cf6134d618916e2fd82736c65fd728fb9ae_12fdf735-b8e4-4cc7-b942-fd8535d96aaf.webp?v=1714721111","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/196e92fd2a6be605a11df520817c3543113e6518_0dd9a58a-56f7-47bb-9a8a-0c1a26ef5ac6.webp?v=1714721114","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e17d06a41fdd277e9cb7427ad13f5d6703cf66c_064d47f6-816f-4622-a1df-9bca9a48d500.webp?v=1714721116","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8af54cf60aa6ca377cae2503ec3c151ea73e55fc_904604d5-d3f2-4c69-91f2-8dc060aa4e47.webp?v=1714721119","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d248cc4b2be57cea15ef341769533db5397861c6_8456e156-103a-4223-a458-67f9f52562a4.webp?v=1714721121"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f42c80400b0a9216c1a58e985b92d82ed6c88ddc_2675e5b1-a0e4-4fab-a12a-7aceef64bbb1.webp?v=1714721096","options":["color"],"media":[{"alt":null,"id":23877165383779,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f42c80400b0a9216c1a58e985b92d82ed6c88ddc_2675e5b1-a0e4-4fab-a12a-7aceef64bbb1.webp?v=1714721096"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f42c80400b0a9216c1a58e985b92d82ed6c88ddc_2675e5b1-a0e4-4fab-a12a-7aceef64bbb1.webp?v=1714721096","width":2000},{"alt":null,"id":23877166202979,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5da41dd8df287489ef243f71c523a2e579a389fc_1a80c1cc-c386-4e90-a884-e0be38edfad8.webp?v=1714721098"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5da41dd8df287489ef243f71c523a2e579a389fc_1a80c1cc-c386-4e90-a884-e0be38edfad8.webp?v=1714721098","width":2000},{"alt":null,"id":23877167644771,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1b2bb579ad2e8b0d4765e3c12fc3f885a06f439_af809eac-5b20-455d-8887-54accde456f3.webp?v=1714721100"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1b2bb579ad2e8b0d4765e3c12fc3f885a06f439_af809eac-5b20-455d-8887-54accde456f3.webp?v=1714721100","width":2000},{"alt":null,"id":23877168791651,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0cf9ae9f588f4ffec7caf9f61cd8a9f7dacf89de_afba21db-4ab7-47c4-82c6-3efa2deeeb6d.webp?v=1714721103"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0cf9ae9f588f4ffec7caf9f61cd8a9f7dacf89de_afba21db-4ab7-47c4-82c6-3efa2deeeb6d.webp?v=1714721103","width":2000},{"alt":null,"id":23877169184867,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba938b00eb179cab6dd43b5b7abd139e7d3c5ff3_6b2b8e52-c0e7-4880-aca0-df35807c0142.webp?v=1714721106"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba938b00eb179cab6dd43b5b7abd139e7d3c5ff3_6b2b8e52-c0e7-4880-aca0-df35807c0142.webp?v=1714721106","width":2000},{"alt":null,"id":23877170036835,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/baf2917a33224249577c3fd60fb7eae6332e5451_86d1f0ab-decc-4c8b-9ac9-2c348394bf21.webp?v=1714721109"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/baf2917a33224249577c3fd60fb7eae6332e5451_86d1f0ab-decc-4c8b-9ac9-2c348394bf21.webp?v=1714721109","width":2000},{"alt":null,"id":23877170856035,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f43f1cf6134d618916e2fd82736c65fd728fb9ae_12fdf735-b8e4-4cc7-b942-fd8535d96aaf.webp?v=1714721111"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f43f1cf6134d618916e2fd82736c65fd728fb9ae_12fdf735-b8e4-4cc7-b942-fd8535d96aaf.webp?v=1714721111","width":2000},{"alt":null,"id":23877171380323,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/196e92fd2a6be605a11df520817c3543113e6518_0dd9a58a-56f7-47bb-9a8a-0c1a26ef5ac6.webp?v=1714721114"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/196e92fd2a6be605a11df520817c3543113e6518_0dd9a58a-56f7-47bb-9a8a-0c1a26ef5ac6.webp?v=1714721114","width":2000},{"alt":null,"id":23877172002915,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e17d06a41fdd277e9cb7427ad13f5d6703cf66c_064d47f6-816f-4622-a1df-9bca9a48d500.webp?v=1714721116"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e17d06a41fdd277e9cb7427ad13f5d6703cf66c_064d47f6-816f-4622-a1df-9bca9a48d500.webp?v=1714721116","width":2000},{"alt":null,"id":23877173084259,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8af54cf60aa6ca377cae2503ec3c151ea73e55fc_904604d5-d3f2-4c69-91f2-8dc060aa4e47.webp?v=1714721119"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8af54cf60aa6ca377cae2503ec3c151ea73e55fc_904604d5-d3f2-4c69-91f2-8dc060aa4e47.webp?v=1714721119","width":2000},{"alt":null,"id":23877173739619,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d248cc4b2be57cea15ef341769533db5397861c6_8456e156-103a-4223-a458-67f9f52562a4.webp?v=1714721121"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d248cc4b2be57cea15ef341769533db5397861c6_8456e156-103a-4223-a458-67f9f52562a4.webp?v=1714721121","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885378019427,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB32","requires_shipping":true,"taxable":true,"featured_image":{"id":31472249208931,"product_id":7408428613731,"position":1,"created_at":"2024-05-03T15:24:56+08:00","updated_at":"2024-05-03T15:24:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f42c80400b0a9216c1a58e985b92d82ed6c88ddc_2675e5b1-a0e4-4fab-a12a-7aceef64bbb1.webp?v=1714721096","variant_ids":[41885378019427]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Sticker-藍 - 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":"NPB0118424-PB32","featured_media":{"alt":null,"id":23877165383779,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f42c80400b0a9216c1a58e985b92d82ed6c88ddc_2675e5b1-a0e4-4fab-a12a-7aceef64bbb1.webp?v=1714721096"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885378019427,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB32","requires_shipping":true,"taxable":true,"featured_image":{"id":31472249208931,"product_id":7408428613731,"position":1,"created_at":"2024-05-03T15:24:56+08:00","updated_at":"2024-05-03T15:24:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f42c80400b0a9216c1a58e985b92d82ed6c88ddc_2675e5b1-a0e4-4fab-a12a-7aceef64bbb1.webp?v=1714721096","variant_ids":[41885378019427]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Sticker-藍 - 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":"NPB0118424-PB32","featured_media":{"alt":null,"id":23877165383779,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f42c80400b0a9216c1a58e985b92d82ed6c88ddc_2675e5b1-a0e4-4fab-a12a-7aceef64bbb1.webp?v=1714721096"}},"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: "停產" }