$product = {"id":7416394645603,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 尤達-塗鴉藝術","handle":"iphone-8-mod-nx-printable-pb36","description":null,"published_at":"2024-06-11T16:57:52+08:00","created_at":"2024-05-06T14:48:13+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":41919253250147,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB36","requires_shipping":true,"taxable":true,"featured_image":{"id":31492019781731,"product_id":7416394645603,"position":7,"created_at":"2024-05-06T14:48:29+08:00","updated_at":"2024-05-06T14:48:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe190f7a8c40388621961e9811eedbd0f34460a7_c1c804f0-60ef-427e-9d39-10987a105de2.webp?v=1714978109","variant_ids":[41919253250147]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0105424-PB36","featured_media":{"alt":null,"id":23897433473123,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe190f7a8c40388621961e9811eedbd0f34460a7_c1c804f0-60ef-427e-9d39-10987a105de2.webp?v=1714978109"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4860e045ca0a270206dd50d8025c237d329391e_b8ca17f4-01bb-4934-92ae-63b4e0fe3590.webp?v=1714978095","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf45945e7b1be52e4449f81aa6de5dd06d65beab_0539eac0-8387-4e8c-80ce-d04b34233240.webp?v=1714978098","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/270da5435f4ff810bc5a49b8256d2037c421ce0d_9ee1e5b2-608e-4205-b942-cc34ab988f3f.webp?v=1714978100","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8aac6fd7b980d4b17579dc49ddbbe5ff9ff5e169_1ae213a7-7d86-4712-bdb2-428cffa8fffc.webp?v=1714978102","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b0600191accc1f45d5677b3ab9e362762e8812b_e778b14e-f27b-4ecf-a69a-df4a812d67f3.webp?v=1714978105","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/206b234474966a526c1ca153a2231700c081fa64_8f3dcbcf-2a71-48df-9a40-2f16c02db138.webp?v=1714978107","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe190f7a8c40388621961e9811eedbd0f34460a7_c1c804f0-60ef-427e-9d39-10987a105de2.webp?v=1714978109","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb853e716ffeda9a5b58c7b07dc13573bcd24cc2_aa301956-e42c-4e12-b881-456e64ea880b.webp?v=1714978111","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1857f98f3a1de58dd5ed22690639a2f9c25496c_2d38679c-72c9-41c6-8c80-dabf9106c783.webp?v=1714978114","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbb61bee43d92583fe50bc787ef6c9a0991045cc_a95addce-6ec0-4b6d-b203-db3cfe3e9986.webp?v=1714978116"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4860e045ca0a270206dd50d8025c237d329391e_b8ca17f4-01bb-4934-92ae-63b4e0fe3590.webp?v=1714978095","options":["color"],"media":[{"alt":null,"id":23897431736419,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4860e045ca0a270206dd50d8025c237d329391e_b8ca17f4-01bb-4934-92ae-63b4e0fe3590.webp?v=1714978095"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4860e045ca0a270206dd50d8025c237d329391e_b8ca17f4-01bb-4934-92ae-63b4e0fe3590.webp?v=1714978095","width":2000},{"alt":null,"id":23897432162403,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf45945e7b1be52e4449f81aa6de5dd06d65beab_0539eac0-8387-4e8c-80ce-d04b34233240.webp?v=1714978098"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf45945e7b1be52e4449f81aa6de5dd06d65beab_0539eac0-8387-4e8c-80ce-d04b34233240.webp?v=1714978098","width":2000},{"alt":null,"id":23897432588387,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/270da5435f4ff810bc5a49b8256d2037c421ce0d_9ee1e5b2-608e-4205-b942-cc34ab988f3f.webp?v=1714978100"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/270da5435f4ff810bc5a49b8256d2037c421ce0d_9ee1e5b2-608e-4205-b942-cc34ab988f3f.webp?v=1714978100","width":2000},{"alt":null,"id":23897432784995,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8aac6fd7b980d4b17579dc49ddbbe5ff9ff5e169_1ae213a7-7d86-4712-bdb2-428cffa8fffc.webp?v=1714978102"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8aac6fd7b980d4b17579dc49ddbbe5ff9ff5e169_1ae213a7-7d86-4712-bdb2-428cffa8fffc.webp?v=1714978102","width":2000},{"alt":null,"id":23897433243747,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b0600191accc1f45d5677b3ab9e362762e8812b_e778b14e-f27b-4ecf-a69a-df4a812d67f3.webp?v=1714978105"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b0600191accc1f45d5677b3ab9e362762e8812b_e778b14e-f27b-4ecf-a69a-df4a812d67f3.webp?v=1714978105","width":2000},{"alt":null,"id":23897433374819,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/206b234474966a526c1ca153a2231700c081fa64_8f3dcbcf-2a71-48df-9a40-2f16c02db138.webp?v=1714978107"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/206b234474966a526c1ca153a2231700c081fa64_8f3dcbcf-2a71-48df-9a40-2f16c02db138.webp?v=1714978107","width":2000},{"alt":null,"id":23897433473123,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe190f7a8c40388621961e9811eedbd0f34460a7_c1c804f0-60ef-427e-9d39-10987a105de2.webp?v=1714978109"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe190f7a8c40388621961e9811eedbd0f34460a7_c1c804f0-60ef-427e-9d39-10987a105de2.webp?v=1714978109","width":2000},{"alt":null,"id":23897434030179,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb853e716ffeda9a5b58c7b07dc13573bcd24cc2_aa301956-e42c-4e12-b881-456e64ea880b.webp?v=1714978111"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb853e716ffeda9a5b58c7b07dc13573bcd24cc2_aa301956-e42c-4e12-b881-456e64ea880b.webp?v=1714978111","width":2000},{"alt":null,"id":23897434194019,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1857f98f3a1de58dd5ed22690639a2f9c25496c_2d38679c-72c9-41c6-8c80-dabf9106c783.webp?v=1714978114"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1857f98f3a1de58dd5ed22690639a2f9c25496c_2d38679c-72c9-41c6-8c80-dabf9106c783.webp?v=1714978114","width":2000},{"alt":null,"id":23897434292323,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbb61bee43d92583fe50bc787ef6c9a0991045cc_a95addce-6ec0-4b6d-b203-db3cfe3e9986.webp?v=1714978116"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbb61bee43d92583fe50bc787ef6c9a0991045cc_a95addce-6ec0-4b6d-b203-db3cfe3e9986.webp?v=1714978116","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41919253250147,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB36","requires_shipping":true,"taxable":true,"featured_image":{"id":31492019781731,"product_id":7416394645603,"position":7,"created_at":"2024-05-06T14:48:29+08:00","updated_at":"2024-05-06T14:48:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe190f7a8c40388621961e9811eedbd0f34460a7_c1c804f0-60ef-427e-9d39-10987a105de2.webp?v=1714978109","variant_ids":[41919253250147]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0105424-PB36","featured_media":{"alt":null,"id":23897433473123,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe190f7a8c40388621961e9811eedbd0f34460a7_c1c804f0-60ef-427e-9d39-10987a105de2.webp?v=1714978109"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41919253250147,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB36","requires_shipping":true,"taxable":true,"featured_image":{"id":31492019781731,"product_id":7416394645603,"position":7,"created_at":"2024-05-06T14:48:29+08:00","updated_at":"2024-05-06T14:48:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe190f7a8c40388621961e9811eedbd0f34460a7_c1c804f0-60ef-427e-9d39-10987a105de2.webp?v=1714978109","variant_ids":[41919253250147]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0105424-PB36","featured_media":{"alt":null,"id":23897433473123,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fe190f7a8c40388621961e9811eedbd0f34460a7_c1c804f0-60ef-427e-9d39-10987a105de2.webp?v=1714978109"}},"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: "停產" }