$product = {"id":7415113187427,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 波巴費特-推推-幽默系列","handle":"iphone-12-mini-mod-nx-magsafe-printable-pc08","description":null,"published_at":"2024-06-11T17:58:19+08:00","created_at":"2024-05-05T20:25:20+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":41912015781987,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PC08","requires_shipping":true,"taxable":true,"featured_image":{"id":31488197918819,"product_id":7415113187427,"position":11,"created_at":"2024-05-05T20:25:46+08:00","updated_at":"2024-05-05T20:25:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1af03ace1e32288c63af15a1b0b99ead24dca047_09c16fb6-5274-4b0b-8333-50595c3c48a2.webp?v=1714911946","variant_ids":[41912015781987]},"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-PC08","featured_media":{"alt":null,"id":23893542568035,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1af03ace1e32288c63af15a1b0b99ead24dca047_09c16fb6-5274-4b0b-8333-50595c3c48a2.webp?v=1714911946"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f8d79520a3b80e2dd9cf45d51d7a1b68f0903c1_28db8d88-64a6-45f8-a8bb-176999a2aa16.webp?v=1714911922","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db5f4720641de13d15e76a96674c113cc89e3f24_07b6e50b-5a12-43c4-88d3-0343067bea8e.webp?v=1714911924","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e636afab4db48828f5c436e4a9ea2c55d9bd59f_e4a18591-4763-42ac-8ad8-ae42403fce6e.webp?v=1714911926","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/143c964387e8db448fa0bf5cb649aff344f40707_7502a673-faa7-4ee9-bef8-1916bfabfb59.webp?v=1714911929","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/448b1d86da229834145446ceb9215f22984257b2_a6217d59-73db-4a8b-9cfd-fa66e732ef29.webp?v=1714911932","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cda23372b056ef29d7e44856be806bb3d953ff82_1086deed-4e5e-4c23-967b-f27360564363.webp?v=1714911934","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d44d019df7fe6a2dc43957a7dc81f52dd8c164b3_1fb42fd2-386f-4adc-8b78-308978308bcc.webp?v=1714911937","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b63acedaf890affa56866416581edcffba73a44_089fc7ff-b9f8-4999-b1e6-6544a710c0d9.webp?v=1714911939","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c468e1750b626d6f258eeb6e639fc5e82d1d8ffe_b2e2721c-c8cb-4670-835a-49f586ca2864.webp?v=1714911942","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ea06d3f8b589abb6b498c43f20c3847e79deaa7_aace1190-31a4-4598-a482-58e143f941d4.webp?v=1714911944","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1af03ace1e32288c63af15a1b0b99ead24dca047_09c16fb6-5274-4b0b-8333-50595c3c48a2.webp?v=1714911946"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f8d79520a3b80e2dd9cf45d51d7a1b68f0903c1_28db8d88-64a6-45f8-a8bb-176999a2aa16.webp?v=1714911922","options":["color"],"media":[{"alt":null,"id":23893537554531,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f8d79520a3b80e2dd9cf45d51d7a1b68f0903c1_28db8d88-64a6-45f8-a8bb-176999a2aa16.webp?v=1714911922"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f8d79520a3b80e2dd9cf45d51d7a1b68f0903c1_28db8d88-64a6-45f8-a8bb-176999a2aa16.webp?v=1714911922","width":2000},{"alt":null,"id":23893538013283,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db5f4720641de13d15e76a96674c113cc89e3f24_07b6e50b-5a12-43c4-88d3-0343067bea8e.webp?v=1714911924"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db5f4720641de13d15e76a96674c113cc89e3f24_07b6e50b-5a12-43c4-88d3-0343067bea8e.webp?v=1714911924","width":2000},{"alt":null,"id":23893538373731,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e636afab4db48828f5c436e4a9ea2c55d9bd59f_e4a18591-4763-42ac-8ad8-ae42403fce6e.webp?v=1714911926"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e636afab4db48828f5c436e4a9ea2c55d9bd59f_e4a18591-4763-42ac-8ad8-ae42403fce6e.webp?v=1714911926","width":2000},{"alt":null,"id":23893538832483,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/143c964387e8db448fa0bf5cb649aff344f40707_7502a673-faa7-4ee9-bef8-1916bfabfb59.webp?v=1714911929"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/143c964387e8db448fa0bf5cb649aff344f40707_7502a673-faa7-4ee9-bef8-1916bfabfb59.webp?v=1714911929","width":2000},{"alt":null,"id":23893539749987,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/448b1d86da229834145446ceb9215f22984257b2_a6217d59-73db-4a8b-9cfd-fa66e732ef29.webp?v=1714911932"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/448b1d86da229834145446ceb9215f22984257b2_a6217d59-73db-4a8b-9cfd-fa66e732ef29.webp?v=1714911932","width":2000},{"alt":null,"id":23893540077667,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cda23372b056ef29d7e44856be806bb3d953ff82_1086deed-4e5e-4c23-967b-f27360564363.webp?v=1714911934"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cda23372b056ef29d7e44856be806bb3d953ff82_1086deed-4e5e-4c23-967b-f27360564363.webp?v=1714911934","width":2000},{"alt":null,"id":23893540896867,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d44d019df7fe6a2dc43957a7dc81f52dd8c164b3_1fb42fd2-386f-4adc-8b78-308978308bcc.webp?v=1714911937"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d44d019df7fe6a2dc43957a7dc81f52dd8c164b3_1fb42fd2-386f-4adc-8b78-308978308bcc.webp?v=1714911937","width":2000},{"alt":null,"id":23893541290083,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b63acedaf890affa56866416581edcffba73a44_089fc7ff-b9f8-4999-b1e6-6544a710c0d9.webp?v=1714911939"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b63acedaf890affa56866416581edcffba73a44_089fc7ff-b9f8-4999-b1e6-6544a710c0d9.webp?v=1714911939","width":2000},{"alt":null,"id":23893541650531,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c468e1750b626d6f258eeb6e639fc5e82d1d8ffe_b2e2721c-c8cb-4670-835a-49f586ca2864.webp?v=1714911942"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c468e1750b626d6f258eeb6e639fc5e82d1d8ffe_b2e2721c-c8cb-4670-835a-49f586ca2864.webp?v=1714911942","width":2000},{"alt":null,"id":23893542109283,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ea06d3f8b589abb6b498c43f20c3847e79deaa7_aace1190-31a4-4598-a482-58e143f941d4.webp?v=1714911944"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ea06d3f8b589abb6b498c43f20c3847e79deaa7_aace1190-31a4-4598-a482-58e143f941d4.webp?v=1714911944","width":2000},{"alt":null,"id":23893542568035,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1af03ace1e32288c63af15a1b0b99ead24dca047_09c16fb6-5274-4b0b-8333-50595c3c48a2.webp?v=1714911946"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1af03ace1e32288c63af15a1b0b99ead24dca047_09c16fb6-5274-4b0b-8333-50595c3c48a2.webp?v=1714911946","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41912015781987,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PC08","requires_shipping":true,"taxable":true,"featured_image":{"id":31488197918819,"product_id":7415113187427,"position":11,"created_at":"2024-05-05T20:25:46+08:00","updated_at":"2024-05-05T20:25:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1af03ace1e32288c63af15a1b0b99ead24dca047_09c16fb6-5274-4b0b-8333-50595c3c48a2.webp?v=1714911946","variant_ids":[41912015781987]},"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-PC08","featured_media":{"alt":null,"id":23893542568035,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1af03ace1e32288c63af15a1b0b99ead24dca047_09c16fb6-5274-4b0b-8333-50595c3c48a2.webp?v=1714911946"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41912015781987,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PC08","requires_shipping":true,"taxable":true,"featured_image":{"id":31488197918819,"product_id":7415113187427,"position":11,"created_at":"2024-05-05T20:25:46+08:00","updated_at":"2024-05-05T20:25:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1af03ace1e32288c63af15a1b0b99ead24dca047_09c16fb6-5274-4b0b-8333-50595c3c48a2.webp?v=1714911946","variant_ids":[41912015781987]},"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-PC08","featured_media":{"alt":null,"id":23893542568035,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1af03ace1e32288c63af15a1b0b99ead24dca047_09c16fb6-5274-4b0b-8333-50595c3c48a2.webp?v=1714911946"}},"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: "停產" }