$product = {"id":7408372318307,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2 \u0026 C3PO-塗鴉藝術","handle":"iphone-12-mini-mod-nx-printable-pb34","description":null,"published_at":"2024-06-11T16:35:26+08:00","created_at":"2024-05-03T15:13:52+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 12 mini","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-star-wars","Top50","type-Mod NX Printable"],"price":90000,"price_min":90000,"price_max":90000,"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":41884762308707,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB34","requires_shipping":true,"taxable":true,"featured_image":{"id":31472097034339,"product_id":7408372318307,"position":6,"created_at":"2024-05-03T15:14:06+08:00","updated_at":"2024-05-03T15:14:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b317fb4eb447a196cc88fee4641766a743e99d4_b2010823-4118-467a-939e-62056bda4115.webp?v=1714720446","variant_ids":[41884762308707]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2 \u0026 C3PO-塗鴉藝術 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-PB34","featured_media":{"alt":null,"id":23877012422755,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b317fb4eb447a196cc88fee4641766a743e99d4_b2010823-4118-467a-939e-62056bda4115.webp?v=1714720446"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78273a52d1f2549fc4a5814b2e5cab73bb21b65b_108f4989-4dc1-49d9-a1f0-b1304921443c.webp?v=1714720435","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d96feb795fa54f2c155155d7ef7d3e6131a93809_dfb28b8d-85e9-40d5-87f9-07d57c58500a.webp?v=1714720437","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59cc5baaecef5864bd3e0b50b3d35c9a8adc2e61_482bd7b7-2a15-49a4-b4a8-b616b57e0095.webp?v=1714720439","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/847eb1cdc24c0304a1becd403c730cf608b67dc3_205909c1-fa22-46dd-a0d9-d626d71074cd.webp?v=1714720442","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5fcb5cff7e1d70b452be55025401015c91f45d47_ea39b429-c948-49c4-b1e9-9debfc84baa8.webp?v=1714720444","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b317fb4eb447a196cc88fee4641766a743e99d4_b2010823-4118-467a-939e-62056bda4115.webp?v=1714720446","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fc2b8804069e77273f240566e316d9b041d98cf_127d428d-76ef-4cd3-8d76-ffd6f51843ae.webp?v=1714720449","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac42431bd59b15250f1007127d242124805497c5_7bd9acc4-5e27-4913-90b0-a7eb66768ff7.webp?v=1714720451","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cec6cd7628db59855d07d31e50408126a946da9c_bea78f66-ce2f-454d-b657-797c1f46ef2c.webp?v=1714720454","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f08967bb9397b7590c5c41f3779e74834fdd66a_4f51fdab-ed16-4e14-ad09-c7e81d6d7d93.webp?v=1714720456","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/880f72213815b8223f49943674e7b8eed25a1539_a327b433-49ab-42e7-9a0e-c17b345a20e0.webp?v=1714720459"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78273a52d1f2549fc4a5814b2e5cab73bb21b65b_108f4989-4dc1-49d9-a1f0-b1304921443c.webp?v=1714720435","options":["color"],"media":[{"alt":null,"id":23877010686051,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78273a52d1f2549fc4a5814b2e5cab73bb21b65b_108f4989-4dc1-49d9-a1f0-b1304921443c.webp?v=1714720435"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78273a52d1f2549fc4a5814b2e5cab73bb21b65b_108f4989-4dc1-49d9-a1f0-b1304921443c.webp?v=1714720435","width":2000},{"alt":null,"id":23877011210339,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d96feb795fa54f2c155155d7ef7d3e6131a93809_dfb28b8d-85e9-40d5-87f9-07d57c58500a.webp?v=1714720437"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d96feb795fa54f2c155155d7ef7d3e6131a93809_dfb28b8d-85e9-40d5-87f9-07d57c58500a.webp?v=1714720437","width":2000},{"alt":null,"id":23877011406947,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59cc5baaecef5864bd3e0b50b3d35c9a8adc2e61_482bd7b7-2a15-49a4-b4a8-b616b57e0095.webp?v=1714720439"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59cc5baaecef5864bd3e0b50b3d35c9a8adc2e61_482bd7b7-2a15-49a4-b4a8-b616b57e0095.webp?v=1714720439","width":2000},{"alt":null,"id":23877011996771,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/847eb1cdc24c0304a1becd403c730cf608b67dc3_205909c1-fa22-46dd-a0d9-d626d71074cd.webp?v=1714720442"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/847eb1cdc24c0304a1becd403c730cf608b67dc3_205909c1-fa22-46dd-a0d9-d626d71074cd.webp?v=1714720442","width":2000},{"alt":null,"id":23877012258915,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5fcb5cff7e1d70b452be55025401015c91f45d47_ea39b429-c948-49c4-b1e9-9debfc84baa8.webp?v=1714720444"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5fcb5cff7e1d70b452be55025401015c91f45d47_ea39b429-c948-49c4-b1e9-9debfc84baa8.webp?v=1714720444","width":2000},{"alt":null,"id":23877012422755,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b317fb4eb447a196cc88fee4641766a743e99d4_b2010823-4118-467a-939e-62056bda4115.webp?v=1714720446"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b317fb4eb447a196cc88fee4641766a743e99d4_b2010823-4118-467a-939e-62056bda4115.webp?v=1714720446","width":2000},{"alt":null,"id":23877013241955,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fc2b8804069e77273f240566e316d9b041d98cf_127d428d-76ef-4cd3-8d76-ffd6f51843ae.webp?v=1714720449"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fc2b8804069e77273f240566e316d9b041d98cf_127d428d-76ef-4cd3-8d76-ffd6f51843ae.webp?v=1714720449","width":2000},{"alt":null,"id":23877013438563,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac42431bd59b15250f1007127d242124805497c5_7bd9acc4-5e27-4913-90b0-a7eb66768ff7.webp?v=1714720451"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ac42431bd59b15250f1007127d242124805497c5_7bd9acc4-5e27-4913-90b0-a7eb66768ff7.webp?v=1714720451","width":2000},{"alt":null,"id":23877014159459,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cec6cd7628db59855d07d31e50408126a946da9c_bea78f66-ce2f-454d-b657-797c1f46ef2c.webp?v=1714720454"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cec6cd7628db59855d07d31e50408126a946da9c_bea78f66-ce2f-454d-b657-797c1f46ef2c.webp?v=1714720454","width":2000},{"alt":null,"id":23877014618211,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f08967bb9397b7590c5c41f3779e74834fdd66a_4f51fdab-ed16-4e14-ad09-c7e81d6d7d93.webp?v=1714720456"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f08967bb9397b7590c5c41f3779e74834fdd66a_4f51fdab-ed16-4e14-ad09-c7e81d6d7d93.webp?v=1714720456","width":2000},{"alt":null,"id":23877015208035,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/880f72213815b8223f49943674e7b8eed25a1539_a327b433-49ab-42e7-9a0e-c17b345a20e0.webp?v=1714720459"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/880f72213815b8223f49943674e7b8eed25a1539_a327b433-49ab-42e7-9a0e-c17b345a20e0.webp?v=1714720459","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41884762308707,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB34","requires_shipping":true,"taxable":true,"featured_image":{"id":31472097034339,"product_id":7408372318307,"position":6,"created_at":"2024-05-03T15:14:06+08:00","updated_at":"2024-05-03T15:14:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b317fb4eb447a196cc88fee4641766a743e99d4_b2010823-4118-467a-939e-62056bda4115.webp?v=1714720446","variant_ids":[41884762308707]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2 \u0026 C3PO-塗鴉藝術 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-PB34","featured_media":{"alt":null,"id":23877012422755,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b317fb4eb447a196cc88fee4641766a743e99d4_b2010823-4118-467a-939e-62056bda4115.webp?v=1714720446"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41884762308707,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB34","requires_shipping":true,"taxable":true,"featured_image":{"id":31472097034339,"product_id":7408372318307,"position":6,"created_at":"2024-05-03T15:14:06+08:00","updated_at":"2024-05-03T15:14:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b317fb4eb447a196cc88fee4641766a743e99d4_b2010823-4118-467a-939e-62056bda4115.webp?v=1714720446","variant_ids":[41884762308707]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2 \u0026 C3PO-塗鴉藝術 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118424-PB34","featured_media":{"alt":null,"id":23877012422755,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b317fb4eb447a196cc88fee4641766a743e99d4_b2010823-4118-467a-939e-62056bda4115.webp?v=1714720446"}},"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: "停產" }