$product = {"id":7407538307171,"title":"犀牛盾Mod NX手機殼 - iPhone 15 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士\u0026尤達-剪紙系列","handle":"iphone-15-plus-mod-nx-printable-pb54","description":null,"published_at":"2024-06-11T16:18:36+08:00","created_at":"2024-05-03T10:06:47+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 15 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":41876092977251,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0129624-PB54","requires_shipping":true,"taxable":true,"featured_image":{"id":31469838401635,"product_id":7407538307171,"position":1,"created_at":"2024-05-03T10:06:50+08:00","updated_at":"2024-05-03T10:06:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a6841023ba56471bc403e39fd36ff0e75c3d4f1_ebc68f30-b33c-42e8-8970-676ddade0da1.webp?v=1714702010","variant_ids":[41876092977251]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 15 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士\u0026尤達-剪紙系列 - 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":"NPB0129624-PB54","featured_media":{"alt":null,"id":23874739863651,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a6841023ba56471bc403e39fd36ff0e75c3d4f1_ebc68f30-b33c-42e8-8970-676ddade0da1.webp?v=1714702010"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41876093108323,"title":"Mod NX-櫻花粉邊框","option1":"Mod NX-櫻花粉邊框","option2":null,"option3":null,"sku":"NPB0129657-PB54","requires_shipping":true,"taxable":true,"featured_image":{"id":31469840466019,"product_id":7407538307171,"position":5,"created_at":"2024-05-03T10:07:00+08:00","updated_at":"2024-05-03T10:07:00+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b02ae45ec6d9b54708199a0ce023e94eb5d0454_b5792ab2-3a9c-4805-8db5-f11b6ce57fa3.webp?v=1714702020","variant_ids":[41876093108323]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 15 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士\u0026尤達-剪紙系列 - 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":"NPB0129657-PB54","featured_media":{"alt":null,"id":23874742059107,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b02ae45ec6d9b54708199a0ce023e94eb5d0454_b5792ab2-3a9c-4805-8db5-f11b6ce57fa3.webp?v=1714702020"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a6841023ba56471bc403e39fd36ff0e75c3d4f1_ebc68f30-b33c-42e8-8970-676ddade0da1.webp?v=1714702010","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f1c9c19f084bc30d17f49b1bd407e504cf1978b_e0a97e37-b3bf-4bcc-956b-4e4520f83812.webp?v=1714702012","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b95d575ba3482717378560f1bd05c56fb41275eb_c11ba162-afe9-4ccd-b33f-dd252f6d51c1.webp?v=1714702015","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b04651995e507d72cf8fb2e55b3262689ec7f76_e3079907-d73a-4f13-878d-c198a34ba952.webp?v=1714702017","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b02ae45ec6d9b54708199a0ce023e94eb5d0454_b5792ab2-3a9c-4805-8db5-f11b6ce57fa3.webp?v=1714702020","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca459e615b802c66143a98ade23fdb8dc9836761_4f83aab0-1d48-4090-99b3-94afe58c8bfe.webp?v=1714702022","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fcff575d13c1df37e9efdc1e43f160c07d3dad6_668bf2bf-f95e-48ad-ac65-cad8af40e2f7.webp?v=1714702024","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/293458e247051c569e1ffb7b6fa8e464366f2ee6_519d19d7-7b94-47e3-b836-f7e15463b95f.webp?v=1714702026","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/21e716178b786193801794467e22f5a233adee2a_df6ca5a9-8410-4cdb-8837-8a6e5675f541.webp?v=1714702028","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d9ea0c1f8e3744f9d22579c9bb7ef1e3cda6422_83156aa7-1cab-4746-884b-835846e32314.webp?v=1714702031"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a6841023ba56471bc403e39fd36ff0e75c3d4f1_ebc68f30-b33c-42e8-8970-676ddade0da1.webp?v=1714702010","options":["color"],"media":[{"alt":null,"id":23874739863651,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a6841023ba56471bc403e39fd36ff0e75c3d4f1_ebc68f30-b33c-42e8-8970-676ddade0da1.webp?v=1714702010"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a6841023ba56471bc403e39fd36ff0e75c3d4f1_ebc68f30-b33c-42e8-8970-676ddade0da1.webp?v=1714702010","width":2000},{"alt":null,"id":23874740519011,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f1c9c19f084bc30d17f49b1bd407e504cf1978b_e0a97e37-b3bf-4bcc-956b-4e4520f83812.webp?v=1714702012"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f1c9c19f084bc30d17f49b1bd407e504cf1978b_e0a97e37-b3bf-4bcc-956b-4e4520f83812.webp?v=1714702012","width":2000},{"alt":null,"id":23874740912227,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b95d575ba3482717378560f1bd05c56fb41275eb_c11ba162-afe9-4ccd-b33f-dd252f6d51c1.webp?v=1714702015"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b95d575ba3482717378560f1bd05c56fb41275eb_c11ba162-afe9-4ccd-b33f-dd252f6d51c1.webp?v=1714702015","width":2000},{"alt":null,"id":23874741534819,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b04651995e507d72cf8fb2e55b3262689ec7f76_e3079907-d73a-4f13-878d-c198a34ba952.webp?v=1714702017"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b04651995e507d72cf8fb2e55b3262689ec7f76_e3079907-d73a-4f13-878d-c198a34ba952.webp?v=1714702017","width":2000},{"alt":null,"id":23874742059107,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b02ae45ec6d9b54708199a0ce023e94eb5d0454_b5792ab2-3a9c-4805-8db5-f11b6ce57fa3.webp?v=1714702020"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b02ae45ec6d9b54708199a0ce023e94eb5d0454_b5792ab2-3a9c-4805-8db5-f11b6ce57fa3.webp?v=1714702020","width":2000},{"alt":null,"id":23874742517859,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca459e615b802c66143a98ade23fdb8dc9836761_4f83aab0-1d48-4090-99b3-94afe58c8bfe.webp?v=1714702022"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca459e615b802c66143a98ade23fdb8dc9836761_4f83aab0-1d48-4090-99b3-94afe58c8bfe.webp?v=1714702022","width":2000},{"alt":null,"id":23874743271523,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fcff575d13c1df37e9efdc1e43f160c07d3dad6_668bf2bf-f95e-48ad-ac65-cad8af40e2f7.webp?v=1714702024"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fcff575d13c1df37e9efdc1e43f160c07d3dad6_668bf2bf-f95e-48ad-ac65-cad8af40e2f7.webp?v=1714702024","width":2000},{"alt":null,"id":23874743697507,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/293458e247051c569e1ffb7b6fa8e464366f2ee6_519d19d7-7b94-47e3-b836-f7e15463b95f.webp?v=1714702026"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/293458e247051c569e1ffb7b6fa8e464366f2ee6_519d19d7-7b94-47e3-b836-f7e15463b95f.webp?v=1714702026","width":2000},{"alt":null,"id":23874744057955,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/21e716178b786193801794467e22f5a233adee2a_df6ca5a9-8410-4cdb-8837-8a6e5675f541.webp?v=1714702028"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/21e716178b786193801794467e22f5a233adee2a_df6ca5a9-8410-4cdb-8837-8a6e5675f541.webp?v=1714702028","width":2000},{"alt":null,"id":23874745073763,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d9ea0c1f8e3744f9d22579c9bb7ef1e3cda6422_83156aa7-1cab-4746-884b-835846e32314.webp?v=1714702031"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d9ea0c1f8e3744f9d22579c9bb7ef1e3cda6422_83156aa7-1cab-4746-884b-835846e32314.webp?v=1714702031","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41876092977251,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0129624-PB54","requires_shipping":true,"taxable":true,"featured_image":{"id":31469838401635,"product_id":7407538307171,"position":1,"created_at":"2024-05-03T10:06:50+08:00","updated_at":"2024-05-03T10:06:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a6841023ba56471bc403e39fd36ff0e75c3d4f1_ebc68f30-b33c-42e8-8970-676ddade0da1.webp?v=1714702010","variant_ids":[41876092977251]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 15 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士\u0026尤達-剪紙系列 - 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":"NPB0129624-PB54","featured_media":{"alt":null,"id":23874739863651,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a6841023ba56471bc403e39fd36ff0e75c3d4f1_ebc68f30-b33c-42e8-8970-676ddade0da1.webp?v=1714702010"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41876093108323,"title":"Mod NX-櫻花粉邊框","option1":"Mod NX-櫻花粉邊框","option2":null,"option3":null,"sku":"NPB0129657-PB54","requires_shipping":true,"taxable":true,"featured_image":{"id":31469840466019,"product_id":7407538307171,"position":5,"created_at":"2024-05-03T10:07:00+08:00","updated_at":"2024-05-03T10:07:00+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b02ae45ec6d9b54708199a0ce023e94eb5d0454_b5792ab2-3a9c-4805-8db5-f11b6ce57fa3.webp?v=1714702020","variant_ids":[41876093108323]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 15 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士\u0026尤達-剪紙系列 - 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":"NPB0129657-PB54","featured_media":{"alt":null,"id":23874742059107,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b02ae45ec6d9b54708199a0ce023e94eb5d0454_b5792ab2-3a9c-4805-8db5-f11b6ce57fa3.webp?v=1714702020"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41876092977251,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0129624-PB54","requires_shipping":true,"taxable":true,"featured_image":{"id":31469838401635,"product_id":7407538307171,"position":1,"created_at":"2024-05-03T10:06:50+08:00","updated_at":"2024-05-03T10:06:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a6841023ba56471bc403e39fd36ff0e75c3d4f1_ebc68f30-b33c-42e8-8970-676ddade0da1.webp?v=1714702010","variant_ids":[41876092977251]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 15 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士\u0026尤達-剪紙系列 - 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":"NPB0129624-PB54","featured_media":{"alt":null,"id":23874739863651,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a6841023ba56471bc403e39fd36ff0e75c3d4f1_ebc68f30-b33c-42e8-8970-676ddade0da1.webp?v=1714702010"}},"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: "停產" }