$product = {"id":7407692054627,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Pattern BB8-Galaxy","handle":"iphone-14-plus-mod-nx-printable-pb59","description":null,"published_at":"2024-06-11T16:22:02+08:00","created_at":"2024-05-03T10:41:58+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":41877706276963,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB59","requires_shipping":true,"taxable":true,"featured_image":{"id":31470228701283,"product_id":7407692054627,"position":9,"created_at":"2024-05-03T10:42:23+08:00","updated_at":"2024-05-03T10:42:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6de4e7c78396f168f80f2b59f80fcdae2cc5db_4ce8e0f1-aab3-4221-bdb8-3a4a9610bc9e.webp?v=1714704143","variant_ids":[41877706276963]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Pattern BB8-Galaxy - 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-PB59","featured_media":{"alt":null,"id":23875131703395,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6de4e7c78396f168f80f2b59f80fcdae2cc5db_4ce8e0f1-aab3-4221-bdb8-3a4a9610bc9e.webp?v=1714704143"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfabf6b5908203f707214d0381d64939e218600d_a23641ea-80b0-4a6c-88db-f89ae3e569b0.webp?v=1714704122","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8df93c172c2f63f2890dcf590f1aba6fbbf817b4_e93c8e72-5123-4d69-8bd5-7223ef99a4bd.webp?v=1714704125","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13d77b7e3962bca32a7327d18739733c3859200c_0f635172-1b71-42f1-8f39-8f4944690bed.webp?v=1714704127","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/791026cd17a9c92aa83f675fcc5a546fd0a3a3ee_4e344066-c483-48ee-ac55-b0bbf3487f5f.webp?v=1714704130","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8dbe08c655f20f6018955943dafca727a637f92_08113dae-9457-4612-b988-05a0cbd45690.webp?v=1714704132","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd93cb16ea33748706693df82cefdffc3c657d8b_58cb9bdd-491d-4787-b5a5-1555228d333e.webp?v=1714704135","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d32492c1cca121bfd6dd316241f39d3d479ea2b_3bf91b98-dc9f-4271-9886-536ef6bfea9c.webp?v=1714704138","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63b98aec73830c03ee3751d0d020b2a48f55029f_07b84a1e-08ef-413e-bd35-674bdb883625.webp?v=1714704140","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6de4e7c78396f168f80f2b59f80fcdae2cc5db_4ce8e0f1-aab3-4221-bdb8-3a4a9610bc9e.webp?v=1714704143","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62889093b27f7454ed54f74bcbff082464a90369_8e18ad4a-5fca-4b8a-9560-24d5a785cd4f.webp?v=1714704145"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfabf6b5908203f707214d0381d64939e218600d_a23641ea-80b0-4a6c-88db-f89ae3e569b0.webp?v=1714704122","options":["color"],"media":[{"alt":null,"id":23875126362211,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfabf6b5908203f707214d0381d64939e218600d_a23641ea-80b0-4a6c-88db-f89ae3e569b0.webp?v=1714704122"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dfabf6b5908203f707214d0381d64939e218600d_a23641ea-80b0-4a6c-88db-f89ae3e569b0.webp?v=1714704122","width":2000},{"alt":null,"id":23875126820963,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8df93c172c2f63f2890dcf590f1aba6fbbf817b4_e93c8e72-5123-4d69-8bd5-7223ef99a4bd.webp?v=1714704125"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8df93c172c2f63f2890dcf590f1aba6fbbf817b4_e93c8e72-5123-4d69-8bd5-7223ef99a4bd.webp?v=1714704125","width":2000},{"alt":null,"id":23875127804003,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13d77b7e3962bca32a7327d18739733c3859200c_0f635172-1b71-42f1-8f39-8f4944690bed.webp?v=1714704127"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13d77b7e3962bca32a7327d18739733c3859200c_0f635172-1b71-42f1-8f39-8f4944690bed.webp?v=1714704127","width":2000},{"alt":null,"id":23875128688739,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/791026cd17a9c92aa83f675fcc5a546fd0a3a3ee_4e344066-c483-48ee-ac55-b0bbf3487f5f.webp?v=1714704130"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/791026cd17a9c92aa83f675fcc5a546fd0a3a3ee_4e344066-c483-48ee-ac55-b0bbf3487f5f.webp?v=1714704130","width":2000},{"alt":null,"id":23875129049187,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8dbe08c655f20f6018955943dafca727a637f92_08113dae-9457-4612-b988-05a0cbd45690.webp?v=1714704132"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8dbe08c655f20f6018955943dafca727a637f92_08113dae-9457-4612-b988-05a0cbd45690.webp?v=1714704132","width":2000},{"alt":null,"id":23875129639011,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd93cb16ea33748706693df82cefdffc3c657d8b_58cb9bdd-491d-4787-b5a5-1555228d333e.webp?v=1714704135"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd93cb16ea33748706693df82cefdffc3c657d8b_58cb9bdd-491d-4787-b5a5-1555228d333e.webp?v=1714704135","width":2000},{"alt":null,"id":23875130392675,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d32492c1cca121bfd6dd316241f39d3d479ea2b_3bf91b98-dc9f-4271-9886-536ef6bfea9c.webp?v=1714704138"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d32492c1cca121bfd6dd316241f39d3d479ea2b_3bf91b98-dc9f-4271-9886-536ef6bfea9c.webp?v=1714704138","width":2000},{"alt":null,"id":23875131015267,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63b98aec73830c03ee3751d0d020b2a48f55029f_07b84a1e-08ef-413e-bd35-674bdb883625.webp?v=1714704140"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63b98aec73830c03ee3751d0d020b2a48f55029f_07b84a1e-08ef-413e-bd35-674bdb883625.webp?v=1714704140","width":2000},{"alt":null,"id":23875131703395,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6de4e7c78396f168f80f2b59f80fcdae2cc5db_4ce8e0f1-aab3-4221-bdb8-3a4a9610bc9e.webp?v=1714704143"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6de4e7c78396f168f80f2b59f80fcdae2cc5db_4ce8e0f1-aab3-4221-bdb8-3a4a9610bc9e.webp?v=1714704143","width":2000},{"alt":null,"id":23875132522595,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62889093b27f7454ed54f74bcbff082464a90369_8e18ad4a-5fca-4b8a-9560-24d5a785cd4f.webp?v=1714704145"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62889093b27f7454ed54f74bcbff082464a90369_8e18ad4a-5fca-4b8a-9560-24d5a785cd4f.webp?v=1714704145","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41877706276963,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB59","requires_shipping":true,"taxable":true,"featured_image":{"id":31470228701283,"product_id":7407692054627,"position":9,"created_at":"2024-05-03T10:42:23+08:00","updated_at":"2024-05-03T10:42:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6de4e7c78396f168f80f2b59f80fcdae2cc5db_4ce8e0f1-aab3-4221-bdb8-3a4a9610bc9e.webp?v=1714704143","variant_ids":[41877706276963]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Pattern BB8-Galaxy - 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-PB59","featured_media":{"alt":null,"id":23875131703395,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6de4e7c78396f168f80f2b59f80fcdae2cc5db_4ce8e0f1-aab3-4221-bdb8-3a4a9610bc9e.webp?v=1714704143"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41877706276963,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB59","requires_shipping":true,"taxable":true,"featured_image":{"id":31470228701283,"product_id":7407692054627,"position":9,"created_at":"2024-05-03T10:42:23+08:00","updated_at":"2024-05-03T10:42:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6de4e7c78396f168f80f2b59f80fcdae2cc5db_4ce8e0f1-aab3-4221-bdb8-3a4a9610bc9e.webp?v=1714704143","variant_ids":[41877706276963]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Pattern BB8-Galaxy - 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-PB59","featured_media":{"alt":null,"id":23875131703395,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf6de4e7c78396f168f80f2b59f80fcdae2cc5db_4ce8e0f1-aab3-4221-bdb8-3a4a9610bc9e.webp?v=1714704143"}},"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: "停產" }