$product = {"id":7407746613347,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 鈦戰機","handle":"iphone-14-plus-mod-nx-printable-pb73","description":null,"published_at":"2024-06-11T16:22:42+08:00","created_at":"2024-05-03T10:47:25+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":41878352920675,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB73","requires_shipping":true,"taxable":true,"featured_image":{"id":31470318583907,"product_id":7407746613347,"position":10,"created_at":"2024-05-03T10:47:53+08:00","updated_at":"2024-05-03T10:47:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9793fc2da37ce8dcb0f7fead80237eef1b320863_fc8564b1-9217-4777-87ba-adddd832fc81.webp?v=1714704473","variant_ids":[41878352920675]},"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-PB73","featured_media":{"alt":null,"id":23875221717091,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9793fc2da37ce8dcb0f7fead80237eef1b320863_fc8564b1-9217-4777-87ba-adddd832fc81.webp?v=1714704473"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da438737a27a1363c00b832ee2391331f79c174c_39cb4de1-e802-4d8c-858d-8ea4e70fc31c.webp?v=1714704448","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6710e38aa3a67d59dc2612b0daf224ae01f3d212_4cc866ae-ac74-4dbc-88d6-1bb5f5566a96.webp?v=1714704451","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45543988f7f91022471743dc84e17d737e2e7569_8f614718-5463-413d-9d8a-a6c356c1fc63.webp?v=1714704454","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e47e31931f174facc1f7f36c9657e2be7abbacb_8b00e42a-4352-4b68-9ac4-f5467c0c3c15.webp?v=1714704457","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b46887cf2df19f2ffbf1393f1c0613a002f35648_9dcff72c-0a51-4026-b3b1-6014e216b14b.webp?v=1714704460","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45cb4283d5d7740f5ccd3150c81f158601a87581_ca0853bd-cf3d-4193-a0d7-cb24dd8ce6e9.webp?v=1714704462","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06592600d1e72e2632c4bfdf36bd31e402c55e96_aab00225-c83a-4518-b4f2-afe6030aaaf2.webp?v=1714704465","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5988b2b7f5ad8c9e2626926d3750979fc095110f_01f35680-8e3e-4b7f-b8fd-93c9e0bb54ea.webp?v=1714704467","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/883e7e37bc3cf43eead04c2c2ae5fedf9ac8e4c4_33e67cf8-e85c-4a1b-b1f3-1917cfce29c2.webp?v=1714704470","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9793fc2da37ce8dcb0f7fead80237eef1b320863_fc8564b1-9217-4777-87ba-adddd832fc81.webp?v=1714704473"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da438737a27a1363c00b832ee2391331f79c174c_39cb4de1-e802-4d8c-858d-8ea4e70fc31c.webp?v=1714704448","options":["color"],"media":[{"alt":null,"id":23875214180451,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da438737a27a1363c00b832ee2391331f79c174c_39cb4de1-e802-4d8c-858d-8ea4e70fc31c.webp?v=1714704448"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da438737a27a1363c00b832ee2391331f79c174c_39cb4de1-e802-4d8c-858d-8ea4e70fc31c.webp?v=1714704448","width":2000},{"alt":null,"id":23875215556707,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6710e38aa3a67d59dc2612b0daf224ae01f3d212_4cc866ae-ac74-4dbc-88d6-1bb5f5566a96.webp?v=1714704451"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6710e38aa3a67d59dc2612b0daf224ae01f3d212_4cc866ae-ac74-4dbc-88d6-1bb5f5566a96.webp?v=1714704451","width":2000},{"alt":null,"id":23875216736355,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45543988f7f91022471743dc84e17d737e2e7569_8f614718-5463-413d-9d8a-a6c356c1fc63.webp?v=1714704454"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45543988f7f91022471743dc84e17d737e2e7569_8f614718-5463-413d-9d8a-a6c356c1fc63.webp?v=1714704454","width":2000},{"alt":null,"id":23875217326179,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e47e31931f174facc1f7f36c9657e2be7abbacb_8b00e42a-4352-4b68-9ac4-f5467c0c3c15.webp?v=1714704457"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e47e31931f174facc1f7f36c9657e2be7abbacb_8b00e42a-4352-4b68-9ac4-f5467c0c3c15.webp?v=1714704457","width":2000},{"alt":null,"id":23875218112611,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b46887cf2df19f2ffbf1393f1c0613a002f35648_9dcff72c-0a51-4026-b3b1-6014e216b14b.webp?v=1714704460"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b46887cf2df19f2ffbf1393f1c0613a002f35648_9dcff72c-0a51-4026-b3b1-6014e216b14b.webp?v=1714704460","width":2000},{"alt":null,"id":23875218931811,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45cb4283d5d7740f5ccd3150c81f158601a87581_ca0853bd-cf3d-4193-a0d7-cb24dd8ce6e9.webp?v=1714704462"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45cb4283d5d7740f5ccd3150c81f158601a87581_ca0853bd-cf3d-4193-a0d7-cb24dd8ce6e9.webp?v=1714704462","width":2000},{"alt":null,"id":23875219521635,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06592600d1e72e2632c4bfdf36bd31e402c55e96_aab00225-c83a-4518-b4f2-afe6030aaaf2.webp?v=1714704465"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06592600d1e72e2632c4bfdf36bd31e402c55e96_aab00225-c83a-4518-b4f2-afe6030aaaf2.webp?v=1714704465","width":2000},{"alt":null,"id":23875220176995,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5988b2b7f5ad8c9e2626926d3750979fc095110f_01f35680-8e3e-4b7f-b8fd-93c9e0bb54ea.webp?v=1714704467"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5988b2b7f5ad8c9e2626926d3750979fc095110f_01f35680-8e3e-4b7f-b8fd-93c9e0bb54ea.webp?v=1714704467","width":2000},{"alt":null,"id":23875221127267,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/883e7e37bc3cf43eead04c2c2ae5fedf9ac8e4c4_33e67cf8-e85c-4a1b-b1f3-1917cfce29c2.webp?v=1714704470"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/883e7e37bc3cf43eead04c2c2ae5fedf9ac8e4c4_33e67cf8-e85c-4a1b-b1f3-1917cfce29c2.webp?v=1714704470","width":2000},{"alt":null,"id":23875221717091,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9793fc2da37ce8dcb0f7fead80237eef1b320863_fc8564b1-9217-4777-87ba-adddd832fc81.webp?v=1714704473"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9793fc2da37ce8dcb0f7fead80237eef1b320863_fc8564b1-9217-4777-87ba-adddd832fc81.webp?v=1714704473","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41878352920675,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB73","requires_shipping":true,"taxable":true,"featured_image":{"id":31470318583907,"product_id":7407746613347,"position":10,"created_at":"2024-05-03T10:47:53+08:00","updated_at":"2024-05-03T10:47:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9793fc2da37ce8dcb0f7fead80237eef1b320863_fc8564b1-9217-4777-87ba-adddd832fc81.webp?v=1714704473","variant_ids":[41878352920675]},"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-PB73","featured_media":{"alt":null,"id":23875221717091,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9793fc2da37ce8dcb0f7fead80237eef1b320863_fc8564b1-9217-4777-87ba-adddd832fc81.webp?v=1714704473"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41878352920675,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB73","requires_shipping":true,"taxable":true,"featured_image":{"id":31470318583907,"product_id":7407746613347,"position":10,"created_at":"2024-05-03T10:47:53+08:00","updated_at":"2024-05-03T10:47:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9793fc2da37ce8dcb0f7fead80237eef1b320863_fc8564b1-9217-4777-87ba-adddd832fc81.webp?v=1714704473","variant_ids":[41878352920675]},"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-PB73","featured_media":{"alt":null,"id":23875221717091,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9793fc2da37ce8dcb0f7fead80237eef1b320863_fc8564b1-9217-4777-87ba-adddd832fc81.webp?v=1714704473"}},"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: "停產" }