$product = {"id":7414969991267,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 小圖款-丘巴卡","handle":"iphone-12-mini-mod-nx-magsafe-printable-pc07","description":null,"published_at":"2024-06-11T17:54:27+08:00","created_at":"2024-05-05T19:57:54+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-star-wars","Top50","type-Mod NX Printable MagSafe Printable"],"price":110000,"price_min":110000,"price_max":110000,"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":41910469722211,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PC07","requires_shipping":true,"taxable":true,"featured_image":{"id":31487811092579,"product_id":7414969991267,"position":11,"created_at":"2024-05-05T19:58:20+08:00","updated_at":"2024-05-05T19:58:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8851302af1a0ac844a571b6c3848fd9defecc6ee_9b6502c0-1563-4b5c-8759-869615f7302a.webp?v=1714910300","variant_ids":[41910469722211]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 小圖款-丘巴卡 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-PC07","featured_media":{"alt":null,"id":23893155086435,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8851302af1a0ac844a571b6c3848fd9defecc6ee_9b6502c0-1563-4b5c-8759-869615f7302a.webp?v=1714910300"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05950d498cbe87300c3a87b1049c6a235994686f_f338fdff-6453-4f91-a821-04ca8cd5082c.webp?v=1714910276","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06059102eb7bba5c4ebb08dd8ddb39d352ee0e74_09725202-7a06-460f-9096-b69ff04682a4.webp?v=1714910279","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13a2b9fe2961d0c63a97c8943540c453be4904c5_a79ba4d8-6e4a-4962-ba21-31e7fcec2e3e.webp?v=1714910282","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef0bcab4cae6743dcb00162be4f702f3975b2071_b0ccc121-2e1e-4d29-ab54-94603c2f82a9.webp?v=1714910284","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a68423371650a0cd16023de57eb4d06ddcc6f8c5_1e8078fe-ee81-4d95-9d14-4023cb4dc699.webp?v=1714910286","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9386688795a060523b50fb46f0431bd7d5c1562a_aceacb6a-43e9-4fd1-9dfc-d4441993cb2f.webp?v=1714910288","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38fbd2fadfd50e385ba4489224b4c75d77bd8a6a_a962bb47-d881-44b6-ad54-aaab91466d9b.webp?v=1714910291","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02a98ff72a0e6d3954c61cbb9bcd78ae6a061e9c_0ea7cfe9-f6fb-48b6-a14f-21defa52ef09.webp?v=1714910293","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e7e3e37797290c003a5d479c0e1c59e69cd9be6_8e2e4710-f4ce-4c0b-ae7e-a29715ae27a0.webp?v=1714910295","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a8ecb9c4490cb046be23e6bdbcd230ac87f34cf_748b3b56-8bfd-4f9c-b537-103aecb1dede.webp?v=1714910298","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8851302af1a0ac844a571b6c3848fd9defecc6ee_9b6502c0-1563-4b5c-8759-869615f7302a.webp?v=1714910300"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05950d498cbe87300c3a87b1049c6a235994686f_f338fdff-6453-4f91-a821-04ca8cd5082c.webp?v=1714910276","options":["color"],"media":[{"alt":null,"id":23893148729443,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05950d498cbe87300c3a87b1049c6a235994686f_f338fdff-6453-4f91-a821-04ca8cd5082c.webp?v=1714910276"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05950d498cbe87300c3a87b1049c6a235994686f_f338fdff-6453-4f91-a821-04ca8cd5082c.webp?v=1714910276","width":2000},{"alt":null,"id":23893149352035,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06059102eb7bba5c4ebb08dd8ddb39d352ee0e74_09725202-7a06-460f-9096-b69ff04682a4.webp?v=1714910279"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06059102eb7bba5c4ebb08dd8ddb39d352ee0e74_09725202-7a06-460f-9096-b69ff04682a4.webp?v=1714910279","width":2000},{"alt":null,"id":23893150040163,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13a2b9fe2961d0c63a97c8943540c453be4904c5_a79ba4d8-6e4a-4962-ba21-31e7fcec2e3e.webp?v=1714910282"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13a2b9fe2961d0c63a97c8943540c453be4904c5_a79ba4d8-6e4a-4962-ba21-31e7fcec2e3e.webp?v=1714910282","width":2000},{"alt":null,"id":23893150597219,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef0bcab4cae6743dcb00162be4f702f3975b2071_b0ccc121-2e1e-4d29-ab54-94603c2f82a9.webp?v=1714910284"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef0bcab4cae6743dcb00162be4f702f3975b2071_b0ccc121-2e1e-4d29-ab54-94603c2f82a9.webp?v=1714910284","width":2000},{"alt":null,"id":23893151121507,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a68423371650a0cd16023de57eb4d06ddcc6f8c5_1e8078fe-ee81-4d95-9d14-4023cb4dc699.webp?v=1714910286"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a68423371650a0cd16023de57eb4d06ddcc6f8c5_1e8078fe-ee81-4d95-9d14-4023cb4dc699.webp?v=1714910286","width":2000},{"alt":null,"id":23893151973475,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9386688795a060523b50fb46f0431bd7d5c1562a_aceacb6a-43e9-4fd1-9dfc-d4441993cb2f.webp?v=1714910288"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9386688795a060523b50fb46f0431bd7d5c1562a_aceacb6a-43e9-4fd1-9dfc-d4441993cb2f.webp?v=1714910288","width":2000},{"alt":null,"id":23893152563299,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38fbd2fadfd50e385ba4489224b4c75d77bd8a6a_a962bb47-d881-44b6-ad54-aaab91466d9b.webp?v=1714910291"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38fbd2fadfd50e385ba4489224b4c75d77bd8a6a_a962bb47-d881-44b6-ad54-aaab91466d9b.webp?v=1714910291","width":2000},{"alt":null,"id":23893153054819,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02a98ff72a0e6d3954c61cbb9bcd78ae6a061e9c_0ea7cfe9-f6fb-48b6-a14f-21defa52ef09.webp?v=1714910293"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02a98ff72a0e6d3954c61cbb9bcd78ae6a061e9c_0ea7cfe9-f6fb-48b6-a14f-21defa52ef09.webp?v=1714910293","width":2000},{"alt":null,"id":23893154005091,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e7e3e37797290c003a5d479c0e1c59e69cd9be6_8e2e4710-f4ce-4c0b-ae7e-a29715ae27a0.webp?v=1714910295"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e7e3e37797290c003a5d479c0e1c59e69cd9be6_8e2e4710-f4ce-4c0b-ae7e-a29715ae27a0.webp?v=1714910295","width":2000},{"alt":null,"id":23893154594915,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a8ecb9c4490cb046be23e6bdbcd230ac87f34cf_748b3b56-8bfd-4f9c-b537-103aecb1dede.webp?v=1714910298"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a8ecb9c4490cb046be23e6bdbcd230ac87f34cf_748b3b56-8bfd-4f9c-b537-103aecb1dede.webp?v=1714910298","width":2000},{"alt":null,"id":23893155086435,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8851302af1a0ac844a571b6c3848fd9defecc6ee_9b6502c0-1563-4b5c-8759-869615f7302a.webp?v=1714910300"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8851302af1a0ac844a571b6c3848fd9defecc6ee_9b6502c0-1563-4b5c-8759-869615f7302a.webp?v=1714910300","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910469722211,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PC07","requires_shipping":true,"taxable":true,"featured_image":{"id":31487811092579,"product_id":7414969991267,"position":11,"created_at":"2024-05-05T19:58:20+08:00","updated_at":"2024-05-05T19:58:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8851302af1a0ac844a571b6c3848fd9defecc6ee_9b6502c0-1563-4b5c-8759-869615f7302a.webp?v=1714910300","variant_ids":[41910469722211]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 小圖款-丘巴卡 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-PC07","featured_media":{"alt":null,"id":23893155086435,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8851302af1a0ac844a571b6c3848fd9defecc6ee_9b6502c0-1563-4b5c-8759-869615f7302a.webp?v=1714910300"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910469722211,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PC07","requires_shipping":true,"taxable":true,"featured_image":{"id":31487811092579,"product_id":7414969991267,"position":11,"created_at":"2024-05-05T19:58:20+08:00","updated_at":"2024-05-05T19:58:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8851302af1a0ac844a571b6c3848fd9defecc6ee_9b6502c0-1563-4b5c-8759-869615f7302a.webp?v=1714910300","variant_ids":[41910469722211]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 小圖款-丘巴卡 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-PC07","featured_media":{"alt":null,"id":23893155086435,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8851302af1a0ac844a571b6c3848fd9defecc6ee_9b6502c0-1563-4b5c-8759-869615f7302a.webp?v=1714910300"}},"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: "停產" }