$product = {"id":7407826010211,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-全白設計","handle":"iphone-14-plus-mod-nx-printable-pb103","description":null,"published_at":"2024-06-11T16:23:54+08:00","created_at":"2024-05-03T10:57:24+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 14 Plus","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":41879296966755,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB103","requires_shipping":true,"taxable":true,"featured_image":{"id":31470465286243,"product_id":7407826010211,"position":5,"created_at":"2024-05-03T10:57:36+08:00","updated_at":"2024-05-03T10:57:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b68795baf9c76a93e0db2a85e5edd2f7907e1a21_2514d64e-b5f3-46de-abc8-e62bb19da53d.webp?v=1714705056","variant_ids":[41879296966755]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0126124-PB103","featured_media":{"alt":null,"id":23875368747107,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b68795baf9c76a93e0db2a85e5edd2f7907e1a21_2514d64e-b5f3-46de-abc8-e62bb19da53d.webp?v=1714705056"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f840c7854ab86f7ddd909c33804c2a10dae846ac_9bda2029-0ee6-4837-b7c6-feef7440bcde.webp?v=1714705047","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2cc680a837b644f95e75ccf7db0345544579f6b_72400a2d-5e70-4c54-b9bd-979f3986c792.webp?v=1714705049","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4dd723b53e9f27b4d5361b32507b74473ed8b146_afb1a8cf-31d4-4c1d-951a-ec8c84072c2c.webp?v=1714705051","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ff6ad7f360babde2ce58c22ec3f23c4badc46f2_4e5555c7-3989-48ef-a82e-e7c168ef524a.webp?v=1714705054","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b68795baf9c76a93e0db2a85e5edd2f7907e1a21_2514d64e-b5f3-46de-abc8-e62bb19da53d.webp?v=1714705056","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/233d721b06777ac1ba853f7c6c6720e463d13080_ce09095f-3c05-4246-8715-90bf19b02cfb.webp?v=1714705059","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efcc64afdc876ee8a1b4f6c5eabc9697b132a7a4_8c84f3d1-810a-4259-b870-1045eb1fcaca.webp?v=1714705061","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e468464091e117dd46c37ec7e04ac121e5b3ef1_b32a8c4e-b589-4975-afb3-cef5925902eb.webp?v=1714705063","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae469e7c46d64ff610c95a0db50f7342d7607902_e72b5839-89f8-4a3f-8159-10eaf3f562cb.webp?v=1714705066","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/003c3f7130a14520aa11c28910750df15b2c21c3_04154fcb-7ea6-4aeb-9fd8-6c5e7d362294.webp?v=1714705068"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f840c7854ab86f7ddd909c33804c2a10dae846ac_9bda2029-0ee6-4837-b7c6-feef7440bcde.webp?v=1714705047","options":["color"],"media":[{"alt":null,"id":23875366879331,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f840c7854ab86f7ddd909c33804c2a10dae846ac_9bda2029-0ee6-4837-b7c6-feef7440bcde.webp?v=1714705047"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f840c7854ab86f7ddd909c33804c2a10dae846ac_9bda2029-0ee6-4837-b7c6-feef7440bcde.webp?v=1714705047","width":2000},{"alt":null,"id":23875367305315,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2cc680a837b644f95e75ccf7db0345544579f6b_72400a2d-5e70-4c54-b9bd-979f3986c792.webp?v=1714705049"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2cc680a837b644f95e75ccf7db0345544579f6b_72400a2d-5e70-4c54-b9bd-979f3986c792.webp?v=1714705049","width":2000},{"alt":null,"id":23875367698531,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4dd723b53e9f27b4d5361b32507b74473ed8b146_afb1a8cf-31d4-4c1d-951a-ec8c84072c2c.webp?v=1714705051"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4dd723b53e9f27b4d5361b32507b74473ed8b146_afb1a8cf-31d4-4c1d-951a-ec8c84072c2c.webp?v=1714705051","width":2000},{"alt":null,"id":23875368190051,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ff6ad7f360babde2ce58c22ec3f23c4badc46f2_4e5555c7-3989-48ef-a82e-e7c168ef524a.webp?v=1714705054"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ff6ad7f360babde2ce58c22ec3f23c4badc46f2_4e5555c7-3989-48ef-a82e-e7c168ef524a.webp?v=1714705054","width":2000},{"alt":null,"id":23875368747107,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b68795baf9c76a93e0db2a85e5edd2f7907e1a21_2514d64e-b5f3-46de-abc8-e62bb19da53d.webp?v=1714705056"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b68795baf9c76a93e0db2a85e5edd2f7907e1a21_2514d64e-b5f3-46de-abc8-e62bb19da53d.webp?v=1714705056","width":2000},{"alt":null,"id":23875369173091,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/233d721b06777ac1ba853f7c6c6720e463d13080_ce09095f-3c05-4246-8715-90bf19b02cfb.webp?v=1714705059"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/233d721b06777ac1ba853f7c6c6720e463d13080_ce09095f-3c05-4246-8715-90bf19b02cfb.webp?v=1714705059","width":2000},{"alt":null,"id":23875369697379,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efcc64afdc876ee8a1b4f6c5eabc9697b132a7a4_8c84f3d1-810a-4259-b870-1045eb1fcaca.webp?v=1714705061"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efcc64afdc876ee8a1b4f6c5eabc9697b132a7a4_8c84f3d1-810a-4259-b870-1045eb1fcaca.webp?v=1714705061","width":2000},{"alt":null,"id":23875370156131,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e468464091e117dd46c37ec7e04ac121e5b3ef1_b32a8c4e-b589-4975-afb3-cef5925902eb.webp?v=1714705063"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e468464091e117dd46c37ec7e04ac121e5b3ef1_b32a8c4e-b589-4975-afb3-cef5925902eb.webp?v=1714705063","width":2000},{"alt":null,"id":23875370582115,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae469e7c46d64ff610c95a0db50f7342d7607902_e72b5839-89f8-4a3f-8159-10eaf3f562cb.webp?v=1714705066"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae469e7c46d64ff610c95a0db50f7342d7607902_e72b5839-89f8-4a3f-8159-10eaf3f562cb.webp?v=1714705066","width":2000},{"alt":null,"id":23875370975331,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/003c3f7130a14520aa11c28910750df15b2c21c3_04154fcb-7ea6-4aeb-9fd8-6c5e7d362294.webp?v=1714705068"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/003c3f7130a14520aa11c28910750df15b2c21c3_04154fcb-7ea6-4aeb-9fd8-6c5e7d362294.webp?v=1714705068","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41879296966755,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB103","requires_shipping":true,"taxable":true,"featured_image":{"id":31470465286243,"product_id":7407826010211,"position":5,"created_at":"2024-05-03T10:57:36+08:00","updated_at":"2024-05-03T10:57:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b68795baf9c76a93e0db2a85e5edd2f7907e1a21_2514d64e-b5f3-46de-abc8-e62bb19da53d.webp?v=1714705056","variant_ids":[41879296966755]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0126124-PB103","featured_media":{"alt":null,"id":23875368747107,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b68795baf9c76a93e0db2a85e5edd2f7907e1a21_2514d64e-b5f3-46de-abc8-e62bb19da53d.webp?v=1714705056"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41879296966755,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB103","requires_shipping":true,"taxable":true,"featured_image":{"id":31470465286243,"product_id":7407826010211,"position":5,"created_at":"2024-05-03T10:57:36+08:00","updated_at":"2024-05-03T10:57:36+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b68795baf9c76a93e0db2a85e5edd2f7907e1a21_2514d64e-b5f3-46de-abc8-e62bb19da53d.webp?v=1714705056","variant_ids":[41879296966755]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0126124-PB103","featured_media":{"alt":null,"id":23875368747107,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b68795baf9c76a93e0db2a85e5edd2f7907e1a21_2514d64e-b5f3-46de-abc8-e62bb19da53d.webp?v=1714705056"}},"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: "停產" }