$product = {"id":7415083728995,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - Ewok-Yub Nub!","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-pb81","description":null,"published_at":"2024-06-11T17:57:31+08:00","created_at":"2024-05-05T20:19:39+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":41911690297443,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PB81","requires_shipping":true,"taxable":true,"featured_image":{"id":31488117342307,"product_id":7415083728995,"position":8,"created_at":"2024-05-05T20:19:59+08:00","updated_at":"2024-05-05T20:19:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ed30b400c4af1e741efa4d5ac0cfdd13f81a849_fd0f5115-e9f6-4194-817a-cc4a67cdcf29.webp?v=1714911599","variant_ids":[41911690297443]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - Ewok-Yub Nub! - 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-PB81","featured_media":{"alt":null,"id":23893461893219,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ed30b400c4af1e741efa4d5ac0cfdd13f81a849_fd0f5115-e9f6-4194-817a-cc4a67cdcf29.webp?v=1714911599"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95a103771fd2d2d50b4eef257e1f97c56bc46e01_59883808-1ac5-4167-b678-90cb2f072da7.webp?v=1714911582","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d70082cb590a74ca663966228dea21b5db7a682a_00e4cc3f-89d8-4991-b886-95701e15fa48.webp?v=1714911584","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3971a0179f5f96730aa464a4ebac2b66856417fd_768ff86e-ba52-419b-991e-7be72bcefcdd.webp?v=1714911587","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/131a11d0e5bb6f4b0bc45fb0831c6cf9a33a3e6b_e1d91a93-4e2b-44dc-8286-3cffe317a46f.webp?v=1714911589","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/062aac63ae135d643ebf09739ade1ae2dee14d52_4b599c92-9162-4902-9317-ed0eff2d1f13.webp?v=1714911591","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0f57a51da63a8342d214a5af04649485d8c5e69_3cab221f-de07-4c5a-b61a-e3f63de55951.webp?v=1714911594","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abd4ee6a65642468861eb186a67d1cc1357cba75_0a55a3f8-0dcb-475c-ac15-d5e8e80868dc.webp?v=1714911596","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ed30b400c4af1e741efa4d5ac0cfdd13f81a849_fd0f5115-e9f6-4194-817a-cc4a67cdcf29.webp?v=1714911599","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf7b98aa8e4a67d4bc66ffeddedf5e327c9db794_c1b75d8f-3f48-4617-9241-3f64e6769e67.webp?v=1714911601","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1151a8ce64181791a4874d9b08ab5e829009e597_22112b05-6b68-4bc8-b603-31bdc23dadba.webp?v=1714911603"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95a103771fd2d2d50b4eef257e1f97c56bc46e01_59883808-1ac5-4167-b678-90cb2f072da7.webp?v=1714911582","options":["color"],"media":[{"alt":null,"id":23893457961059,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95a103771fd2d2d50b4eef257e1f97c56bc46e01_59883808-1ac5-4167-b678-90cb2f072da7.webp?v=1714911582"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95a103771fd2d2d50b4eef257e1f97c56bc46e01_59883808-1ac5-4167-b678-90cb2f072da7.webp?v=1714911582","width":2000},{"alt":null,"id":23893458452579,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d70082cb590a74ca663966228dea21b5db7a682a_00e4cc3f-89d8-4991-b886-95701e15fa48.webp?v=1714911584"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d70082cb590a74ca663966228dea21b5db7a682a_00e4cc3f-89d8-4991-b886-95701e15fa48.webp?v=1714911584","width":2000},{"alt":null,"id":23893458976867,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3971a0179f5f96730aa464a4ebac2b66856417fd_768ff86e-ba52-419b-991e-7be72bcefcdd.webp?v=1714911587"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3971a0179f5f96730aa464a4ebac2b66856417fd_768ff86e-ba52-419b-991e-7be72bcefcdd.webp?v=1714911587","width":2000},{"alt":null,"id":23893459435619,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/131a11d0e5bb6f4b0bc45fb0831c6cf9a33a3e6b_e1d91a93-4e2b-44dc-8286-3cffe317a46f.webp?v=1714911589"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/131a11d0e5bb6f4b0bc45fb0831c6cf9a33a3e6b_e1d91a93-4e2b-44dc-8286-3cffe317a46f.webp?v=1714911589","width":2000},{"alt":null,"id":23893459927139,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/062aac63ae135d643ebf09739ade1ae2dee14d52_4b599c92-9162-4902-9317-ed0eff2d1f13.webp?v=1714911591"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/062aac63ae135d643ebf09739ade1ae2dee14d52_4b599c92-9162-4902-9317-ed0eff2d1f13.webp?v=1714911591","width":2000},{"alt":null,"id":23893460746339,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0f57a51da63a8342d214a5af04649485d8c5e69_3cab221f-de07-4c5a-b61a-e3f63de55951.webp?v=1714911594"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0f57a51da63a8342d214a5af04649485d8c5e69_3cab221f-de07-4c5a-b61a-e3f63de55951.webp?v=1714911594","width":2000},{"alt":null,"id":23893461434467,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abd4ee6a65642468861eb186a67d1cc1357cba75_0a55a3f8-0dcb-475c-ac15-d5e8e80868dc.webp?v=1714911596"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abd4ee6a65642468861eb186a67d1cc1357cba75_0a55a3f8-0dcb-475c-ac15-d5e8e80868dc.webp?v=1714911596","width":2000},{"alt":null,"id":23893461893219,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ed30b400c4af1e741efa4d5ac0cfdd13f81a849_fd0f5115-e9f6-4194-817a-cc4a67cdcf29.webp?v=1714911599"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ed30b400c4af1e741efa4d5ac0cfdd13f81a849_fd0f5115-e9f6-4194-817a-cc4a67cdcf29.webp?v=1714911599","width":2000},{"alt":null,"id":23893462679651,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf7b98aa8e4a67d4bc66ffeddedf5e327c9db794_c1b75d8f-3f48-4617-9241-3f64e6769e67.webp?v=1714911601"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf7b98aa8e4a67d4bc66ffeddedf5e327c9db794_c1b75d8f-3f48-4617-9241-3f64e6769e67.webp?v=1714911601","width":2000},{"alt":null,"id":23893463302243,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1151a8ce64181791a4874d9b08ab5e829009e597_22112b05-6b68-4bc8-b603-31bdc23dadba.webp?v=1714911603"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1151a8ce64181791a4874d9b08ab5e829009e597_22112b05-6b68-4bc8-b603-31bdc23dadba.webp?v=1714911603","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911690297443,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PB81","requires_shipping":true,"taxable":true,"featured_image":{"id":31488117342307,"product_id":7415083728995,"position":8,"created_at":"2024-05-05T20:19:59+08:00","updated_at":"2024-05-05T20:19:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ed30b400c4af1e741efa4d5ac0cfdd13f81a849_fd0f5115-e9f6-4194-817a-cc4a67cdcf29.webp?v=1714911599","variant_ids":[41911690297443]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - Ewok-Yub Nub! - 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-PB81","featured_media":{"alt":null,"id":23893461893219,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ed30b400c4af1e741efa4d5ac0cfdd13f81a849_fd0f5115-e9f6-4194-817a-cc4a67cdcf29.webp?v=1714911599"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911690297443,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PB81","requires_shipping":true,"taxable":true,"featured_image":{"id":31488117342307,"product_id":7415083728995,"position":8,"created_at":"2024-05-05T20:19:59+08:00","updated_at":"2024-05-05T20:19:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ed30b400c4af1e741efa4d5ac0cfdd13f81a849_fd0f5115-e9f6-4194-817a-cc4a67cdcf29.webp?v=1714911599","variant_ids":[41911690297443]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - Ewok-Yub Nub! - 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-PB81","featured_media":{"alt":null,"id":23893461893219,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ed30b400c4af1e741efa4d5ac0cfdd13f81a849_fd0f5115-e9f6-4194-817a-cc4a67cdcf29.webp?v=1714911599"}},"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: "停產" }