$product = {"id":7408486416483,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Pattern 星際大戰-Galaxy","handle":"iphone-12-mini-mod-nx-printable-pb61","description":null,"published_at":"2024-06-11T16:38:35+08:00","created_at":"2024-05-03T15: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 12 mini","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":41886033182819,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB61","requires_shipping":true,"taxable":true,"featured_image":{"id":31472398532707,"product_id":7408486416483,"position":3,"created_at":"2024-05-03T15:36:13+08:00","updated_at":"2024-05-03T15:36:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/603c1cb31bc755e6c89432d7d57e60f46751a727_86230b73-8172-4a72-a471-8139cd5ef59f.webp?v=1714721773","variant_ids":[41886033182819]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Pattern 星際大戰-Galaxy - 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":"NPB0118424-PB61","featured_media":{"alt":null,"id":23877315493987,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/603c1cb31bc755e6c89432d7d57e60f46751a727_86230b73-8172-4a72-a471-8139cd5ef59f.webp?v=1714721773"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7417e9df5040e088e756e5d4576e34a91d9d7b2_8bf0c8f2-e062-481e-9f19-278cdb75eac8.webp?v=1714721768","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84080ba418bf85203ae58fe973c08bc423c84362_c7cedb0b-3121-48ae-aa5e-4a84d4e28510.webp?v=1714721771","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/603c1cb31bc755e6c89432d7d57e60f46751a727_86230b73-8172-4a72-a471-8139cd5ef59f.webp?v=1714721773","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18041af299bd549e12371edcac69da326b160e56_c7f8cad6-7b51-44b4-9b4d-3e1ced84a0b7.webp?v=1714721775","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a3e72471473f9c297409e9f887a71020f72da31_7f02cd52-eb09-46b0-a7e1-afdf69817e1a.webp?v=1714721778","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d5b7591f5b70ef4c4ca983c6da889e101e6cda5_f61219e6-cc5d-440f-8718-9a613804445a.webp?v=1714721780","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5079ebd1b2d5c02fa4935ec32308c7c907136c1d_86c2b6e2-4c4a-49c3-ac8b-448abdfab3c9.webp?v=1714721783","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/531530ca7a285492ecbf0c2543460f496974c3a5_f0bf7f50-363a-425d-8c88-c2fdfb7f6b25.webp?v=1714721785","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57b6d5984af24792500a7a63189b725e2d294f1e_e65e4028-36d0-41e1-8860-ef41f54397a3.webp?v=1714721787","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87c24f7a4de5a98af2c79565f5dafe7a48ff6242_eff7b6be-ea5a-43ed-906e-c2aeb8ba6c89.webp?v=1714721790","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e93357e744ef887cb2e4106100e311d991fd631b_e49983a6-4392-4f93-a324-59bacee11fc6.webp?v=1714721793"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7417e9df5040e088e756e5d4576e34a91d9d7b2_8bf0c8f2-e062-481e-9f19-278cdb75eac8.webp?v=1714721768","options":["color"],"media":[{"alt":null,"id":23877314609251,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7417e9df5040e088e756e5d4576e34a91d9d7b2_8bf0c8f2-e062-481e-9f19-278cdb75eac8.webp?v=1714721768"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b7417e9df5040e088e756e5d4576e34a91d9d7b2_8bf0c8f2-e062-481e-9f19-278cdb75eac8.webp?v=1714721768","width":2000},{"alt":null,"id":23877315133539,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84080ba418bf85203ae58fe973c08bc423c84362_c7cedb0b-3121-48ae-aa5e-4a84d4e28510.webp?v=1714721771"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84080ba418bf85203ae58fe973c08bc423c84362_c7cedb0b-3121-48ae-aa5e-4a84d4e28510.webp?v=1714721771","width":2000},{"alt":null,"id":23877315493987,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/603c1cb31bc755e6c89432d7d57e60f46751a727_86230b73-8172-4a72-a471-8139cd5ef59f.webp?v=1714721773"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/603c1cb31bc755e6c89432d7d57e60f46751a727_86230b73-8172-4a72-a471-8139cd5ef59f.webp?v=1714721773","width":2000},{"alt":null,"id":23877315919971,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18041af299bd549e12371edcac69da326b160e56_c7f8cad6-7b51-44b4-9b4d-3e1ced84a0b7.webp?v=1714721775"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18041af299bd549e12371edcac69da326b160e56_c7f8cad6-7b51-44b4-9b4d-3e1ced84a0b7.webp?v=1714721775","width":2000},{"alt":null,"id":23877316608099,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a3e72471473f9c297409e9f887a71020f72da31_7f02cd52-eb09-46b0-a7e1-afdf69817e1a.webp?v=1714721778"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a3e72471473f9c297409e9f887a71020f72da31_7f02cd52-eb09-46b0-a7e1-afdf69817e1a.webp?v=1714721778","width":2000},{"alt":null,"id":23877317099619,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d5b7591f5b70ef4c4ca983c6da889e101e6cda5_f61219e6-cc5d-440f-8718-9a613804445a.webp?v=1714721780"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d5b7591f5b70ef4c4ca983c6da889e101e6cda5_f61219e6-cc5d-440f-8718-9a613804445a.webp?v=1714721780","width":2000},{"alt":null,"id":23877317623907,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5079ebd1b2d5c02fa4935ec32308c7c907136c1d_86c2b6e2-4c4a-49c3-ac8b-448abdfab3c9.webp?v=1714721783"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5079ebd1b2d5c02fa4935ec32308c7c907136c1d_86c2b6e2-4c4a-49c3-ac8b-448abdfab3c9.webp?v=1714721783","width":2000},{"alt":null,"id":23877318901859,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/531530ca7a285492ecbf0c2543460f496974c3a5_f0bf7f50-363a-425d-8c88-c2fdfb7f6b25.webp?v=1714721785"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/531530ca7a285492ecbf0c2543460f496974c3a5_f0bf7f50-363a-425d-8c88-c2fdfb7f6b25.webp?v=1714721785","width":2000},{"alt":null,"id":23877319819363,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57b6d5984af24792500a7a63189b725e2d294f1e_e65e4028-36d0-41e1-8860-ef41f54397a3.webp?v=1714721787"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57b6d5984af24792500a7a63189b725e2d294f1e_e65e4028-36d0-41e1-8860-ef41f54397a3.webp?v=1714721787","width":2000},{"alt":null,"id":23877320310883,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87c24f7a4de5a98af2c79565f5dafe7a48ff6242_eff7b6be-ea5a-43ed-906e-c2aeb8ba6c89.webp?v=1714721790"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/87c24f7a4de5a98af2c79565f5dafe7a48ff6242_eff7b6be-ea5a-43ed-906e-c2aeb8ba6c89.webp?v=1714721790","width":2000},{"alt":null,"id":23877321031779,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e93357e744ef887cb2e4106100e311d991fd631b_e49983a6-4392-4f93-a324-59bacee11fc6.webp?v=1714721793"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e93357e744ef887cb2e4106100e311d991fd631b_e49983a6-4392-4f93-a324-59bacee11fc6.webp?v=1714721793","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886033182819,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB61","requires_shipping":true,"taxable":true,"featured_image":{"id":31472398532707,"product_id":7408486416483,"position":3,"created_at":"2024-05-03T15:36:13+08:00","updated_at":"2024-05-03T15:36:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/603c1cb31bc755e6c89432d7d57e60f46751a727_86230b73-8172-4a72-a471-8139cd5ef59f.webp?v=1714721773","variant_ids":[41886033182819]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Pattern 星際大戰-Galaxy - 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":"NPB0118424-PB61","featured_media":{"alt":null,"id":23877315493987,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/603c1cb31bc755e6c89432d7d57e60f46751a727_86230b73-8172-4a72-a471-8139cd5ef59f.webp?v=1714721773"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886033182819,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB61","requires_shipping":true,"taxable":true,"featured_image":{"id":31472398532707,"product_id":7408486416483,"position":3,"created_at":"2024-05-03T15:36:13+08:00","updated_at":"2024-05-03T15:36:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/603c1cb31bc755e6c89432d7d57e60f46751a727_86230b73-8172-4a72-a471-8139cd5ef59f.webp?v=1714721773","variant_ids":[41886033182819]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Pattern 星際大戰-Galaxy - 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":"NPB0118424-PB61","featured_media":{"alt":null,"id":23877315493987,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/603c1cb31bc755e6c89432d7d57e60f46751a727_86230b73-8172-4a72-a471-8139cd5ef59f.webp?v=1714721773"}},"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: "停產" }