$product = {"id":7415010885731,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 小圖款-凱羅忍","handle":"iphone-12-mini-mod-nx-magsafe-printable-pc06","description":null,"published_at":"2024-06-11T17:55:34+08:00","created_at":"2024-05-05T20:05:44+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":41910911074403,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PC06","requires_shipping":true,"taxable":true,"featured_image":{"id":31487915720803,"product_id":7415010885731,"position":3,"created_at":"2024-05-05T20:05:52+08:00","updated_at":"2024-05-05T20:05:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6428a5310a481f3815ee40aec57509d89f61315_f0718ded-d868-4b0d-9703-891e78f71981.webp?v=1714910752","variant_ids":[41910911074403]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 小圖款-凱羅忍 - 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-PC06","featured_media":{"alt":null,"id":23893259780195,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6428a5310a481f3815ee40aec57509d89f61315_f0718ded-d868-4b0d-9703-891e78f71981.webp?v=1714910752"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c63ac12145de2762b9b622fd502957c1b366e0d_86b82e9a-a2f9-4f8b-99d2-a4176056e7f1.webp?v=1714910747","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/654944e346d744164b6d039a751f4ef5e55d4728_d648797a-50eb-482e-b37a-43b4d32352aa.webp?v=1714910749","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6428a5310a481f3815ee40aec57509d89f61315_f0718ded-d868-4b0d-9703-891e78f71981.webp?v=1714910752","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ac37c31f36f2f87497b618b1b36e826cf00d9d8_49a68970-a85b-4a50-870e-eb36e0435060.webp?v=1714910754","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e542427a4d6ee97c9304d377edcecb3af8e52f6e_f55883f2-56be-41c5-9a19-5f51179d5689.webp?v=1714910756","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea9fc2165473738f137d96a62189b855de7d4135_409b8e99-0907-463e-bd02-ad244ca8e5ba.webp?v=1714910759","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c403ad0c891a29fc820d29cd3942300958ce0dc_0394131d-f3f6-4479-9f73-f2922af021bf.webp?v=1714910761","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0dc391087af562354d7528f141ee379cc3c0dca2_ad23308f-100f-425e-b764-4fc139c2aede.webp?v=1714910764","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4500fb9bd20a0e203ef6360d452a22ece29eb9ad_146f10f4-e48d-4c8d-81b0-cef1f964b42d.webp?v=1714910766","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9811ac8ac650ea764e027b8b5cdce29f383659e0_85c284de-529c-423d-80d6-61f24d9cda11.webp?v=1714910769","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de39569e7e997937d83f4c03a367c71a7942c08b_e84d302b-4d5f-41f9-a6cc-8c1b68d9908d.webp?v=1714910771"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c63ac12145de2762b9b622fd502957c1b366e0d_86b82e9a-a2f9-4f8b-99d2-a4176056e7f1.webp?v=1714910747","options":["color"],"media":[{"alt":null,"id":23893258600547,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c63ac12145de2762b9b622fd502957c1b366e0d_86b82e9a-a2f9-4f8b-99d2-a4176056e7f1.webp?v=1714910747"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7c63ac12145de2762b9b622fd502957c1b366e0d_86b82e9a-a2f9-4f8b-99d2-a4176056e7f1.webp?v=1714910747","width":2000},{"alt":null,"id":23893259223139,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/654944e346d744164b6d039a751f4ef5e55d4728_d648797a-50eb-482e-b37a-43b4d32352aa.webp?v=1714910749"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/654944e346d744164b6d039a751f4ef5e55d4728_d648797a-50eb-482e-b37a-43b4d32352aa.webp?v=1714910749","width":2000},{"alt":null,"id":23893259780195,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6428a5310a481f3815ee40aec57509d89f61315_f0718ded-d868-4b0d-9703-891e78f71981.webp?v=1714910752"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6428a5310a481f3815ee40aec57509d89f61315_f0718ded-d868-4b0d-9703-891e78f71981.webp?v=1714910752","width":2000},{"alt":null,"id":23893260337251,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ac37c31f36f2f87497b618b1b36e826cf00d9d8_49a68970-a85b-4a50-870e-eb36e0435060.webp?v=1714910754"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2ac37c31f36f2f87497b618b1b36e826cf00d9d8_49a68970-a85b-4a50-870e-eb36e0435060.webp?v=1714910754","width":2000},{"alt":null,"id":23893260861539,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e542427a4d6ee97c9304d377edcecb3af8e52f6e_f55883f2-56be-41c5-9a19-5f51179d5689.webp?v=1714910756"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e542427a4d6ee97c9304d377edcecb3af8e52f6e_f55883f2-56be-41c5-9a19-5f51179d5689.webp?v=1714910756","width":2000},{"alt":null,"id":23893261287523,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea9fc2165473738f137d96a62189b855de7d4135_409b8e99-0907-463e-bd02-ad244ca8e5ba.webp?v=1714910759"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea9fc2165473738f137d96a62189b855de7d4135_409b8e99-0907-463e-bd02-ad244ca8e5ba.webp?v=1714910759","width":2000},{"alt":null,"id":23893262106723,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c403ad0c891a29fc820d29cd3942300958ce0dc_0394131d-f3f6-4479-9f73-f2922af021bf.webp?v=1714910761"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c403ad0c891a29fc820d29cd3942300958ce0dc_0394131d-f3f6-4479-9f73-f2922af021bf.webp?v=1714910761","width":2000},{"alt":null,"id":23893262696547,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0dc391087af562354d7528f141ee379cc3c0dca2_ad23308f-100f-425e-b764-4fc139c2aede.webp?v=1714910764"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0dc391087af562354d7528f141ee379cc3c0dca2_ad23308f-100f-425e-b764-4fc139c2aede.webp?v=1714910764","width":2000},{"alt":null,"id":23893263155299,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4500fb9bd20a0e203ef6360d452a22ece29eb9ad_146f10f4-e48d-4c8d-81b0-cef1f964b42d.webp?v=1714910766"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4500fb9bd20a0e203ef6360d452a22ece29eb9ad_146f10f4-e48d-4c8d-81b0-cef1f964b42d.webp?v=1714910766","width":2000},{"alt":null,"id":23893263548515,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9811ac8ac650ea764e027b8b5cdce29f383659e0_85c284de-529c-423d-80d6-61f24d9cda11.webp?v=1714910769"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9811ac8ac650ea764e027b8b5cdce29f383659e0_85c284de-529c-423d-80d6-61f24d9cda11.webp?v=1714910769","width":2000},{"alt":null,"id":23893264236643,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de39569e7e997937d83f4c03a367c71a7942c08b_e84d302b-4d5f-41f9-a6cc-8c1b68d9908d.webp?v=1714910771"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de39569e7e997937d83f4c03a367c71a7942c08b_e84d302b-4d5f-41f9-a6cc-8c1b68d9908d.webp?v=1714910771","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910911074403,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PC06","requires_shipping":true,"taxable":true,"featured_image":{"id":31487915720803,"product_id":7415010885731,"position":3,"created_at":"2024-05-05T20:05:52+08:00","updated_at":"2024-05-05T20:05:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6428a5310a481f3815ee40aec57509d89f61315_f0718ded-d868-4b0d-9703-891e78f71981.webp?v=1714910752","variant_ids":[41910911074403]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 小圖款-凱羅忍 - 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-PC06","featured_media":{"alt":null,"id":23893259780195,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6428a5310a481f3815ee40aec57509d89f61315_f0718ded-d868-4b0d-9703-891e78f71981.webp?v=1714910752"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910911074403,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PC06","requires_shipping":true,"taxable":true,"featured_image":{"id":31487915720803,"product_id":7415010885731,"position":3,"created_at":"2024-05-05T20:05:52+08:00","updated_at":"2024-05-05T20:05:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6428a5310a481f3815ee40aec57509d89f61315_f0718ded-d868-4b0d-9703-891e78f71981.webp?v=1714910752","variant_ids":[41910911074403]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 小圖款-凱羅忍 - 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-PC06","featured_media":{"alt":null,"id":23893259780195,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6428a5310a481f3815ee40aec57509d89f61315_f0718ded-d868-4b0d-9703-891e78f71981.webp?v=1714910752"}},"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: "停產" }