$product = {"id":7415023501411,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - X翼戰機","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb74","description":null,"published_at":"2024-06-11T17:55:54+08:00","created_at":"2024-05-05T20:08:24+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":41911050076259,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB74","requires_shipping":true,"taxable":true,"featured_image":{"id":31487955239011,"product_id":7415023501411,"position":6,"created_at":"2024-05-05T20:08:39+08:00","updated_at":"2024-05-05T20:08:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2610d9724ba601dddc1885d3b016c7a93d9f621_ebd14657-127c-4f95-88e5-8128220d240b.webp?v=1714910919","variant_ids":[41911050076259]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - X翼戰機 - 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-PB74","featured_media":{"alt":null,"id":23893299462243,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2610d9724ba601dddc1885d3b016c7a93d9f621_ebd14657-127c-4f95-88e5-8128220d240b.webp?v=1714910919"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94e2766a1c9a8a93e835ba0a77af6a4d8bc19da5_1578fc7d-4d5c-4cce-bd75-959e7918fb8b.webp?v=1714910907","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bb2e7fbb5bbd1c8cd3d30f4177d5f3b3b91bdde_3bb0c6f6-e02e-4a97-bcf0-93067c6ce585.webp?v=1714910909","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e7cb91f3b343f286c3c81ea1b6379ee61c64434_457678bb-bb38-47b7-8596-7b39e8954d8a.webp?v=1714910912","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/280a809bd5ec0309c86da061452507bbee0ee440_1bbeac72-2e65-4697-b762-c43a0300d303.webp?v=1714910914","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/565c8a4ce28eff9e1624e9171efa6a2893dd7a6d_d8a81b38-11cc-4d0b-a37c-094c369385f7.webp?v=1714910917","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2610d9724ba601dddc1885d3b016c7a93d9f621_ebd14657-127c-4f95-88e5-8128220d240b.webp?v=1714910919","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b44a57528b8e6445bff422ad99ddc76feefeea8_283f749c-3dd8-477a-a578-514da0b4326f.webp?v=1714910921","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a13f6496cebecdcf061db160f30b1980f67499fd_5d884aaa-0a18-47a5-b293-96d6c5959854.webp?v=1714910924","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e01e1d3a3d9ebfcc813308b2cbb422cfccba9fe9_8cfe57a2-3c04-4533-865c-270a03ecf849.webp?v=1714910926","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a8174849938f7fe512ab0ce90cb4f8ef2c38b49_3aaa21f1-6183-4354-9299-77056b397d7b.webp?v=1714910928","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/91fd22a0821bbbe5ba3fe1d0da8d87d34502de73_db74b2b0-dd2c-4372-b280-850ba3627dae.webp?v=1714910931"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94e2766a1c9a8a93e835ba0a77af6a4d8bc19da5_1578fc7d-4d5c-4cce-bd75-959e7918fb8b.webp?v=1714910907","options":["color"],"media":[{"alt":null,"id":23893296709731,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94e2766a1c9a8a93e835ba0a77af6a4d8bc19da5_1578fc7d-4d5c-4cce-bd75-959e7918fb8b.webp?v=1714910907"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/94e2766a1c9a8a93e835ba0a77af6a4d8bc19da5_1578fc7d-4d5c-4cce-bd75-959e7918fb8b.webp?v=1714910907","width":2000},{"alt":null,"id":23893297168483,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bb2e7fbb5bbd1c8cd3d30f4177d5f3b3b91bdde_3bb0c6f6-e02e-4a97-bcf0-93067c6ce585.webp?v=1714910909"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bb2e7fbb5bbd1c8cd3d30f4177d5f3b3b91bdde_3bb0c6f6-e02e-4a97-bcf0-93067c6ce585.webp?v=1714910909","width":2000},{"alt":null,"id":23893297660003,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e7cb91f3b343f286c3c81ea1b6379ee61c64434_457678bb-bb38-47b7-8596-7b39e8954d8a.webp?v=1714910912"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e7cb91f3b343f286c3c81ea1b6379ee61c64434_457678bb-bb38-47b7-8596-7b39e8954d8a.webp?v=1714910912","width":2000},{"alt":null,"id":23893298348131,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/280a809bd5ec0309c86da061452507bbee0ee440_1bbeac72-2e65-4697-b762-c43a0300d303.webp?v=1714910914"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/280a809bd5ec0309c86da061452507bbee0ee440_1bbeac72-2e65-4697-b762-c43a0300d303.webp?v=1714910914","width":2000},{"alt":null,"id":23893298839651,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/565c8a4ce28eff9e1624e9171efa6a2893dd7a6d_d8a81b38-11cc-4d0b-a37c-094c369385f7.webp?v=1714910917"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/565c8a4ce28eff9e1624e9171efa6a2893dd7a6d_d8a81b38-11cc-4d0b-a37c-094c369385f7.webp?v=1714910917","width":2000},{"alt":null,"id":23893299462243,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2610d9724ba601dddc1885d3b016c7a93d9f621_ebd14657-127c-4f95-88e5-8128220d240b.webp?v=1714910919"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2610d9724ba601dddc1885d3b016c7a93d9f621_ebd14657-127c-4f95-88e5-8128220d240b.webp?v=1714910919","width":2000},{"alt":null,"id":23893299986531,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b44a57528b8e6445bff422ad99ddc76feefeea8_283f749c-3dd8-477a-a578-514da0b4326f.webp?v=1714910921"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b44a57528b8e6445bff422ad99ddc76feefeea8_283f749c-3dd8-477a-a578-514da0b4326f.webp?v=1714910921","width":2000},{"alt":null,"id":23893300674659,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a13f6496cebecdcf061db160f30b1980f67499fd_5d884aaa-0a18-47a5-b293-96d6c5959854.webp?v=1714910924"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a13f6496cebecdcf061db160f30b1980f67499fd_5d884aaa-0a18-47a5-b293-96d6c5959854.webp?v=1714910924","width":2000},{"alt":null,"id":23893301231715,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e01e1d3a3d9ebfcc813308b2cbb422cfccba9fe9_8cfe57a2-3c04-4533-865c-270a03ecf849.webp?v=1714910926"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e01e1d3a3d9ebfcc813308b2cbb422cfccba9fe9_8cfe57a2-3c04-4533-865c-270a03ecf849.webp?v=1714910926","width":2000},{"alt":null,"id":23893301657699,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a8174849938f7fe512ab0ce90cb4f8ef2c38b49_3aaa21f1-6183-4354-9299-77056b397d7b.webp?v=1714910928"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a8174849938f7fe512ab0ce90cb4f8ef2c38b49_3aaa21f1-6183-4354-9299-77056b397d7b.webp?v=1714910928","width":2000},{"alt":null,"id":23893302476899,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/91fd22a0821bbbe5ba3fe1d0da8d87d34502de73_db74b2b0-dd2c-4372-b280-850ba3627dae.webp?v=1714910931"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/91fd22a0821bbbe5ba3fe1d0da8d87d34502de73_db74b2b0-dd2c-4372-b280-850ba3627dae.webp?v=1714910931","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911050076259,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB74","requires_shipping":true,"taxable":true,"featured_image":{"id":31487955239011,"product_id":7415023501411,"position":6,"created_at":"2024-05-05T20:08:39+08:00","updated_at":"2024-05-05T20:08:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2610d9724ba601dddc1885d3b016c7a93d9f621_ebd14657-127c-4f95-88e5-8128220d240b.webp?v=1714910919","variant_ids":[41911050076259]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - X翼戰機 - 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-PB74","featured_media":{"alt":null,"id":23893299462243,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2610d9724ba601dddc1885d3b016c7a93d9f621_ebd14657-127c-4f95-88e5-8128220d240b.webp?v=1714910919"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911050076259,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB74","requires_shipping":true,"taxable":true,"featured_image":{"id":31487955239011,"product_id":7415023501411,"position":6,"created_at":"2024-05-05T20:08:39+08:00","updated_at":"2024-05-05T20:08:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2610d9724ba601dddc1885d3b016c7a93d9f621_ebd14657-127c-4f95-88e5-8128220d240b.webp?v=1714910919","variant_ids":[41911050076259]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - X翼戰機 - 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-PB74","featured_media":{"alt":null,"id":23893299462243,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2610d9724ba601dddc1885d3b016c7a93d9f621_ebd14657-127c-4f95-88e5-8128220d240b.webp?v=1714910919"}},"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: "停產" }