$product = {"id":7407893446755,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 絕地武士-光劍系列","handle":"iphone-14-plus-mod-nx-printable-pb71","description":null,"published_at":"2024-06-11T16:25:48+08:00","created_at":"2024-05-03T11:10:51+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":41880179212387,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB71","requires_shipping":true,"taxable":true,"featured_image":{"id":31470637744227,"product_id":7407893446755,"position":6,"created_at":"2024-05-03T11:11:05+08:00","updated_at":"2024-05-03T11:11:05+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ce404f9f239069652f6455d3fd0a50d75b393c6_5e873bbb-03b0-4f3b-9d8b-89167623b4ff.webp?v=1714705865","variant_ids":[41880179212387]},"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-PB71","featured_media":{"alt":null,"id":23875541663843,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ce404f9f239069652f6455d3fd0a50d75b393c6_5e873bbb-03b0-4f3b-9d8b-89167623b4ff.webp?v=1714705865"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b3f9d5198a5c14c200e78985570d59aafe42757_fd48e80b-3c4e-4e76-b697-f0f1a7fa90e7.webp?v=1714705854","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e546676483abba37a730159c594c068615f21b5e_23b2474c-3298-48f5-be42-c86363cfb718.webp?v=1714705856","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/badc703de3862c81a507eac78ada11418623d685_411a241d-4f20-4d8b-991d-2311dc4a1faf.webp?v=1714705858","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a407c574fd16377806ab58517a02dc338924b4e3_b8ac6662-6833-40c8-a290-5a421216c629.webp?v=1714705861","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/526fa3a5640231c63b285a8acae5bbdd67e2510e_c937af54-e273-412a-8940-c6d54c031722.webp?v=1714705863","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ce404f9f239069652f6455d3fd0a50d75b393c6_5e873bbb-03b0-4f3b-9d8b-89167623b4ff.webp?v=1714705865","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39b4e64542019a1069d06d873287cd68d3606194_8334c4af-f129-462a-ab54-244f04688d2a.webp?v=1714705868","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a8e5a8ed74785b76d845956c92252c5e666b484_acb504eb-a1a3-4099-a8c2-fee0c60eb7a8.webp?v=1714705870","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92550deb6d642b091af7bac783edfc459ff9b671_12fe8dad-ca63-47e9-bb01-cdd289f52138.webp?v=1714705873","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/debb008cdbb195c88247ec38bd26a85fadd7ae91_3d2fe7f1-ae6f-4040-bc5b-e86a44ba583f.webp?v=1714705875"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b3f9d5198a5c14c200e78985570d59aafe42757_fd48e80b-3c4e-4e76-b697-f0f1a7fa90e7.webp?v=1714705854","options":["color"],"media":[{"alt":null,"id":23875539435619,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b3f9d5198a5c14c200e78985570d59aafe42757_fd48e80b-3c4e-4e76-b697-f0f1a7fa90e7.webp?v=1714705854"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b3f9d5198a5c14c200e78985570d59aafe42757_fd48e80b-3c4e-4e76-b697-f0f1a7fa90e7.webp?v=1714705854","width":2000},{"alt":null,"id":23875539763299,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e546676483abba37a730159c594c068615f21b5e_23b2474c-3298-48f5-be42-c86363cfb718.webp?v=1714705856"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e546676483abba37a730159c594c068615f21b5e_23b2474c-3298-48f5-be42-c86363cfb718.webp?v=1714705856","width":2000},{"alt":null,"id":23875540320355,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/badc703de3862c81a507eac78ada11418623d685_411a241d-4f20-4d8b-991d-2311dc4a1faf.webp?v=1714705858"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/badc703de3862c81a507eac78ada11418623d685_411a241d-4f20-4d8b-991d-2311dc4a1faf.webp?v=1714705858","width":2000},{"alt":null,"id":23875540713571,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a407c574fd16377806ab58517a02dc338924b4e3_b8ac6662-6833-40c8-a290-5a421216c629.webp?v=1714705861"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a407c574fd16377806ab58517a02dc338924b4e3_b8ac6662-6833-40c8-a290-5a421216c629.webp?v=1714705861","width":2000},{"alt":null,"id":23875541401699,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/526fa3a5640231c63b285a8acae5bbdd67e2510e_c937af54-e273-412a-8940-c6d54c031722.webp?v=1714705863"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/526fa3a5640231c63b285a8acae5bbdd67e2510e_c937af54-e273-412a-8940-c6d54c031722.webp?v=1714705863","width":2000},{"alt":null,"id":23875541663843,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ce404f9f239069652f6455d3fd0a50d75b393c6_5e873bbb-03b0-4f3b-9d8b-89167623b4ff.webp?v=1714705865"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ce404f9f239069652f6455d3fd0a50d75b393c6_5e873bbb-03b0-4f3b-9d8b-89167623b4ff.webp?v=1714705865","width":2000},{"alt":null,"id":23875542220899,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39b4e64542019a1069d06d873287cd68d3606194_8334c4af-f129-462a-ab54-244f04688d2a.webp?v=1714705868"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39b4e64542019a1069d06d873287cd68d3606194_8334c4af-f129-462a-ab54-244f04688d2a.webp?v=1714705868","width":2000},{"alt":null,"id":23875542646883,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a8e5a8ed74785b76d845956c92252c5e666b484_acb504eb-a1a3-4099-a8c2-fee0c60eb7a8.webp?v=1714705870"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a8e5a8ed74785b76d845956c92252c5e666b484_acb504eb-a1a3-4099-a8c2-fee0c60eb7a8.webp?v=1714705870","width":2000},{"alt":null,"id":23875543171171,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92550deb6d642b091af7bac783edfc459ff9b671_12fe8dad-ca63-47e9-bb01-cdd289f52138.webp?v=1714705873"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92550deb6d642b091af7bac783edfc459ff9b671_12fe8dad-ca63-47e9-bb01-cdd289f52138.webp?v=1714705873","width":2000},{"alt":null,"id":23875543531619,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/debb008cdbb195c88247ec38bd26a85fadd7ae91_3d2fe7f1-ae6f-4040-bc5b-e86a44ba583f.webp?v=1714705875"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/debb008cdbb195c88247ec38bd26a85fadd7ae91_3d2fe7f1-ae6f-4040-bc5b-e86a44ba583f.webp?v=1714705875","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41880179212387,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB71","requires_shipping":true,"taxable":true,"featured_image":{"id":31470637744227,"product_id":7407893446755,"position":6,"created_at":"2024-05-03T11:11:05+08:00","updated_at":"2024-05-03T11:11:05+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ce404f9f239069652f6455d3fd0a50d75b393c6_5e873bbb-03b0-4f3b-9d8b-89167623b4ff.webp?v=1714705865","variant_ids":[41880179212387]},"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-PB71","featured_media":{"alt":null,"id":23875541663843,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ce404f9f239069652f6455d3fd0a50d75b393c6_5e873bbb-03b0-4f3b-9d8b-89167623b4ff.webp?v=1714705865"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41880179212387,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB71","requires_shipping":true,"taxable":true,"featured_image":{"id":31470637744227,"product_id":7407893446755,"position":6,"created_at":"2024-05-03T11:11:05+08:00","updated_at":"2024-05-03T11:11:05+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ce404f9f239069652f6455d3fd0a50d75b393c6_5e873bbb-03b0-4f3b-9d8b-89167623b4ff.webp?v=1714705865","variant_ids":[41880179212387]},"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-PB71","featured_media":{"alt":null,"id":23875541663843,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ce404f9f239069652f6455d3fd0a50d75b393c6_5e873bbb-03b0-4f3b-9d8b-89167623b4ff.webp?v=1714705865"}},"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: "停產" }