$product = {"id":7407840264291,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【獨家設計款】 - 窯花","handle":"iphone-14-plus-mod-nx-printable-gd14","description":null,"published_at":"2024-06-11T16:24:18+08:00","created_at":"2024-05-03T11:00:22+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"MOD NX 客製化","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","device-iPhone 14 Plus","discountable-item","member","merge","mod-nx-printable","new-modnx-sku","reseller","reseller-modnx-chi-po-lin-series","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":41879492132963,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-GD14","requires_shipping":true,"taxable":true,"featured_image":{"id":31470499561571,"product_id":7407840264291,"position":4,"created_at":"2024-05-03T11:00:33+08:00","updated_at":"2024-05-03T11:00:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0baeb90f6518f63b6e361bf9477e0486ac180433_7ec0d106-e7b9-4fee-b369-420eeee22ad2.webp?v=1714705233","variant_ids":[41879492132963]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【獨家設計款】 - 窯花 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0126124-GD14","featured_media":{"alt":null,"id":23875403317347,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0baeb90f6518f63b6e361bf9477e0486ac180433_7ec0d106-e7b9-4fee-b369-420eeee22ad2.webp?v=1714705233"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c79510c1fd8d9b45e3088342c39a5db32034eaca_c4bebc1c-f1d6-40fd-8b07-dd8c5221616f.webp?v=1714705225","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c5fbe354fcfca4f062cb83c40b208fb6a3022bf_75c3bf08-d304-4b51-85b7-84b97cea0b6c.webp?v=1714705228","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/493555ecd3bb33fe07c9dffd41c2a99ed5414d72_6a343465-5972-4f6d-b774-8a5f1df39856.webp?v=1714705231","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0baeb90f6518f63b6e361bf9477e0486ac180433_7ec0d106-e7b9-4fee-b369-420eeee22ad2.webp?v=1714705233","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd90cf01bc53c99f9108dd84484bfd5ca7df7ccc_cbd4afcd-12ee-4cba-b4d6-14e09ee1e7eb.webp?v=1714705236","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c0b0315e6a75f92735148c8eea4a623562d28a0_773b9ab3-1784-405c-91df-736a4dd201f1.webp?v=1714705238","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de3f30f04b4f7fe89589650ddc1ade96cfba588a_b8158f03-1202-482c-860d-65851e6776c3.webp?v=1714705240","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d89aa1ae59a472e40f65251d090dbcbddf87f75_d9cc08f5-3f9b-4591-aef4-4f7ad1723f74.webp?v=1714705243","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52358c0bceb4961e87e79dd0a7a1727c939323c5_4d351fbe-f8b2-494d-b77a-27a0b4a58778.webp?v=1714705245","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80283d792f471a9e051b4559548ccd4621487d6b_f76929f6-0105-43b3-8bb7-d9afd2afe050.webp?v=1714705247"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c79510c1fd8d9b45e3088342c39a5db32034eaca_c4bebc1c-f1d6-40fd-8b07-dd8c5221616f.webp?v=1714705225","options":["color"],"media":[{"alt":null,"id":23875402039395,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c79510c1fd8d9b45e3088342c39a5db32034eaca_c4bebc1c-f1d6-40fd-8b07-dd8c5221616f.webp?v=1714705225"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c79510c1fd8d9b45e3088342c39a5db32034eaca_c4bebc1c-f1d6-40fd-8b07-dd8c5221616f.webp?v=1714705225","width":2000},{"alt":null,"id":23875402399843,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c5fbe354fcfca4f062cb83c40b208fb6a3022bf_75c3bf08-d304-4b51-85b7-84b97cea0b6c.webp?v=1714705228"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0c5fbe354fcfca4f062cb83c40b208fb6a3022bf_75c3bf08-d304-4b51-85b7-84b97cea0b6c.webp?v=1714705228","width":2000},{"alt":null,"id":23875402858595,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/493555ecd3bb33fe07c9dffd41c2a99ed5414d72_6a343465-5972-4f6d-b774-8a5f1df39856.webp?v=1714705231"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/493555ecd3bb33fe07c9dffd41c2a99ed5414d72_6a343465-5972-4f6d-b774-8a5f1df39856.webp?v=1714705231","width":2000},{"alt":null,"id":23875403317347,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0baeb90f6518f63b6e361bf9477e0486ac180433_7ec0d106-e7b9-4fee-b369-420eeee22ad2.webp?v=1714705233"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0baeb90f6518f63b6e361bf9477e0486ac180433_7ec0d106-e7b9-4fee-b369-420eeee22ad2.webp?v=1714705233","width":2000},{"alt":null,"id":23875403677795,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd90cf01bc53c99f9108dd84484bfd5ca7df7ccc_cbd4afcd-12ee-4cba-b4d6-14e09ee1e7eb.webp?v=1714705236"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd90cf01bc53c99f9108dd84484bfd5ca7df7ccc_cbd4afcd-12ee-4cba-b4d6-14e09ee1e7eb.webp?v=1714705236","width":2000},{"alt":null,"id":23875404038243,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c0b0315e6a75f92735148c8eea4a623562d28a0_773b9ab3-1784-405c-91df-736a4dd201f1.webp?v=1714705238"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c0b0315e6a75f92735148c8eea4a623562d28a0_773b9ab3-1784-405c-91df-736a4dd201f1.webp?v=1714705238","width":2000},{"alt":null,"id":23875404464227,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de3f30f04b4f7fe89589650ddc1ade96cfba588a_b8158f03-1202-482c-860d-65851e6776c3.webp?v=1714705240"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de3f30f04b4f7fe89589650ddc1ade96cfba588a_b8158f03-1202-482c-860d-65851e6776c3.webp?v=1714705240","width":2000},{"alt":null,"id":23875404857443,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d89aa1ae59a472e40f65251d090dbcbddf87f75_d9cc08f5-3f9b-4591-aef4-4f7ad1723f74.webp?v=1714705243"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d89aa1ae59a472e40f65251d090dbcbddf87f75_d9cc08f5-3f9b-4591-aef4-4f7ad1723f74.webp?v=1714705243","width":2000},{"alt":null,"id":23875405348963,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52358c0bceb4961e87e79dd0a7a1727c939323c5_4d351fbe-f8b2-494d-b77a-27a0b4a58778.webp?v=1714705245"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52358c0bceb4961e87e79dd0a7a1727c939323c5_4d351fbe-f8b2-494d-b77a-27a0b4a58778.webp?v=1714705245","width":2000},{"alt":null,"id":23875405742179,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80283d792f471a9e051b4559548ccd4621487d6b_f76929f6-0105-43b3-8bb7-d9afd2afe050.webp?v=1714705247"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80283d792f471a9e051b4559548ccd4621487d6b_f76929f6-0105-43b3-8bb7-d9afd2afe050.webp?v=1714705247","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41879492132963,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-GD14","requires_shipping":true,"taxable":true,"featured_image":{"id":31470499561571,"product_id":7407840264291,"position":4,"created_at":"2024-05-03T11:00:33+08:00","updated_at":"2024-05-03T11:00:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0baeb90f6518f63b6e361bf9477e0486ac180433_7ec0d106-e7b9-4fee-b369-420eeee22ad2.webp?v=1714705233","variant_ids":[41879492132963]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【獨家設計款】 - 窯花 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0126124-GD14","featured_media":{"alt":null,"id":23875403317347,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0baeb90f6518f63b6e361bf9477e0486ac180433_7ec0d106-e7b9-4fee-b369-420eeee22ad2.webp?v=1714705233"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41879492132963,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-GD14","requires_shipping":true,"taxable":true,"featured_image":{"id":31470499561571,"product_id":7407840264291,"position":4,"created_at":"2024-05-03T11:00:33+08:00","updated_at":"2024-05-03T11:00:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0baeb90f6518f63b6e361bf9477e0486ac180433_7ec0d106-e7b9-4fee-b369-420eeee22ad2.webp?v=1714705233","variant_ids":[41879492132963]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【獨家設計款】 - 窯花 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0126124-GD14","featured_media":{"alt":null,"id":23875403317347,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0baeb90f6518f63b6e361bf9477e0486ac180433_7ec0d106-e7b9-4fee-b369-420eeee22ad2.webp?v=1714705233"}},"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: "停產" }