$product = {"id":7408558735459,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 爪哇族2-塗鴉藝術","handle":"iphone-12-mini-mod-nx-printable-pb40","description":null,"published_at":"2024-06-11T16:40:41+08:00","created_at":"2024-05-03T15:50:28+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":41886861557859,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB40","requires_shipping":true,"taxable":true,"featured_image":{"id":31472588128355,"product_id":7408558735459,"position":5,"created_at":"2024-05-03T15:50:39+08:00","updated_at":"2024-05-03T15:50:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f8773d431254dcbd0b9de326f0c100d8488c77b_e1811ae6-d638-4643-92dc-0646a4fcbe8f.webp?v=1714722639","variant_ids":[41886861557859]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 爪哇族2-塗鴉藝術 - 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-PB40","featured_media":{"alt":null,"id":23877505548387,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f8773d431254dcbd0b9de326f0c100d8488c77b_e1811ae6-d638-4643-92dc-0646a4fcbe8f.webp?v=1714722639"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/578226d1bef0b75d8fedbd2963c9f5b5d9354db3_f0ee83b5-f6c2-4216-a44c-907c9efa73ba.webp?v=1714722631","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba49813b21c03e1360405b0e16096a65b48b3fa4_2daffa7d-369a-4d4e-bef2-2177ca69addb.webp?v=1714722633","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1f9d5c49d1cb9c1470771521b43624e4df4b6f6_afda6c83-a288-41c2-b0e5-1f8dbbbb7c06.webp?v=1714722635","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09a00334fd211d8d6c435fb093c3fcac02dcee4d_e25c9a85-480e-4aaf-8996-57fff25a736e.webp?v=1714722637","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f8773d431254dcbd0b9de326f0c100d8488c77b_e1811ae6-d638-4643-92dc-0646a4fcbe8f.webp?v=1714722639","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9df483016f56d14e5e8ca9be1ad1c43e69841c87_662efcbd-7dfc-4b8f-9101-4364c3523c5e.webp?v=1714722642","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56422e50b6e8abd8541dc65365b4bf729f089182_bc9bcd52-37cb-4495-ae6c-9bd96e840010.webp?v=1714722644","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/594d82ad7fa2a4d559c95d88d36ef8496d90911b_bd6cd40b-e43b-4ba5-b370-84f46f66f30a.webp?v=1714722646","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62bc3b89f7df9df981faf9a10215e020bb049db0_6b9f0df9-3804-4b8c-b0f6-eed37a9c5d66.webp?v=1714722648","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcf0d761825eae51e4908970f369326d87fb8056_8436442e-0f4d-44eb-8e04-24c0c416c322.webp?v=1714722651","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a9183ed860f7f7f991567445e9c3980d2e38440_ab641f00-2234-4eab-9120-33805b2a496d.webp?v=1714722653"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/578226d1bef0b75d8fedbd2963c9f5b5d9354db3_f0ee83b5-f6c2-4216-a44c-907c9efa73ba.webp?v=1714722631","options":["color"],"media":[{"alt":null,"id":23877503680611,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/578226d1bef0b75d8fedbd2963c9f5b5d9354db3_f0ee83b5-f6c2-4216-a44c-907c9efa73ba.webp?v=1714722631"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/578226d1bef0b75d8fedbd2963c9f5b5d9354db3_f0ee83b5-f6c2-4216-a44c-907c9efa73ba.webp?v=1714722631","width":2000},{"alt":null,"id":23877504073827,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba49813b21c03e1360405b0e16096a65b48b3fa4_2daffa7d-369a-4d4e-bef2-2177ca69addb.webp?v=1714722633"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ba49813b21c03e1360405b0e16096a65b48b3fa4_2daffa7d-369a-4d4e-bef2-2177ca69addb.webp?v=1714722633","width":2000},{"alt":null,"id":23877504532579,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1f9d5c49d1cb9c1470771521b43624e4df4b6f6_afda6c83-a288-41c2-b0e5-1f8dbbbb7c06.webp?v=1714722635"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1f9d5c49d1cb9c1470771521b43624e4df4b6f6_afda6c83-a288-41c2-b0e5-1f8dbbbb7c06.webp?v=1714722635","width":2000},{"alt":null,"id":23877504958563,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09a00334fd211d8d6c435fb093c3fcac02dcee4d_e25c9a85-480e-4aaf-8996-57fff25a736e.webp?v=1714722637"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09a00334fd211d8d6c435fb093c3fcac02dcee4d_e25c9a85-480e-4aaf-8996-57fff25a736e.webp?v=1714722637","width":2000},{"alt":null,"id":23877505548387,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f8773d431254dcbd0b9de326f0c100d8488c77b_e1811ae6-d638-4643-92dc-0646a4fcbe8f.webp?v=1714722639"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f8773d431254dcbd0b9de326f0c100d8488c77b_e1811ae6-d638-4643-92dc-0646a4fcbe8f.webp?v=1714722639","width":2000},{"alt":null,"id":23877506039907,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9df483016f56d14e5e8ca9be1ad1c43e69841c87_662efcbd-7dfc-4b8f-9101-4364c3523c5e.webp?v=1714722642"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9df483016f56d14e5e8ca9be1ad1c43e69841c87_662efcbd-7dfc-4b8f-9101-4364c3523c5e.webp?v=1714722642","width":2000},{"alt":null,"id":23877506465891,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56422e50b6e8abd8541dc65365b4bf729f089182_bc9bcd52-37cb-4495-ae6c-9bd96e840010.webp?v=1714722644"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56422e50b6e8abd8541dc65365b4bf729f089182_bc9bcd52-37cb-4495-ae6c-9bd96e840010.webp?v=1714722644","width":2000},{"alt":null,"id":23877506990179,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/594d82ad7fa2a4d559c95d88d36ef8496d90911b_bd6cd40b-e43b-4ba5-b370-84f46f66f30a.webp?v=1714722646"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/594d82ad7fa2a4d559c95d88d36ef8496d90911b_bd6cd40b-e43b-4ba5-b370-84f46f66f30a.webp?v=1714722646","width":2000},{"alt":null,"id":23877507383395,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62bc3b89f7df9df981faf9a10215e020bb049db0_6b9f0df9-3804-4b8c-b0f6-eed37a9c5d66.webp?v=1714722648"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62bc3b89f7df9df981faf9a10215e020bb049db0_6b9f0df9-3804-4b8c-b0f6-eed37a9c5d66.webp?v=1714722648","width":2000},{"alt":null,"id":23877507776611,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcf0d761825eae51e4908970f369326d87fb8056_8436442e-0f4d-44eb-8e04-24c0c416c322.webp?v=1714722651"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcf0d761825eae51e4908970f369326d87fb8056_8436442e-0f4d-44eb-8e04-24c0c416c322.webp?v=1714722651","width":2000},{"alt":null,"id":23877508300899,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a9183ed860f7f7f991567445e9c3980d2e38440_ab641f00-2234-4eab-9120-33805b2a496d.webp?v=1714722653"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a9183ed860f7f7f991567445e9c3980d2e38440_ab641f00-2234-4eab-9120-33805b2a496d.webp?v=1714722653","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886861557859,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB40","requires_shipping":true,"taxable":true,"featured_image":{"id":31472588128355,"product_id":7408558735459,"position":5,"created_at":"2024-05-03T15:50:39+08:00","updated_at":"2024-05-03T15:50:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f8773d431254dcbd0b9de326f0c100d8488c77b_e1811ae6-d638-4643-92dc-0646a4fcbe8f.webp?v=1714722639","variant_ids":[41886861557859]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 爪哇族2-塗鴉藝術 - 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-PB40","featured_media":{"alt":null,"id":23877505548387,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f8773d431254dcbd0b9de326f0c100d8488c77b_e1811ae6-d638-4643-92dc-0646a4fcbe8f.webp?v=1714722639"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886861557859,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB40","requires_shipping":true,"taxable":true,"featured_image":{"id":31472588128355,"product_id":7408558735459,"position":5,"created_at":"2024-05-03T15:50:39+08:00","updated_at":"2024-05-03T15:50:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f8773d431254dcbd0b9de326f0c100d8488c77b_e1811ae6-d638-4643-92dc-0646a4fcbe8f.webp?v=1714722639","variant_ids":[41886861557859]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 爪哇族2-塗鴉藝術 - 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-PB40","featured_media":{"alt":null,"id":23877505548387,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f8773d431254dcbd0b9de326f0c100d8488c77b_e1811ae6-d638-4643-92dc-0646a4fcbe8f.webp?v=1714722639"}},"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: "停產" }