$product = {"id":7415093821539,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - X翼戰機","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-pb74","description":null,"published_at":"2024-06-11T17:57:48+08:00","created_at":"2024-05-05T20:21:37+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 12 pro max","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-star-wars","Top50","type-Mod NX Printable MagSafe Printable"],"price":110000,"price_min":110000,"price_max":110000,"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":41911802134627,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PB74","requires_shipping":true,"taxable":true,"featured_image":{"id":31488144015459,"product_id":7415093821539,"position":5,"created_at":"2024-05-05T20:21:49+08:00","updated_at":"2024-05-05T20:21:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/077c3bf60bb4a01fff657b8385410e30ee1dafc5_2b3ea0a4-7d96-4804-a3b4-67700911e27b.webp?v=1714911709","variant_ids":[41911802134627]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - X翼戰機 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-PB74","featured_media":{"alt":null,"id":23893488566371,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/077c3bf60bb4a01fff657b8385410e30ee1dafc5_2b3ea0a4-7d96-4804-a3b4-67700911e27b.webp?v=1714911709"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2eceaa5e41c071be714c815a24f85b7edf861f2c_8e5da6ea-a874-4ab0-ac1a-b15ab3af6243.webp?v=1714911700","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01392fddc0a6bce0f7e5e2516c13979b93da19a1_421eea69-622a-4ef6-a4c6-561ef07423fa.webp?v=1714911702","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4b3745d2ae0636202044f5117a9b54577ee75ed_12e4b67d-4c91-4275-a670-87764656a1ba.webp?v=1714911704","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f87bd861585fc961d9007df90860c6c10b031aa_3b6d3eb2-cf5d-4c3d-8624-839bf5a91e15.webp?v=1714911707","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/077c3bf60bb4a01fff657b8385410e30ee1dafc5_2b3ea0a4-7d96-4804-a3b4-67700911e27b.webp?v=1714911709","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4f7b565d7ed42f1c78542be9b91999046d78105_1c3f2434-ae5c-4495-9569-b68fa7ce6ebe.webp?v=1714911712","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/489638db38042e28815f11a27cc1cb0f65b5754a_6c7e26e0-bca4-4e7a-bd32-8901b27f2a09.webp?v=1714911714","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/246183e3adc772b62a0174b4431856a34e815e0b_3458bd71-7b31-470b-9e80-6b660102a473.webp?v=1714911716","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da848a433588f543475826d8c51ea35913a8da71_3ec16278-d5a3-4727-8dc3-a66998d8d01c.webp?v=1714911719","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bf9dba675c64fa5a700aa6d6f6a15a243597555_b09a43a8-6725-42d9-82ea-6b9c695872d7.webp?v=1714911721"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2eceaa5e41c071be714c815a24f85b7edf861f2c_8e5da6ea-a874-4ab0-ac1a-b15ab3af6243.webp?v=1714911700","options":["color"],"media":[{"alt":null,"id":23893486633059,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2eceaa5e41c071be714c815a24f85b7edf861f2c_8e5da6ea-a874-4ab0-ac1a-b15ab3af6243.webp?v=1714911700"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2eceaa5e41c071be714c815a24f85b7edf861f2c_8e5da6ea-a874-4ab0-ac1a-b15ab3af6243.webp?v=1714911700","width":2000},{"alt":null,"id":23893487288419,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01392fddc0a6bce0f7e5e2516c13979b93da19a1_421eea69-622a-4ef6-a4c6-561ef07423fa.webp?v=1714911702"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01392fddc0a6bce0f7e5e2516c13979b93da19a1_421eea69-622a-4ef6-a4c6-561ef07423fa.webp?v=1714911702","width":2000},{"alt":null,"id":23893487681635,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4b3745d2ae0636202044f5117a9b54577ee75ed_12e4b67d-4c91-4275-a670-87764656a1ba.webp?v=1714911704"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4b3745d2ae0636202044f5117a9b54577ee75ed_12e4b67d-4c91-4275-a670-87764656a1ba.webp?v=1714911704","width":2000},{"alt":null,"id":23893488205923,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f87bd861585fc961d9007df90860c6c10b031aa_3b6d3eb2-cf5d-4c3d-8624-839bf5a91e15.webp?v=1714911707"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f87bd861585fc961d9007df90860c6c10b031aa_3b6d3eb2-cf5d-4c3d-8624-839bf5a91e15.webp?v=1714911707","width":2000},{"alt":null,"id":23893488566371,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/077c3bf60bb4a01fff657b8385410e30ee1dafc5_2b3ea0a4-7d96-4804-a3b4-67700911e27b.webp?v=1714911709"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/077c3bf60bb4a01fff657b8385410e30ee1dafc5_2b3ea0a4-7d96-4804-a3b4-67700911e27b.webp?v=1714911709","width":2000},{"alt":null,"id":23893489287267,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4f7b565d7ed42f1c78542be9b91999046d78105_1c3f2434-ae5c-4495-9569-b68fa7ce6ebe.webp?v=1714911712"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4f7b565d7ed42f1c78542be9b91999046d78105_1c3f2434-ae5c-4495-9569-b68fa7ce6ebe.webp?v=1714911712","width":2000},{"alt":null,"id":23893490073699,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/489638db38042e28815f11a27cc1cb0f65b5754a_6c7e26e0-bca4-4e7a-bd32-8901b27f2a09.webp?v=1714911714"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/489638db38042e28815f11a27cc1cb0f65b5754a_6c7e26e0-bca4-4e7a-bd32-8901b27f2a09.webp?v=1714911714","width":2000},{"alt":null,"id":23893490532451,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/246183e3adc772b62a0174b4431856a34e815e0b_3458bd71-7b31-470b-9e80-6b660102a473.webp?v=1714911716"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/246183e3adc772b62a0174b4431856a34e815e0b_3458bd71-7b31-470b-9e80-6b660102a473.webp?v=1714911716","width":2000},{"alt":null,"id":23893491482723,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da848a433588f543475826d8c51ea35913a8da71_3ec16278-d5a3-4727-8dc3-a66998d8d01c.webp?v=1714911719"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da848a433588f543475826d8c51ea35913a8da71_3ec16278-d5a3-4727-8dc3-a66998d8d01c.webp?v=1714911719","width":2000},{"alt":null,"id":23893491941475,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bf9dba675c64fa5a700aa6d6f6a15a243597555_b09a43a8-6725-42d9-82ea-6b9c695872d7.webp?v=1714911721"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bf9dba675c64fa5a700aa6d6f6a15a243597555_b09a43a8-6725-42d9-82ea-6b9c695872d7.webp?v=1714911721","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911802134627,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PB74","requires_shipping":true,"taxable":true,"featured_image":{"id":31488144015459,"product_id":7415093821539,"position":5,"created_at":"2024-05-05T20:21:49+08:00","updated_at":"2024-05-05T20:21:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/077c3bf60bb4a01fff657b8385410e30ee1dafc5_2b3ea0a4-7d96-4804-a3b4-67700911e27b.webp?v=1714911709","variant_ids":[41911802134627]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - X翼戰機 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-PB74","featured_media":{"alt":null,"id":23893488566371,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/077c3bf60bb4a01fff657b8385410e30ee1dafc5_2b3ea0a4-7d96-4804-a3b4-67700911e27b.webp?v=1714911709"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911802134627,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PB74","requires_shipping":true,"taxable":true,"featured_image":{"id":31488144015459,"product_id":7415093821539,"position":5,"created_at":"2024-05-05T20:21:49+08:00","updated_at":"2024-05-05T20:21:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/077c3bf60bb4a01fff657b8385410e30ee1dafc5_2b3ea0a4-7d96-4804-a3b4-67700911e27b.webp?v=1714911709","variant_ids":[41911802134627]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - X翼戰機 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118724-PB74","featured_media":{"alt":null,"id":23893488566371,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/077c3bf60bb4a01fff657b8385410e30ee1dafc5_2b3ea0a4-7d96-4804-a3b4-67700911e27b.webp?v=1714911709"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null; $type = ""; var sellingStatus if ($isMerge) { $(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: "停產" }