$product = {"id":7416016732259,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max The Powerpuff Girls - 貼紙款","handle":"iphone-xs-max-mod-nx-printable-sr08","description":null,"published_at":"2024-06-11T16:50:30+08:00","created_at":"2024-05-06T12:42:54+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-The Powerpuff Girls","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-the-power-puff-girls","device-iPhone XS Max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-the-power-puff-girls","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":41916546351203,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SR08","requires_shipping":true,"taxable":true,"featured_image":{"id":31490994569315,"product_id":7416016732259,"position":1,"created_at":"2024-05-06T12:42:57+08:00","updated_at":"2024-05-06T12:42:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbfec9a1d4458b99b74eb2cf75a83e999079dd72_4add947e-a8dc-4ca7-9cb6-ba5f88ff44f7.webp?v=1714970577","variant_ids":[41916546351203]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max The Powerpuff Girls - 貼紙款 - 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":"NPB0108624-SR08","featured_media":{"alt":null,"id":23896401805411,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbfec9a1d4458b99b74eb2cf75a83e999079dd72_4add947e-a8dc-4ca7-9cb6-ba5f88ff44f7.webp?v=1714970577"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbfec9a1d4458b99b74eb2cf75a83e999079dd72_4add947e-a8dc-4ca7-9cb6-ba5f88ff44f7.webp?v=1714970577","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83f8c361656066ed314854eb7ea9c51881437a59_4292490f-f81d-424b-b72b-3919c7c8fc0f.webp?v=1714970579","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2d77d94f6822a02ca9f1a2e72d75bf3ccdd4db6_476dc84d-4e33-45df-81a5-86f42c0c26b4.webp?v=1714970582","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8df1322d9309a99062514879faace91c32b3f6da_d043e0bc-b44d-42e3-91cf-706eb1686acf.webp?v=1714970584","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/48b7e41137ad627ff9e1629b533510c04e499f84_703bebcd-28c9-48b1-be4c-462b87a14052.webp?v=1714970587","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1591dfc8bfba9e2a51a01753819ee01c8f14ba3_7b5e192e-cebb-4304-b567-e8d855c4e6eb.webp?v=1714970589","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f500875c69312e368e7d8953680283551a461888_5c0214f0-6d82-44e1-8356-c9e2c004ad67.webp?v=1714970592","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26567f64e6c0d3e1cb437279b4271fd0d6eb5c34_2ca49259-c1b9-49ec-a15e-56a298e8dbba.webp?v=1714970594","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58fcc791a29e689e16b3de4a3f94cd0ae66c152a_a23ed31c-b053-4f0e-9c2c-db9147781daa.webp?v=1714970597","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/140d330d790decc8e203961c1c0838a724054141_adc5b3cd-d8e7-4d87-9c60-136d3f8707f8.webp?v=1714970599"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbfec9a1d4458b99b74eb2cf75a83e999079dd72_4add947e-a8dc-4ca7-9cb6-ba5f88ff44f7.webp?v=1714970577","options":["color"],"media":[{"alt":null,"id":23896401805411,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbfec9a1d4458b99b74eb2cf75a83e999079dd72_4add947e-a8dc-4ca7-9cb6-ba5f88ff44f7.webp?v=1714970577"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbfec9a1d4458b99b74eb2cf75a83e999079dd72_4add947e-a8dc-4ca7-9cb6-ba5f88ff44f7.webp?v=1714970577","width":2000},{"alt":null,"id":23896402264163,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83f8c361656066ed314854eb7ea9c51881437a59_4292490f-f81d-424b-b72b-3919c7c8fc0f.webp?v=1714970579"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83f8c361656066ed314854eb7ea9c51881437a59_4292490f-f81d-424b-b72b-3919c7c8fc0f.webp?v=1714970579","width":2000},{"alt":null,"id":23896402657379,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2d77d94f6822a02ca9f1a2e72d75bf3ccdd4db6_476dc84d-4e33-45df-81a5-86f42c0c26b4.webp?v=1714970582"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2d77d94f6822a02ca9f1a2e72d75bf3ccdd4db6_476dc84d-4e33-45df-81a5-86f42c0c26b4.webp?v=1714970582","width":2000},{"alt":null,"id":23896403607651,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8df1322d9309a99062514879faace91c32b3f6da_d043e0bc-b44d-42e3-91cf-706eb1686acf.webp?v=1714970584"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8df1322d9309a99062514879faace91c32b3f6da_d043e0bc-b44d-42e3-91cf-706eb1686acf.webp?v=1714970584","width":2000},{"alt":null,"id":23896404000867,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/48b7e41137ad627ff9e1629b533510c04e499f84_703bebcd-28c9-48b1-be4c-462b87a14052.webp?v=1714970587"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/48b7e41137ad627ff9e1629b533510c04e499f84_703bebcd-28c9-48b1-be4c-462b87a14052.webp?v=1714970587","width":2000},{"alt":null,"id":23896404721763,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1591dfc8bfba9e2a51a01753819ee01c8f14ba3_7b5e192e-cebb-4304-b567-e8d855c4e6eb.webp?v=1714970589"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d1591dfc8bfba9e2a51a01753819ee01c8f14ba3_7b5e192e-cebb-4304-b567-e8d855c4e6eb.webp?v=1714970589","width":2000},{"alt":null,"id":23896405082211,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f500875c69312e368e7d8953680283551a461888_5c0214f0-6d82-44e1-8356-c9e2c004ad67.webp?v=1714970592"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f500875c69312e368e7d8953680283551a461888_5c0214f0-6d82-44e1-8356-c9e2c004ad67.webp?v=1714970592","width":2000},{"alt":null,"id":23896405934179,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26567f64e6c0d3e1cb437279b4271fd0d6eb5c34_2ca49259-c1b9-49ec-a15e-56a298e8dbba.webp?v=1714970594"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26567f64e6c0d3e1cb437279b4271fd0d6eb5c34_2ca49259-c1b9-49ec-a15e-56a298e8dbba.webp?v=1714970594","width":2000},{"alt":null,"id":23896406425699,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58fcc791a29e689e16b3de4a3f94cd0ae66c152a_a23ed31c-b053-4f0e-9c2c-db9147781daa.webp?v=1714970597"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/58fcc791a29e689e16b3de4a3f94cd0ae66c152a_a23ed31c-b053-4f0e-9c2c-db9147781daa.webp?v=1714970597","width":2000},{"alt":null,"id":23896406949987,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/140d330d790decc8e203961c1c0838a724054141_adc5b3cd-d8e7-4d87-9c60-136d3f8707f8.webp?v=1714970599"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/140d330d790decc8e203961c1c0838a724054141_adc5b3cd-d8e7-4d87-9c60-136d3f8707f8.webp?v=1714970599","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41916546351203,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SR08","requires_shipping":true,"taxable":true,"featured_image":{"id":31490994569315,"product_id":7416016732259,"position":1,"created_at":"2024-05-06T12:42:57+08:00","updated_at":"2024-05-06T12:42:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbfec9a1d4458b99b74eb2cf75a83e999079dd72_4add947e-a8dc-4ca7-9cb6-ba5f88ff44f7.webp?v=1714970577","variant_ids":[41916546351203]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max The Powerpuff Girls - 貼紙款 - 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":"NPB0108624-SR08","featured_media":{"alt":null,"id":23896401805411,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbfec9a1d4458b99b74eb2cf75a83e999079dd72_4add947e-a8dc-4ca7-9cb6-ba5f88ff44f7.webp?v=1714970577"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41916546351203,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SR08","requires_shipping":true,"taxable":true,"featured_image":{"id":31490994569315,"product_id":7416016732259,"position":1,"created_at":"2024-05-06T12:42:57+08:00","updated_at":"2024-05-06T12:42:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbfec9a1d4458b99b74eb2cf75a83e999079dd72_4add947e-a8dc-4ca7-9cb6-ba5f88ff44f7.webp?v=1714970577","variant_ids":[41916546351203]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max The Powerpuff Girls - 貼紙款 - 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":"NPB0108624-SR08","featured_media":{"alt":null,"id":23896401805411,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cbfec9a1d4458b99b74eb2cf75a83e999079dd72_4add947e-a8dc-4ca7-9cb6-ba5f88ff44f7.webp?v=1714970577"}},"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: "停產" }