$product = {"id":7416008212579,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 達斯魔-星際大戰Logo","handle":"iphone-xs-max-mod-nx-printable-pb100","description":null,"published_at":"2024-06-11T16:50:17+08:00","created_at":"2024-05-06T12:41: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 XS Max","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":41916458008675,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB100","requires_shipping":true,"taxable":true,"featured_image":{"id":31490974482531,"product_id":7416008212579,"position":5,"created_at":"2024-05-06T12:41:35+08:00","updated_at":"2024-05-06T12:41:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36d1dd9fcf458a1382bd764e988bc49a6b5a6810_a49b342d-661f-4553-b97e-c2c5846d521c.webp?v=1714970496","variant_ids":[41916458008675]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 達斯魔-星際大戰Logo - 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":"NPB0108624-PB100","featured_media":{"alt":null,"id":23896381653091,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36d1dd9fcf458a1382bd764e988bc49a6b5a6810_a49b342d-661f-4553-b97e-c2c5846d521c.webp?v=1714970496"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af5d29367a2bd5604847bf16ff4cec93bc30e4f2_d38a192b-47f5-4136-8661-afa292da3f15.webp?v=1714970484","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14d8ac356a4e3dc2437037125f8ada89cebb59ce_fa0c51bb-d6ec-4a64-a986-b2127794b6d4.webp?v=1714970486","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2631c2dd66da9673615e23c47a69fc5b54af1c89_1f5b583a-6093-462b-af37-cb85fa87e84f.webp?v=1714970491","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a556a21db2f63847097cc128930dfdf3316c4c55_a7094bd2-0795-41c8-bd91-f67d3cd80e7d.webp?v=1714970493","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36d1dd9fcf458a1382bd764e988bc49a6b5a6810_a49b342d-661f-4553-b97e-c2c5846d521c.webp?v=1714970496","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c39496b82937fbcdc2192f2a81174058605906bc_67fb1eef-fdc2-4123-abb2-773624084814.webp?v=1714970498","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09b4185ff76baa4d643825b2e2835e6d378643c0_d05bae6b-ced7-467f-91c4-75d3f778c631.webp?v=1714970500","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2231b16ef051e825f648423db1fb38d0729ff266_f588df3a-bcbf-4feb-b5ea-2c4cc0d9ef96.webp?v=1714970502","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00abd662c023df244bc1aa43efe22a06042edcef_6a0a47df-af1a-4d45-a755-dd2a7f5e69da.webp?v=1714970505"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af5d29367a2bd5604847bf16ff4cec93bc30e4f2_d38a192b-47f5-4136-8661-afa292da3f15.webp?v=1714970484","options":["color"],"media":[{"alt":null,"id":23896379326563,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af5d29367a2bd5604847bf16ff4cec93bc30e4f2_d38a192b-47f5-4136-8661-afa292da3f15.webp?v=1714970484"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af5d29367a2bd5604847bf16ff4cec93bc30e4f2_d38a192b-47f5-4136-8661-afa292da3f15.webp?v=1714970484","width":2000},{"alt":null,"id":23896379818083,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14d8ac356a4e3dc2437037125f8ada89cebb59ce_fa0c51bb-d6ec-4a64-a986-b2127794b6d4.webp?v=1714970486"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14d8ac356a4e3dc2437037125f8ada89cebb59ce_fa0c51bb-d6ec-4a64-a986-b2127794b6d4.webp?v=1714970486","width":2000},{"alt":null,"id":23896380801123,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2631c2dd66da9673615e23c47a69fc5b54af1c89_1f5b583a-6093-462b-af37-cb85fa87e84f.webp?v=1714970491"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2631c2dd66da9673615e23c47a69fc5b54af1c89_1f5b583a-6093-462b-af37-cb85fa87e84f.webp?v=1714970491","width":2000},{"alt":null,"id":23896381128803,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a556a21db2f63847097cc128930dfdf3316c4c55_a7094bd2-0795-41c8-bd91-f67d3cd80e7d.webp?v=1714970493"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a556a21db2f63847097cc128930dfdf3316c4c55_a7094bd2-0795-41c8-bd91-f67d3cd80e7d.webp?v=1714970493","width":2000},{"alt":null,"id":23896381653091,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36d1dd9fcf458a1382bd764e988bc49a6b5a6810_a49b342d-661f-4553-b97e-c2c5846d521c.webp?v=1714970496"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36d1dd9fcf458a1382bd764e988bc49a6b5a6810_a49b342d-661f-4553-b97e-c2c5846d521c.webp?v=1714970496","width":2000},{"alt":null,"id":23896381980771,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c39496b82937fbcdc2192f2a81174058605906bc_67fb1eef-fdc2-4123-abb2-773624084814.webp?v=1714970498"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c39496b82937fbcdc2192f2a81174058605906bc_67fb1eef-fdc2-4123-abb2-773624084814.webp?v=1714970498","width":2000},{"alt":null,"id":23896382963811,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09b4185ff76baa4d643825b2e2835e6d378643c0_d05bae6b-ced7-467f-91c4-75d3f778c631.webp?v=1714970500"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09b4185ff76baa4d643825b2e2835e6d378643c0_d05bae6b-ced7-467f-91c4-75d3f778c631.webp?v=1714970500","width":2000},{"alt":null,"id":23896383389795,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2231b16ef051e825f648423db1fb38d0729ff266_f588df3a-bcbf-4feb-b5ea-2c4cc0d9ef96.webp?v=1714970502"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2231b16ef051e825f648423db1fb38d0729ff266_f588df3a-bcbf-4feb-b5ea-2c4cc0d9ef96.webp?v=1714970502","width":2000},{"alt":null,"id":23896383914083,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00abd662c023df244bc1aa43efe22a06042edcef_6a0a47df-af1a-4d45-a755-dd2a7f5e69da.webp?v=1714970505"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00abd662c023df244bc1aa43efe22a06042edcef_6a0a47df-af1a-4d45-a755-dd2a7f5e69da.webp?v=1714970505","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41916458008675,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB100","requires_shipping":true,"taxable":true,"featured_image":{"id":31490974482531,"product_id":7416008212579,"position":5,"created_at":"2024-05-06T12:41:35+08:00","updated_at":"2024-05-06T12:41:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36d1dd9fcf458a1382bd764e988bc49a6b5a6810_a49b342d-661f-4553-b97e-c2c5846d521c.webp?v=1714970496","variant_ids":[41916458008675]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 達斯魔-星際大戰Logo - 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":"NPB0108624-PB100","featured_media":{"alt":null,"id":23896381653091,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36d1dd9fcf458a1382bd764e988bc49a6b5a6810_a49b342d-661f-4553-b97e-c2c5846d521c.webp?v=1714970496"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916458008675,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB100","requires_shipping":true,"taxable":true,"featured_image":{"id":31490974482531,"product_id":7416008212579,"position":5,"created_at":"2024-05-06T12:41:35+08:00","updated_at":"2024-05-06T12:41:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36d1dd9fcf458a1382bd764e988bc49a6b5a6810_a49b342d-661f-4553-b97e-c2c5846d521c.webp?v=1714970496","variant_ids":[41916458008675]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 達斯魔-星際大戰Logo - 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":"NPB0108624-PB100","featured_media":{"alt":null,"id":23896381653091,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36d1dd9fcf458a1382bd764e988bc49a6b5a6810_a49b342d-661f-4553-b97e-c2c5846d521c.webp?v=1714970496"}},"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: "停產" }