$product = {"id":7408483500131,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-剪紙系列","handle":"iphone-12-mini-mod-nx-printable-pb56","description":null,"published_at":"2024-06-11T16:38:30+08:00","created_at":"2024-05-03T15:35:32+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":41885997891683,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB56","requires_shipping":true,"taxable":true,"featured_image":{"id":31472391749731,"product_id":7408483500131,"position":3,"created_at":"2024-05-03T15:35:39+08:00","updated_at":"2024-05-03T15:35:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ddb4ad0cfe6879e90d9db462f37b9e705e26f9ef_a1c94e2a-cb21-49ef-9828-ff0354808776.webp?v=1714721739","variant_ids":[41885997891683]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-剪紙系列 - 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-PB56","featured_media":{"alt":null,"id":23877308678243,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ddb4ad0cfe6879e90d9db462f37b9e705e26f9ef_a1c94e2a-cb21-49ef-9828-ff0354808776.webp?v=1714721739"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/61d0bbe3c329d323955b6350c496b09a910eb7dc_4a4b9c5e-1d03-4211-be5a-20a2a9a95b0e.webp?v=1714721735","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8afc9428bc5a35c5b771f52be54253f460e39fc5_b3efa339-4a53-490c-b947-54546d0c65b3.webp?v=1714721737","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ddb4ad0cfe6879e90d9db462f37b9e705e26f9ef_a1c94e2a-cb21-49ef-9828-ff0354808776.webp?v=1714721739","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8034c8744020a731dc084b2d6e05cbfc5f0192bb_4e3a2e43-ce43-4caf-bbc8-c7e55a4ab7e1.webp?v=1714721742","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/631b1ee36100cf3291d60348323415e913a74caf_cb871000-414b-4fe6-98fc-d64fd0511101.webp?v=1714721744","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc1e5165fca89b35958ae52b1c4461e9f7b331f2_28069af3-d07b-4d56-9b5c-5fce5efa0995.webp?v=1714721746","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2c4189ba3b3940d18a9d15b09cc36fd75db122f_31365049-c340-4ed0-9489-4af9defe5ad6.webp?v=1714721749","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/413b62d956d6ded6891358bb1fbd8730ae7db211_e080f793-ba44-48fe-8336-61308dc91c73.webp?v=1714721751","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/077a956bb31bc0558682c88c93a0585354df22d1_e176e8f4-8c86-4363-8498-9e195494091d.webp?v=1714721754","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f50246c805fc368ddbe4acb1b3d2c0c152bacd6_f55e8469-4767-4b92-96cf-3e01dd0e2d98.webp?v=1714721756","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e68961048082da5673a32e17259975575c9fa4a_e1472e83-ffc1-476c-a0ca-c9fef432b21e.webp?v=1714721759"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/61d0bbe3c329d323955b6350c496b09a910eb7dc_4a4b9c5e-1d03-4211-be5a-20a2a9a95b0e.webp?v=1714721735","options":["color"],"media":[{"alt":null,"id":23877307859043,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/61d0bbe3c329d323955b6350c496b09a910eb7dc_4a4b9c5e-1d03-4211-be5a-20a2a9a95b0e.webp?v=1714721735"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/61d0bbe3c329d323955b6350c496b09a910eb7dc_4a4b9c5e-1d03-4211-be5a-20a2a9a95b0e.webp?v=1714721735","width":2000},{"alt":null,"id":23877308219491,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8afc9428bc5a35c5b771f52be54253f460e39fc5_b3efa339-4a53-490c-b947-54546d0c65b3.webp?v=1714721737"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8afc9428bc5a35c5b771f52be54253f460e39fc5_b3efa339-4a53-490c-b947-54546d0c65b3.webp?v=1714721737","width":2000},{"alt":null,"id":23877308678243,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ddb4ad0cfe6879e90d9db462f37b9e705e26f9ef_a1c94e2a-cb21-49ef-9828-ff0354808776.webp?v=1714721739"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ddb4ad0cfe6879e90d9db462f37b9e705e26f9ef_a1c94e2a-cb21-49ef-9828-ff0354808776.webp?v=1714721739","width":2000},{"alt":null,"id":23877309202531,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8034c8744020a731dc084b2d6e05cbfc5f0192bb_4e3a2e43-ce43-4caf-bbc8-c7e55a4ab7e1.webp?v=1714721742"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8034c8744020a731dc084b2d6e05cbfc5f0192bb_4e3a2e43-ce43-4caf-bbc8-c7e55a4ab7e1.webp?v=1714721742","width":2000},{"alt":null,"id":23877309825123,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/631b1ee36100cf3291d60348323415e913a74caf_cb871000-414b-4fe6-98fc-d64fd0511101.webp?v=1714721744"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/631b1ee36100cf3291d60348323415e913a74caf_cb871000-414b-4fe6-98fc-d64fd0511101.webp?v=1714721744","width":2000},{"alt":null,"id":23877310251107,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc1e5165fca89b35958ae52b1c4461e9f7b331f2_28069af3-d07b-4d56-9b5c-5fce5efa0995.webp?v=1714721746"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc1e5165fca89b35958ae52b1c4461e9f7b331f2_28069af3-d07b-4d56-9b5c-5fce5efa0995.webp?v=1714721746","width":2000},{"alt":null,"id":23877310677091,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2c4189ba3b3940d18a9d15b09cc36fd75db122f_31365049-c340-4ed0-9489-4af9defe5ad6.webp?v=1714721749"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2c4189ba3b3940d18a9d15b09cc36fd75db122f_31365049-c340-4ed0-9489-4af9defe5ad6.webp?v=1714721749","width":2000},{"alt":null,"id":23877311201379,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/413b62d956d6ded6891358bb1fbd8730ae7db211_e080f793-ba44-48fe-8336-61308dc91c73.webp?v=1714721751"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/413b62d956d6ded6891358bb1fbd8730ae7db211_e080f793-ba44-48fe-8336-61308dc91c73.webp?v=1714721751","width":2000},{"alt":null,"id":23877311758435,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/077a956bb31bc0558682c88c93a0585354df22d1_e176e8f4-8c86-4363-8498-9e195494091d.webp?v=1714721754"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/077a956bb31bc0558682c88c93a0585354df22d1_e176e8f4-8c86-4363-8498-9e195494091d.webp?v=1714721754","width":2000},{"alt":null,"id":23877312249955,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f50246c805fc368ddbe4acb1b3d2c0c152bacd6_f55e8469-4767-4b92-96cf-3e01dd0e2d98.webp?v=1714721756"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f50246c805fc368ddbe4acb1b3d2c0c152bacd6_f55e8469-4767-4b92-96cf-3e01dd0e2d98.webp?v=1714721756","width":2000},{"alt":null,"id":23877312708707,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e68961048082da5673a32e17259975575c9fa4a_e1472e83-ffc1-476c-a0ca-c9fef432b21e.webp?v=1714721759"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e68961048082da5673a32e17259975575c9fa4a_e1472e83-ffc1-476c-a0ca-c9fef432b21e.webp?v=1714721759","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885997891683,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB56","requires_shipping":true,"taxable":true,"featured_image":{"id":31472391749731,"product_id":7408483500131,"position":3,"created_at":"2024-05-03T15:35:39+08:00","updated_at":"2024-05-03T15:35:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ddb4ad0cfe6879e90d9db462f37b9e705e26f9ef_a1c94e2a-cb21-49ef-9828-ff0354808776.webp?v=1714721739","variant_ids":[41885997891683]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-剪紙系列 - 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-PB56","featured_media":{"alt":null,"id":23877308678243,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ddb4ad0cfe6879e90d9db462f37b9e705e26f9ef_a1c94e2a-cb21-49ef-9828-ff0354808776.webp?v=1714721739"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885997891683,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB56","requires_shipping":true,"taxable":true,"featured_image":{"id":31472391749731,"product_id":7408483500131,"position":3,"created_at":"2024-05-03T15:35:39+08:00","updated_at":"2024-05-03T15:35:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ddb4ad0cfe6879e90d9db462f37b9e705e26f9ef_a1c94e2a-cb21-49ef-9828-ff0354808776.webp?v=1714721739","variant_ids":[41885997891683]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-剪紙系列 - 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-PB56","featured_media":{"alt":null,"id":23877308678243,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ddb4ad0cfe6879e90d9db462f37b9e705e26f9ef_a1c94e2a-cb21-49ef-9828-ff0354808776.webp?v=1714721739"}},"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: "停產" }