$product = {"id":7415035428963,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - X翼戰機-經典","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb80","description":null,"published_at":"2024-06-11T17:56:14+08:00","created_at":"2024-05-05T20:10:51+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 mini","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":41911180460131,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB80","requires_shipping":true,"taxable":true,"featured_image":{"id":31487985877091,"product_id":7415035428963,"position":2,"created_at":"2024-05-05T20:10:55+08:00","updated_at":"2024-05-05T20:10:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38f9519dee0df713365d11b9f61abe5c3d6bbc2b_40ea2067-41d6-4489-a056-643c64728d0b.webp?v=1714911055","variant_ids":[41911180460131]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 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":"MPB0118424-PB80","featured_media":{"alt":null,"id":23893330133091,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38f9519dee0df713365d11b9f61abe5c3d6bbc2b_40ea2067-41d6-4489-a056-643c64728d0b.webp?v=1714911055"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/238ce478a57c99af5593a3ca66141326b292f925_441fd853-3936-4e58-9a55-e7fbdb7f7b09.webp?v=1714911053","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38f9519dee0df713365d11b9f61abe5c3d6bbc2b_40ea2067-41d6-4489-a056-643c64728d0b.webp?v=1714911055","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a61450233666527f9855888f1d14abb57a383e33_c8141428-391f-48c5-891b-9c2e80a8a5db.webp?v=1714911058","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf5d4575fab3dbad4fc4bf958a8b4c66dda15926_17c58b15-7eac-4678-992e-e6fd0b80b105.webp?v=1714911060","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4498f67a6785339545b09824fc455cfb8e9ab74_cac981b4-db1c-4a87-a4ef-2944d6c90457.webp?v=1714911062","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9cbc2409ce8ceab44a5d499ca1e69a7bab5a5987_a111445f-3870-4a4f-8bb0-c8eacdf7bbf2.webp?v=1714911065","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/313f51a2551782ac2fc3ec8241214f8f8d128d34_f49b5c2d-fc7e-490b-b88b-c524145cc807.webp?v=1714911067","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f5cefbe19db217f7802cb2762a9f2467cb965bb_e4ef0395-bcaa-4d96-87a5-0e4578ab9d88.webp?v=1714911069","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/750c8978979933a3ba040215c710c9edba71d9d5_e697c3b7-f95b-4a42-b505-48e4be9f9374.webp?v=1714911072","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80a34e5e2c7849dcefb8333e3a5ab7555c06e7e3_66d46363-5cce-4a81-8528-8f73d47d4d76.webp?v=1714911074","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd31c71629bc9490b471a249554718a59a992bb6_98cad7dc-5ac4-481d-a720-151145c5775e.webp?v=1714911076"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/238ce478a57c99af5593a3ca66141326b292f925_441fd853-3936-4e58-9a55-e7fbdb7f7b09.webp?v=1714911053","options":["color"],"media":[{"alt":null,"id":23893329641571,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/238ce478a57c99af5593a3ca66141326b292f925_441fd853-3936-4e58-9a55-e7fbdb7f7b09.webp?v=1714911053"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/238ce478a57c99af5593a3ca66141326b292f925_441fd853-3936-4e58-9a55-e7fbdb7f7b09.webp?v=1714911053","width":2000},{"alt":null,"id":23893330133091,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38f9519dee0df713365d11b9f61abe5c3d6bbc2b_40ea2067-41d6-4489-a056-643c64728d0b.webp?v=1714911055"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38f9519dee0df713365d11b9f61abe5c3d6bbc2b_40ea2067-41d6-4489-a056-643c64728d0b.webp?v=1714911055","width":2000},{"alt":null,"id":23893330624611,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a61450233666527f9855888f1d14abb57a383e33_c8141428-391f-48c5-891b-9c2e80a8a5db.webp?v=1714911058"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a61450233666527f9855888f1d14abb57a383e33_c8141428-391f-48c5-891b-9c2e80a8a5db.webp?v=1714911058","width":2000},{"alt":null,"id":23893330952291,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf5d4575fab3dbad4fc4bf958a8b4c66dda15926_17c58b15-7eac-4678-992e-e6fd0b80b105.webp?v=1714911060"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf5d4575fab3dbad4fc4bf958a8b4c66dda15926_17c58b15-7eac-4678-992e-e6fd0b80b105.webp?v=1714911060","width":2000},{"alt":null,"id":23893331476579,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4498f67a6785339545b09824fc455cfb8e9ab74_cac981b4-db1c-4a87-a4ef-2944d6c90457.webp?v=1714911062"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4498f67a6785339545b09824fc455cfb8e9ab74_cac981b4-db1c-4a87-a4ef-2944d6c90457.webp?v=1714911062","width":2000},{"alt":null,"id":23893331902563,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9cbc2409ce8ceab44a5d499ca1e69a7bab5a5987_a111445f-3870-4a4f-8bb0-c8eacdf7bbf2.webp?v=1714911065"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9cbc2409ce8ceab44a5d499ca1e69a7bab5a5987_a111445f-3870-4a4f-8bb0-c8eacdf7bbf2.webp?v=1714911065","width":2000},{"alt":null,"id":23893332590691,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/313f51a2551782ac2fc3ec8241214f8f8d128d34_f49b5c2d-fc7e-490b-b88b-c524145cc807.webp?v=1714911067"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/313f51a2551782ac2fc3ec8241214f8f8d128d34_f49b5c2d-fc7e-490b-b88b-c524145cc807.webp?v=1714911067","width":2000},{"alt":null,"id":23893333377123,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f5cefbe19db217f7802cb2762a9f2467cb965bb_e4ef0395-bcaa-4d96-87a5-0e4578ab9d88.webp?v=1714911069"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f5cefbe19db217f7802cb2762a9f2467cb965bb_e4ef0395-bcaa-4d96-87a5-0e4578ab9d88.webp?v=1714911069","width":2000},{"alt":null,"id":23893334032483,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/750c8978979933a3ba040215c710c9edba71d9d5_e697c3b7-f95b-4a42-b505-48e4be9f9374.webp?v=1714911072"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/750c8978979933a3ba040215c710c9edba71d9d5_e697c3b7-f95b-4a42-b505-48e4be9f9374.webp?v=1714911072","width":2000},{"alt":null,"id":23893334786147,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80a34e5e2c7849dcefb8333e3a5ab7555c06e7e3_66d46363-5cce-4a81-8528-8f73d47d4d76.webp?v=1714911074"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80a34e5e2c7849dcefb8333e3a5ab7555c06e7e3_66d46363-5cce-4a81-8528-8f73d47d4d76.webp?v=1714911074","width":2000},{"alt":null,"id":23893335212131,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd31c71629bc9490b471a249554718a59a992bb6_98cad7dc-5ac4-481d-a720-151145c5775e.webp?v=1714911076"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd31c71629bc9490b471a249554718a59a992bb6_98cad7dc-5ac4-481d-a720-151145c5775e.webp?v=1714911076","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911180460131,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB80","requires_shipping":true,"taxable":true,"featured_image":{"id":31487985877091,"product_id":7415035428963,"position":2,"created_at":"2024-05-05T20:10:55+08:00","updated_at":"2024-05-05T20:10:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38f9519dee0df713365d11b9f61abe5c3d6bbc2b_40ea2067-41d6-4489-a056-643c64728d0b.webp?v=1714911055","variant_ids":[41911180460131]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 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":"MPB0118424-PB80","featured_media":{"alt":null,"id":23893330133091,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38f9519dee0df713365d11b9f61abe5c3d6bbc2b_40ea2067-41d6-4489-a056-643c64728d0b.webp?v=1714911055"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911180460131,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB80","requires_shipping":true,"taxable":true,"featured_image":{"id":31487985877091,"product_id":7415035428963,"position":2,"created_at":"2024-05-05T20:10:55+08:00","updated_at":"2024-05-05T20:10:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38f9519dee0df713365d11b9f61abe5c3d6bbc2b_40ea2067-41d6-4489-a056-643c64728d0b.webp?v=1714911055","variant_ids":[41911180460131]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 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":"MPB0118424-PB80","featured_media":{"alt":null,"id":23893330133091,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38f9519dee0df713365d11b9f61abe5c3d6bbc2b_40ea2067-41d6-4489-a056-643c64728d0b.webp?v=1714911055"}},"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: "停產" }