$product = {"id":7408394371171,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - C3PO-經典","handle":"iphone-12-pro-max-mod-nx-printable-pb24","description":null,"published_at":"2024-06-11T16:36:03+08:00","created_at":"2024-05-03T15:17:55+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 pro max","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":41884991586403,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB24","requires_shipping":true,"taxable":true,"featured_image":{"id":31472151560291,"product_id":7408394371171,"position":10,"created_at":"2024-05-03T15:18:18+08:00","updated_at":"2024-05-03T15:18:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70b0197df2a662d6bbe5f894cd2dee88c9b6aafd_5e44ccec-1b74-4520-8382-947878ee7fb7.webp?v=1714720698","variant_ids":[41884991586403]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - C3PO-經典 - 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":"NPB0118724-PB24","featured_media":{"alt":null,"id":23877067178083,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70b0197df2a662d6bbe5f894cd2dee88c9b6aafd_5e44ccec-1b74-4520-8382-947878ee7fb7.webp?v=1714720698"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc5dae618c13727c2515e1dd8278bca37105f1f7_73d086cb-0050-416a-abef-0ba0dd4c60aa.webp?v=1714720677","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6255276d5dd7d35639cdbc5ed0d90885beb2195_8d4c4c38-c8c5-4679-a12e-18959fc4e603.webp?v=1714720680","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9ef9d0565664c7efba2ca073e0bf7a858fdd8bc_9414ba59-7da0-4aa3-9dd5-2e073bc55871.webp?v=1714720682","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c92e25864ed3133aa463726b3888598a5849a7f0_68db1f43-ee64-4f75-8659-1ee3ec615047.webp?v=1714720684","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2f77adbb613594a3e25524f466e0301b52542c3_c30cc9f6-d2a2-44cb-897f-15b9f87b2ee3.webp?v=1714720687","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a6872c25bf1a4ecb1655cb107ee2fd10ee61f8c_ad0a6c61-119e-47c4-bc89-3ed2cda15249.webp?v=1714720689","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59c359f0a546476ff2d985dcb8a3698014214905_f33445eb-d281-423c-aa63-d1c1cf53eb5f.webp?v=1714720691","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fc36d6f79059c15b9a1c31a4eefc96e8e372a11_a00e7eca-87f7-4946-88dd-950aa815d1b8.webp?v=1714720693","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da0586005e7e5740f2400f72410869c074e9a53a_46a499a9-d7bd-4ebc-8534-841ee1150449.webp?v=1714720696","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70b0197df2a662d6bbe5f894cd2dee88c9b6aafd_5e44ccec-1b74-4520-8382-947878ee7fb7.webp?v=1714720698"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc5dae618c13727c2515e1dd8278bca37105f1f7_73d086cb-0050-416a-abef-0ba0dd4c60aa.webp?v=1714720677","options":["color"],"media":[{"alt":null,"id":23877062066275,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc5dae618c13727c2515e1dd8278bca37105f1f7_73d086cb-0050-416a-abef-0ba0dd4c60aa.webp?v=1714720677"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc5dae618c13727c2515e1dd8278bca37105f1f7_73d086cb-0050-416a-abef-0ba0dd4c60aa.webp?v=1714720677","width":2000},{"alt":null,"id":23877062951011,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6255276d5dd7d35639cdbc5ed0d90885beb2195_8d4c4c38-c8c5-4679-a12e-18959fc4e603.webp?v=1714720680"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6255276d5dd7d35639cdbc5ed0d90885beb2195_8d4c4c38-c8c5-4679-a12e-18959fc4e603.webp?v=1714720680","width":2000},{"alt":null,"id":23877063278691,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9ef9d0565664c7efba2ca073e0bf7a858fdd8bc_9414ba59-7da0-4aa3-9dd5-2e073bc55871.webp?v=1714720682"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9ef9d0565664c7efba2ca073e0bf7a858fdd8bc_9414ba59-7da0-4aa3-9dd5-2e073bc55871.webp?v=1714720682","width":2000},{"alt":null,"id":23877063901283,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c92e25864ed3133aa463726b3888598a5849a7f0_68db1f43-ee64-4f75-8659-1ee3ec615047.webp?v=1714720684"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c92e25864ed3133aa463726b3888598a5849a7f0_68db1f43-ee64-4f75-8659-1ee3ec615047.webp?v=1714720684","width":2000},{"alt":null,"id":23877064228963,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2f77adbb613594a3e25524f466e0301b52542c3_c30cc9f6-d2a2-44cb-897f-15b9f87b2ee3.webp?v=1714720687"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2f77adbb613594a3e25524f466e0301b52542c3_c30cc9f6-d2a2-44cb-897f-15b9f87b2ee3.webp?v=1714720687","width":2000},{"alt":null,"id":23877064949859,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a6872c25bf1a4ecb1655cb107ee2fd10ee61f8c_ad0a6c61-119e-47c4-bc89-3ed2cda15249.webp?v=1714720689"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a6872c25bf1a4ecb1655cb107ee2fd10ee61f8c_ad0a6c61-119e-47c4-bc89-3ed2cda15249.webp?v=1714720689","width":2000},{"alt":null,"id":23877065310307,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59c359f0a546476ff2d985dcb8a3698014214905_f33445eb-d281-423c-aa63-d1c1cf53eb5f.webp?v=1714720691"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59c359f0a546476ff2d985dcb8a3698014214905_f33445eb-d281-423c-aa63-d1c1cf53eb5f.webp?v=1714720691","width":2000},{"alt":null,"id":23877065932899,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fc36d6f79059c15b9a1c31a4eefc96e8e372a11_a00e7eca-87f7-4946-88dd-950aa815d1b8.webp?v=1714720693"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fc36d6f79059c15b9a1c31a4eefc96e8e372a11_a00e7eca-87f7-4946-88dd-950aa815d1b8.webp?v=1714720693","width":2000},{"alt":null,"id":23877066588259,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da0586005e7e5740f2400f72410869c074e9a53a_46a499a9-d7bd-4ebc-8534-841ee1150449.webp?v=1714720696"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da0586005e7e5740f2400f72410869c074e9a53a_46a499a9-d7bd-4ebc-8534-841ee1150449.webp?v=1714720696","width":2000},{"alt":null,"id":23877067178083,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70b0197df2a662d6bbe5f894cd2dee88c9b6aafd_5e44ccec-1b74-4520-8382-947878ee7fb7.webp?v=1714720698"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70b0197df2a662d6bbe5f894cd2dee88c9b6aafd_5e44ccec-1b74-4520-8382-947878ee7fb7.webp?v=1714720698","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41884991586403,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB24","requires_shipping":true,"taxable":true,"featured_image":{"id":31472151560291,"product_id":7408394371171,"position":10,"created_at":"2024-05-03T15:18:18+08:00","updated_at":"2024-05-03T15:18:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70b0197df2a662d6bbe5f894cd2dee88c9b6aafd_5e44ccec-1b74-4520-8382-947878ee7fb7.webp?v=1714720698","variant_ids":[41884991586403]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - C3PO-經典 - 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":"NPB0118724-PB24","featured_media":{"alt":null,"id":23877067178083,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70b0197df2a662d6bbe5f894cd2dee88c9b6aafd_5e44ccec-1b74-4520-8382-947878ee7fb7.webp?v=1714720698"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41884991586403,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB24","requires_shipping":true,"taxable":true,"featured_image":{"id":31472151560291,"product_id":7408394371171,"position":10,"created_at":"2024-05-03T15:18:18+08:00","updated_at":"2024-05-03T15:18:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70b0197df2a662d6bbe5f894cd2dee88c9b6aafd_5e44ccec-1b74-4520-8382-947878ee7fb7.webp?v=1714720698","variant_ids":[41884991586403]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - C3PO-經典 - 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":"NPB0118724-PB24","featured_media":{"alt":null,"id":23877067178083,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/70b0197df2a662d6bbe5f894cd2dee88c9b6aafd_5e44ccec-1b74-4520-8382-947878ee7fb7.webp?v=1714720698"}},"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: "停產" }