$product = {"id":7411231064163,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 迪士尼-星際大戰 Star Wars - 風暴兵-黑白條紋","handle":"iphone-14-plus-mod-nx-magsafe-printable-pb19","description":null,"published_at":"2024-06-11T17:39:24+08:00","created_at":"2024-05-04T23:49:53+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 14 Plus","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-star-wars","Top50","type-Mod NX Printable MagSafe Printable"],"price":110000,"price_min":110000,"price_max":110000,"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":41896285765731,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-PB19","requires_shipping":true,"taxable":true,"featured_image":{"id":31479912562787,"product_id":7411231064163,"position":7,"created_at":"2024-05-04T23:50:13+08:00","updated_at":"2024-05-04T23:50:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71bf01b0ab41886b9168426691ef2e6ed981d9ba_a6a63872-509c-44ec-87f0-bcd3fe0b701a.webp?v=1714837813","variant_ids":[41896285765731]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 迪士尼-星際大戰 Star Wars - 風暴兵-黑白條紋 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-PB19","featured_media":{"alt":null,"id":23885162938467,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71bf01b0ab41886b9168426691ef2e6ed981d9ba_a6a63872-509c-44ec-87f0-bcd3fe0b701a.webp?v=1714837813"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44d200ea137d89671f853aa86a196cc139d864f5_3ff63132-1f97-4270-82af-f4790b5a1c8f.webp?v=1714837796","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ed629fe65f5339ba2ca5f59f168aea22dada624_1924b870-49f3-446b-a72b-9e6f1150385a.webp?v=1714837798","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00560ccf56776c02840b9361af2b8704ffcf76db_d69555f5-7ea7-42d7-bf70-017168b6d66e.webp?v=1714837803","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2e657bfd3c6d9fa3b01c1c3a5be0d649223ef08_5116dac1-54a7-4098-8d52-b05531f110ac.webp?v=1714837805","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d9041b3faaaa42a53830233151ce534fe827771_3fe0f0d5-380f-4f09-a0b5-76baddeee6b1.webp?v=1714837808","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dac4fa2cc7dda37d6f5da6fbad7af85901d2a3b9_80f5cfa2-0669-4bd8-98f7-8824b2bcfa39.webp?v=1714837811","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71bf01b0ab41886b9168426691ef2e6ed981d9ba_a6a63872-509c-44ec-87f0-bcd3fe0b701a.webp?v=1714837813","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7295b60ea356b79df0918be5f2e127306ecdc059_92c6cb60-49db-4060-adc0-4bc0186a49ff.webp?v=1714837815","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bdda4fe3597c4948c555e1aec9f05a55c3ee60bf_cf4a0710-4f73-4c79-9349-383ba1445713.webp?v=1714837818","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/515f10a3a1804f87bbc3a08e325ece7684977a11_cc348837-f198-4e88-94f2-6bb9588de0d0.webp?v=1714837820"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44d200ea137d89671f853aa86a196cc139d864f5_3ff63132-1f97-4270-82af-f4790b5a1c8f.webp?v=1714837796","options":["color"],"media":[{"alt":null,"id":23885159333987,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44d200ea137d89671f853aa86a196cc139d864f5_3ff63132-1f97-4270-82af-f4790b5a1c8f.webp?v=1714837796"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44d200ea137d89671f853aa86a196cc139d864f5_3ff63132-1f97-4270-82af-f4790b5a1c8f.webp?v=1714837796","width":2000},{"alt":null,"id":23885159858275,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ed629fe65f5339ba2ca5f59f168aea22dada624_1924b870-49f3-446b-a72b-9e6f1150385a.webp?v=1714837798"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1ed629fe65f5339ba2ca5f59f168aea22dada624_1924b870-49f3-446b-a72b-9e6f1150385a.webp?v=1714837798","width":2000},{"alt":null,"id":23885160579171,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00560ccf56776c02840b9361af2b8704ffcf76db_d69555f5-7ea7-42d7-bf70-017168b6d66e.webp?v=1714837803"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00560ccf56776c02840b9361af2b8704ffcf76db_d69555f5-7ea7-42d7-bf70-017168b6d66e.webp?v=1714837803","width":2000},{"alt":null,"id":23885161300067,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2e657bfd3c6d9fa3b01c1c3a5be0d649223ef08_5116dac1-54a7-4098-8d52-b05531f110ac.webp?v=1714837805"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2e657bfd3c6d9fa3b01c1c3a5be0d649223ef08_5116dac1-54a7-4098-8d52-b05531f110ac.webp?v=1714837805","width":2000},{"alt":null,"id":23885161824355,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d9041b3faaaa42a53830233151ce534fe827771_3fe0f0d5-380f-4f09-a0b5-76baddeee6b1.webp?v=1714837808"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d9041b3faaaa42a53830233151ce534fe827771_3fe0f0d5-380f-4f09-a0b5-76baddeee6b1.webp?v=1714837808","width":2000},{"alt":null,"id":23885162414179,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dac4fa2cc7dda37d6f5da6fbad7af85901d2a3b9_80f5cfa2-0669-4bd8-98f7-8824b2bcfa39.webp?v=1714837811"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dac4fa2cc7dda37d6f5da6fbad7af85901d2a3b9_80f5cfa2-0669-4bd8-98f7-8824b2bcfa39.webp?v=1714837811","width":2000},{"alt":null,"id":23885162938467,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71bf01b0ab41886b9168426691ef2e6ed981d9ba_a6a63872-509c-44ec-87f0-bcd3fe0b701a.webp?v=1714837813"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71bf01b0ab41886b9168426691ef2e6ed981d9ba_a6a63872-509c-44ec-87f0-bcd3fe0b701a.webp?v=1714837813","width":2000},{"alt":null,"id":23885163724899,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7295b60ea356b79df0918be5f2e127306ecdc059_92c6cb60-49db-4060-adc0-4bc0186a49ff.webp?v=1714837815"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7295b60ea356b79df0918be5f2e127306ecdc059_92c6cb60-49db-4060-adc0-4bc0186a49ff.webp?v=1714837815","width":2000},{"alt":null,"id":23885164150883,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bdda4fe3597c4948c555e1aec9f05a55c3ee60bf_cf4a0710-4f73-4c79-9349-383ba1445713.webp?v=1714837818"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bdda4fe3597c4948c555e1aec9f05a55c3ee60bf_cf4a0710-4f73-4c79-9349-383ba1445713.webp?v=1714837818","width":2000},{"alt":null,"id":23885164740707,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/515f10a3a1804f87bbc3a08e325ece7684977a11_cc348837-f198-4e88-94f2-6bb9588de0d0.webp?v=1714837820"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/515f10a3a1804f87bbc3a08e325ece7684977a11_cc348837-f198-4e88-94f2-6bb9588de0d0.webp?v=1714837820","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41896285765731,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-PB19","requires_shipping":true,"taxable":true,"featured_image":{"id":31479912562787,"product_id":7411231064163,"position":7,"created_at":"2024-05-04T23:50:13+08:00","updated_at":"2024-05-04T23:50:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71bf01b0ab41886b9168426691ef2e6ed981d9ba_a6a63872-509c-44ec-87f0-bcd3fe0b701a.webp?v=1714837813","variant_ids":[41896285765731]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 迪士尼-星際大戰 Star Wars - 風暴兵-黑白條紋 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-PB19","featured_media":{"alt":null,"id":23885162938467,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71bf01b0ab41886b9168426691ef2e6ed981d9ba_a6a63872-509c-44ec-87f0-bcd3fe0b701a.webp?v=1714837813"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41896285765731,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-PB19","requires_shipping":true,"taxable":true,"featured_image":{"id":31479912562787,"product_id":7411231064163,"position":7,"created_at":"2024-05-04T23:50:13+08:00","updated_at":"2024-05-04T23:50:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71bf01b0ab41886b9168426691ef2e6ed981d9ba_a6a63872-509c-44ec-87f0-bcd3fe0b701a.webp?v=1714837813","variant_ids":[41896285765731]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 迪士尼-星際大戰 Star Wars - 風暴兵-黑白條紋 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-PB19","featured_media":{"alt":null,"id":23885162938467,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71bf01b0ab41886b9168426691ef2e6ed981d9ba_a6a63872-509c-44ec-87f0-bcd3fe0b701a.webp?v=1714837813"}},"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: "停產" }