$product = {"id":7416392351843,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 死星-黑白條紋","handle":"iphone-8-mod-nx-printable-pb21","description":null,"published_at":"2024-06-11T16:57:49+08:00","created_at":"2024-05-06T14:47:53+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 8","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":41919244599395,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB21","requires_shipping":true,"taxable":true,"featured_image":{"id":31492013981795,"product_id":7416392351843,"position":2,"created_at":"2024-05-06T14:47:58+08:00","updated_at":"2024-05-06T14:47:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11942c4e2f986decdcfdd4292f1513563ab30c19_226c1b29-30c1-428f-be44-070f78851d38.webp?v=1714978078","variant_ids":[41919244599395]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0105424-PB21","featured_media":{"alt":null,"id":23897427837027,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11942c4e2f986decdcfdd4292f1513563ab30c19_226c1b29-30c1-428f-be44-070f78851d38.webp?v=1714978078"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09d3883f6d4217e6b671210126f965643232a5a4_15f7de98-0a77-4f97-a0cc-99bd3adaa32e.webp?v=1714978076","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11942c4e2f986decdcfdd4292f1513563ab30c19_226c1b29-30c1-428f-be44-070f78851d38.webp?v=1714978078","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bd95e55efd3dcf3630c39333a242030f8cdbaa2_7629ea3b-01f3-4e5b-82b5-f135cd4eafb3.webp?v=1714978080","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff6d4c48d307cb679313637b5fc6a4a8b469bbd5_d9b974b4-c7ba-450c-947b-c8abdc97205b.webp?v=1714978083","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b71ce6705bdd8f5fe6c88ab435be6a9564ac4c2_c04d60db-ef3d-4806-a72f-a23c149f6e9e.webp?v=1714978086","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa8920f06951f2b6d4d5df44b4081a837deebb42_23f538cc-e6cf-4a72-91ac-9a50e766062f.webp?v=1714978088","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1feda921a2b5d96d1b28b7f773ad95f81df29f5b_91fcd15e-eb4f-45d3-8605-38c4063dc08c.webp?v=1714978090","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ebb656406ccf4fb6289ba6ab56606e14d427362b_e26e7b61-3624-4371-b759-29ec3d61153b.webp?v=1714978093","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26e1426f41e414980fc0959e1f51d672d14f7da3_c487a2a2-74a0-44f2-8863-a94ac8a9349c.webp?v=1714978097"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09d3883f6d4217e6b671210126f965643232a5a4_15f7de98-0a77-4f97-a0cc-99bd3adaa32e.webp?v=1714978076","options":["color"],"media":[{"alt":null,"id":23897427411043,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09d3883f6d4217e6b671210126f965643232a5a4_15f7de98-0a77-4f97-a0cc-99bd3adaa32e.webp?v=1714978076"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09d3883f6d4217e6b671210126f965643232a5a4_15f7de98-0a77-4f97-a0cc-99bd3adaa32e.webp?v=1714978076","width":2000},{"alt":null,"id":23897427837027,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11942c4e2f986decdcfdd4292f1513563ab30c19_226c1b29-30c1-428f-be44-070f78851d38.webp?v=1714978078"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11942c4e2f986decdcfdd4292f1513563ab30c19_226c1b29-30c1-428f-be44-070f78851d38.webp?v=1714978078","width":2000},{"alt":null,"id":23897428394083,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bd95e55efd3dcf3630c39333a242030f8cdbaa2_7629ea3b-01f3-4e5b-82b5-f135cd4eafb3.webp?v=1714978080"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1bd95e55efd3dcf3630c39333a242030f8cdbaa2_7629ea3b-01f3-4e5b-82b5-f135cd4eafb3.webp?v=1714978080","width":2000},{"alt":null,"id":23897428918371,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff6d4c48d307cb679313637b5fc6a4a8b469bbd5_d9b974b4-c7ba-450c-947b-c8abdc97205b.webp?v=1714978083"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff6d4c48d307cb679313637b5fc6a4a8b469bbd5_d9b974b4-c7ba-450c-947b-c8abdc97205b.webp?v=1714978083","width":2000},{"alt":null,"id":23897429573731,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b71ce6705bdd8f5fe6c88ab435be6a9564ac4c2_c04d60db-ef3d-4806-a72f-a23c149f6e9e.webp?v=1714978086"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b71ce6705bdd8f5fe6c88ab435be6a9564ac4c2_c04d60db-ef3d-4806-a72f-a23c149f6e9e.webp?v=1714978086","width":2000},{"alt":null,"id":23897429934179,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa8920f06951f2b6d4d5df44b4081a837deebb42_23f538cc-e6cf-4a72-91ac-9a50e766062f.webp?v=1714978088"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa8920f06951f2b6d4d5df44b4081a837deebb42_23f538cc-e6cf-4a72-91ac-9a50e766062f.webp?v=1714978088","width":2000},{"alt":null,"id":23897430360163,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1feda921a2b5d96d1b28b7f773ad95f81df29f5b_91fcd15e-eb4f-45d3-8605-38c4063dc08c.webp?v=1714978090"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1feda921a2b5d96d1b28b7f773ad95f81df29f5b_91fcd15e-eb4f-45d3-8605-38c4063dc08c.webp?v=1714978090","width":2000},{"alt":null,"id":23897430818915,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ebb656406ccf4fb6289ba6ab56606e14d427362b_e26e7b61-3624-4371-b759-29ec3d61153b.webp?v=1714978093"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ebb656406ccf4fb6289ba6ab56606e14d427362b_e26e7b61-3624-4371-b759-29ec3d61153b.webp?v=1714978093","width":2000},{"alt":null,"id":23897432031331,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26e1426f41e414980fc0959e1f51d672d14f7da3_c487a2a2-74a0-44f2-8863-a94ac8a9349c.webp?v=1714978097"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26e1426f41e414980fc0959e1f51d672d14f7da3_c487a2a2-74a0-44f2-8863-a94ac8a9349c.webp?v=1714978097","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41919244599395,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB21","requires_shipping":true,"taxable":true,"featured_image":{"id":31492013981795,"product_id":7416392351843,"position":2,"created_at":"2024-05-06T14:47:58+08:00","updated_at":"2024-05-06T14:47:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11942c4e2f986decdcfdd4292f1513563ab30c19_226c1b29-30c1-428f-be44-070f78851d38.webp?v=1714978078","variant_ids":[41919244599395]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0105424-PB21","featured_media":{"alt":null,"id":23897427837027,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11942c4e2f986decdcfdd4292f1513563ab30c19_226c1b29-30c1-428f-be44-070f78851d38.webp?v=1714978078"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41919244599395,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB21","requires_shipping":true,"taxable":true,"featured_image":{"id":31492013981795,"product_id":7416392351843,"position":2,"created_at":"2024-05-06T14:47:58+08:00","updated_at":"2024-05-06T14:47:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11942c4e2f986decdcfdd4292f1513563ab30c19_226c1b29-30c1-428f-be44-070f78851d38.webp?v=1714978078","variant_ids":[41919244599395]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0105424-PB21","featured_media":{"alt":null,"id":23897427837027,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/11942c4e2f986decdcfdd4292f1513563ab30c19_226c1b29-30c1-428f-be44-070f78851d38.webp?v=1714978078"}},"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: "停產" }