$product = {"id":7416332320867,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP X戰機 X-WI","handle":"iphone-8-mod-nx-printable-pb25","description":null,"published_at":"2024-06-11T16:56:08+08:00","created_at":"2024-05-06T14:36:06+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":41918586552419,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB25","requires_shipping":true,"taxable":true,"featured_image":{"id":31491862462563,"product_id":7416332320867,"position":2,"created_at":"2024-05-06T14:36:12+08:00","updated_at":"2024-05-06T14:36:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58216412222615c28334163765704b2fd94603fc_2b1268bd-d191-4209-b30b-2b184ae9440c.webp?v=1714977372","variant_ids":[41918586552419]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP X戰機 X-WI - 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-PB25","featured_media":{"alt":null,"id":23897275269219,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58216412222615c28334163765704b2fd94603fc_2b1268bd-d191-4209-b30b-2b184ae9440c.webp?v=1714977372"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0121bd44752d0a441e6cf45c3762a836b383b12f_bc06fed9-f776-4da4-9e36-3ff0825202e7.webp?v=1714977369","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58216412222615c28334163765704b2fd94603fc_2b1268bd-d191-4209-b30b-2b184ae9440c.webp?v=1714977372","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eab56518a9167874b86803f5440ff671f1973cc8_ed06ab7a-1211-47ac-8ef9-9bbaa8015c93.webp?v=1714977375","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c017ed8fd1e06f4d72476ab5606e7f9bfe1bae4_f706d7e8-6ff3-4454-a9c4-0a3f9e9936f5.webp?v=1714977377","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/780960b0a3f62ae2663adc7bb89a6409a86aa252_a182e095-1b53-44fe-96ab-261ec3c79509.webp?v=1714977380","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/851ee63e612a25305798968795a28840e2cb6919_d7376cd6-99a8-4310-938a-fc0491e4f414.webp?v=1714977382","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37004fde79e476a64a4aedcb5b5068e3b68bde26_c6d0da6f-6e10-495e-b7b2-c76f444eb1a5.webp?v=1714977385","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8e0177a79b9f5e06209f8069cc27c834c1b581c_f16b56a7-c1c5-4f48-96e7-8d90ddbf220c.webp?v=1714977388","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45b7ae86227172b5ded24054d71779e51ab2677e_d97150dc-a14b-4d5a-a3ac-8cdb07c6bb9e.webp?v=1714977390","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b6c3b707b0b1da49246dd919daf300caa67cb55_2a927f4a-3126-49f6-bc34-fb50122a5735.webp?v=1714977392"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0121bd44752d0a441e6cf45c3762a836b383b12f_bc06fed9-f776-4da4-9e36-3ff0825202e7.webp?v=1714977369","options":["color"],"media":[{"alt":null,"id":23897274712163,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0121bd44752d0a441e6cf45c3762a836b383b12f_bc06fed9-f776-4da4-9e36-3ff0825202e7.webp?v=1714977369"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0121bd44752d0a441e6cf45c3762a836b383b12f_bc06fed9-f776-4da4-9e36-3ff0825202e7.webp?v=1714977369","width":2000},{"alt":null,"id":23897275269219,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58216412222615c28334163765704b2fd94603fc_2b1268bd-d191-4209-b30b-2b184ae9440c.webp?v=1714977372"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58216412222615c28334163765704b2fd94603fc_2b1268bd-d191-4209-b30b-2b184ae9440c.webp?v=1714977372","width":2000},{"alt":null,"id":23897275891811,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eab56518a9167874b86803f5440ff671f1973cc8_ed06ab7a-1211-47ac-8ef9-9bbaa8015c93.webp?v=1714977375"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eab56518a9167874b86803f5440ff671f1973cc8_ed06ab7a-1211-47ac-8ef9-9bbaa8015c93.webp?v=1714977375","width":2000},{"alt":null,"id":23897276809315,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c017ed8fd1e06f4d72476ab5606e7f9bfe1bae4_f706d7e8-6ff3-4454-a9c4-0a3f9e9936f5.webp?v=1714977377"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c017ed8fd1e06f4d72476ab5606e7f9bfe1bae4_f706d7e8-6ff3-4454-a9c4-0a3f9e9936f5.webp?v=1714977377","width":2000},{"alt":null,"id":23897277333603,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/780960b0a3f62ae2663adc7bb89a6409a86aa252_a182e095-1b53-44fe-96ab-261ec3c79509.webp?v=1714977380"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/780960b0a3f62ae2663adc7bb89a6409a86aa252_a182e095-1b53-44fe-96ab-261ec3c79509.webp?v=1714977380","width":2000},{"alt":null,"id":23897277857891,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/851ee63e612a25305798968795a28840e2cb6919_d7376cd6-99a8-4310-938a-fc0491e4f414.webp?v=1714977382"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/851ee63e612a25305798968795a28840e2cb6919_d7376cd6-99a8-4310-938a-fc0491e4f414.webp?v=1714977382","width":2000},{"alt":null,"id":23897278414947,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37004fde79e476a64a4aedcb5b5068e3b68bde26_c6d0da6f-6e10-495e-b7b2-c76f444eb1a5.webp?v=1714977385"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37004fde79e476a64a4aedcb5b5068e3b68bde26_c6d0da6f-6e10-495e-b7b2-c76f444eb1a5.webp?v=1714977385","width":2000},{"alt":null,"id":23897279168611,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8e0177a79b9f5e06209f8069cc27c834c1b581c_f16b56a7-c1c5-4f48-96e7-8d90ddbf220c.webp?v=1714977388"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d8e0177a79b9f5e06209f8069cc27c834c1b581c_f16b56a7-c1c5-4f48-96e7-8d90ddbf220c.webp?v=1714977388","width":2000},{"alt":null,"id":23897279594595,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45b7ae86227172b5ded24054d71779e51ab2677e_d97150dc-a14b-4d5a-a3ac-8cdb07c6bb9e.webp?v=1714977390"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45b7ae86227172b5ded24054d71779e51ab2677e_d97150dc-a14b-4d5a-a3ac-8cdb07c6bb9e.webp?v=1714977390","width":2000},{"alt":null,"id":23897280151651,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b6c3b707b0b1da49246dd919daf300caa67cb55_2a927f4a-3126-49f6-bc34-fb50122a5735.webp?v=1714977392"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b6c3b707b0b1da49246dd919daf300caa67cb55_2a927f4a-3126-49f6-bc34-fb50122a5735.webp?v=1714977392","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41918586552419,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB25","requires_shipping":true,"taxable":true,"featured_image":{"id":31491862462563,"product_id":7416332320867,"position":2,"created_at":"2024-05-06T14:36:12+08:00","updated_at":"2024-05-06T14:36:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58216412222615c28334163765704b2fd94603fc_2b1268bd-d191-4209-b30b-2b184ae9440c.webp?v=1714977372","variant_ids":[41918586552419]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP X戰機 X-WI - 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-PB25","featured_media":{"alt":null,"id":23897275269219,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58216412222615c28334163765704b2fd94603fc_2b1268bd-d191-4209-b30b-2b184ae9440c.webp?v=1714977372"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41918586552419,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB25","requires_shipping":true,"taxable":true,"featured_image":{"id":31491862462563,"product_id":7416332320867,"position":2,"created_at":"2024-05-06T14:36:12+08:00","updated_at":"2024-05-06T14:36:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58216412222615c28334163765704b2fd94603fc_2b1268bd-d191-4209-b30b-2b184ae9440c.webp?v=1714977372","variant_ids":[41918586552419]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP X戰機 X-WI - 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-PB25","featured_media":{"alt":null,"id":23897275269219,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58216412222615c28334163765704b2fd94603fc_2b1268bd-d191-4209-b30b-2b184ae9440c.webp?v=1714977372"}},"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: "停產" }