$product = {"id":7407957770339,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 小圖款-丘巴卡","handle":"iphone-14-plus-mod-nx-printable-pc07","description":null,"published_at":"2024-06-11T16:27:36+08:00","created_at":"2024-05-03T11:23:25+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 14 Plus","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":41881030164579,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PC07","requires_shipping":true,"taxable":true,"featured_image":{"id":31470801977443,"product_id":7407957770339,"position":3,"created_at":"2024-05-03T11:23:32+08:00","updated_at":"2024-05-03T11:23:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffc8edf314f19696fd985fb13fde476f31af22b6_54c9476a-5242-4dce-a8db-5cbfa8c21950.webp?v=1714706612","variant_ids":[41881030164579]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0126124-PC07","featured_media":{"alt":null,"id":23875706191971,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffc8edf314f19696fd985fb13fde476f31af22b6_54c9476a-5242-4dce-a8db-5cbfa8c21950.webp?v=1714706612"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ead87a8d78e624fee830d8d99d4498781871ad3_2fa42787-0d67-4e2d-8e3c-ae9766ac85de.webp?v=1714706607","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87e8fef7a2a9f6cc68bf7b5961b3ae23ba59fcdd_d46e00aa-61f9-4a2e-b4b8-92660ecad41f.webp?v=1714706610","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffc8edf314f19696fd985fb13fde476f31af22b6_54c9476a-5242-4dce-a8db-5cbfa8c21950.webp?v=1714706612","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5792c6540cd79b8e36faa08b27e4db46749a84e5_a29208da-657e-4778-8843-d0a6b17f7729.webp?v=1714706614","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52a70a3a8fabd57faed94de02fd0743e0fe210ac_7565d4ed-d2a1-446f-9e6a-1e165e92426d.webp?v=1714706617","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a3e08254d2620677db56534e60b6f925dea5c92_9bbfbae1-4352-44d3-a3f0-de5c99c7bd3f.webp?v=1714706619","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87a32aaad9f6beacc635a6006f6621964e75893b_f3124c7f-10f8-4a5b-b886-12d4eab02a9f.webp?v=1714706621","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d95cda7644337a799968d97d5a270b103b157ff_e4c6f470-a88a-4ae0-87d9-796502773be2.webp?v=1714706623","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea7260e9333baca46ca36f607df8d85ab1c0f850_78a08282-b16b-4c87-b835-28436cabb8b0.webp?v=1714706626","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7753778e7f43c309bb9a833c3f1685b3bc76b53c_08b6fd5c-6497-4224-8a1a-8e3900c7c108.webp?v=1714706628"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ead87a8d78e624fee830d8d99d4498781871ad3_2fa42787-0d67-4e2d-8e3c-ae9766ac85de.webp?v=1714706607","options":["color"],"media":[{"alt":null,"id":23875699638371,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ead87a8d78e624fee830d8d99d4498781871ad3_2fa42787-0d67-4e2d-8e3c-ae9766ac85de.webp?v=1714706607"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ead87a8d78e624fee830d8d99d4498781871ad3_2fa42787-0d67-4e2d-8e3c-ae9766ac85de.webp?v=1714706607","width":2000},{"alt":null,"id":23875704815715,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87e8fef7a2a9f6cc68bf7b5961b3ae23ba59fcdd_d46e00aa-61f9-4a2e-b4b8-92660ecad41f.webp?v=1714706610"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87e8fef7a2a9f6cc68bf7b5961b3ae23ba59fcdd_d46e00aa-61f9-4a2e-b4b8-92660ecad41f.webp?v=1714706610","width":2000},{"alt":null,"id":23875706191971,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffc8edf314f19696fd985fb13fde476f31af22b6_54c9476a-5242-4dce-a8db-5cbfa8c21950.webp?v=1714706612"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffc8edf314f19696fd985fb13fde476f31af22b6_54c9476a-5242-4dce-a8db-5cbfa8c21950.webp?v=1714706612","width":2000},{"alt":null,"id":23875706585187,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5792c6540cd79b8e36faa08b27e4db46749a84e5_a29208da-657e-4778-8843-d0a6b17f7729.webp?v=1714706614"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5792c6540cd79b8e36faa08b27e4db46749a84e5_a29208da-657e-4778-8843-d0a6b17f7729.webp?v=1714706614","width":2000},{"alt":null,"id":23875707207779,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52a70a3a8fabd57faed94de02fd0743e0fe210ac_7565d4ed-d2a1-446f-9e6a-1e165e92426d.webp?v=1714706617"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52a70a3a8fabd57faed94de02fd0743e0fe210ac_7565d4ed-d2a1-446f-9e6a-1e165e92426d.webp?v=1714706617","width":2000},{"alt":null,"id":23875707633763,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a3e08254d2620677db56534e60b6f925dea5c92_9bbfbae1-4352-44d3-a3f0-de5c99c7bd3f.webp?v=1714706619"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a3e08254d2620677db56534e60b6f925dea5c92_9bbfbae1-4352-44d3-a3f0-de5c99c7bd3f.webp?v=1714706619","width":2000},{"alt":null,"id":23875708059747,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87a32aaad9f6beacc635a6006f6621964e75893b_f3124c7f-10f8-4a5b-b886-12d4eab02a9f.webp?v=1714706621"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87a32aaad9f6beacc635a6006f6621964e75893b_f3124c7f-10f8-4a5b-b886-12d4eab02a9f.webp?v=1714706621","width":2000},{"alt":null,"id":23875708584035,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d95cda7644337a799968d97d5a270b103b157ff_e4c6f470-a88a-4ae0-87d9-796502773be2.webp?v=1714706623"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d95cda7644337a799968d97d5a270b103b157ff_e4c6f470-a88a-4ae0-87d9-796502773be2.webp?v=1714706623","width":2000},{"alt":null,"id":23875709075555,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea7260e9333baca46ca36f607df8d85ab1c0f850_78a08282-b16b-4c87-b835-28436cabb8b0.webp?v=1714706626"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea7260e9333baca46ca36f607df8d85ab1c0f850_78a08282-b16b-4c87-b835-28436cabb8b0.webp?v=1714706626","width":2000},{"alt":null,"id":23875709501539,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7753778e7f43c309bb9a833c3f1685b3bc76b53c_08b6fd5c-6497-4224-8a1a-8e3900c7c108.webp?v=1714706628"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7753778e7f43c309bb9a833c3f1685b3bc76b53c_08b6fd5c-6497-4224-8a1a-8e3900c7c108.webp?v=1714706628","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41881030164579,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PC07","requires_shipping":true,"taxable":true,"featured_image":{"id":31470801977443,"product_id":7407957770339,"position":3,"created_at":"2024-05-03T11:23:32+08:00","updated_at":"2024-05-03T11:23:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffc8edf314f19696fd985fb13fde476f31af22b6_54c9476a-5242-4dce-a8db-5cbfa8c21950.webp?v=1714706612","variant_ids":[41881030164579]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0126124-PC07","featured_media":{"alt":null,"id":23875706191971,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffc8edf314f19696fd985fb13fde476f31af22b6_54c9476a-5242-4dce-a8db-5cbfa8c21950.webp?v=1714706612"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41881030164579,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PC07","requires_shipping":true,"taxable":true,"featured_image":{"id":31470801977443,"product_id":7407957770339,"position":3,"created_at":"2024-05-03T11:23:32+08:00","updated_at":"2024-05-03T11:23:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffc8edf314f19696fd985fb13fde476f31af22b6_54c9476a-5242-4dce-a8db-5cbfa8c21950.webp?v=1714706612","variant_ids":[41881030164579]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0126124-PC07","featured_media":{"alt":null,"id":23875706191971,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffc8edf314f19696fd985fb13fde476f31af22b6_54c9476a-5242-4dce-a8db-5cbfa8c21950.webp?v=1714706612"}},"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: "停產" }