$product = {"id":7416034164835,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 柴語錄 Shiba Says - 超不穩的疊疊樂","handle":"iphone-xs-max-mod-nx-printable-fz05","description":null,"published_at":"2024-06-11T16:50:58+08:00","created_at":"2024-05-06T12:45:57+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-柴語錄 Shiba Says","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-shiba-says","device-iPhone XS Max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-shiba-says","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":41916730703971,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-FZ05","requires_shipping":true,"taxable":true,"featured_image":{"id":31491039985763,"product_id":7416034164835,"position":5,"created_at":"2024-05-06T12:46:09+08:00","updated_at":"2024-05-06T12:46:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ec945bd766fed0e0845320b25cab6217625e7b0_332e7437-9081-47bd-b50e-2e35257ca2ff.webp?v=1714970769","variant_ids":[41916730703971]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 柴語錄 Shiba Says - 超不穩的疊疊樂 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-FZ05","featured_media":{"alt":null,"id":23896447254627,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ec945bd766fed0e0845320b25cab6217625e7b0_332e7437-9081-47bd-b50e-2e35257ca2ff.webp?v=1714970769"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69c04e9d6d3ef775a69a78e6a5a8e2e87c2c1f0e_a4c59c3c-3438-42c0-84b1-2fc0ac463668.webp?v=1714970760","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/560fd0e4f597803d578e126fe464fa9a227163c8_2f5494e1-920c-4123-9e14-fc2589936bab.webp?v=1714970762","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bfbdd540f500b7a794cd243f6247c363e8410eec_39164f3b-90f3-43cc-a914-9fce0b6e042f.webp?v=1714970764","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/91dd82c7bde03dd1ad600db3c6fd1cdc1b493626_24b7824c-ae4f-47c1-945c-53fdf8d087e6.webp?v=1714970766","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ec945bd766fed0e0845320b25cab6217625e7b0_332e7437-9081-47bd-b50e-2e35257ca2ff.webp?v=1714970769","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c0da796a4b57f5640f942e780eb36e89c5d56e80_c7826fdf-9683-4da1-929c-fa10552a1747.webp?v=1714970771","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/822bc414da5ca8fda137f7af3d046555a134e5c1_7ce2349b-2fac-4819-ba5e-1f2cbb99dbbb.webp?v=1714970773","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d41c0038ffc2dcf3779db3f336483f13bdbf2578_08adabdb-973e-4858-93a6-90a06c24d4a3.webp?v=1714970775","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/470bfd308e42ac7f976d4c62e2800d9c95e9e037_c6489c26-7268-4258-8de3-6c4107b779f1.webp?v=1714970779"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69c04e9d6d3ef775a69a78e6a5a8e2e87c2c1f0e_a4c59c3c-3438-42c0-84b1-2fc0ac463668.webp?v=1714970760","options":["color"],"media":[{"alt":null,"id":23896444108899,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69c04e9d6d3ef775a69a78e6a5a8e2e87c2c1f0e_a4c59c3c-3438-42c0-84b1-2fc0ac463668.webp?v=1714970760"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69c04e9d6d3ef775a69a78e6a5a8e2e87c2c1f0e_a4c59c3c-3438-42c0-84b1-2fc0ac463668.webp?v=1714970760","width":2000},{"alt":null,"id":23896444633187,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/560fd0e4f597803d578e126fe464fa9a227163c8_2f5494e1-920c-4123-9e14-fc2589936bab.webp?v=1714970762"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/560fd0e4f597803d578e126fe464fa9a227163c8_2f5494e1-920c-4123-9e14-fc2589936bab.webp?v=1714970762","width":2000},{"alt":null,"id":23896444993635,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bfbdd540f500b7a794cd243f6247c363e8410eec_39164f3b-90f3-43cc-a914-9fce0b6e042f.webp?v=1714970764"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bfbdd540f500b7a794cd243f6247c363e8410eec_39164f3b-90f3-43cc-a914-9fce0b6e042f.webp?v=1714970764","width":2000},{"alt":null,"id":23896446926947,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/91dd82c7bde03dd1ad600db3c6fd1cdc1b493626_24b7824c-ae4f-47c1-945c-53fdf8d087e6.webp?v=1714970766"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/91dd82c7bde03dd1ad600db3c6fd1cdc1b493626_24b7824c-ae4f-47c1-945c-53fdf8d087e6.webp?v=1714970766","width":2000},{"alt":null,"id":23896447254627,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ec945bd766fed0e0845320b25cab6217625e7b0_332e7437-9081-47bd-b50e-2e35257ca2ff.webp?v=1714970769"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ec945bd766fed0e0845320b25cab6217625e7b0_332e7437-9081-47bd-b50e-2e35257ca2ff.webp?v=1714970769","width":2000},{"alt":null,"id":23896447647843,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c0da796a4b57f5640f942e780eb36e89c5d56e80_c7826fdf-9683-4da1-929c-fa10552a1747.webp?v=1714970771"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c0da796a4b57f5640f942e780eb36e89c5d56e80_c7826fdf-9683-4da1-929c-fa10552a1747.webp?v=1714970771","width":2000},{"alt":null,"id":23896448106595,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/822bc414da5ca8fda137f7af3d046555a134e5c1_7ce2349b-2fac-4819-ba5e-1f2cbb99dbbb.webp?v=1714970773"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/822bc414da5ca8fda137f7af3d046555a134e5c1_7ce2349b-2fac-4819-ba5e-1f2cbb99dbbb.webp?v=1714970773","width":2000},{"alt":null,"id":23896448565347,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d41c0038ffc2dcf3779db3f336483f13bdbf2578_08adabdb-973e-4858-93a6-90a06c24d4a3.webp?v=1714970775"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d41c0038ffc2dcf3779db3f336483f13bdbf2578_08adabdb-973e-4858-93a6-90a06c24d4a3.webp?v=1714970775","width":2000},{"alt":null,"id":23896449417315,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/470bfd308e42ac7f976d4c62e2800d9c95e9e037_c6489c26-7268-4258-8de3-6c4107b779f1.webp?v=1714970779"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/470bfd308e42ac7f976d4c62e2800d9c95e9e037_c6489c26-7268-4258-8de3-6c4107b779f1.webp?v=1714970779","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41916730703971,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-FZ05","requires_shipping":true,"taxable":true,"featured_image":{"id":31491039985763,"product_id":7416034164835,"position":5,"created_at":"2024-05-06T12:46:09+08:00","updated_at":"2024-05-06T12:46:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ec945bd766fed0e0845320b25cab6217625e7b0_332e7437-9081-47bd-b50e-2e35257ca2ff.webp?v=1714970769","variant_ids":[41916730703971]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 柴語錄 Shiba Says - 超不穩的疊疊樂 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-FZ05","featured_media":{"alt":null,"id":23896447254627,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ec945bd766fed0e0845320b25cab6217625e7b0_332e7437-9081-47bd-b50e-2e35257ca2ff.webp?v=1714970769"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916730703971,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-FZ05","requires_shipping":true,"taxable":true,"featured_image":{"id":31491039985763,"product_id":7416034164835,"position":5,"created_at":"2024-05-06T12:46:09+08:00","updated_at":"2024-05-06T12:46:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ec945bd766fed0e0845320b25cab6217625e7b0_332e7437-9081-47bd-b50e-2e35257ca2ff.webp?v=1714970769","variant_ids":[41916730703971]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 柴語錄 Shiba Says - 超不穩的疊疊樂 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-FZ05","featured_media":{"alt":null,"id":23896447254627,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ec945bd766fed0e0845320b25cab6217625e7b0_332e7437-9081-47bd-b50e-2e35257ca2ff.webp?v=1714970769"}},"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: "停產" }