$product = {"id":7416365678691,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 星際大戰-開場字幕","handle":"iphone-8-mod-nx-printable-pb70","description":null,"published_at":"2024-06-11T16:57:05+08:00","created_at":"2024-05-06T14:42:59+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":41918953488483,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB70","requires_shipping":true,"taxable":true,"featured_image":{"id":31491953492067,"product_id":7416365678691,"position":9,"created_at":"2024-05-06T14:43:21+08:00","updated_at":"2024-05-06T14:43:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/547024261c2acb213962a373aad8f34c42a80b51_345a1dac-8eb7-4955-b66f-d958979fc9f9.webp?v=1714977801","variant_ids":[41918953488483]},"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-PB70","featured_media":{"alt":null,"id":23897366659171,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/547024261c2acb213962a373aad8f34c42a80b51_345a1dac-8eb7-4955-b66f-d958979fc9f9.webp?v=1714977801"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cda1716eb392954491cab8c6d9898a162da5c4ec_23589c0a-21c1-4c76-a838-5b2c0d698997.webp?v=1714977782","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90c796294402814c85943016fc0d27126fbec098_3dea164e-f24a-4e61-b579-dfeff9b07ea7.webp?v=1714977784","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f09df55c41d1a8f3535719aa7602ea8445c80f93_507377c7-19b4-44e8-bb25-7925979d257d.webp?v=1714977786","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63dab317ed211e86d382221ef8dac74b27179c7b_7c8efcff-b978-4a2d-a51d-af62c75ddf85.webp?v=1714977789","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a78d2f8867ad3d88e22704385dcd4b520b54d9c_23f9082c-0115-4e7a-935d-42b04a6063e9.webp?v=1714977791","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/481327c5a4c1596cdce3798114c2a88e3dcc18d6_903302a6-a087-4ac0-925c-6b9352965ac2.webp?v=1714977793","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3444106e322a1b5a4fd3cf7ffc56bc9f1c9d7180_75357a41-0ad3-4179-b05e-88e3a8c90449.webp?v=1714977796","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0baf95223cd8dbf0a5dd5f68854f6c55d741b0a_58984bb4-169f-4b9f-a4f4-8c55e02a2661.webp?v=1714977798","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/547024261c2acb213962a373aad8f34c42a80b51_345a1dac-8eb7-4955-b66f-d958979fc9f9.webp?v=1714977801","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e608a1be152180d83e47b2447fe5665046bfa65_ce58a2ff-8a33-4af3-a325-a2d12b39c99c.webp?v=1714977803"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cda1716eb392954491cab8c6d9898a162da5c4ec_23589c0a-21c1-4c76-a838-5b2c0d698997.webp?v=1714977782","options":["color"],"media":[{"alt":null,"id":23897362628707,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cda1716eb392954491cab8c6d9898a162da5c4ec_23589c0a-21c1-4c76-a838-5b2c0d698997.webp?v=1714977782"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cda1716eb392954491cab8c6d9898a162da5c4ec_23589c0a-21c1-4c76-a838-5b2c0d698997.webp?v=1714977782","width":2000},{"alt":null,"id":23897363218531,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90c796294402814c85943016fc0d27126fbec098_3dea164e-f24a-4e61-b579-dfeff9b07ea7.webp?v=1714977784"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90c796294402814c85943016fc0d27126fbec098_3dea164e-f24a-4e61-b579-dfeff9b07ea7.webp?v=1714977784","width":2000},{"alt":null,"id":23897363644515,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f09df55c41d1a8f3535719aa7602ea8445c80f93_507377c7-19b4-44e8-bb25-7925979d257d.webp?v=1714977786"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f09df55c41d1a8f3535719aa7602ea8445c80f93_507377c7-19b4-44e8-bb25-7925979d257d.webp?v=1714977786","width":2000},{"alt":null,"id":23897364168803,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63dab317ed211e86d382221ef8dac74b27179c7b_7c8efcff-b978-4a2d-a51d-af62c75ddf85.webp?v=1714977789"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63dab317ed211e86d382221ef8dac74b27179c7b_7c8efcff-b978-4a2d-a51d-af62c75ddf85.webp?v=1714977789","width":2000},{"alt":null,"id":23897364725859,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a78d2f8867ad3d88e22704385dcd4b520b54d9c_23f9082c-0115-4e7a-935d-42b04a6063e9.webp?v=1714977791"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a78d2f8867ad3d88e22704385dcd4b520b54d9c_23f9082c-0115-4e7a-935d-42b04a6063e9.webp?v=1714977791","width":2000},{"alt":null,"id":23897365184611,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/481327c5a4c1596cdce3798114c2a88e3dcc18d6_903302a6-a087-4ac0-925c-6b9352965ac2.webp?v=1714977793"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/481327c5a4c1596cdce3798114c2a88e3dcc18d6_903302a6-a087-4ac0-925c-6b9352965ac2.webp?v=1714977793","width":2000},{"alt":null,"id":23897365872739,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3444106e322a1b5a4fd3cf7ffc56bc9f1c9d7180_75357a41-0ad3-4179-b05e-88e3a8c90449.webp?v=1714977796"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3444106e322a1b5a4fd3cf7ffc56bc9f1c9d7180_75357a41-0ad3-4179-b05e-88e3a8c90449.webp?v=1714977796","width":2000},{"alt":null,"id":23897366298723,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0baf95223cd8dbf0a5dd5f68854f6c55d741b0a_58984bb4-169f-4b9f-a4f4-8c55e02a2661.webp?v=1714977798"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0baf95223cd8dbf0a5dd5f68854f6c55d741b0a_58984bb4-169f-4b9f-a4f4-8c55e02a2661.webp?v=1714977798","width":2000},{"alt":null,"id":23897366659171,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/547024261c2acb213962a373aad8f34c42a80b51_345a1dac-8eb7-4955-b66f-d958979fc9f9.webp?v=1714977801"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/547024261c2acb213962a373aad8f34c42a80b51_345a1dac-8eb7-4955-b66f-d958979fc9f9.webp?v=1714977801","width":2000},{"alt":null,"id":23897367183459,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e608a1be152180d83e47b2447fe5665046bfa65_ce58a2ff-8a33-4af3-a325-a2d12b39c99c.webp?v=1714977803"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e608a1be152180d83e47b2447fe5665046bfa65_ce58a2ff-8a33-4af3-a325-a2d12b39c99c.webp?v=1714977803","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41918953488483,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB70","requires_shipping":true,"taxable":true,"featured_image":{"id":31491953492067,"product_id":7416365678691,"position":9,"created_at":"2024-05-06T14:43:21+08:00","updated_at":"2024-05-06T14:43:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/547024261c2acb213962a373aad8f34c42a80b51_345a1dac-8eb7-4955-b66f-d958979fc9f9.webp?v=1714977801","variant_ids":[41918953488483]},"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-PB70","featured_media":{"alt":null,"id":23897366659171,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/547024261c2acb213962a373aad8f34c42a80b51_345a1dac-8eb7-4955-b66f-d958979fc9f9.webp?v=1714977801"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41918953488483,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB70","requires_shipping":true,"taxable":true,"featured_image":{"id":31491953492067,"product_id":7416365678691,"position":9,"created_at":"2024-05-06T14:43:21+08:00","updated_at":"2024-05-06T14:43:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/547024261c2acb213962a373aad8f34c42a80b51_345a1dac-8eb7-4955-b66f-d958979fc9f9.webp?v=1714977801","variant_ids":[41918953488483]},"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-PB70","featured_media":{"alt":null,"id":23897366659171,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/547024261c2acb213962a373aad8f34c42a80b51_345a1dac-8eb7-4955-b66f-d958979fc9f9.webp?v=1714977801"}},"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: "停產" }