$product = {"id":7408538091619,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-噴漆白","handle":"iphone-12-mini-mod-nx-printable-pb02","description":null,"published_at":"2024-06-11T16:40:04+08:00","created_at":"2024-05-03T15:46:08+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":41886624448611,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB02","requires_shipping":true,"taxable":true,"featured_image":{"id":31472534192227,"product_id":7408538091619,"position":9,"created_at":"2024-05-03T15:46:29+08:00","updated_at":"2024-05-03T15:46:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/975602522911aae3a3ddc3ab816fb47af2b75a17_6a87fb00-7ade-4ff5-a79e-5096c0eaf1e0.webp?v=1714722389","variant_ids":[41886624448611]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118424-PB02","featured_media":{"alt":null,"id":23877451448419,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/975602522911aae3a3ddc3ab816fb47af2b75a17_6a87fb00-7ade-4ff5-a79e-5096c0eaf1e0.webp?v=1714722389"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d00ef69dc9134675fd4ffd9b8345f046945a9279_72a54cff-8a2f-45bb-99ac-ef435467c9d2.webp?v=1714722370","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a83bf06ee6d5de403f158d46bfcff7967085c1ba_41a3e1c9-4052-4cdd-a37e-2df5118bd241.webp?v=1714722372","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/100ef46f927e41f1149f4894eec63d43b01831a2_1c6c6579-fc6f-42e1-a312-1f2d01892d62.webp?v=1714722375","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4f8889877cad89e0a44274776ef00e55657696d_41b33a0d-5161-4eaa-9308-6f423c045977.webp?v=1714722377","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6b9daf61effc03148285d7c79f60ce6e3acfcd6_7c4d9210-b3e1-43db-bd74-88f5533207ef.webp?v=1714722379","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/717231734f2b5d39f6b6c63c43b54e1873fb7faf_10233c18-448a-4f8b-a11f-822e6d8417fa.webp?v=1714722382","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed9a8662905b03fe34b719a25cc3b8fc5de20c44_6af6e2c7-0896-4122-8602-909eb3b22bd2.webp?v=1714722384","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f88f65d6b7697297f5cd2e186a9203e2060c3afd_8944027e-6524-432a-89c9-abf519a257dd.webp?v=1714722387","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/975602522911aae3a3ddc3ab816fb47af2b75a17_6a87fb00-7ade-4ff5-a79e-5096c0eaf1e0.webp?v=1714722389","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/774fd04f2eb212c02ef465924fed6423d2ef6ef0_0e6f6d3d-6d7d-4b38-b15f-02b73fc206d8.webp?v=1714722391","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4662819d0530d47e43b5786aa4dbfb2042e18133_437812de-53e0-47c0-9249-48967730fe5a.webp?v=1714722394"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d00ef69dc9134675fd4ffd9b8345f046945a9279_72a54cff-8a2f-45bb-99ac-ef435467c9d2.webp?v=1714722370","options":["color"],"media":[{"alt":null,"id":23877447516259,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d00ef69dc9134675fd4ffd9b8345f046945a9279_72a54cff-8a2f-45bb-99ac-ef435467c9d2.webp?v=1714722370"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d00ef69dc9134675fd4ffd9b8345f046945a9279_72a54cff-8a2f-45bb-99ac-ef435467c9d2.webp?v=1714722370","width":2000},{"alt":null,"id":23877448335459,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a83bf06ee6d5de403f158d46bfcff7967085c1ba_41a3e1c9-4052-4cdd-a37e-2df5118bd241.webp?v=1714722372"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a83bf06ee6d5de403f158d46bfcff7967085c1ba_41a3e1c9-4052-4cdd-a37e-2df5118bd241.webp?v=1714722372","width":2000},{"alt":null,"id":23877448630371,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/100ef46f927e41f1149f4894eec63d43b01831a2_1c6c6579-fc6f-42e1-a312-1f2d01892d62.webp?v=1714722375"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/100ef46f927e41f1149f4894eec63d43b01831a2_1c6c6579-fc6f-42e1-a312-1f2d01892d62.webp?v=1714722375","width":2000},{"alt":null,"id":23877449220195,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4f8889877cad89e0a44274776ef00e55657696d_41b33a0d-5161-4eaa-9308-6f423c045977.webp?v=1714722377"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4f8889877cad89e0a44274776ef00e55657696d_41b33a0d-5161-4eaa-9308-6f423c045977.webp?v=1714722377","width":2000},{"alt":null,"id":23877449646179,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6b9daf61effc03148285d7c79f60ce6e3acfcd6_7c4d9210-b3e1-43db-bd74-88f5533207ef.webp?v=1714722379"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6b9daf61effc03148285d7c79f60ce6e3acfcd6_7c4d9210-b3e1-43db-bd74-88f5533207ef.webp?v=1714722379","width":2000},{"alt":null,"id":23877450170467,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/717231734f2b5d39f6b6c63c43b54e1873fb7faf_10233c18-448a-4f8b-a11f-822e6d8417fa.webp?v=1714722382"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/717231734f2b5d39f6b6c63c43b54e1873fb7faf_10233c18-448a-4f8b-a11f-822e6d8417fa.webp?v=1714722382","width":2000},{"alt":null,"id":23877450596451,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed9a8662905b03fe34b719a25cc3b8fc5de20c44_6af6e2c7-0896-4122-8602-909eb3b22bd2.webp?v=1714722384"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ed9a8662905b03fe34b719a25cc3b8fc5de20c44_6af6e2c7-0896-4122-8602-909eb3b22bd2.webp?v=1714722384","width":2000},{"alt":null,"id":23877451153507,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f88f65d6b7697297f5cd2e186a9203e2060c3afd_8944027e-6524-432a-89c9-abf519a257dd.webp?v=1714722387"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f88f65d6b7697297f5cd2e186a9203e2060c3afd_8944027e-6524-432a-89c9-abf519a257dd.webp?v=1714722387","width":2000},{"alt":null,"id":23877451448419,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/975602522911aae3a3ddc3ab816fb47af2b75a17_6a87fb00-7ade-4ff5-a79e-5096c0eaf1e0.webp?v=1714722389"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/975602522911aae3a3ddc3ab816fb47af2b75a17_6a87fb00-7ade-4ff5-a79e-5096c0eaf1e0.webp?v=1714722389","width":2000},{"alt":null,"id":23877452103779,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/774fd04f2eb212c02ef465924fed6423d2ef6ef0_0e6f6d3d-6d7d-4b38-b15f-02b73fc206d8.webp?v=1714722391"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/774fd04f2eb212c02ef465924fed6423d2ef6ef0_0e6f6d3d-6d7d-4b38-b15f-02b73fc206d8.webp?v=1714722391","width":2000},{"alt":null,"id":23877452464227,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4662819d0530d47e43b5786aa4dbfb2042e18133_437812de-53e0-47c0-9249-48967730fe5a.webp?v=1714722394"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4662819d0530d47e43b5786aa4dbfb2042e18133_437812de-53e0-47c0-9249-48967730fe5a.webp?v=1714722394","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886624448611,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB02","requires_shipping":true,"taxable":true,"featured_image":{"id":31472534192227,"product_id":7408538091619,"position":9,"created_at":"2024-05-03T15:46:29+08:00","updated_at":"2024-05-03T15:46:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/975602522911aae3a3ddc3ab816fb47af2b75a17_6a87fb00-7ade-4ff5-a79e-5096c0eaf1e0.webp?v=1714722389","variant_ids":[41886624448611]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118424-PB02","featured_media":{"alt":null,"id":23877451448419,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/975602522911aae3a3ddc3ab816fb47af2b75a17_6a87fb00-7ade-4ff5-a79e-5096c0eaf1e0.webp?v=1714722389"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886624448611,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB02","requires_shipping":true,"taxable":true,"featured_image":{"id":31472534192227,"product_id":7408538091619,"position":9,"created_at":"2024-05-03T15:46:29+08:00","updated_at":"2024-05-03T15:46:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/975602522911aae3a3ddc3ab816fb47af2b75a17_6a87fb00-7ade-4ff5-a79e-5096c0eaf1e0.webp?v=1714722389","variant_ids":[41886624448611]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118424-PB02","featured_media":{"alt":null,"id":23877451448419,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/975602522911aae3a3ddc3ab816fb47af2b75a17_6a87fb00-7ade-4ff5-a79e-5096c0eaf1e0.webp?v=1714722389"}},"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: "停產" }