$product = {"id":7415057842275,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 史迪奇 - 夏威夷系列-線稿","handle":"iphone-12-mini-mod-nx-magsafe-printable-yf03","description":null,"published_at":"2024-06-11T17:56:50+08:00","created_at":"2024-05-05T20:14:41+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區史迪奇","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-stitch","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-stitch","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":41911415341155,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YF03","requires_shipping":true,"taxable":true,"featured_image":{"id":31488043188323,"product_id":7415057842275,"position":8,"created_at":"2024-05-05T20:14:59+08:00","updated_at":"2024-05-05T20:14:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22d2a0be0995bd63d53adba325636f78c1b856cc_f2e9df86-5d0d-4e26-9450-7998b830852b.webp?v=1714911299","variant_ids":[41911415341155]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 史迪奇 - 夏威夷系列-線稿 - 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-YF03","featured_media":{"alt":null,"id":23893387608163,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22d2a0be0995bd63d53adba325636f78c1b856cc_f2e9df86-5d0d-4e26-9450-7998b830852b.webp?v=1714911299"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de77ad7dfd65357eb6607c9aab5b8bb917f1e4ee_59bb802c-babc-403c-91fb-5b5da6ab35f8.webp?v=1714911283","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0717cbabb50bd5e42ab8514fa24f25cf0ac1251b_b795d1c7-16c6-465e-be48-86f7cf80f3c5.webp?v=1714911285","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f67e50ccd6b7559fd77b80c1baaa26660457ffa2_8cc2963b-3759-4058-a40c-399468664393.webp?v=1714911288","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3376651cac1e3f8af0a9dd1a6d1c3585e54f4318_66843717-ad76-4dc5-a915-b28f940de5ce.webp?v=1714911290","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c578d306ac17b569ff6570f00628b097969fcbfa_5f1f04b1-02b0-4df8-b523-78bd1cc89c5b.webp?v=1714911292","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/028ac2deb4f6357e0ef1068a73f505d0b891c36d_9a33c385-b614-4d9b-9a0c-c030185cf4a7.webp?v=1714911295","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b60a1aad5bc3c8fd96b4e42d5e5c695d39739c77_f95bbe2b-7833-4cd6-876b-3c36bd477989.webp?v=1714911297","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22d2a0be0995bd63d53adba325636f78c1b856cc_f2e9df86-5d0d-4e26-9450-7998b830852b.webp?v=1714911299","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f041aac98b3056f775e16d3ced734967313ce47_fae1be5a-f456-4c09-af54-0e9544b38f6d.webp?v=1714911302","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f847e9020a72b5792f28b1bf070be20d55dec395_d7294b99-0853-4141-aa9c-257ab8cb12d1.webp?v=1714911304","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/495772822b654412910e6683fbdecaf091dfae1d_170c6881-055d-4854-8ca7-1d8b8108601f.webp?v=1714911306"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de77ad7dfd65357eb6607c9aab5b8bb917f1e4ee_59bb802c-babc-403c-91fb-5b5da6ab35f8.webp?v=1714911283","options":["color"],"media":[{"alt":null,"id":23893383479395,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de77ad7dfd65357eb6607c9aab5b8bb917f1e4ee_59bb802c-babc-403c-91fb-5b5da6ab35f8.webp?v=1714911283"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de77ad7dfd65357eb6607c9aab5b8bb917f1e4ee_59bb802c-babc-403c-91fb-5b5da6ab35f8.webp?v=1714911283","width":2000},{"alt":null,"id":23893383905379,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0717cbabb50bd5e42ab8514fa24f25cf0ac1251b_b795d1c7-16c6-465e-be48-86f7cf80f3c5.webp?v=1714911285"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0717cbabb50bd5e42ab8514fa24f25cf0ac1251b_b795d1c7-16c6-465e-be48-86f7cf80f3c5.webp?v=1714911285","width":2000},{"alt":null,"id":23893384790115,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f67e50ccd6b7559fd77b80c1baaa26660457ffa2_8cc2963b-3759-4058-a40c-399468664393.webp?v=1714911288"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f67e50ccd6b7559fd77b80c1baaa26660457ffa2_8cc2963b-3759-4058-a40c-399468664393.webp?v=1714911288","width":2000},{"alt":null,"id":23893385248867,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3376651cac1e3f8af0a9dd1a6d1c3585e54f4318_66843717-ad76-4dc5-a915-b28f940de5ce.webp?v=1714911290"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3376651cac1e3f8af0a9dd1a6d1c3585e54f4318_66843717-ad76-4dc5-a915-b28f940de5ce.webp?v=1714911290","width":2000},{"alt":null,"id":23893385773155,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c578d306ac17b569ff6570f00628b097969fcbfa_5f1f04b1-02b0-4df8-b523-78bd1cc89c5b.webp?v=1714911292"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c578d306ac17b569ff6570f00628b097969fcbfa_5f1f04b1-02b0-4df8-b523-78bd1cc89c5b.webp?v=1714911292","width":2000},{"alt":null,"id":23893386330211,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/028ac2deb4f6357e0ef1068a73f505d0b891c36d_9a33c385-b614-4d9b-9a0c-c030185cf4a7.webp?v=1714911295"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/028ac2deb4f6357e0ef1068a73f505d0b891c36d_9a33c385-b614-4d9b-9a0c-c030185cf4a7.webp?v=1714911295","width":2000},{"alt":null,"id":23893387083875,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b60a1aad5bc3c8fd96b4e42d5e5c695d39739c77_f95bbe2b-7833-4cd6-876b-3c36bd477989.webp?v=1714911297"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b60a1aad5bc3c8fd96b4e42d5e5c695d39739c77_f95bbe2b-7833-4cd6-876b-3c36bd477989.webp?v=1714911297","width":2000},{"alt":null,"id":23893387608163,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22d2a0be0995bd63d53adba325636f78c1b856cc_f2e9df86-5d0d-4e26-9450-7998b830852b.webp?v=1714911299"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22d2a0be0995bd63d53adba325636f78c1b856cc_f2e9df86-5d0d-4e26-9450-7998b830852b.webp?v=1714911299","width":2000},{"alt":null,"id":23893388099683,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f041aac98b3056f775e16d3ced734967313ce47_fae1be5a-f456-4c09-af54-0e9544b38f6d.webp?v=1714911302"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f041aac98b3056f775e16d3ced734967313ce47_fae1be5a-f456-4c09-af54-0e9544b38f6d.webp?v=1714911302","width":2000},{"alt":null,"id":23893388984419,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f847e9020a72b5792f28b1bf070be20d55dec395_d7294b99-0853-4141-aa9c-257ab8cb12d1.webp?v=1714911304"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f847e9020a72b5792f28b1bf070be20d55dec395_d7294b99-0853-4141-aa9c-257ab8cb12d1.webp?v=1714911304","width":2000},{"alt":null,"id":23893389443171,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/495772822b654412910e6683fbdecaf091dfae1d_170c6881-055d-4854-8ca7-1d8b8108601f.webp?v=1714911306"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/495772822b654412910e6683fbdecaf091dfae1d_170c6881-055d-4854-8ca7-1d8b8108601f.webp?v=1714911306","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911415341155,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YF03","requires_shipping":true,"taxable":true,"featured_image":{"id":31488043188323,"product_id":7415057842275,"position":8,"created_at":"2024-05-05T20:14:59+08:00","updated_at":"2024-05-05T20:14:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22d2a0be0995bd63d53adba325636f78c1b856cc_f2e9df86-5d0d-4e26-9450-7998b830852b.webp?v=1714911299","variant_ids":[41911415341155]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 史迪奇 - 夏威夷系列-線稿 - 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-YF03","featured_media":{"alt":null,"id":23893387608163,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22d2a0be0995bd63d53adba325636f78c1b856cc_f2e9df86-5d0d-4e26-9450-7998b830852b.webp?v=1714911299"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911415341155,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-YF03","requires_shipping":true,"taxable":true,"featured_image":{"id":31488043188323,"product_id":7415057842275,"position":8,"created_at":"2024-05-05T20:14:59+08:00","updated_at":"2024-05-05T20:14:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22d2a0be0995bd63d53adba325636f78c1b856cc_f2e9df86-5d0d-4e26-9450-7998b830852b.webp?v=1714911299","variant_ids":[41911415341155]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 史迪奇 - 夏威夷系列-線稿 - 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-YF03","featured_media":{"alt":null,"id":23893387608163,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22d2a0be0995bd63d53adba325636f78c1b856cc_f2e9df86-5d0d-4e26-9450-7998b830852b.webp?v=1714911299"}},"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: "停產" }