$product = {"id":7416328290403,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 路克 vs 黑武士","handle":"iphone-8-mod-nx-printable-pb109","description":null,"published_at":"2024-06-11T16:56:01+08:00","created_at":"2024-05-06T14:35:20+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 8","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":41918543167587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB109","requires_shipping":true,"taxable":true,"featured_image":{"id":31491856203875,"product_id":7416328290403,"position":8,"created_at":"2024-05-06T14:35:40+08:00","updated_at":"2024-05-06T14:35:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98fbe546e3cec275593fd173af05772aeaf1d5ab_68ab43dd-af8e-43e4-a25e-28b53586553f.webp?v=1714977340","variant_ids":[41918543167587]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 路克 vs 黑武士 - 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":"NPB0105424-PB109","featured_media":{"alt":null,"id":23897269043299,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98fbe546e3cec275593fd173af05772aeaf1d5ab_68ab43dd-af8e-43e4-a25e-28b53586553f.webp?v=1714977340"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbad21942719348c8835ecef3300954c01a64aba_6ee63e1d-5bb2-4c84-bb64-e4de752fcba4.webp?v=1714977323","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da94c53b29b28735a191623817f4795b7147e3a5_cc3669cb-30de-46bc-8b1e-0e0053c8bbd8.webp?v=1714977325","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9df4ccfa0ce659f6d65f0c065e2096fbf215e3b_ac527944-51a0-4db4-b5ef-733220e86254.webp?v=1714977328","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/397631f284ee6ac0b4fb9ec2a9c2137a36546340_596935a1-121b-4332-ada0-b157d4ebd9f9.webp?v=1714977330","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19e4d80df4e654eb8ded460cb4dbd821efe1c32c_52274493-3474-47e5-97c7-1c77d4cafb67.webp?v=1714977333","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4dd1611f99708a0949bcbf0a4ea3496d7740db05_56826f46-a148-4075-bc88-ee6357c6e3e7.webp?v=1714977335","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08832a1e55e40b1ebc5cc14263cde8e85550fa61_e16fc66d-e5b9-4b40-9186-07b468a2ccce.webp?v=1714977338","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98fbe546e3cec275593fd173af05772aeaf1d5ab_68ab43dd-af8e-43e4-a25e-28b53586553f.webp?v=1714977340","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f6d01e63a77f07963c5f6e3183f72fbc995d6de_99bf851e-a639-4189-b4f4-f3fc7e9f5d58.webp?v=1714977342","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38b8197cb8b8cb3367a61696382ce69eba7ec0ce_04142c3e-cc8c-4be7-b7f7-0444b79d843f.webp?v=1714977345"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbad21942719348c8835ecef3300954c01a64aba_6ee63e1d-5bb2-4c84-bb64-e4de752fcba4.webp?v=1714977323","options":["color"],"media":[{"alt":null,"id":23897266225251,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbad21942719348c8835ecef3300954c01a64aba_6ee63e1d-5bb2-4c84-bb64-e4de752fcba4.webp?v=1714977323"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbad21942719348c8835ecef3300954c01a64aba_6ee63e1d-5bb2-4c84-bb64-e4de752fcba4.webp?v=1714977323","width":2000},{"alt":null,"id":23897266782307,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da94c53b29b28735a191623817f4795b7147e3a5_cc3669cb-30de-46bc-8b1e-0e0053c8bbd8.webp?v=1714977325"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da94c53b29b28735a191623817f4795b7147e3a5_cc3669cb-30de-46bc-8b1e-0e0053c8bbd8.webp?v=1714977325","width":2000},{"alt":null,"id":23897267306595,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9df4ccfa0ce659f6d65f0c065e2096fbf215e3b_ac527944-51a0-4db4-b5ef-733220e86254.webp?v=1714977328"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9df4ccfa0ce659f6d65f0c065e2096fbf215e3b_ac527944-51a0-4db4-b5ef-733220e86254.webp?v=1714977328","width":2000},{"alt":null,"id":23897267535971,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/397631f284ee6ac0b4fb9ec2a9c2137a36546340_596935a1-121b-4332-ada0-b157d4ebd9f9.webp?v=1714977330"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/397631f284ee6ac0b4fb9ec2a9c2137a36546340_596935a1-121b-4332-ada0-b157d4ebd9f9.webp?v=1714977330","width":2000},{"alt":null,"id":23897267765347,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19e4d80df4e654eb8ded460cb4dbd821efe1c32c_52274493-3474-47e5-97c7-1c77d4cafb67.webp?v=1714977333"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19e4d80df4e654eb8ded460cb4dbd821efe1c32c_52274493-3474-47e5-97c7-1c77d4cafb67.webp?v=1714977333","width":2000},{"alt":null,"id":23897268224099,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4dd1611f99708a0949bcbf0a4ea3496d7740db05_56826f46-a148-4075-bc88-ee6357c6e3e7.webp?v=1714977335"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4dd1611f99708a0949bcbf0a4ea3496d7740db05_56826f46-a148-4075-bc88-ee6357c6e3e7.webp?v=1714977335","width":2000},{"alt":null,"id":23897268650083,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08832a1e55e40b1ebc5cc14263cde8e85550fa61_e16fc66d-e5b9-4b40-9186-07b468a2ccce.webp?v=1714977338"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/08832a1e55e40b1ebc5cc14263cde8e85550fa61_e16fc66d-e5b9-4b40-9186-07b468a2ccce.webp?v=1714977338","width":2000},{"alt":null,"id":23897269043299,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98fbe546e3cec275593fd173af05772aeaf1d5ab_68ab43dd-af8e-43e4-a25e-28b53586553f.webp?v=1714977340"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98fbe546e3cec275593fd173af05772aeaf1d5ab_68ab43dd-af8e-43e4-a25e-28b53586553f.webp?v=1714977340","width":2000},{"alt":null,"id":23897269534819,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f6d01e63a77f07963c5f6e3183f72fbc995d6de_99bf851e-a639-4189-b4f4-f3fc7e9f5d58.webp?v=1714977342"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f6d01e63a77f07963c5f6e3183f72fbc995d6de_99bf851e-a639-4189-b4f4-f3fc7e9f5d58.webp?v=1714977342","width":2000},{"alt":null,"id":23897269796963,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38b8197cb8b8cb3367a61696382ce69eba7ec0ce_04142c3e-cc8c-4be7-b7f7-0444b79d843f.webp?v=1714977345"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38b8197cb8b8cb3367a61696382ce69eba7ec0ce_04142c3e-cc8c-4be7-b7f7-0444b79d843f.webp?v=1714977345","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41918543167587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB109","requires_shipping":true,"taxable":true,"featured_image":{"id":31491856203875,"product_id":7416328290403,"position":8,"created_at":"2024-05-06T14:35:40+08:00","updated_at":"2024-05-06T14:35:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98fbe546e3cec275593fd173af05772aeaf1d5ab_68ab43dd-af8e-43e4-a25e-28b53586553f.webp?v=1714977340","variant_ids":[41918543167587]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 路克 vs 黑武士 - 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":"NPB0105424-PB109","featured_media":{"alt":null,"id":23897269043299,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98fbe546e3cec275593fd173af05772aeaf1d5ab_68ab43dd-af8e-43e4-a25e-28b53586553f.webp?v=1714977340"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41918543167587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB109","requires_shipping":true,"taxable":true,"featured_image":{"id":31491856203875,"product_id":7416328290403,"position":8,"created_at":"2024-05-06T14:35:40+08:00","updated_at":"2024-05-06T14:35:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98fbe546e3cec275593fd173af05772aeaf1d5ab_68ab43dd-af8e-43e4-a25e-28b53586553f.webp?v=1714977340","variant_ids":[41918543167587]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 路克 vs 黑武士 - 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":"NPB0105424-PB109","featured_media":{"alt":null,"id":23897269043299,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98fbe546e3cec275593fd173af05772aeaf1d5ab_68ab43dd-af8e-43e4-a25e-28b53586553f.webp?v=1714977340"}},"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: "停產" }