$product = {"id":7415048765539,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 柴語錄 Shiba Says - 放我出去♥","handle":"iphone-12-mini-mod-nx-magsafe-printable-fz04","description":null,"published_at":"2024-06-11T17:56:35+08:00","created_at":"2024-05-05T20:13:10+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區柴語錄 Shiba Says","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-shiba-says","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-shiba-says","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":41911324147811,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-FZ04","requires_shipping":true,"taxable":true,"featured_image":{"id":31488020447331,"product_id":7415048765539,"position":4,"created_at":"2024-05-05T20:13:20+08:00","updated_at":"2024-05-05T20:13:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d77f617a78a3aa85634a56d069d60e9214c43cf6_fa2fc2f5-2722-4ca2-9b94-5b6faf8f74a4.webp?v=1714911200","variant_ids":[41911324147811]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 柴語錄 Shiba Says - 放我出去♥ - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-FZ04","featured_media":{"alt":null,"id":23893364801635,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d77f617a78a3aa85634a56d069d60e9214c43cf6_fa2fc2f5-2722-4ca2-9b94-5b6faf8f74a4.webp?v=1714911200"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f04b119d9bad26a7cb556eabeb60dbc2bc423ad4_aca228a1-2d60-4d21-9125-4aae3e2fa068.webp?v=1714911193","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e12e1a996c789ded53a00afabe29758d835e34a_f58aa178-a9a5-41c4-b4a6-c44297cf1dbb.webp?v=1714911196","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cef986a3550d83eb5299e1907ec211f5f2c6ce8c_1dab2fb0-746f-4f67-b88f-000ef576db20.webp?v=1714911198","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d77f617a78a3aa85634a56d069d60e9214c43cf6_fa2fc2f5-2722-4ca2-9b94-5b6faf8f74a4.webp?v=1714911200","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22101921f25ce32ca757d8488cf0d5d1edd380fe_51c3d6b4-2d28-44c7-9387-c4d9dee95df9.webp?v=1714911203","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e401c91166329ca4a76441baca112d0e4163152_fc3da9f0-8a61-458f-adf7-b79331bd979c.webp?v=1714911205","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/834e82e8df228526df7895b4c5a8617238ab6498_91d82ba0-02ce-4b2a-9cc0-9ece711c8089.webp?v=1714911207","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e309496b7aa17abb9df1acf524044a4e6c21b57_1e8b1b16-5399-48d5-ae29-7c4a3fa90813.webp?v=1714911209","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/61ff50f26dd52a1ee704c2d81bfd1497d856d6fe_2b9be18c-b20b-47fc-8abe-2904ef90edb1.webp?v=1714911212","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5f970eccfce531e5d9f5a54cb8680de66d1d6f1_34ab6d29-358d-460a-8834-1b1bfc361143.webp?v=1714911214","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d6c9bd3c09f1a3267d09b3a6df18b0dff38f5b0_1f5d81c7-fd2b-4349-937d-1df1e812b5b6.webp?v=1714911216"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f04b119d9bad26a7cb556eabeb60dbc2bc423ad4_aca228a1-2d60-4d21-9125-4aae3e2fa068.webp?v=1714911193","options":["color"],"media":[{"alt":null,"id":23893363490915,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f04b119d9bad26a7cb556eabeb60dbc2bc423ad4_aca228a1-2d60-4d21-9125-4aae3e2fa068.webp?v=1714911193"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f04b119d9bad26a7cb556eabeb60dbc2bc423ad4_aca228a1-2d60-4d21-9125-4aae3e2fa068.webp?v=1714911193","width":2000},{"alt":null,"id":23893363916899,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e12e1a996c789ded53a00afabe29758d835e34a_f58aa178-a9a5-41c4-b4a6-c44297cf1dbb.webp?v=1714911196"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e12e1a996c789ded53a00afabe29758d835e34a_f58aa178-a9a5-41c4-b4a6-c44297cf1dbb.webp?v=1714911196","width":2000},{"alt":null,"id":23893364375651,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cef986a3550d83eb5299e1907ec211f5f2c6ce8c_1dab2fb0-746f-4f67-b88f-000ef576db20.webp?v=1714911198"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cef986a3550d83eb5299e1907ec211f5f2c6ce8c_1dab2fb0-746f-4f67-b88f-000ef576db20.webp?v=1714911198","width":2000},{"alt":null,"id":23893364801635,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d77f617a78a3aa85634a56d069d60e9214c43cf6_fa2fc2f5-2722-4ca2-9b94-5b6faf8f74a4.webp?v=1714911200"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d77f617a78a3aa85634a56d069d60e9214c43cf6_fa2fc2f5-2722-4ca2-9b94-5b6faf8f74a4.webp?v=1714911200","width":2000},{"alt":null,"id":23893365129315,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22101921f25ce32ca757d8488cf0d5d1edd380fe_51c3d6b4-2d28-44c7-9387-c4d9dee95df9.webp?v=1714911203"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22101921f25ce32ca757d8488cf0d5d1edd380fe_51c3d6b4-2d28-44c7-9387-c4d9dee95df9.webp?v=1714911203","width":2000},{"alt":null,"id":23893365588067,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e401c91166329ca4a76441baca112d0e4163152_fc3da9f0-8a61-458f-adf7-b79331bd979c.webp?v=1714911205"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e401c91166329ca4a76441baca112d0e4163152_fc3da9f0-8a61-458f-adf7-b79331bd979c.webp?v=1714911205","width":2000},{"alt":null,"id":23893366407267,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/834e82e8df228526df7895b4c5a8617238ab6498_91d82ba0-02ce-4b2a-9cc0-9ece711c8089.webp?v=1714911207"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/834e82e8df228526df7895b4c5a8617238ab6498_91d82ba0-02ce-4b2a-9cc0-9ece711c8089.webp?v=1714911207","width":2000},{"alt":null,"id":23893366833251,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e309496b7aa17abb9df1acf524044a4e6c21b57_1e8b1b16-5399-48d5-ae29-7c4a3fa90813.webp?v=1714911209"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e309496b7aa17abb9df1acf524044a4e6c21b57_1e8b1b16-5399-48d5-ae29-7c4a3fa90813.webp?v=1714911209","width":2000},{"alt":null,"id":23893367292003,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/61ff50f26dd52a1ee704c2d81bfd1497d856d6fe_2b9be18c-b20b-47fc-8abe-2904ef90edb1.webp?v=1714911212"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/61ff50f26dd52a1ee704c2d81bfd1497d856d6fe_2b9be18c-b20b-47fc-8abe-2904ef90edb1.webp?v=1714911212","width":2000},{"alt":null,"id":23893367750755,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5f970eccfce531e5d9f5a54cb8680de66d1d6f1_34ab6d29-358d-460a-8834-1b1bfc361143.webp?v=1714911214"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5f970eccfce531e5d9f5a54cb8680de66d1d6f1_34ab6d29-358d-460a-8834-1b1bfc361143.webp?v=1714911214","width":2000},{"alt":null,"id":23893368569955,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d6c9bd3c09f1a3267d09b3a6df18b0dff38f5b0_1f5d81c7-fd2b-4349-937d-1df1e812b5b6.webp?v=1714911216"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d6c9bd3c09f1a3267d09b3a6df18b0dff38f5b0_1f5d81c7-fd2b-4349-937d-1df1e812b5b6.webp?v=1714911216","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911324147811,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-FZ04","requires_shipping":true,"taxable":true,"featured_image":{"id":31488020447331,"product_id":7415048765539,"position":4,"created_at":"2024-05-05T20:13:20+08:00","updated_at":"2024-05-05T20:13:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d77f617a78a3aa85634a56d069d60e9214c43cf6_fa2fc2f5-2722-4ca2-9b94-5b6faf8f74a4.webp?v=1714911200","variant_ids":[41911324147811]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 柴語錄 Shiba Says - 放我出去♥ - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-FZ04","featured_media":{"alt":null,"id":23893364801635,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d77f617a78a3aa85634a56d069d60e9214c43cf6_fa2fc2f5-2722-4ca2-9b94-5b6faf8f74a4.webp?v=1714911200"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911324147811,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-FZ04","requires_shipping":true,"taxable":true,"featured_image":{"id":31488020447331,"product_id":7415048765539,"position":4,"created_at":"2024-05-05T20:13:20+08:00","updated_at":"2024-05-05T20:13:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d77f617a78a3aa85634a56d069d60e9214c43cf6_fa2fc2f5-2722-4ca2-9b94-5b6faf8f74a4.webp?v=1714911200","variant_ids":[41911324147811]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 柴語錄 Shiba Says - 放我出去♥ - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-FZ04","featured_media":{"alt":null,"id":23893364801635,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d77f617a78a3aa85634a56d069d60e9214c43cf6_fa2fc2f5-2722-4ca2-9b94-5b6faf8f74a4.webp?v=1714911200"}},"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: "停產" }