$product = {"id":7407935225955,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - X戰機-線條白","handle":"iphone-14-plus-mod-nx-printable-pb16","description":null,"published_at":"2024-06-11T16:26:59+08:00","created_at":"2024-05-03T11:19:03+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":41880735514723,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB16","requires_shipping":true,"taxable":true,"featured_image":{"id":31470741553251,"product_id":7407935225955,"position":6,"created_at":"2024-05-03T11:19:17+08:00","updated_at":"2024-05-03T11:19:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9aa3ef88594279f3a2e415f788b8ad149250dff1_1974fc5d-b9df-4d0b-8845-8ebdcf0ed14e.webp?v=1714706357","variant_ids":[41880735514723]},"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-PB16","featured_media":{"alt":null,"id":23875645669475,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9aa3ef88594279f3a2e415f788b8ad149250dff1_1974fc5d-b9df-4d0b-8845-8ebdcf0ed14e.webp?v=1714706357"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3607a083453e684ec1946c3d86c9618a7bfdebe4_04b2189d-f6ca-4b2c-9ce6-dc47de93e1d5.webp?v=1714706345","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee3de6d19ab505aa1837d6b28c831112c94b7314_38d87f40-a21d-44e7-9aa5-0d1c11a613c6.webp?v=1714706347","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dccc017c0b193102c23b40f526229d4f961688a1_7c583ad0-859f-4b6f-b221-5a9c6c994aa6.webp?v=1714706350","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d13f2bc2a2f84a1f108a31be976ef8cb4adeea6_7db07bf3-297d-4dcc-88d0-5a7fe930170e.webp?v=1714706352","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80799b5002e0952c75d8f4cc20494781ad42aeef_692f06c9-9c6c-4045-993b-ab4f25dd0c73.webp?v=1714706354","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9aa3ef88594279f3a2e415f788b8ad149250dff1_1974fc5d-b9df-4d0b-8845-8ebdcf0ed14e.webp?v=1714706357","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fa2e03917fd1c09cc77ad9c3916a8b9375fa1d9_c9f9e0a5-4f3b-40f7-b062-0a475729c1a4.webp?v=1714706359","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a06e8df1129acf3dfdbdb5cab15e4ee1cbda6060_2652752d-cf84-4da7-ac9d-5e0f7b4e2d49.webp?v=1714706361","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97b50ef7e7beee8dff71eabc81b3607df1c437c2_4bb8263c-7806-4353-a082-9d15154c32b6.webp?v=1714706363","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f296edb6a6a46399e6f06233ed1b0984822727d7_e48a44f3-143e-47e4-a40f-367493b314dd.webp?v=1714706366"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3607a083453e684ec1946c3d86c9618a7bfdebe4_04b2189d-f6ca-4b2c-9ce6-dc47de93e1d5.webp?v=1714706345","options":["color"],"media":[{"alt":null,"id":23875642851427,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3607a083453e684ec1946c3d86c9618a7bfdebe4_04b2189d-f6ca-4b2c-9ce6-dc47de93e1d5.webp?v=1714706345"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3607a083453e684ec1946c3d86c9618a7bfdebe4_04b2189d-f6ca-4b2c-9ce6-dc47de93e1d5.webp?v=1714706345","width":2000},{"alt":null,"id":23875643342947,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee3de6d19ab505aa1837d6b28c831112c94b7314_38d87f40-a21d-44e7-9aa5-0d1c11a613c6.webp?v=1714706347"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee3de6d19ab505aa1837d6b28c831112c94b7314_38d87f40-a21d-44e7-9aa5-0d1c11a613c6.webp?v=1714706347","width":2000},{"alt":null,"id":23875643801699,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dccc017c0b193102c23b40f526229d4f961688a1_7c583ad0-859f-4b6f-b221-5a9c6c994aa6.webp?v=1714706350"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dccc017c0b193102c23b40f526229d4f961688a1_7c583ad0-859f-4b6f-b221-5a9c6c994aa6.webp?v=1714706350","width":2000},{"alt":null,"id":23875644293219,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d13f2bc2a2f84a1f108a31be976ef8cb4adeea6_7db07bf3-297d-4dcc-88d0-5a7fe930170e.webp?v=1714706352"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d13f2bc2a2f84a1f108a31be976ef8cb4adeea6_7db07bf3-297d-4dcc-88d0-5a7fe930170e.webp?v=1714706352","width":2000},{"alt":null,"id":23875645177955,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80799b5002e0952c75d8f4cc20494781ad42aeef_692f06c9-9c6c-4045-993b-ab4f25dd0c73.webp?v=1714706354"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80799b5002e0952c75d8f4cc20494781ad42aeef_692f06c9-9c6c-4045-993b-ab4f25dd0c73.webp?v=1714706354","width":2000},{"alt":null,"id":23875645669475,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9aa3ef88594279f3a2e415f788b8ad149250dff1_1974fc5d-b9df-4d0b-8845-8ebdcf0ed14e.webp?v=1714706357"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9aa3ef88594279f3a2e415f788b8ad149250dff1_1974fc5d-b9df-4d0b-8845-8ebdcf0ed14e.webp?v=1714706357","width":2000},{"alt":null,"id":23875647733859,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fa2e03917fd1c09cc77ad9c3916a8b9375fa1d9_c9f9e0a5-4f3b-40f7-b062-0a475729c1a4.webp?v=1714706359"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0fa2e03917fd1c09cc77ad9c3916a8b9375fa1d9_c9f9e0a5-4f3b-40f7-b062-0a475729c1a4.webp?v=1714706359","width":2000},{"alt":null,"id":23875648127075,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a06e8df1129acf3dfdbdb5cab15e4ee1cbda6060_2652752d-cf84-4da7-ac9d-5e0f7b4e2d49.webp?v=1714706361"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a06e8df1129acf3dfdbdb5cab15e4ee1cbda6060_2652752d-cf84-4da7-ac9d-5e0f7b4e2d49.webp?v=1714706361","width":2000},{"alt":null,"id":23875648880739,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97b50ef7e7beee8dff71eabc81b3607df1c437c2_4bb8263c-7806-4353-a082-9d15154c32b6.webp?v=1714706363"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97b50ef7e7beee8dff71eabc81b3607df1c437c2_4bb8263c-7806-4353-a082-9d15154c32b6.webp?v=1714706363","width":2000},{"alt":null,"id":23875649273955,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f296edb6a6a46399e6f06233ed1b0984822727d7_e48a44f3-143e-47e4-a40f-367493b314dd.webp?v=1714706366"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f296edb6a6a46399e6f06233ed1b0984822727d7_e48a44f3-143e-47e4-a40f-367493b314dd.webp?v=1714706366","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41880735514723,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB16","requires_shipping":true,"taxable":true,"featured_image":{"id":31470741553251,"product_id":7407935225955,"position":6,"created_at":"2024-05-03T11:19:17+08:00","updated_at":"2024-05-03T11:19:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9aa3ef88594279f3a2e415f788b8ad149250dff1_1974fc5d-b9df-4d0b-8845-8ebdcf0ed14e.webp?v=1714706357","variant_ids":[41880735514723]},"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-PB16","featured_media":{"alt":null,"id":23875645669475,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9aa3ef88594279f3a2e415f788b8ad149250dff1_1974fc5d-b9df-4d0b-8845-8ebdcf0ed14e.webp?v=1714706357"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41880735514723,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB16","requires_shipping":true,"taxable":true,"featured_image":{"id":31470741553251,"product_id":7407935225955,"position":6,"created_at":"2024-05-03T11:19:17+08:00","updated_at":"2024-05-03T11:19:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9aa3ef88594279f3a2e415f788b8ad149250dff1_1974fc5d-b9df-4d0b-8845-8ebdcf0ed14e.webp?v=1714706357","variant_ids":[41880735514723]},"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-PB16","featured_media":{"alt":null,"id":23875645669475,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9aa3ef88594279f3a2e415f788b8ad149250dff1_1974fc5d-b9df-4d0b-8845-8ebdcf0ed14e.webp?v=1714706357"}},"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: "停產" }