$product = {"id":7415914823779,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 星際大戰四部曲:曙光乍現-電影海報","handle":"iphone-xs-max-mod-nx-printable-pb101","description":null,"published_at":"2024-06-11T16:47:49+08:00","created_at":"2024-05-06T12:23:55+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":41915485880419,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB101","requires_shipping":true,"taxable":true,"featured_image":{"id":31490719678563,"product_id":7415914823779,"position":1,"created_at":"2024-05-06T12:23:57+08:00","updated_at":"2024-05-06T12:23:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34fcb8bee4d59c43085944d0f3a923414ad22fe3_891e46b0-5ec3-4a8c-a9b8-6375331a1eb5.webp?v=1714969437","variant_ids":[41915485880419]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0108624-PB101","featured_media":{"alt":null,"id":23896126423139,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34fcb8bee4d59c43085944d0f3a923414ad22fe3_891e46b0-5ec3-4a8c-a9b8-6375331a1eb5.webp?v=1714969437"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34fcb8bee4d59c43085944d0f3a923414ad22fe3_891e46b0-5ec3-4a8c-a9b8-6375331a1eb5.webp?v=1714969437","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4155713eae06786bfb251f6a206924c915c1ef06_e3d72c1c-4ed6-4918-93bb-9c1bb585670e.webp?v=1714969440","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d010413e55424201b493eec827a54bb8df96ce4e_47807475-e9e6-4e9b-bf22-564c3f636686.webp?v=1714969444","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c20a9bf07cc682f41e87033bd631708958de052d_005ecdbe-4afa-4425-b6f7-870b8e327bdc.webp?v=1714969447","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7870477e257991efc2f7b37c582ef1a99cd06daa_7824c0b1-3e46-4076-a7fa-eee12d6b456f.webp?v=1714969449","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6da70c9100857e290bcf38e75c6b3880e3f97472_62cd8350-f1de-43e4-8d32-813e229f3917.webp?v=1714969451","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72532934754ad2deaf15c6c62f05d78053f05474_7758f666-bd04-4ccb-9a40-3f856762cfde.webp?v=1714969454","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f6735b3e53c3713772e38c950a5d780c0deae32_190b12e1-9093-4afc-94a5-5f0212e27f8c.webp?v=1714969458","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/705d6519d0fd6bdcf8629d9817bae078c8d26a90_976e8e02-5c52-4834-b102-4c4249bbb819.webp?v=1714969460"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34fcb8bee4d59c43085944d0f3a923414ad22fe3_891e46b0-5ec3-4a8c-a9b8-6375331a1eb5.webp?v=1714969437","options":["color"],"media":[{"alt":null,"id":23896126423139,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34fcb8bee4d59c43085944d0f3a923414ad22fe3_891e46b0-5ec3-4a8c-a9b8-6375331a1eb5.webp?v=1714969437"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34fcb8bee4d59c43085944d0f3a923414ad22fe3_891e46b0-5ec3-4a8c-a9b8-6375331a1eb5.webp?v=1714969437","width":2000},{"alt":null,"id":23896126947427,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4155713eae06786bfb251f6a206924c915c1ef06_e3d72c1c-4ed6-4918-93bb-9c1bb585670e.webp?v=1714969440"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4155713eae06786bfb251f6a206924c915c1ef06_e3d72c1c-4ed6-4918-93bb-9c1bb585670e.webp?v=1714969440","width":2000},{"alt":null,"id":23896128225379,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d010413e55424201b493eec827a54bb8df96ce4e_47807475-e9e6-4e9b-bf22-564c3f636686.webp?v=1714969444"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d010413e55424201b493eec827a54bb8df96ce4e_47807475-e9e6-4e9b-bf22-564c3f636686.webp?v=1714969444","width":2000},{"alt":null,"id":23896128684131,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c20a9bf07cc682f41e87033bd631708958de052d_005ecdbe-4afa-4425-b6f7-870b8e327bdc.webp?v=1714969447"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c20a9bf07cc682f41e87033bd631708958de052d_005ecdbe-4afa-4425-b6f7-870b8e327bdc.webp?v=1714969447","width":2000},{"alt":null,"id":23896129208419,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7870477e257991efc2f7b37c582ef1a99cd06daa_7824c0b1-3e46-4076-a7fa-eee12d6b456f.webp?v=1714969449"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7870477e257991efc2f7b37c582ef1a99cd06daa_7824c0b1-3e46-4076-a7fa-eee12d6b456f.webp?v=1714969449","width":2000},{"alt":null,"id":23896129699939,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6da70c9100857e290bcf38e75c6b3880e3f97472_62cd8350-f1de-43e4-8d32-813e229f3917.webp?v=1714969451"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6da70c9100857e290bcf38e75c6b3880e3f97472_62cd8350-f1de-43e4-8d32-813e229f3917.webp?v=1714969451","width":2000},{"alt":null,"id":23896130617443,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72532934754ad2deaf15c6c62f05d78053f05474_7758f666-bd04-4ccb-9a40-3f856762cfde.webp?v=1714969454"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72532934754ad2deaf15c6c62f05d78053f05474_7758f666-bd04-4ccb-9a40-3f856762cfde.webp?v=1714969454","width":2000},{"alt":null,"id":23896131207267,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f6735b3e53c3713772e38c950a5d780c0deae32_190b12e1-9093-4afc-94a5-5f0212e27f8c.webp?v=1714969458"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f6735b3e53c3713772e38c950a5d780c0deae32_190b12e1-9093-4afc-94a5-5f0212e27f8c.webp?v=1714969458","width":2000},{"alt":null,"id":23896131731555,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/705d6519d0fd6bdcf8629d9817bae078c8d26a90_976e8e02-5c52-4834-b102-4c4249bbb819.webp?v=1714969460"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/705d6519d0fd6bdcf8629d9817bae078c8d26a90_976e8e02-5c52-4834-b102-4c4249bbb819.webp?v=1714969460","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41915485880419,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB101","requires_shipping":true,"taxable":true,"featured_image":{"id":31490719678563,"product_id":7415914823779,"position":1,"created_at":"2024-05-06T12:23:57+08:00","updated_at":"2024-05-06T12:23:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34fcb8bee4d59c43085944d0f3a923414ad22fe3_891e46b0-5ec3-4a8c-a9b8-6375331a1eb5.webp?v=1714969437","variant_ids":[41915485880419]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0108624-PB101","featured_media":{"alt":null,"id":23896126423139,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34fcb8bee4d59c43085944d0f3a923414ad22fe3_891e46b0-5ec3-4a8c-a9b8-6375331a1eb5.webp?v=1714969437"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915485880419,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB101","requires_shipping":true,"taxable":true,"featured_image":{"id":31490719678563,"product_id":7415914823779,"position":1,"created_at":"2024-05-06T12:23:57+08:00","updated_at":"2024-05-06T12:23:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34fcb8bee4d59c43085944d0f3a923414ad22fe3_891e46b0-5ec3-4a8c-a9b8-6375331a1eb5.webp?v=1714969437","variant_ids":[41915485880419]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0108624-PB101","featured_media":{"alt":null,"id":23896126423139,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/34fcb8bee4d59c43085944d0f3a923414ad22fe3_891e46b0-5ec3-4a8c-a9b8-6375331a1eb5.webp?v=1714969437"}},"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: "停產" }