$product = {"id":7415110271075,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 伊沃克人1-塗鴉藝術","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb37","description":null,"published_at":"2024-06-11T17:58:14+08:00","created_at":"2024-05-05T20:24:46+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":41911980621923,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB37","requires_shipping":true,"taxable":true,"featured_image":{"id":31488188973155,"product_id":7415110271075,"position":7,"created_at":"2024-05-05T20:25:02+08:00","updated_at":"2024-05-05T20:25:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/637c98e7bd8507e2168f65f8c20cd29443d50403_526586ec-ed0f-437b-97b2-7245703eb25a.webp?v=1714911902","variant_ids":[41911980621923]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 伊沃克人1-塗鴉藝術 - 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-PB37","featured_media":{"alt":null,"id":23893533622371,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/637c98e7bd8507e2168f65f8c20cd29443d50403_526586ec-ed0f-437b-97b2-7245703eb25a.webp?v=1714911902"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/537d0e8874f28b7edc26c69e230c332a33dc4e30_0bbcb366-2b35-48a7-a688-5a4a6917b80d.webp?v=1714911889","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f5a62bb22737e726700b62f73b4b7148bc4413b_b23f571d-4bd9-4638-ae9c-7bbb341c72ca.webp?v=1714911891","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2500177c34c5550df98de2fe2e9b8cf7949282ce_bad574d6-cc6b-4690-b53d-52fec077b04a.webp?v=1714911893","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1abf4def8ec5b084ff3f0764c634dd9913618c65_469203f6-0788-4b42-b106-9c49e76a82e1.webp?v=1714911896","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95c10fa190a1669d96830590e760dd643714c42a_05bde04b-a19f-4ffb-8647-37df6c2b7e70.webp?v=1714911898","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be3b373a2d8a4e4a3d398dc539f9482b1fd296a5_a659f6d1-cf45-4fa2-961e-003c227246fe.webp?v=1714911900","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/637c98e7bd8507e2168f65f8c20cd29443d50403_526586ec-ed0f-437b-97b2-7245703eb25a.webp?v=1714911902","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d7376086dba2ed9d4e58f7b4997c47ed3a99c9c_11cf8099-327f-4a6d-8514-147506a80ff0.webp?v=1714911905","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/694b6bd89540ef3db1e80931d292a77df0d7fa89_1f50722e-3129-4b21-b336-efcb37d40bf6.webp?v=1714911907","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e350805d835a00e6bfe520d0f6a4f7f4f55b3e8_42c7fda4-049c-40fb-9da7-f31a360103dc.webp?v=1714911909","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ead2a9950bca1854cf1e32cac82c3c0be8801771_d059eb1c-e5f0-4a73-941e-f559961bac62.webp?v=1714911911"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/537d0e8874f28b7edc26c69e230c332a33dc4e30_0bbcb366-2b35-48a7-a688-5a4a6917b80d.webp?v=1714911889","options":["color"],"media":[{"alt":null,"id":23893530640483,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/537d0e8874f28b7edc26c69e230c332a33dc4e30_0bbcb366-2b35-48a7-a688-5a4a6917b80d.webp?v=1714911889"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/537d0e8874f28b7edc26c69e230c332a33dc4e30_0bbcb366-2b35-48a7-a688-5a4a6917b80d.webp?v=1714911889","width":2000},{"alt":null,"id":23893531099235,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f5a62bb22737e726700b62f73b4b7148bc4413b_b23f571d-4bd9-4638-ae9c-7bbb341c72ca.webp?v=1714911891"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f5a62bb22737e726700b62f73b4b7148bc4413b_b23f571d-4bd9-4638-ae9c-7bbb341c72ca.webp?v=1714911891","width":2000},{"alt":null,"id":23893531492451,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2500177c34c5550df98de2fe2e9b8cf7949282ce_bad574d6-cc6b-4690-b53d-52fec077b04a.webp?v=1714911893"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2500177c34c5550df98de2fe2e9b8cf7949282ce_bad574d6-cc6b-4690-b53d-52fec077b04a.webp?v=1714911893","width":2000},{"alt":null,"id":23893532180579,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1abf4def8ec5b084ff3f0764c634dd9913618c65_469203f6-0788-4b42-b106-9c49e76a82e1.webp?v=1714911896"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1abf4def8ec5b084ff3f0764c634dd9913618c65_469203f6-0788-4b42-b106-9c49e76a82e1.webp?v=1714911896","width":2000},{"alt":null,"id":23893532835939,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95c10fa190a1669d96830590e760dd643714c42a_05bde04b-a19f-4ffb-8647-37df6c2b7e70.webp?v=1714911898"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95c10fa190a1669d96830590e760dd643714c42a_05bde04b-a19f-4ffb-8647-37df6c2b7e70.webp?v=1714911898","width":2000},{"alt":null,"id":23893533196387,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be3b373a2d8a4e4a3d398dc539f9482b1fd296a5_a659f6d1-cf45-4fa2-961e-003c227246fe.webp?v=1714911900"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be3b373a2d8a4e4a3d398dc539f9482b1fd296a5_a659f6d1-cf45-4fa2-961e-003c227246fe.webp?v=1714911900","width":2000},{"alt":null,"id":23893533622371,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/637c98e7bd8507e2168f65f8c20cd29443d50403_526586ec-ed0f-437b-97b2-7245703eb25a.webp?v=1714911902"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/637c98e7bd8507e2168f65f8c20cd29443d50403_526586ec-ed0f-437b-97b2-7245703eb25a.webp?v=1714911902","width":2000},{"alt":null,"id":23893534408803,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d7376086dba2ed9d4e58f7b4997c47ed3a99c9c_11cf8099-327f-4a6d-8514-147506a80ff0.webp?v=1714911905"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d7376086dba2ed9d4e58f7b4997c47ed3a99c9c_11cf8099-327f-4a6d-8514-147506a80ff0.webp?v=1714911905","width":2000},{"alt":null,"id":23893535228003,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/694b6bd89540ef3db1e80931d292a77df0d7fa89_1f50722e-3129-4b21-b336-efcb37d40bf6.webp?v=1714911907"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/694b6bd89540ef3db1e80931d292a77df0d7fa89_1f50722e-3129-4b21-b336-efcb37d40bf6.webp?v=1714911907","width":2000},{"alt":null,"id":23893535686755,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e350805d835a00e6bfe520d0f6a4f7f4f55b3e8_42c7fda4-049c-40fb-9da7-f31a360103dc.webp?v=1714911909"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e350805d835a00e6bfe520d0f6a4f7f4f55b3e8_42c7fda4-049c-40fb-9da7-f31a360103dc.webp?v=1714911909","width":2000},{"alt":null,"id":23893536079971,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ead2a9950bca1854cf1e32cac82c3c0be8801771_d059eb1c-e5f0-4a73-941e-f559961bac62.webp?v=1714911911"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ead2a9950bca1854cf1e32cac82c3c0be8801771_d059eb1c-e5f0-4a73-941e-f559961bac62.webp?v=1714911911","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911980621923,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB37","requires_shipping":true,"taxable":true,"featured_image":{"id":31488188973155,"product_id":7415110271075,"position":7,"created_at":"2024-05-05T20:25:02+08:00","updated_at":"2024-05-05T20:25:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/637c98e7bd8507e2168f65f8c20cd29443d50403_526586ec-ed0f-437b-97b2-7245703eb25a.webp?v=1714911902","variant_ids":[41911980621923]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 伊沃克人1-塗鴉藝術 - 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-PB37","featured_media":{"alt":null,"id":23893533622371,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/637c98e7bd8507e2168f65f8c20cd29443d50403_526586ec-ed0f-437b-97b2-7245703eb25a.webp?v=1714911902"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911980621923,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB37","requires_shipping":true,"taxable":true,"featured_image":{"id":31488188973155,"product_id":7415110271075,"position":7,"created_at":"2024-05-05T20:25:02+08:00","updated_at":"2024-05-05T20:25:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/637c98e7bd8507e2168f65f8c20cd29443d50403_526586ec-ed0f-437b-97b2-7245703eb25a.webp?v=1714911902","variant_ids":[41911980621923]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 伊沃克人1-塗鴉藝術 - 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-PB37","featured_media":{"alt":null,"id":23893533622371,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/637c98e7bd8507e2168f65f8c20cd29443d50403_526586ec-ed0f-437b-97b2-7245703eb25a.webp?v=1714911902"}},"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: "停產" }