$product = {"id":7407869624419,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-塗鴉藝術","handle":"iphone-14-plus-mod-nx-printable-pb38","description":null,"published_at":"2024-06-11T16:25:08+08:00","created_at":"2024-05-03T11:06:11+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":41879864475747,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB38","requires_shipping":true,"taxable":true,"featured_image":{"id":31470579744867,"product_id":7407869624419,"position":7,"created_at":"2024-05-03T11:06:27+08:00","updated_at":"2024-05-03T11:06:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3e6d8646dd73444c2e74cd38be3bf75bf023843_d45c7f79-cbde-419c-89bc-d2701d661b78.webp?v=1714705587","variant_ids":[41879864475747]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-塗鴉藝術 - 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-PB38","featured_media":{"alt":null,"id":23875483598947,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3e6d8646dd73444c2e74cd38be3bf75bf023843_d45c7f79-cbde-419c-89bc-d2701d661b78.webp?v=1714705587"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f00f113c3538a1749b7cbf4d713b3a3d023df2e_16614537-d588-4064-9822-c189badf77ac.webp?v=1714705574","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b38b10bbe2e8e62c913e347f729231f5986d1073_25c3d316-f507-459b-8e10-97104e656a96.webp?v=1714705576","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9cfbdc613ad5b196d38eb5edcb246042cb1c9e14_335cceca-0e4a-4dce-9153-a42b349e3652.webp?v=1714705578","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51ba33341e3b78349411672086ae854a1b4fd80a_f60ec0de-edc0-435d-afe7-8e40d69219d7.webp?v=1714705580","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b42100de57e458646fee826121764720b4dc880_c7e2f135-5dd7-42e0-af7c-7820a9018bb8.webp?v=1714705582","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de9542698d68feaa965fe23dc0c3e39693ead270_89f1ef98-9b06-4066-881f-9e285a0d75a8.webp?v=1714705585","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3e6d8646dd73444c2e74cd38be3bf75bf023843_d45c7f79-cbde-419c-89bc-d2701d661b78.webp?v=1714705587","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab0e9c54bc54686209fe49256b19d286ffe29f17_d903ef58-fc8a-4ec7-83df-d2345ed9dd73.webp?v=1714705590","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a04e59ca6787c5471958e3cc55481c88a4f92a33_962b43cb-a4eb-4a40-a767-f9bc7ee2a066.webp?v=1714705592","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/25f6334d28b9a22cede03236175e1af3e722c6b1_081bfb37-6de5-4fc9-95bd-ed014152732e.webp?v=1714705594"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f00f113c3538a1749b7cbf4d713b3a3d023df2e_16614537-d588-4064-9822-c189badf77ac.webp?v=1714705574","options":["color"],"media":[{"alt":null,"id":23875481010275,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f00f113c3538a1749b7cbf4d713b3a3d023df2e_16614537-d588-4064-9822-c189badf77ac.webp?v=1714705574"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f00f113c3538a1749b7cbf4d713b3a3d023df2e_16614537-d588-4064-9822-c189badf77ac.webp?v=1714705574","width":2000},{"alt":null,"id":23875481436259,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b38b10bbe2e8e62c913e347f729231f5986d1073_25c3d316-f507-459b-8e10-97104e656a96.webp?v=1714705576"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b38b10bbe2e8e62c913e347f729231f5986d1073_25c3d316-f507-459b-8e10-97104e656a96.webp?v=1714705576","width":2000},{"alt":null,"id":23875481862243,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9cfbdc613ad5b196d38eb5edcb246042cb1c9e14_335cceca-0e4a-4dce-9153-a42b349e3652.webp?v=1714705578"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9cfbdc613ad5b196d38eb5edcb246042cb1c9e14_335cceca-0e4a-4dce-9153-a42b349e3652.webp?v=1714705578","width":2000},{"alt":null,"id":23875482157155,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51ba33341e3b78349411672086ae854a1b4fd80a_f60ec0de-edc0-435d-afe7-8e40d69219d7.webp?v=1714705580"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51ba33341e3b78349411672086ae854a1b4fd80a_f60ec0de-edc0-435d-afe7-8e40d69219d7.webp?v=1714705580","width":2000},{"alt":null,"id":23875482615907,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b42100de57e458646fee826121764720b4dc880_c7e2f135-5dd7-42e0-af7c-7820a9018bb8.webp?v=1714705582"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b42100de57e458646fee826121764720b4dc880_c7e2f135-5dd7-42e0-af7c-7820a9018bb8.webp?v=1714705582","width":2000},{"alt":null,"id":23875483140195,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de9542698d68feaa965fe23dc0c3e39693ead270_89f1ef98-9b06-4066-881f-9e285a0d75a8.webp?v=1714705585"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de9542698d68feaa965fe23dc0c3e39693ead270_89f1ef98-9b06-4066-881f-9e285a0d75a8.webp?v=1714705585","width":2000},{"alt":null,"id":23875483598947,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3e6d8646dd73444c2e74cd38be3bf75bf023843_d45c7f79-cbde-419c-89bc-d2701d661b78.webp?v=1714705587"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3e6d8646dd73444c2e74cd38be3bf75bf023843_d45c7f79-cbde-419c-89bc-d2701d661b78.webp?v=1714705587","width":2000},{"alt":null,"id":23875484287075,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab0e9c54bc54686209fe49256b19d286ffe29f17_d903ef58-fc8a-4ec7-83df-d2345ed9dd73.webp?v=1714705590"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab0e9c54bc54686209fe49256b19d286ffe29f17_d903ef58-fc8a-4ec7-83df-d2345ed9dd73.webp?v=1714705590","width":2000},{"alt":null,"id":23875484745827,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a04e59ca6787c5471958e3cc55481c88a4f92a33_962b43cb-a4eb-4a40-a767-f9bc7ee2a066.webp?v=1714705592"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a04e59ca6787c5471958e3cc55481c88a4f92a33_962b43cb-a4eb-4a40-a767-f9bc7ee2a066.webp?v=1714705592","width":2000},{"alt":null,"id":23875485237347,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/25f6334d28b9a22cede03236175e1af3e722c6b1_081bfb37-6de5-4fc9-95bd-ed014152732e.webp?v=1714705594"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/25f6334d28b9a22cede03236175e1af3e722c6b1_081bfb37-6de5-4fc9-95bd-ed014152732e.webp?v=1714705594","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41879864475747,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB38","requires_shipping":true,"taxable":true,"featured_image":{"id":31470579744867,"product_id":7407869624419,"position":7,"created_at":"2024-05-03T11:06:27+08:00","updated_at":"2024-05-03T11:06:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3e6d8646dd73444c2e74cd38be3bf75bf023843_d45c7f79-cbde-419c-89bc-d2701d661b78.webp?v=1714705587","variant_ids":[41879864475747]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-塗鴉藝術 - 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-PB38","featured_media":{"alt":null,"id":23875483598947,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3e6d8646dd73444c2e74cd38be3bf75bf023843_d45c7f79-cbde-419c-89bc-d2701d661b78.webp?v=1714705587"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41879864475747,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB38","requires_shipping":true,"taxable":true,"featured_image":{"id":31470579744867,"product_id":7407869624419,"position":7,"created_at":"2024-05-03T11:06:27+08:00","updated_at":"2024-05-03T11:06:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3e6d8646dd73444c2e74cd38be3bf75bf023843_d45c7f79-cbde-419c-89bc-d2701d661b78.webp?v=1714705587","variant_ids":[41879864475747]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-塗鴉藝術 - 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-PB38","featured_media":{"alt":null,"id":23875483598947,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d3e6d8646dd73444c2e74cd38be3bf75bf023843_d45c7f79-cbde-419c-89bc-d2701d661b78.webp?v=1714705587"}},"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: "停產" }