$product = {"id":7408421142627,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2-D2-復古系列","handle":"iphone-12-mini-mod-nx-printable-pb110","description":null,"published_at":"2024-06-11T16:36:46+08:00","created_at":"2024-05-03T15:23:17+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 12 mini","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":41885287383139,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB110","requires_shipping":true,"taxable":true,"featured_image":{"id":31472233152611,"product_id":7408421142627,"position":10,"created_at":"2024-05-03T15:23:42+08:00","updated_at":"2024-05-03T15:23:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/168344de27d99aac731c6010377f26dd722542f7_0b2db80c-96b7-407a-8c6b-aefb312c52d8.webp?v=1714721022","variant_ids":[41885287383139]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2-D2-復古系列 - 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":"NPB0118424-PB110","featured_media":{"alt":null,"id":23877149261923,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/168344de27d99aac731c6010377f26dd722542f7_0b2db80c-96b7-407a-8c6b-aefb312c52d8.webp?v=1714721022"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9aefdc08eb34d65cecf4d9a9e69c97fdeaafe1de_3ac75553-9ad0-4c47-8d2a-2252b38de4cb.webp?v=1714721000","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa1f97cf8871c2b4a2903e228823fa4328fc6fc2_853f2112-6278-4b6a-b0a4-be9725a01900.webp?v=1714721002","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70613bf0e714be03f2b7b735de7312b81eab047c_29901bb6-cc40-464b-874e-22609a2c1799.webp?v=1714721005","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1be03c0a7c4f036bf8473f75e6960c049fc7a3ca_7bf6b6e6-25c0-4f23-8449-ddf00ff148d3.webp?v=1714721008","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e75b467432299a63e37f37208d7d4c0d0a28972d_4a17d64f-7083-4ce8-b907-19072c064afc.webp?v=1714721010","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e296e0cdee4a8a676165e4237eaadf3272ae8f0f_72ac0e53-a599-4c3d-b5e8-a65b4b9d2c2b.webp?v=1714721012","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1599296bbd4ab9cc5f73284f3fe9ccfa632213c_7b5726de-34b9-4fb5-ae5e-dc931940ed54.webp?v=1714721015","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/331652d8e6affbf8835c59d84ad8d33a77741c1e_7ace20e8-f4f5-4ffa-bf7f-0535fabef048.webp?v=1714721018","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f4ce5345e403ac611c66b53e8b1f3d10616bcd0_089395ea-e001-4255-ac0e-7222831efa92.webp?v=1714721020","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/168344de27d99aac731c6010377f26dd722542f7_0b2db80c-96b7-407a-8c6b-aefb312c52d8.webp?v=1714721022","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b7046ba489ae55d77924fd6101ac18342801eb5_13b5a4dd-1247-4d2d-bca8-4ae0d5041df8.webp?v=1714721024"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9aefdc08eb34d65cecf4d9a9e69c97fdeaafe1de_3ac75553-9ad0-4c47-8d2a-2252b38de4cb.webp?v=1714721000","options":["color"],"media":[{"alt":null,"id":23877142446179,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9aefdc08eb34d65cecf4d9a9e69c97fdeaafe1de_3ac75553-9ad0-4c47-8d2a-2252b38de4cb.webp?v=1714721000"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9aefdc08eb34d65cecf4d9a9e69c97fdeaafe1de_3ac75553-9ad0-4c47-8d2a-2252b38de4cb.webp?v=1714721000","width":2000},{"alt":null,"id":23877143101539,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa1f97cf8871c2b4a2903e228823fa4328fc6fc2_853f2112-6278-4b6a-b0a4-be9725a01900.webp?v=1714721002"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa1f97cf8871c2b4a2903e228823fa4328fc6fc2_853f2112-6278-4b6a-b0a4-be9725a01900.webp?v=1714721002","width":2000},{"alt":null,"id":23877143724131,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70613bf0e714be03f2b7b735de7312b81eab047c_29901bb6-cc40-464b-874e-22609a2c1799.webp?v=1714721005"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70613bf0e714be03f2b7b735de7312b81eab047c_29901bb6-cc40-464b-874e-22609a2c1799.webp?v=1714721005","width":2000},{"alt":null,"id":23877144281187,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1be03c0a7c4f036bf8473f75e6960c049fc7a3ca_7bf6b6e6-25c0-4f23-8449-ddf00ff148d3.webp?v=1714721008"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1be03c0a7c4f036bf8473f75e6960c049fc7a3ca_7bf6b6e6-25c0-4f23-8449-ddf00ff148d3.webp?v=1714721008","width":2000},{"alt":null,"id":23877145133155,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e75b467432299a63e37f37208d7d4c0d0a28972d_4a17d64f-7083-4ce8-b907-19072c064afc.webp?v=1714721010"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e75b467432299a63e37f37208d7d4c0d0a28972d_4a17d64f-7083-4ce8-b907-19072c064afc.webp?v=1714721010","width":2000},{"alt":null,"id":23877146247267,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e296e0cdee4a8a676165e4237eaadf3272ae8f0f_72ac0e53-a599-4c3d-b5e8-a65b4b9d2c2b.webp?v=1714721012"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e296e0cdee4a8a676165e4237eaadf3272ae8f0f_72ac0e53-a599-4c3d-b5e8-a65b4b9d2c2b.webp?v=1714721012","width":2000},{"alt":null,"id":23877147721827,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1599296bbd4ab9cc5f73284f3fe9ccfa632213c_7b5726de-34b9-4fb5-ae5e-dc931940ed54.webp?v=1714721015"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1599296bbd4ab9cc5f73284f3fe9ccfa632213c_7b5726de-34b9-4fb5-ae5e-dc931940ed54.webp?v=1714721015","width":2000},{"alt":null,"id":23877148344419,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/331652d8e6affbf8835c59d84ad8d33a77741c1e_7ace20e8-f4f5-4ffa-bf7f-0535fabef048.webp?v=1714721018"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/331652d8e6affbf8835c59d84ad8d33a77741c1e_7ace20e8-f4f5-4ffa-bf7f-0535fabef048.webp?v=1714721018","width":2000},{"alt":null,"id":23877148803171,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f4ce5345e403ac611c66b53e8b1f3d10616bcd0_089395ea-e001-4255-ac0e-7222831efa92.webp?v=1714721020"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f4ce5345e403ac611c66b53e8b1f3d10616bcd0_089395ea-e001-4255-ac0e-7222831efa92.webp?v=1714721020","width":2000},{"alt":null,"id":23877149261923,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/168344de27d99aac731c6010377f26dd722542f7_0b2db80c-96b7-407a-8c6b-aefb312c52d8.webp?v=1714721022"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/168344de27d99aac731c6010377f26dd722542f7_0b2db80c-96b7-407a-8c6b-aefb312c52d8.webp?v=1714721022","width":2000},{"alt":null,"id":23877149851747,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b7046ba489ae55d77924fd6101ac18342801eb5_13b5a4dd-1247-4d2d-bca8-4ae0d5041df8.webp?v=1714721024"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b7046ba489ae55d77924fd6101ac18342801eb5_13b5a4dd-1247-4d2d-bca8-4ae0d5041df8.webp?v=1714721024","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885287383139,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB110","requires_shipping":true,"taxable":true,"featured_image":{"id":31472233152611,"product_id":7408421142627,"position":10,"created_at":"2024-05-03T15:23:42+08:00","updated_at":"2024-05-03T15:23:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/168344de27d99aac731c6010377f26dd722542f7_0b2db80c-96b7-407a-8c6b-aefb312c52d8.webp?v=1714721022","variant_ids":[41885287383139]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2-D2-復古系列 - 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":"NPB0118424-PB110","featured_media":{"alt":null,"id":23877149261923,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/168344de27d99aac731c6010377f26dd722542f7_0b2db80c-96b7-407a-8c6b-aefb312c52d8.webp?v=1714721022"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885287383139,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB110","requires_shipping":true,"taxable":true,"featured_image":{"id":31472233152611,"product_id":7408421142627,"position":10,"created_at":"2024-05-03T15:23:42+08:00","updated_at":"2024-05-03T15:23:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/168344de27d99aac731c6010377f26dd722542f7_0b2db80c-96b7-407a-8c6b-aefb312c52d8.webp?v=1714721022","variant_ids":[41885287383139]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2-D2-復古系列 - 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":"NPB0118424-PB110","featured_media":{"alt":null,"id":23877149261923,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/168344de27d99aac731c6010377f26dd722542f7_0b2db80c-96b7-407a-8c6b-aefb312c52d8.webp?v=1714721022"}},"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: "停產" }