$product = {"id":7408532455523,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 尤達-塗鴉藝術","handle":"iphone-12-pro-max-mod-nx-printable-pb36","description":null,"published_at":"2024-06-11T16:39:54+08:00","created_at":"2024-05-03T15:45:00+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 pro max","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":41886557438051,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB36","requires_shipping":true,"taxable":true,"featured_image":{"id":31472516890723,"product_id":7408532455523,"position":5,"created_at":"2024-05-03T15:45:11+08:00","updated_at":"2024-05-03T15:45:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e13609e8e0e4b829497ea8691c60f7dcca111de3_91feeac7-9a16-4f7f-b4be-b65e39eedd48.webp?v=1714722311","variant_ids":[41886557438051]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118724-PB36","featured_media":{"alt":null,"id":23877434212451,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e13609e8e0e4b829497ea8691c60f7dcca111de3_91feeac7-9a16-4f7f-b4be-b65e39eedd48.webp?v=1714722311"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2039b62072a4f5772bd70810bb4473fe42435166_bc571299-6f8a-45b2-8aaf-28538266967a.webp?v=1714722302","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6dec37c48e7aea0c8e275aeead259d7ac607682_53af6aac-7fb8-42b3-9d10-fd6174fd684a.webp?v=1714722305","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5e8b1b9aa54d4573ba7e6683e0e0dd985160e3c_2bf1b1bb-5862-4131-bffe-2cd97253453d.webp?v=1714722307","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8916befecbe3e0f06285886d7f43fe58113acecf_07944d8e-3238-41c5-8380-b24bfdfbd871.webp?v=1714722309","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e13609e8e0e4b829497ea8691c60f7dcca111de3_91feeac7-9a16-4f7f-b4be-b65e39eedd48.webp?v=1714722311","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2d86027edbe1bcfc08e9477ad95c564059aea82_c97dd1ce-abed-4f4d-9d01-b23e080bd543.webp?v=1714722314","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42ec2f26f25d8a131910c77f150f9e7bacb9ca5f_f3ff70e1-e383-4006-bbee-f96e6d6cc370.webp?v=1714722316","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a9aa4b1fb7cdba46daa3244641257988da17b4a_622400dc-df3f-4634-88f6-9207fdfe2f1c.webp?v=1714722318","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc49462b48722dd635a7d89a3220a8341c892bff_9643a4e3-a6c7-4580-93a2-1b281a056ed7.webp?v=1714722321","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42c4370e19940cfdc20f8b30cdd63e3dc09be163_76942e73-0f11-44c1-8522-8a87df3e94b7.webp?v=1714722323"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2039b62072a4f5772bd70810bb4473fe42435166_bc571299-6f8a-45b2-8aaf-28538266967a.webp?v=1714722302","options":["color"],"media":[{"alt":null,"id":23877432148067,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2039b62072a4f5772bd70810bb4473fe42435166_bc571299-6f8a-45b2-8aaf-28538266967a.webp?v=1714722302"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2039b62072a4f5772bd70810bb4473fe42435166_bc571299-6f8a-45b2-8aaf-28538266967a.webp?v=1714722302","width":2000},{"alt":null,"id":23877432606819,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6dec37c48e7aea0c8e275aeead259d7ac607682_53af6aac-7fb8-42b3-9d10-fd6174fd684a.webp?v=1714722305"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6dec37c48e7aea0c8e275aeead259d7ac607682_53af6aac-7fb8-42b3-9d10-fd6174fd684a.webp?v=1714722305","width":2000},{"alt":null,"id":23877433032803,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5e8b1b9aa54d4573ba7e6683e0e0dd985160e3c_2bf1b1bb-5862-4131-bffe-2cd97253453d.webp?v=1714722307"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5e8b1b9aa54d4573ba7e6683e0e0dd985160e3c_2bf1b1bb-5862-4131-bffe-2cd97253453d.webp?v=1714722307","width":2000},{"alt":null,"id":23877433819235,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8916befecbe3e0f06285886d7f43fe58113acecf_07944d8e-3238-41c5-8380-b24bfdfbd871.webp?v=1714722309"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8916befecbe3e0f06285886d7f43fe58113acecf_07944d8e-3238-41c5-8380-b24bfdfbd871.webp?v=1714722309","width":2000},{"alt":null,"id":23877434212451,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e13609e8e0e4b829497ea8691c60f7dcca111de3_91feeac7-9a16-4f7f-b4be-b65e39eedd48.webp?v=1714722311"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e13609e8e0e4b829497ea8691c60f7dcca111de3_91feeac7-9a16-4f7f-b4be-b65e39eedd48.webp?v=1714722311","width":2000},{"alt":null,"id":23877434703971,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2d86027edbe1bcfc08e9477ad95c564059aea82_c97dd1ce-abed-4f4d-9d01-b23e080bd543.webp?v=1714722314"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2d86027edbe1bcfc08e9477ad95c564059aea82_c97dd1ce-abed-4f4d-9d01-b23e080bd543.webp?v=1714722314","width":2000},{"alt":null,"id":23877435162723,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42ec2f26f25d8a131910c77f150f9e7bacb9ca5f_f3ff70e1-e383-4006-bbee-f96e6d6cc370.webp?v=1714722316"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42ec2f26f25d8a131910c77f150f9e7bacb9ca5f_f3ff70e1-e383-4006-bbee-f96e6d6cc370.webp?v=1714722316","width":2000},{"alt":null,"id":23877435621475,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a9aa4b1fb7cdba46daa3244641257988da17b4a_622400dc-df3f-4634-88f6-9207fdfe2f1c.webp?v=1714722318"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4a9aa4b1fb7cdba46daa3244641257988da17b4a_622400dc-df3f-4634-88f6-9207fdfe2f1c.webp?v=1714722318","width":2000},{"alt":null,"id":23877436112995,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc49462b48722dd635a7d89a3220a8341c892bff_9643a4e3-a6c7-4580-93a2-1b281a056ed7.webp?v=1714722321"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc49462b48722dd635a7d89a3220a8341c892bff_9643a4e3-a6c7-4580-93a2-1b281a056ed7.webp?v=1714722321","width":2000},{"alt":null,"id":23877436932195,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42c4370e19940cfdc20f8b30cdd63e3dc09be163_76942e73-0f11-44c1-8522-8a87df3e94b7.webp?v=1714722323"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42c4370e19940cfdc20f8b30cdd63e3dc09be163_76942e73-0f11-44c1-8522-8a87df3e94b7.webp?v=1714722323","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886557438051,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB36","requires_shipping":true,"taxable":true,"featured_image":{"id":31472516890723,"product_id":7408532455523,"position":5,"created_at":"2024-05-03T15:45:11+08:00","updated_at":"2024-05-03T15:45:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e13609e8e0e4b829497ea8691c60f7dcca111de3_91feeac7-9a16-4f7f-b4be-b65e39eedd48.webp?v=1714722311","variant_ids":[41886557438051]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118724-PB36","featured_media":{"alt":null,"id":23877434212451,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e13609e8e0e4b829497ea8691c60f7dcca111de3_91feeac7-9a16-4f7f-b4be-b65e39eedd48.webp?v=1714722311"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886557438051,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB36","requires_shipping":true,"taxable":true,"featured_image":{"id":31472516890723,"product_id":7408532455523,"position":5,"created_at":"2024-05-03T15:45:11+08:00","updated_at":"2024-05-03T15:45:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e13609e8e0e4b829497ea8691c60f7dcca111de3_91feeac7-9a16-4f7f-b4be-b65e39eedd48.webp?v=1714722311","variant_ids":[41886557438051]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118724-PB36","featured_media":{"alt":null,"id":23877434212451,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e13609e8e0e4b829497ea8691c60f7dcca111de3_91feeac7-9a16-4f7f-b4be-b65e39eedd48.webp?v=1714722311"}},"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: "停產" }