$product = {"id":7407854616675,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-噴漆白","handle":"iphone-14-plus-mod-nx-printable-pb02","description":null,"published_at":"2024-06-11T16:24:42+08:00","created_at":"2024-05-03T11:03:04+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":41879670390883,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB02","requires_shipping":true,"taxable":true,"featured_image":{"id":31470539767907,"product_id":7407854616675,"position":7,"created_at":"2024-05-03T11:03:21+08:00","updated_at":"2024-05-03T11:03:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32e488a445a45815cf57a0cccd8dbe7b43f6c368_aaa3fbf1-b6fa-481b-92a7-30c63faf26d4.webp?v=1714705401","variant_ids":[41879670390883]},"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-PB02","featured_media":{"alt":null,"id":23875443589219,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32e488a445a45815cf57a0cccd8dbe7b43f6c368_aaa3fbf1-b6fa-481b-92a7-30c63faf26d4.webp?v=1714705401"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/baa152c39230a21ba643321789d472160cbee400_52575f2f-b7a1-448f-af3c-0b3e9ff07388.webp?v=1714705387","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71bd417a9346be15b879566a502d06ef099d8600_80bf79f1-f30d-4583-b281-1b33b925d8cd.webp?v=1714705389","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9288bca646117324ae4ea335a34d1463c91bd4d5_2df716d6-44ec-4df1-b8ab-bccfeef7dca0.webp?v=1714705392","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97b1a1a2e240ed42788f3d4eacb3d9c1e735db28_ff394a88-efd4-4fef-a1d0-2e0ea52992b3.webp?v=1714705394","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97bdf71b66639ece6199abdd6bd40bd86d092b6f_d2d7833e-cff7-4fed-a803-0c149147b5ef.webp?v=1714705396","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43d5b8bad2a2923820bc2b907ce4ab38a078d1da_c95ee70f-d610-4b68-9944-4c1ba2eee4c7.webp?v=1714705399","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32e488a445a45815cf57a0cccd8dbe7b43f6c368_aaa3fbf1-b6fa-481b-92a7-30c63faf26d4.webp?v=1714705401","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f21f672f1b6bb7ba5fa2aaed1262adc89ca747f5_0d25be97-a5e0-4831-80af-13ef29112487.webp?v=1714705404","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf337b8b649e43b17f37e2f03b95aad75f70a523_6e0cd0bb-aba9-4cb5-970a-146e7e9cd6c8.webp?v=1714705406","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01f8e9d77e1d904059159c4cc2581c1ccde72520_2a155bec-d3f6-4237-9e5e-e74d4c171870.webp?v=1714705408"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/baa152c39230a21ba643321789d472160cbee400_52575f2f-b7a1-448f-af3c-0b3e9ff07388.webp?v=1714705387","options":["color"],"media":[{"alt":null,"id":23875439329379,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/baa152c39230a21ba643321789d472160cbee400_52575f2f-b7a1-448f-af3c-0b3e9ff07388.webp?v=1714705387"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/baa152c39230a21ba643321789d472160cbee400_52575f2f-b7a1-448f-af3c-0b3e9ff07388.webp?v=1714705387","width":2000},{"alt":null,"id":23875439951971,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71bd417a9346be15b879566a502d06ef099d8600_80bf79f1-f30d-4583-b281-1b33b925d8cd.webp?v=1714705389"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71bd417a9346be15b879566a502d06ef099d8600_80bf79f1-f30d-4583-b281-1b33b925d8cd.webp?v=1714705389","width":2000},{"alt":null,"id":23875440509027,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9288bca646117324ae4ea335a34d1463c91bd4d5_2df716d6-44ec-4df1-b8ab-bccfeef7dca0.webp?v=1714705392"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9288bca646117324ae4ea335a34d1463c91bd4d5_2df716d6-44ec-4df1-b8ab-bccfeef7dca0.webp?v=1714705392","width":2000},{"alt":null,"id":23875441000547,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97b1a1a2e240ed42788f3d4eacb3d9c1e735db28_ff394a88-efd4-4fef-a1d0-2e0ea52992b3.webp?v=1714705394"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97b1a1a2e240ed42788f3d4eacb3d9c1e735db28_ff394a88-efd4-4fef-a1d0-2e0ea52992b3.webp?v=1714705394","width":2000},{"alt":null,"id":23875441754211,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97bdf71b66639ece6199abdd6bd40bd86d092b6f_d2d7833e-cff7-4fed-a803-0c149147b5ef.webp?v=1714705396"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97bdf71b66639ece6199abdd6bd40bd86d092b6f_d2d7833e-cff7-4fed-a803-0c149147b5ef.webp?v=1714705396","width":2000},{"alt":null,"id":23875442507875,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43d5b8bad2a2923820bc2b907ce4ab38a078d1da_c95ee70f-d610-4b68-9944-4c1ba2eee4c7.webp?v=1714705399"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43d5b8bad2a2923820bc2b907ce4ab38a078d1da_c95ee70f-d610-4b68-9944-4c1ba2eee4c7.webp?v=1714705399","width":2000},{"alt":null,"id":23875443589219,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32e488a445a45815cf57a0cccd8dbe7b43f6c368_aaa3fbf1-b6fa-481b-92a7-30c63faf26d4.webp?v=1714705401"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32e488a445a45815cf57a0cccd8dbe7b43f6c368_aaa3fbf1-b6fa-481b-92a7-30c63faf26d4.webp?v=1714705401","width":2000},{"alt":null,"id":23875444310115,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f21f672f1b6bb7ba5fa2aaed1262adc89ca747f5_0d25be97-a5e0-4831-80af-13ef29112487.webp?v=1714705404"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f21f672f1b6bb7ba5fa2aaed1262adc89ca747f5_0d25be97-a5e0-4831-80af-13ef29112487.webp?v=1714705404","width":2000},{"alt":null,"id":23875444867171,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf337b8b649e43b17f37e2f03b95aad75f70a523_6e0cd0bb-aba9-4cb5-970a-146e7e9cd6c8.webp?v=1714705406"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf337b8b649e43b17f37e2f03b95aad75f70a523_6e0cd0bb-aba9-4cb5-970a-146e7e9cd6c8.webp?v=1714705406","width":2000},{"alt":null,"id":23875445260387,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01f8e9d77e1d904059159c4cc2581c1ccde72520_2a155bec-d3f6-4237-9e5e-e74d4c171870.webp?v=1714705408"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01f8e9d77e1d904059159c4cc2581c1ccde72520_2a155bec-d3f6-4237-9e5e-e74d4c171870.webp?v=1714705408","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41879670390883,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB02","requires_shipping":true,"taxable":true,"featured_image":{"id":31470539767907,"product_id":7407854616675,"position":7,"created_at":"2024-05-03T11:03:21+08:00","updated_at":"2024-05-03T11:03:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32e488a445a45815cf57a0cccd8dbe7b43f6c368_aaa3fbf1-b6fa-481b-92a7-30c63faf26d4.webp?v=1714705401","variant_ids":[41879670390883]},"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-PB02","featured_media":{"alt":null,"id":23875443589219,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32e488a445a45815cf57a0cccd8dbe7b43f6c368_aaa3fbf1-b6fa-481b-92a7-30c63faf26d4.webp?v=1714705401"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41879670390883,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB02","requires_shipping":true,"taxable":true,"featured_image":{"id":31470539767907,"product_id":7407854616675,"position":7,"created_at":"2024-05-03T11:03:21+08:00","updated_at":"2024-05-03T11:03:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32e488a445a45815cf57a0cccd8dbe7b43f6c368_aaa3fbf1-b6fa-481b-92a7-30c63faf26d4.webp?v=1714705401","variant_ids":[41879670390883]},"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-PB02","featured_media":{"alt":null,"id":23875443589219,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32e488a445a45815cf57a0cccd8dbe7b43f6c368_aaa3fbf1-b6fa-481b-92a7-30c63faf26d4.webp?v=1714705401"}},"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: "停產" }