$product = {"id":7408385458275,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 路克 vs 黑武士","handle":"iphone-12-pro-max-mod-nx-printable-pb109","description":null,"published_at":"2024-06-11T16:35:47+08:00","created_at":"2024-05-03T15:16:06+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":41884895412323,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB109","requires_shipping":true,"taxable":true,"featured_image":{"id":31472124100707,"product_id":7408385458275,"position":2,"created_at":"2024-05-03T15:16:10+08:00","updated_at":"2024-05-03T15:16:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1fa18da75bb5d760461bfeb1fa85a95207bbb19c_0dde3181-aaf5-4272-865d-ee1d2a38eae9.webp?v=1714720570","variant_ids":[41884895412323]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 路克 vs 黑武士 - 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-PB109","featured_media":{"alt":null,"id":23877039587427,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1fa18da75bb5d760461bfeb1fa85a95207bbb19c_0dde3181-aaf5-4272-865d-ee1d2a38eae9.webp?v=1714720570"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a00256a2a6bbc7e97511099f779ecb4fb2c1f139_1d29dfd2-57ff-474e-a236-c3e9c9d27485.webp?v=1714720568","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1fa18da75bb5d760461bfeb1fa85a95207bbb19c_0dde3181-aaf5-4272-865d-ee1d2a38eae9.webp?v=1714720570","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c664cf062266c9dc15c64bb7678b373dc471468c_3cd9d063-aa07-4df3-9658-d9518dc02ce1.webp?v=1714720573","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb4e176a08876f434937d8d8d82a0bc8920c1abb_e644c048-8e25-4a00-adc3-f04dd89f8e98.webp?v=1714720575","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c100e2fc565605adf33db0b1992cfccec6aab19a_bd085cac-b096-499f-b5bf-4c6141ee34ad.webp?v=1714720577","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c64f832da3d737d54bbe268aaea876a5d4fcda61_5b567cb8-4667-42a1-93e5-1f3f9924e131.webp?v=1714720580","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c2f86e26f5a8dfefd11aaa2c22043843ce0db3a_02b19e34-30ae-487d-a945-09ae17fa8f41.webp?v=1714720582","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2aeea7924ce1393aa643829f2cc331d73ca84837_0ba1dd06-86ed-49e1-895c-01449571a574.webp?v=1714720584","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d83200fb6605658b12b3e515d429e4330f4840f_2840e4c7-3c9e-43e7-b046-44ffbfd42a89.webp?v=1714720587","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80491684243bb497fb100a03a60daeff8edeb5b2_9bd0623b-b83e-49d6-a3d3-744abce39e11.webp?v=1714720590"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a00256a2a6bbc7e97511099f779ecb4fb2c1f139_1d29dfd2-57ff-474e-a236-c3e9c9d27485.webp?v=1714720568","options":["color"],"media":[{"alt":null,"id":23877039325283,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a00256a2a6bbc7e97511099f779ecb4fb2c1f139_1d29dfd2-57ff-474e-a236-c3e9c9d27485.webp?v=1714720568"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a00256a2a6bbc7e97511099f779ecb4fb2c1f139_1d29dfd2-57ff-474e-a236-c3e9c9d27485.webp?v=1714720568","width":2000},{"alt":null,"id":23877039587427,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1fa18da75bb5d760461bfeb1fa85a95207bbb19c_0dde3181-aaf5-4272-865d-ee1d2a38eae9.webp?v=1714720570"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1fa18da75bb5d760461bfeb1fa85a95207bbb19c_0dde3181-aaf5-4272-865d-ee1d2a38eae9.webp?v=1714720570","width":2000},{"alt":null,"id":23877039980643,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c664cf062266c9dc15c64bb7678b373dc471468c_3cd9d063-aa07-4df3-9658-d9518dc02ce1.webp?v=1714720573"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c664cf062266c9dc15c64bb7678b373dc471468c_3cd9d063-aa07-4df3-9658-d9518dc02ce1.webp?v=1714720573","width":2000},{"alt":null,"id":23877040537699,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb4e176a08876f434937d8d8d82a0bc8920c1abb_e644c048-8e25-4a00-adc3-f04dd89f8e98.webp?v=1714720575"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb4e176a08876f434937d8d8d82a0bc8920c1abb_e644c048-8e25-4a00-adc3-f04dd89f8e98.webp?v=1714720575","width":2000},{"alt":null,"id":23877040930915,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c100e2fc565605adf33db0b1992cfccec6aab19a_bd085cac-b096-499f-b5bf-4c6141ee34ad.webp?v=1714720577"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c100e2fc565605adf33db0b1992cfccec6aab19a_bd085cac-b096-499f-b5bf-4c6141ee34ad.webp?v=1714720577","width":2000},{"alt":null,"id":23877041520739,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c64f832da3d737d54bbe268aaea876a5d4fcda61_5b567cb8-4667-42a1-93e5-1f3f9924e131.webp?v=1714720580"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c64f832da3d737d54bbe268aaea876a5d4fcda61_5b567cb8-4667-42a1-93e5-1f3f9924e131.webp?v=1714720580","width":2000},{"alt":null,"id":23877041881187,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c2f86e26f5a8dfefd11aaa2c22043843ce0db3a_02b19e34-30ae-487d-a945-09ae17fa8f41.webp?v=1714720582"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c2f86e26f5a8dfefd11aaa2c22043843ce0db3a_02b19e34-30ae-487d-a945-09ae17fa8f41.webp?v=1714720582","width":2000},{"alt":null,"id":23877042602083,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2aeea7924ce1393aa643829f2cc331d73ca84837_0ba1dd06-86ed-49e1-895c-01449571a574.webp?v=1714720584"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2aeea7924ce1393aa643829f2cc331d73ca84837_0ba1dd06-86ed-49e1-895c-01449571a574.webp?v=1714720584","width":2000},{"alt":null,"id":23877043093603,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d83200fb6605658b12b3e515d429e4330f4840f_2840e4c7-3c9e-43e7-b046-44ffbfd42a89.webp?v=1714720587"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d83200fb6605658b12b3e515d429e4330f4840f_2840e4c7-3c9e-43e7-b046-44ffbfd42a89.webp?v=1714720587","width":2000},{"alt":null,"id":23877043585123,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80491684243bb497fb100a03a60daeff8edeb5b2_9bd0623b-b83e-49d6-a3d3-744abce39e11.webp?v=1714720590"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80491684243bb497fb100a03a60daeff8edeb5b2_9bd0623b-b83e-49d6-a3d3-744abce39e11.webp?v=1714720590","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41884895412323,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB109","requires_shipping":true,"taxable":true,"featured_image":{"id":31472124100707,"product_id":7408385458275,"position":2,"created_at":"2024-05-03T15:16:10+08:00","updated_at":"2024-05-03T15:16:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1fa18da75bb5d760461bfeb1fa85a95207bbb19c_0dde3181-aaf5-4272-865d-ee1d2a38eae9.webp?v=1714720570","variant_ids":[41884895412323]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 路克 vs 黑武士 - 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-PB109","featured_media":{"alt":null,"id":23877039587427,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1fa18da75bb5d760461bfeb1fa85a95207bbb19c_0dde3181-aaf5-4272-865d-ee1d2a38eae9.webp?v=1714720570"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41884895412323,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB109","requires_shipping":true,"taxable":true,"featured_image":{"id":31472124100707,"product_id":7408385458275,"position":2,"created_at":"2024-05-03T15:16:10+08:00","updated_at":"2024-05-03T15:16:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1fa18da75bb5d760461bfeb1fa85a95207bbb19c_0dde3181-aaf5-4272-865d-ee1d2a38eae9.webp?v=1714720570","variant_ids":[41884895412323]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 路克 vs 黑武士 - 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-PB109","featured_media":{"alt":null,"id":23877039587427,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1fa18da75bb5d760461bfeb1fa85a95207bbb19c_0dde3181-aaf5-4272-865d-ee1d2a38eae9.webp?v=1714720570"}},"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: "停產" }