$product = {"id":7407991160931,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 星戰漫畫-貼紙系列","handle":"iphone-14-plus-mod-nx-printable-pb83","description":null,"published_at":"2024-06-11T16:28:30+08:00","created_at":"2024-05-03T11:30:21+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":41881458802787,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB83","requires_shipping":true,"taxable":true,"featured_image":{"id":31470895530083,"product_id":7407991160931,"position":5,"created_at":"2024-05-03T11:30:35+08:00","updated_at":"2024-05-03T11:30:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e70bc922cc5604164b06647cf0647b81503e6e7_fa58ba73-bf71-464a-9e81-308a33cef577.webp?v=1714707035","variant_ids":[41881458802787]},"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-PB83","featured_media":{"alt":null,"id":23875800268899,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e70bc922cc5604164b06647cf0647b81503e6e7_fa58ba73-bf71-464a-9e81-308a33cef577.webp?v=1714707035"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/867ac01378e1a57c56e010f2d440930f8f35c0f6_ff481aa4-9a24-424f-9ac0-91034b8df518.webp?v=1714707024","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/101fc7bd64737632ed924c003d4d67ba71099e29_48b7ba1f-5e10-44c9-8766-a26344bf500b.webp?v=1714707027","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b156835fdbea5971556a2668d1c68396fe922f9a_1294d99c-3bcb-4ff0-a05f-de60ca034046.webp?v=1714707029","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fdb40d2182e47d46240866acb3510263f49bbaaa_9538c3f6-53d7-4dff-b19d-5af7129ec34b.webp?v=1714707032","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e70bc922cc5604164b06647cf0647b81503e6e7_fa58ba73-bf71-464a-9e81-308a33cef577.webp?v=1714707035","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfa98e1b457bce63d879443410cbd8c3dbd44b82_8ffcfd60-b236-4eef-b123-5f834389fb0b.webp?v=1714707037","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e80c9949516526957af64095f487adc530b61f2_6409f86e-6c86-411c-8eab-3bbcf0a38ed1.webp?v=1714707040","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/540271291f84d6b98a2bd3e784b859ad17921ae8_e59fecea-07f4-48cc-9862-856b712b080d.webp?v=1714707042","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3cacfe5a3bddc0d76507d9b3a2ae798525dbf703_bfe89b6d-54cf-4852-9550-1a22309f87e4.webp?v=1714707045","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/514dd67c995bd0a267a921c2e98ec0fa101f3083_add3ea06-2dba-4028-81a2-071f2ef96ee7.webp?v=1714707047"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/867ac01378e1a57c56e010f2d440930f8f35c0f6_ff481aa4-9a24-424f-9ac0-91034b8df518.webp?v=1714707024","options":["color"],"media":[{"alt":null,"id":23875798073443,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/867ac01378e1a57c56e010f2d440930f8f35c0f6_ff481aa4-9a24-424f-9ac0-91034b8df518.webp?v=1714707024"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/867ac01378e1a57c56e010f2d440930f8f35c0f6_ff481aa4-9a24-424f-9ac0-91034b8df518.webp?v=1714707024","width":2000},{"alt":null,"id":23875798401123,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/101fc7bd64737632ed924c003d4d67ba71099e29_48b7ba1f-5e10-44c9-8766-a26344bf500b.webp?v=1714707027"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/101fc7bd64737632ed924c003d4d67ba71099e29_48b7ba1f-5e10-44c9-8766-a26344bf500b.webp?v=1714707027","width":2000},{"alt":null,"id":23875799056483,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b156835fdbea5971556a2668d1c68396fe922f9a_1294d99c-3bcb-4ff0-a05f-de60ca034046.webp?v=1714707029"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b156835fdbea5971556a2668d1c68396fe922f9a_1294d99c-3bcb-4ff0-a05f-de60ca034046.webp?v=1714707029","width":2000},{"alt":null,"id":23875799515235,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fdb40d2182e47d46240866acb3510263f49bbaaa_9538c3f6-53d7-4dff-b19d-5af7129ec34b.webp?v=1714707032"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fdb40d2182e47d46240866acb3510263f49bbaaa_9538c3f6-53d7-4dff-b19d-5af7129ec34b.webp?v=1714707032","width":2000},{"alt":null,"id":23875800268899,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e70bc922cc5604164b06647cf0647b81503e6e7_fa58ba73-bf71-464a-9e81-308a33cef577.webp?v=1714707035"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e70bc922cc5604164b06647cf0647b81503e6e7_fa58ba73-bf71-464a-9e81-308a33cef577.webp?v=1714707035","width":2000},{"alt":null,"id":23875800793187,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfa98e1b457bce63d879443410cbd8c3dbd44b82_8ffcfd60-b236-4eef-b123-5f834389fb0b.webp?v=1714707037"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfa98e1b457bce63d879443410cbd8c3dbd44b82_8ffcfd60-b236-4eef-b123-5f834389fb0b.webp?v=1714707037","width":2000},{"alt":null,"id":23875801284707,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e80c9949516526957af64095f487adc530b61f2_6409f86e-6c86-411c-8eab-3bbcf0a38ed1.webp?v=1714707040"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e80c9949516526957af64095f487adc530b61f2_6409f86e-6c86-411c-8eab-3bbcf0a38ed1.webp?v=1714707040","width":2000},{"alt":null,"id":23875801677923,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/540271291f84d6b98a2bd3e784b859ad17921ae8_e59fecea-07f4-48cc-9862-856b712b080d.webp?v=1714707042"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/540271291f84d6b98a2bd3e784b859ad17921ae8_e59fecea-07f4-48cc-9862-856b712b080d.webp?v=1714707042","width":2000},{"alt":null,"id":23875802071139,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3cacfe5a3bddc0d76507d9b3a2ae798525dbf703_bfe89b6d-54cf-4852-9550-1a22309f87e4.webp?v=1714707045"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3cacfe5a3bddc0d76507d9b3a2ae798525dbf703_bfe89b6d-54cf-4852-9550-1a22309f87e4.webp?v=1714707045","width":2000},{"alt":null,"id":23875802398819,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/514dd67c995bd0a267a921c2e98ec0fa101f3083_add3ea06-2dba-4028-81a2-071f2ef96ee7.webp?v=1714707047"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/514dd67c995bd0a267a921c2e98ec0fa101f3083_add3ea06-2dba-4028-81a2-071f2ef96ee7.webp?v=1714707047","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41881458802787,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB83","requires_shipping":true,"taxable":true,"featured_image":{"id":31470895530083,"product_id":7407991160931,"position":5,"created_at":"2024-05-03T11:30:35+08:00","updated_at":"2024-05-03T11:30:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e70bc922cc5604164b06647cf0647b81503e6e7_fa58ba73-bf71-464a-9e81-308a33cef577.webp?v=1714707035","variant_ids":[41881458802787]},"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-PB83","featured_media":{"alt":null,"id":23875800268899,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e70bc922cc5604164b06647cf0647b81503e6e7_fa58ba73-bf71-464a-9e81-308a33cef577.webp?v=1714707035"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41881458802787,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB83","requires_shipping":true,"taxable":true,"featured_image":{"id":31470895530083,"product_id":7407991160931,"position":5,"created_at":"2024-05-03T11:30:35+08:00","updated_at":"2024-05-03T11:30:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e70bc922cc5604164b06647cf0647b81503e6e7_fa58ba73-bf71-464a-9e81-308a33cef577.webp?v=1714707035","variant_ids":[41881458802787]},"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-PB83","featured_media":{"alt":null,"id":23875800268899,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e70bc922cc5604164b06647cf0647b81503e6e7_fa58ba73-bf71-464a-9e81-308a33cef577.webp?v=1714707035"}},"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: "停產" }