$product = {"id":7408489857123,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-噴漆黑","handle":"iphone-12-pro-max-mod-nx-printable-pb07","description":null,"published_at":"2024-06-11T16:38:41+08:00","created_at":"2024-05-03T15:36:44+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":41886066770019,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31472411115619,"product_id":7408489857123,"position":9,"created_at":"2024-05-03T15:37:05+08:00","updated_at":"2024-05-03T15:37:05+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f2dddf19b1de2bfd9a780eec941643107066cfc_2e682766-e279-48ca-9249-9de3c801022d.webp?v=1714721825","variant_ids":[41886066770019]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118724-PB07","featured_media":{"alt":null,"id":23877328109667,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f2dddf19b1de2bfd9a780eec941643107066cfc_2e682766-e279-48ca-9249-9de3c801022d.webp?v=1714721825"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17c47097570984df023bc8d474a611856860d424_06ccc137-2ab4-4bc3-9183-97444232a6cb.webp?v=1714721806","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/704c3f1c8d8bf4b047cb6057ef7412b4e9d37c77_b256239d-e86a-4241-8d91-a43b461ddf43.webp?v=1714721809","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/390d4edb2e200ee25036c09b26c53b58b5f2a8cf_e452cf0d-2a46-4833-84ce-6740be8a7f44.webp?v=1714721811","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd44a781df9304047847356c182ae9ddd4324259_d66ebce1-8c16-49fe-a4f4-6914782c9018.webp?v=1714721813","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a9122e2f3b0dc7f158b6d8ed90aa9918bfa2d60_7718966e-c786-4417-82e2-8c876f9bdc51.webp?v=1714721815","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a75acda0c251a1b17dce900235ea838fc4b8a2c_0c9c5516-25c1-445d-9a7b-d8c18e7a70b2.webp?v=1714721818","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a008aa180cf61606957db1ae10f56ac4c036e5b_21b00039-fe5a-4f68-aa61-027790a753ca.webp?v=1714721820","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da290a47b57f6c3188cbcfeafc73c6b4978c24a1_2035a1a6-553b-4ce6-8465-a3c89130d398.webp?v=1714721823","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f2dddf19b1de2bfd9a780eec941643107066cfc_2e682766-e279-48ca-9249-9de3c801022d.webp?v=1714721825","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a1615ebd40da447c250a0d206ee8b5a05d77d74f_d40cf093-4c0d-4efa-bd62-f21134f595cf.webp?v=1714721827"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17c47097570984df023bc8d474a611856860d424_06ccc137-2ab4-4bc3-9183-97444232a6cb.webp?v=1714721806","options":["color"],"media":[{"alt":null,"id":23877323620451,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17c47097570984df023bc8d474a611856860d424_06ccc137-2ab4-4bc3-9183-97444232a6cb.webp?v=1714721806"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17c47097570984df023bc8d474a611856860d424_06ccc137-2ab4-4bc3-9183-97444232a6cb.webp?v=1714721806","width":2000},{"alt":null,"id":23877324308579,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/704c3f1c8d8bf4b047cb6057ef7412b4e9d37c77_b256239d-e86a-4241-8d91-a43b461ddf43.webp?v=1714721809"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/704c3f1c8d8bf4b047cb6057ef7412b4e9d37c77_b256239d-e86a-4241-8d91-a43b461ddf43.webp?v=1714721809","width":2000},{"alt":null,"id":23877324767331,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/390d4edb2e200ee25036c09b26c53b58b5f2a8cf_e452cf0d-2a46-4833-84ce-6740be8a7f44.webp?v=1714721811"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/390d4edb2e200ee25036c09b26c53b58b5f2a8cf_e452cf0d-2a46-4833-84ce-6740be8a7f44.webp?v=1714721811","width":2000},{"alt":null,"id":23877325095011,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd44a781df9304047847356c182ae9ddd4324259_d66ebce1-8c16-49fe-a4f4-6914782c9018.webp?v=1714721813"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd44a781df9304047847356c182ae9ddd4324259_d66ebce1-8c16-49fe-a4f4-6914782c9018.webp?v=1714721813","width":2000},{"alt":null,"id":23877325783139,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a9122e2f3b0dc7f158b6d8ed90aa9918bfa2d60_7718966e-c786-4417-82e2-8c876f9bdc51.webp?v=1714721815"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a9122e2f3b0dc7f158b6d8ed90aa9918bfa2d60_7718966e-c786-4417-82e2-8c876f9bdc51.webp?v=1714721815","width":2000},{"alt":null,"id":23877326307427,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a75acda0c251a1b17dce900235ea838fc4b8a2c_0c9c5516-25c1-445d-9a7b-d8c18e7a70b2.webp?v=1714721818"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a75acda0c251a1b17dce900235ea838fc4b8a2c_0c9c5516-25c1-445d-9a7b-d8c18e7a70b2.webp?v=1714721818","width":2000},{"alt":null,"id":23877326930019,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a008aa180cf61606957db1ae10f56ac4c036e5b_21b00039-fe5a-4f68-aa61-027790a753ca.webp?v=1714721820"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a008aa180cf61606957db1ae10f56ac4c036e5b_21b00039-fe5a-4f68-aa61-027790a753ca.webp?v=1714721820","width":2000},{"alt":null,"id":23877327388771,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da290a47b57f6c3188cbcfeafc73c6b4978c24a1_2035a1a6-553b-4ce6-8465-a3c89130d398.webp?v=1714721823"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da290a47b57f6c3188cbcfeafc73c6b4978c24a1_2035a1a6-553b-4ce6-8465-a3c89130d398.webp?v=1714721823","width":2000},{"alt":null,"id":23877328109667,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f2dddf19b1de2bfd9a780eec941643107066cfc_2e682766-e279-48ca-9249-9de3c801022d.webp?v=1714721825"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f2dddf19b1de2bfd9a780eec941643107066cfc_2e682766-e279-48ca-9249-9de3c801022d.webp?v=1714721825","width":2000},{"alt":null,"id":23877328568419,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a1615ebd40da447c250a0d206ee8b5a05d77d74f_d40cf093-4c0d-4efa-bd62-f21134f595cf.webp?v=1714721827"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a1615ebd40da447c250a0d206ee8b5a05d77d74f_d40cf093-4c0d-4efa-bd62-f21134f595cf.webp?v=1714721827","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886066770019,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31472411115619,"product_id":7408489857123,"position":9,"created_at":"2024-05-03T15:37:05+08:00","updated_at":"2024-05-03T15:37:05+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f2dddf19b1de2bfd9a780eec941643107066cfc_2e682766-e279-48ca-9249-9de3c801022d.webp?v=1714721825","variant_ids":[41886066770019]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118724-PB07","featured_media":{"alt":null,"id":23877328109667,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f2dddf19b1de2bfd9a780eec941643107066cfc_2e682766-e279-48ca-9249-9de3c801022d.webp?v=1714721825"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886066770019,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31472411115619,"product_id":7408489857123,"position":9,"created_at":"2024-05-03T15:37:05+08:00","updated_at":"2024-05-03T15:37:05+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f2dddf19b1de2bfd9a780eec941643107066cfc_2e682766-e279-48ca-9249-9de3c801022d.webp?v=1714721825","variant_ids":[41886066770019]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118724-PB07","featured_media":{"alt":null,"id":23877328109667,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1f2dddf19b1de2bfd9a780eec941643107066cfc_2e682766-e279-48ca-9249-9de3c801022d.webp?v=1714721825"}},"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: "停產" }