$product = {"id":7415908565091,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 爪哇族2-塗鴉藝術","handle":"iphone-xs-max-mod-nx-printable-pb40","description":null,"published_at":"2024-06-11T16:47:39+08:00","created_at":"2024-05-06T12:22:50+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":41915428274275,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB40","requires_shipping":true,"taxable":true,"featured_image":{"id":31490710995043,"product_id":7415908565091,"position":9,"created_at":"2024-05-06T12:23:14+08:00","updated_at":"2024-05-06T12:23:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eaa6cfc99bbe13732886737a5f24066ce374113a_6b53fbeb-b553-41d6-a41e-50870ccf5736.webp?v=1714969394","variant_ids":[41915428274275]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 爪哇族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-PB40","featured_media":{"alt":null,"id":23896117772387,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eaa6cfc99bbe13732886737a5f24066ce374113a_6b53fbeb-b553-41d6-a41e-50870ccf5736.webp?v=1714969394"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1eff25b521c1a193ecf3e6fbee51443c8eeb2fec_8082fc99-817e-4d82-a18e-e358b7126bf1.webp?v=1714969372","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4affb1408e99c8a9b605cb947d3ce8ad9a530e81_81e603bb-cc4a-4352-adbe-4ea02d425b6d.webp?v=1714969374","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e60799915cfdd43513f41cf06ed43c81fc2852cc_b42ae3ea-ded8-45ae-8087-7c7160203e15.webp?v=1714969379","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a088660308a05adc09595d22cb4f2ca875dcfd9_8d005af0-18f9-41ac-9e37-af7899c060a3.webp?v=1714969381","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f1377243986554aefef053e49f2397a504ec008_f3d30066-9049-41aa-9526-ca0882fe50cb.webp?v=1714969384","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6e4ee38c74d06cbdab4edbf3b7490bbdf1ae510_1fc6c8b0-5540-466d-bb23-fc9482052cfc.webp?v=1714969386","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2ca7c0e7269fbe0de6b6c8c0e5436d2e57ab376_09f36eed-bd57-4de7-959f-59636bba3c6c.webp?v=1714969388","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4f55756523dd44066aea47dab56e63a75fa6731_2b813883-4375-4a1b-90f2-bbf1e1195387.webp?v=1714969392","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eaa6cfc99bbe13732886737a5f24066ce374113a_6b53fbeb-b553-41d6-a41e-50870ccf5736.webp?v=1714969394"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1eff25b521c1a193ecf3e6fbee51443c8eeb2fec_8082fc99-817e-4d82-a18e-e358b7126bf1.webp?v=1714969372","options":["color"],"media":[{"alt":null,"id":23896113250403,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1eff25b521c1a193ecf3e6fbee51443c8eeb2fec_8082fc99-817e-4d82-a18e-e358b7126bf1.webp?v=1714969372"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1eff25b521c1a193ecf3e6fbee51443c8eeb2fec_8082fc99-817e-4d82-a18e-e358b7126bf1.webp?v=1714969372","width":2000},{"alt":null,"id":23896113709155,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4affb1408e99c8a9b605cb947d3ce8ad9a530e81_81e603bb-cc4a-4352-adbe-4ea02d425b6d.webp?v=1714969374"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4affb1408e99c8a9b605cb947d3ce8ad9a530e81_81e603bb-cc4a-4352-adbe-4ea02d425b6d.webp?v=1714969374","width":2000},{"alt":null,"id":23896114724963,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e60799915cfdd43513f41cf06ed43c81fc2852cc_b42ae3ea-ded8-45ae-8087-7c7160203e15.webp?v=1714969379"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e60799915cfdd43513f41cf06ed43c81fc2852cc_b42ae3ea-ded8-45ae-8087-7c7160203e15.webp?v=1714969379","width":2000},{"alt":null,"id":23896115118179,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a088660308a05adc09595d22cb4f2ca875dcfd9_8d005af0-18f9-41ac-9e37-af7899c060a3.webp?v=1714969381"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a088660308a05adc09595d22cb4f2ca875dcfd9_8d005af0-18f9-41ac-9e37-af7899c060a3.webp?v=1714969381","width":2000},{"alt":null,"id":23896115937379,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f1377243986554aefef053e49f2397a504ec008_f3d30066-9049-41aa-9526-ca0882fe50cb.webp?v=1714969384"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f1377243986554aefef053e49f2397a504ec008_f3d30066-9049-41aa-9526-ca0882fe50cb.webp?v=1714969384","width":2000},{"alt":null,"id":23896116363363,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6e4ee38c74d06cbdab4edbf3b7490bbdf1ae510_1fc6c8b0-5540-466d-bb23-fc9482052cfc.webp?v=1714969386"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6e4ee38c74d06cbdab4edbf3b7490bbdf1ae510_1fc6c8b0-5540-466d-bb23-fc9482052cfc.webp?v=1714969386","width":2000},{"alt":null,"id":23896116854883,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2ca7c0e7269fbe0de6b6c8c0e5436d2e57ab376_09f36eed-bd57-4de7-959f-59636bba3c6c.webp?v=1714969388"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2ca7c0e7269fbe0de6b6c8c0e5436d2e57ab376_09f36eed-bd57-4de7-959f-59636bba3c6c.webp?v=1714969388","width":2000},{"alt":null,"id":23896117280867,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4f55756523dd44066aea47dab56e63a75fa6731_2b813883-4375-4a1b-90f2-bbf1e1195387.webp?v=1714969392"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4f55756523dd44066aea47dab56e63a75fa6731_2b813883-4375-4a1b-90f2-bbf1e1195387.webp?v=1714969392","width":2000},{"alt":null,"id":23896117772387,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eaa6cfc99bbe13732886737a5f24066ce374113a_6b53fbeb-b553-41d6-a41e-50870ccf5736.webp?v=1714969394"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eaa6cfc99bbe13732886737a5f24066ce374113a_6b53fbeb-b553-41d6-a41e-50870ccf5736.webp?v=1714969394","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41915428274275,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB40","requires_shipping":true,"taxable":true,"featured_image":{"id":31490710995043,"product_id":7415908565091,"position":9,"created_at":"2024-05-06T12:23:14+08:00","updated_at":"2024-05-06T12:23:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eaa6cfc99bbe13732886737a5f24066ce374113a_6b53fbeb-b553-41d6-a41e-50870ccf5736.webp?v=1714969394","variant_ids":[41915428274275]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 爪哇族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-PB40","featured_media":{"alt":null,"id":23896117772387,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eaa6cfc99bbe13732886737a5f24066ce374113a_6b53fbeb-b553-41d6-a41e-50870ccf5736.webp?v=1714969394"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915428274275,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB40","requires_shipping":true,"taxable":true,"featured_image":{"id":31490710995043,"product_id":7415908565091,"position":9,"created_at":"2024-05-06T12:23:14+08:00","updated_at":"2024-05-06T12:23:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eaa6cfc99bbe13732886737a5f24066ce374113a_6b53fbeb-b553-41d6-a41e-50870ccf5736.webp?v=1714969394","variant_ids":[41915428274275]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 爪哇族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-PB40","featured_media":{"alt":null,"id":23896117772387,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eaa6cfc99bbe13732886737a5f24066ce374113a_6b53fbeb-b553-41d6-a41e-50870ccf5736.webp?v=1714969394"}},"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: "停產" }