$product = {"id":7407833251939,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - X翼戰機","handle":"iphone-14-plus-mod-nx-printable-pb74","description":null,"published_at":"2024-06-11T16:24:07+08:00","created_at":"2024-05-03T10:59:02+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":41879400972387,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB74","requires_shipping":true,"taxable":true,"featured_image":{"id":31470485930083,"product_id":7407833251939,"position":8,"created_at":"2024-05-03T10:59:21+08:00","updated_at":"2024-05-03T10:59:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0697f36352170e632adae83c28b10a49a764e824_9c48f44d-7378-4e52-8459-74229cd04dd1.webp?v=1714705161","variant_ids":[41879400972387]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - X翼戰機 - 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-PB74","featured_media":{"alt":null,"id":23875389653091,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0697f36352170e632adae83c28b10a49a764e824_9c48f44d-7378-4e52-8459-74229cd04dd1.webp?v=1714705161"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0dea4accc465d564f9b6fcf3d4519cfd49a602a7_877d894a-c2c2-4795-ad2d-e87021ed86f8.webp?v=1714705144","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1012d16b81fbc6c120393f72e15db07508c832eb_d1c0ac2b-31c1-48d4-9452-ef2d1d3a9ff6.webp?v=1714705147","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00672448c05a176dfff4e7cdeb1e1ec4592283ad_c651d22b-7c98-4e0d-a935-60a1fa3f1dec.webp?v=1714705149","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69f66e5932b400b6e672e2224d85109ad673125f_c6ffe71a-c060-4656-b790-d190c35bac85.webp?v=1714705152","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b50a508e571935a3ecb7ced29bd7d798c9db442d_c7f44848-f48b-47d5-9842-bbb17a94e1e3.webp?v=1714705154","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a96e62f1c7e13f15bd9c0789b94e6ff6df3a9546_224306b5-6824-4b6d-be2b-4a88b99381f9.webp?v=1714705157","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ce312601022ab731e65a3b8b1b235914c4940152_59408cb8-e503-49cd-ba0f-57c04e98426a.webp?v=1714705159","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0697f36352170e632adae83c28b10a49a764e824_9c48f44d-7378-4e52-8459-74229cd04dd1.webp?v=1714705161","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e2081da1dc4929d4b9871d3abeaa9f125cd1237_2eb3211d-279b-46f6-a095-7e108b7efc10.webp?v=1714705164","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/886e8452b7d06d6f1fd69b91d5231b024eafa6d0_59b84f29-0522-49ef-a277-268e9273c28a.webp?v=1714705166"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0dea4accc465d564f9b6fcf3d4519cfd49a602a7_877d894a-c2c2-4795-ad2d-e87021ed86f8.webp?v=1714705144","options":["color"],"media":[{"alt":null,"id":23875386769507,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0dea4accc465d564f9b6fcf3d4519cfd49a602a7_877d894a-c2c2-4795-ad2d-e87021ed86f8.webp?v=1714705144"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0dea4accc465d564f9b6fcf3d4519cfd49a602a7_877d894a-c2c2-4795-ad2d-e87021ed86f8.webp?v=1714705144","width":2000},{"alt":null,"id":23875387195491,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1012d16b81fbc6c120393f72e15db07508c832eb_d1c0ac2b-31c1-48d4-9452-ef2d1d3a9ff6.webp?v=1714705147"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1012d16b81fbc6c120393f72e15db07508c832eb_d1c0ac2b-31c1-48d4-9452-ef2d1d3a9ff6.webp?v=1714705147","width":2000},{"alt":null,"id":23875387588707,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00672448c05a176dfff4e7cdeb1e1ec4592283ad_c651d22b-7c98-4e0d-a935-60a1fa3f1dec.webp?v=1714705149"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00672448c05a176dfff4e7cdeb1e1ec4592283ad_c651d22b-7c98-4e0d-a935-60a1fa3f1dec.webp?v=1714705149","width":2000},{"alt":null,"id":23875388080227,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69f66e5932b400b6e672e2224d85109ad673125f_c6ffe71a-c060-4656-b790-d190c35bac85.webp?v=1714705152"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69f66e5932b400b6e672e2224d85109ad673125f_c6ffe71a-c060-4656-b790-d190c35bac85.webp?v=1714705152","width":2000},{"alt":null,"id":23875388440675,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b50a508e571935a3ecb7ced29bd7d798c9db442d_c7f44848-f48b-47d5-9842-bbb17a94e1e3.webp?v=1714705154"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b50a508e571935a3ecb7ced29bd7d798c9db442d_c7f44848-f48b-47d5-9842-bbb17a94e1e3.webp?v=1714705154","width":2000},{"alt":null,"id":23875388964963,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a96e62f1c7e13f15bd9c0789b94e6ff6df3a9546_224306b5-6824-4b6d-be2b-4a88b99381f9.webp?v=1714705157"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a96e62f1c7e13f15bd9c0789b94e6ff6df3a9546_224306b5-6824-4b6d-be2b-4a88b99381f9.webp?v=1714705157","width":2000},{"alt":null,"id":23875389259875,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ce312601022ab731e65a3b8b1b235914c4940152_59408cb8-e503-49cd-ba0f-57c04e98426a.webp?v=1714705159"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ce312601022ab731e65a3b8b1b235914c4940152_59408cb8-e503-49cd-ba0f-57c04e98426a.webp?v=1714705159","width":2000},{"alt":null,"id":23875389653091,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0697f36352170e632adae83c28b10a49a764e824_9c48f44d-7378-4e52-8459-74229cd04dd1.webp?v=1714705161"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0697f36352170e632adae83c28b10a49a764e824_9c48f44d-7378-4e52-8459-74229cd04dd1.webp?v=1714705161","width":2000},{"alt":null,"id":23875390111843,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e2081da1dc4929d4b9871d3abeaa9f125cd1237_2eb3211d-279b-46f6-a095-7e108b7efc10.webp?v=1714705164"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e2081da1dc4929d4b9871d3abeaa9f125cd1237_2eb3211d-279b-46f6-a095-7e108b7efc10.webp?v=1714705164","width":2000},{"alt":null,"id":23875390472291,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/886e8452b7d06d6f1fd69b91d5231b024eafa6d0_59b84f29-0522-49ef-a277-268e9273c28a.webp?v=1714705166"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/886e8452b7d06d6f1fd69b91d5231b024eafa6d0_59b84f29-0522-49ef-a277-268e9273c28a.webp?v=1714705166","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41879400972387,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB74","requires_shipping":true,"taxable":true,"featured_image":{"id":31470485930083,"product_id":7407833251939,"position":8,"created_at":"2024-05-03T10:59:21+08:00","updated_at":"2024-05-03T10:59:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0697f36352170e632adae83c28b10a49a764e824_9c48f44d-7378-4e52-8459-74229cd04dd1.webp?v=1714705161","variant_ids":[41879400972387]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - X翼戰機 - 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-PB74","featured_media":{"alt":null,"id":23875389653091,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0697f36352170e632adae83c28b10a49a764e824_9c48f44d-7378-4e52-8459-74229cd04dd1.webp?v=1714705161"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41879400972387,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB74","requires_shipping":true,"taxable":true,"featured_image":{"id":31470485930083,"product_id":7407833251939,"position":8,"created_at":"2024-05-03T10:59:21+08:00","updated_at":"2024-05-03T10:59:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0697f36352170e632adae83c28b10a49a764e824_9c48f44d-7378-4e52-8459-74229cd04dd1.webp?v=1714705161","variant_ids":[41879400972387]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - X翼戰機 - 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-PB74","featured_media":{"alt":null,"id":23875389653091,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0697f36352170e632adae83c28b10a49a764e824_9c48f44d-7378-4e52-8459-74229cd04dd1.webp?v=1714705161"}},"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: "停產" }