$product = {"id":7369180151907,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Snoopy 史努比 - 冰淇淋甜筒","handle":"iphone-12-mini-mod-nx-printable-pl59","description":null,"published_at":"2024-06-11T16:13:56+08:00","created_at":"2024-04-23T15:39:13+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Snoopy 史努比","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-snoopy","device-iPhone 12 mini","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-snoopy","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":41793340964963,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PL59","requires_shipping":true,"taxable":true,"featured_image":{"id":31386999980131,"product_id":7369180151907,"position":10,"created_at":"2024-04-23T15:39:36+08:00","updated_at":"2024-04-23T15:39:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1adceb5027d82e9861c67fc830e8a6903e6b315_d7a56f75-4696-4838-8b13-ef1c594ea0e0.webp?v=1713857976","variant_ids":[41793340964963]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Snoopy 史努比 - 冰淇淋甜筒 - 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-PL59","featured_media":{"alt":null,"id":23789238550627,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1adceb5027d82e9861c67fc830e8a6903e6b315_d7a56f75-4696-4838-8b13-ef1c594ea0e0.webp?v=1713857976"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81495e21c903636b09f6e250c4627c941f90e7d8_f089a83a-5370-4084-a534-226f7028a6e0.webp?v=1713857955","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/305bb06a976a29a0f8164aa340fa3bccf3b2ee59_5844cbd0-8ac8-462d-bdd4-cecf0347776f.webp?v=1713857958","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9dde7211750b2cf16d3b4a1b6457035d91a9ba6b_3a1b4896-9d4f-4331-b8f0-fdeb1b88df51.webp?v=1713857960","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5b013853bb78415e0939d1a83d9df2639369d93_1fd892f6-e396-4466-96da-aee87b9725e1.webp?v=1713857962","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2925b8533931f0d0588e8bf56ab3563de0f72a3e_84073ac1-11fa-4821-9ead-cb6062facb7c.webp?v=1713857965","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/485ed1f9bdb7a02a834d9c3a8a546a3543bc28d5_b9784b1f-1b9d-48a9-8be6-ecba1473e159.webp?v=1713857967","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcc03155e8fcc4d7bbbe9dd608c0aea78e819f65_f2d41d80-040a-41de-820b-3487af8264d5.webp?v=1713857969","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/536b56bd64d5e4e89851dbacf51d266dcba5994a_f8e1a021-c8dc-4319-b502-9168d9800e66.webp?v=1713857972","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d57d833e46891e02a8cc6e1990af1606ec584553_4180233d-8e3e-4e66-a8ef-532cc6a5abd9.webp?v=1713857974","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1adceb5027d82e9861c67fc830e8a6903e6b315_d7a56f75-4696-4838-8b13-ef1c594ea0e0.webp?v=1713857976","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/133c062132fbe46db1e98c124397a946522071c8_299d3fe0-df78-46da-9fe7-73d63f8131f5.webp?v=1713857979"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81495e21c903636b09f6e250c4627c941f90e7d8_f089a83a-5370-4084-a534-226f7028a6e0.webp?v=1713857955","options":["color"],"media":[{"alt":null,"id":23789232881763,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81495e21c903636b09f6e250c4627c941f90e7d8_f089a83a-5370-4084-a534-226f7028a6e0.webp?v=1713857955"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81495e21c903636b09f6e250c4627c941f90e7d8_f089a83a-5370-4084-a534-226f7028a6e0.webp?v=1713857955","width":2000},{"alt":null,"id":23789233602659,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/305bb06a976a29a0f8164aa340fa3bccf3b2ee59_5844cbd0-8ac8-462d-bdd4-cecf0347776f.webp?v=1713857958"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/305bb06a976a29a0f8164aa340fa3bccf3b2ee59_5844cbd0-8ac8-462d-bdd4-cecf0347776f.webp?v=1713857958","width":2000},{"alt":null,"id":23789234094179,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9dde7211750b2cf16d3b4a1b6457035d91a9ba6b_3a1b4896-9d4f-4331-b8f0-fdeb1b88df51.webp?v=1713857960"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9dde7211750b2cf16d3b4a1b6457035d91a9ba6b_3a1b4896-9d4f-4331-b8f0-fdeb1b88df51.webp?v=1713857960","width":2000},{"alt":null,"id":23789234847843,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5b013853bb78415e0939d1a83d9df2639369d93_1fd892f6-e396-4466-96da-aee87b9725e1.webp?v=1713857962"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5b013853bb78415e0939d1a83d9df2639369d93_1fd892f6-e396-4466-96da-aee87b9725e1.webp?v=1713857962","width":2000},{"alt":null,"id":23789235470435,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2925b8533931f0d0588e8bf56ab3563de0f72a3e_84073ac1-11fa-4821-9ead-cb6062facb7c.webp?v=1713857965"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2925b8533931f0d0588e8bf56ab3563de0f72a3e_84073ac1-11fa-4821-9ead-cb6062facb7c.webp?v=1713857965","width":2000},{"alt":null,"id":23789236027491,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/485ed1f9bdb7a02a834d9c3a8a546a3543bc28d5_b9784b1f-1b9d-48a9-8be6-ecba1473e159.webp?v=1713857967"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/485ed1f9bdb7a02a834d9c3a8a546a3543bc28d5_b9784b1f-1b9d-48a9-8be6-ecba1473e159.webp?v=1713857967","width":2000},{"alt":null,"id":23789236584547,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcc03155e8fcc4d7bbbe9dd608c0aea78e819f65_f2d41d80-040a-41de-820b-3487af8264d5.webp?v=1713857969"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcc03155e8fcc4d7bbbe9dd608c0aea78e819f65_f2d41d80-040a-41de-820b-3487af8264d5.webp?v=1713857969","width":2000},{"alt":null,"id":23789237338211,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/536b56bd64d5e4e89851dbacf51d266dcba5994a_f8e1a021-c8dc-4319-b502-9168d9800e66.webp?v=1713857972"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/536b56bd64d5e4e89851dbacf51d266dcba5994a_f8e1a021-c8dc-4319-b502-9168d9800e66.webp?v=1713857972","width":2000},{"alt":null,"id":23789237764195,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d57d833e46891e02a8cc6e1990af1606ec584553_4180233d-8e3e-4e66-a8ef-532cc6a5abd9.webp?v=1713857974"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d57d833e46891e02a8cc6e1990af1606ec584553_4180233d-8e3e-4e66-a8ef-532cc6a5abd9.webp?v=1713857974","width":2000},{"alt":null,"id":23789238550627,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1adceb5027d82e9861c67fc830e8a6903e6b315_d7a56f75-4696-4838-8b13-ef1c594ea0e0.webp?v=1713857976"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1adceb5027d82e9861c67fc830e8a6903e6b315_d7a56f75-4696-4838-8b13-ef1c594ea0e0.webp?v=1713857976","width":2000},{"alt":null,"id":23789239205987,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/133c062132fbe46db1e98c124397a946522071c8_299d3fe0-df78-46da-9fe7-73d63f8131f5.webp?v=1713857979"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/133c062132fbe46db1e98c124397a946522071c8_299d3fe0-df78-46da-9fe7-73d63f8131f5.webp?v=1713857979","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41793340964963,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PL59","requires_shipping":true,"taxable":true,"featured_image":{"id":31386999980131,"product_id":7369180151907,"position":10,"created_at":"2024-04-23T15:39:36+08:00","updated_at":"2024-04-23T15:39:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1adceb5027d82e9861c67fc830e8a6903e6b315_d7a56f75-4696-4838-8b13-ef1c594ea0e0.webp?v=1713857976","variant_ids":[41793340964963]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Snoopy 史努比 - 冰淇淋甜筒 - 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-PL59","featured_media":{"alt":null,"id":23789238550627,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1adceb5027d82e9861c67fc830e8a6903e6b315_d7a56f75-4696-4838-8b13-ef1c594ea0e0.webp?v=1713857976"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41793340964963,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PL59","requires_shipping":true,"taxable":true,"featured_image":{"id":31386999980131,"product_id":7369180151907,"position":10,"created_at":"2024-04-23T15:39:36+08:00","updated_at":"2024-04-23T15:39:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1adceb5027d82e9861c67fc830e8a6903e6b315_d7a56f75-4696-4838-8b13-ef1c594ea0e0.webp?v=1713857976","variant_ids":[41793340964963]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Snoopy 史努比 - 冰淇淋甜筒 - 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-PL59","featured_media":{"alt":null,"id":23789238550627,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1adceb5027d82e9861c67fc830e8a6903e6b315_d7a56f75-4696-4838-8b13-ef1c594ea0e0.webp?v=1713857976"}},"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: "停產" }