$product = {"id":7415903715427,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具2-白","handle":"iphone-xs-max-mod-nx-printable-pb12","description":null,"published_at":"2024-06-11T16:47:32+08:00","created_at":"2024-05-06T12:21:59+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 XS Max","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":41915380793443,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31490698313827,"product_id":7415903715427,"position":4,"created_at":"2024-05-06T12:22:11+08:00","updated_at":"2024-05-06T12:22:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec8ed367c5b21aca4f8a44507becba6569cf81fc_65c8531a-c99c-427a-ada4-388c8b41c909.webp?v=1714969331","variant_ids":[41915380793443]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具2-白 - 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":"NPB0108624-PB12","featured_media":{"alt":null,"id":23896105058403,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec8ed367c5b21aca4f8a44507becba6569cf81fc_65c8531a-c99c-427a-ada4-388c8b41c909.webp?v=1714969331"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/146b1a1471023da941502d4008999b21e5d2130d_26602229-b2b8-4cbc-87c4-4584d8afa2b0.webp?v=1714969322","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fb9ce3eb594dab3de346e5110086222b530c1da_cfb27834-000a-4337-88f4-b2306de1794e.webp?v=1714969324","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67f29d2248a396791132e6369cf2451570e4a3ab_ff64d069-f64b-4b60-acc0-39eabfe149c5.webp?v=1714969329","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec8ed367c5b21aca4f8a44507becba6569cf81fc_65c8531a-c99c-427a-ada4-388c8b41c909.webp?v=1714969331","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b8bc40c2ca07c8d211c3bceb0d71bf693ffdc30d_2f78eb85-fa5c-4342-81bd-7f7410867642.webp?v=1714969334","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6cfae9f039cdcbb18170eb11e115ecdb40913bb0_22fe994c-4054-4dd7-910b-7b36125d8244.webp?v=1714969337","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a777940b2cf946b8f5f38cfb975144d046e90b38_17726a56-23f2-4bcb-a283-5148db1ab511.webp?v=1714969339","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/412cea91edf0a6bd6843ea3bb2f28664536a0fc7_f1ca58e8-3961-40ae-9c24-4ebd04d7d114.webp?v=1714969342","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80ac3482a5e248e09d4dab201c651e1a0b33b558_edd42389-8054-4465-8d52-0907eae736ac.webp?v=1714969344"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/146b1a1471023da941502d4008999b21e5d2130d_26602229-b2b8-4cbc-87c4-4584d8afa2b0.webp?v=1714969322","options":["color"],"media":[{"alt":null,"id":23896102928483,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/146b1a1471023da941502d4008999b21e5d2130d_26602229-b2b8-4cbc-87c4-4584d8afa2b0.webp?v=1714969322"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/146b1a1471023da941502d4008999b21e5d2130d_26602229-b2b8-4cbc-87c4-4584d8afa2b0.webp?v=1714969322","width":2000},{"alt":null,"id":23896103387235,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fb9ce3eb594dab3de346e5110086222b530c1da_cfb27834-000a-4337-88f4-b2306de1794e.webp?v=1714969324"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fb9ce3eb594dab3de346e5110086222b530c1da_cfb27834-000a-4337-88f4-b2306de1794e.webp?v=1714969324","width":2000},{"alt":null,"id":23896104566883,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67f29d2248a396791132e6369cf2451570e4a3ab_ff64d069-f64b-4b60-acc0-39eabfe149c5.webp?v=1714969329"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67f29d2248a396791132e6369cf2451570e4a3ab_ff64d069-f64b-4b60-acc0-39eabfe149c5.webp?v=1714969329","width":2000},{"alt":null,"id":23896105058403,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec8ed367c5b21aca4f8a44507becba6569cf81fc_65c8531a-c99c-427a-ada4-388c8b41c909.webp?v=1714969331"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec8ed367c5b21aca4f8a44507becba6569cf81fc_65c8531a-c99c-427a-ada4-388c8b41c909.webp?v=1714969331","width":2000},{"alt":null,"id":23896105582691,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b8bc40c2ca07c8d211c3bceb0d71bf693ffdc30d_2f78eb85-fa5c-4342-81bd-7f7410867642.webp?v=1714969334"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b8bc40c2ca07c8d211c3bceb0d71bf693ffdc30d_2f78eb85-fa5c-4342-81bd-7f7410867642.webp?v=1714969334","width":2000},{"alt":null,"id":23896106270819,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6cfae9f039cdcbb18170eb11e115ecdb40913bb0_22fe994c-4054-4dd7-910b-7b36125d8244.webp?v=1714969337"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6cfae9f039cdcbb18170eb11e115ecdb40913bb0_22fe994c-4054-4dd7-910b-7b36125d8244.webp?v=1714969337","width":2000},{"alt":null,"id":23896106860643,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a777940b2cf946b8f5f38cfb975144d046e90b38_17726a56-23f2-4bcb-a283-5148db1ab511.webp?v=1714969339"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a777940b2cf946b8f5f38cfb975144d046e90b38_17726a56-23f2-4bcb-a283-5148db1ab511.webp?v=1714969339","width":2000},{"alt":null,"id":23896107417699,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/412cea91edf0a6bd6843ea3bb2f28664536a0fc7_f1ca58e8-3961-40ae-9c24-4ebd04d7d114.webp?v=1714969342"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/412cea91edf0a6bd6843ea3bb2f28664536a0fc7_f1ca58e8-3961-40ae-9c24-4ebd04d7d114.webp?v=1714969342","width":2000},{"alt":null,"id":23896107974755,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80ac3482a5e248e09d4dab201c651e1a0b33b558_edd42389-8054-4465-8d52-0907eae736ac.webp?v=1714969344"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80ac3482a5e248e09d4dab201c651e1a0b33b558_edd42389-8054-4465-8d52-0907eae736ac.webp?v=1714969344","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41915380793443,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31490698313827,"product_id":7415903715427,"position":4,"created_at":"2024-05-06T12:22:11+08:00","updated_at":"2024-05-06T12:22:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec8ed367c5b21aca4f8a44507becba6569cf81fc_65c8531a-c99c-427a-ada4-388c8b41c909.webp?v=1714969331","variant_ids":[41915380793443]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具2-白 - 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":"NPB0108624-PB12","featured_media":{"alt":null,"id":23896105058403,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec8ed367c5b21aca4f8a44507becba6569cf81fc_65c8531a-c99c-427a-ada4-388c8b41c909.webp?v=1714969331"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915380793443,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31490698313827,"product_id":7415903715427,"position":4,"created_at":"2024-05-06T12:22:11+08:00","updated_at":"2024-05-06T12:22:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec8ed367c5b21aca4f8a44507becba6569cf81fc_65c8531a-c99c-427a-ada4-388c8b41c909.webp?v=1714969331","variant_ids":[41915380793443]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具2-白 - 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":"NPB0108624-PB12","featured_media":{"alt":null,"id":23896105058403,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec8ed367c5b21aca4f8a44507becba6569cf81fc_65c8531a-c99c-427a-ada4-388c8b41c909.webp?v=1714969331"}},"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: "停產" }