$product = {"id":7407818670179,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具2-黑","handle":"iphone-14-plus-mod-nx-printable-pb11","description":null,"published_at":"2024-06-11T16:23:42+08:00","created_at":"2024-05-03T10:55:40+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":41879199809635,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB11","requires_shipping":true,"taxable":true,"featured_image":{"id":31470445101155,"product_id":7407818670179,"position":6,"created_at":"2024-05-03T10:55:55+08:00","updated_at":"2024-05-03T10:55:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97c8e7dad49a8c8f01f926c4b9f592da8b063ca3_59722b93-3f5f-47fc-9deb-ad4dc646cd78.webp?v=1714704955","variant_ids":[41879199809635]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具2-黑 - 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-PB11","featured_media":{"alt":null,"id":23875348496483,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97c8e7dad49a8c8f01f926c4b9f592da8b063ca3_59722b93-3f5f-47fc-9deb-ad4dc646cd78.webp?v=1714704955"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a2acd22899b47d9ad49edb610a05450d99d0fa2_09ad3ce4-ac8a-4edc-baf8-af4ed861ad49.webp?v=1714704943","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1af99dd8b31faf756afb6213ff123039586ccf1_f010f91d-090f-4369-8368-541080761990.webp?v=1714704946","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c304ed91e8daf6a6668c11cea67dd07799937aba_3eb1d992-96e6-4b10-8cdf-497bc9e5d50e.webp?v=1714704948","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b5e66230aefbb7d8d795f03827ee3e103bf610a_3a752f06-a20d-4110-9345-e19a687ad4de.webp?v=1714704950","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bbf7cf640227f3c21548ba576a5d8dcc43ed254_904c212b-ca11-40ea-ac95-7ac3758de65e.webp?v=1714704953","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97c8e7dad49a8c8f01f926c4b9f592da8b063ca3_59722b93-3f5f-47fc-9deb-ad4dc646cd78.webp?v=1714704955","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/765afc33f6b76e24dcfe43a51f2d672311dd5a43_f00044e9-1f53-4d54-a118-7465f7f3c427.webp?v=1714704958","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1440336b22a07aac05011a112e3999f09f9f73e_1571f596-55fd-4a22-a4a9-79bdd3b9d08c.webp?v=1714704960","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/799426782b1517ee689224f4927f8878e4ca2a3e_1eceda3f-37c0-4181-878e-8e1353d95392.webp?v=1714704963","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3aa90d9fe68dce67a77dc2f3e77126d1ab305543_976e1f92-f281-44b9-8ede-907db46a99c0.webp?v=1714704965"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a2acd22899b47d9ad49edb610a05450d99d0fa2_09ad3ce4-ac8a-4edc-baf8-af4ed861ad49.webp?v=1714704943","options":["color"],"media":[{"alt":null,"id":23875345481827,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a2acd22899b47d9ad49edb610a05450d99d0fa2_09ad3ce4-ac8a-4edc-baf8-af4ed861ad49.webp?v=1714704943"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a2acd22899b47d9ad49edb610a05450d99d0fa2_09ad3ce4-ac8a-4edc-baf8-af4ed861ad49.webp?v=1714704943","width":2000},{"alt":null,"id":23875346071651,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1af99dd8b31faf756afb6213ff123039586ccf1_f010f91d-090f-4369-8368-541080761990.webp?v=1714704946"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1af99dd8b31faf756afb6213ff123039586ccf1_f010f91d-090f-4369-8368-541080761990.webp?v=1714704946","width":2000},{"alt":null,"id":23875346563171,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c304ed91e8daf6a6668c11cea67dd07799937aba_3eb1d992-96e6-4b10-8cdf-497bc9e5d50e.webp?v=1714704948"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c304ed91e8daf6a6668c11cea67dd07799937aba_3eb1d992-96e6-4b10-8cdf-497bc9e5d50e.webp?v=1714704948","width":2000},{"alt":null,"id":23875347054691,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b5e66230aefbb7d8d795f03827ee3e103bf610a_3a752f06-a20d-4110-9345-e19a687ad4de.webp?v=1714704950"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8b5e66230aefbb7d8d795f03827ee3e103bf610a_3a752f06-a20d-4110-9345-e19a687ad4de.webp?v=1714704950","width":2000},{"alt":null,"id":23875347578979,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bbf7cf640227f3c21548ba576a5d8dcc43ed254_904c212b-ca11-40ea-ac95-7ac3758de65e.webp?v=1714704953"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8bbf7cf640227f3c21548ba576a5d8dcc43ed254_904c212b-ca11-40ea-ac95-7ac3758de65e.webp?v=1714704953","width":2000},{"alt":null,"id":23875348496483,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97c8e7dad49a8c8f01f926c4b9f592da8b063ca3_59722b93-3f5f-47fc-9deb-ad4dc646cd78.webp?v=1714704955"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97c8e7dad49a8c8f01f926c4b9f592da8b063ca3_59722b93-3f5f-47fc-9deb-ad4dc646cd78.webp?v=1714704955","width":2000},{"alt":null,"id":23875348824163,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/765afc33f6b76e24dcfe43a51f2d672311dd5a43_f00044e9-1f53-4d54-a118-7465f7f3c427.webp?v=1714704958"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/765afc33f6b76e24dcfe43a51f2d672311dd5a43_f00044e9-1f53-4d54-a118-7465f7f3c427.webp?v=1714704958","width":2000},{"alt":null,"id":23875349282915,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1440336b22a07aac05011a112e3999f09f9f73e_1571f596-55fd-4a22-a4a9-79bdd3b9d08c.webp?v=1714704960"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1440336b22a07aac05011a112e3999f09f9f73e_1571f596-55fd-4a22-a4a9-79bdd3b9d08c.webp?v=1714704960","width":2000},{"alt":null,"id":23875349708899,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/799426782b1517ee689224f4927f8878e4ca2a3e_1eceda3f-37c0-4181-878e-8e1353d95392.webp?v=1714704963"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/799426782b1517ee689224f4927f8878e4ca2a3e_1eceda3f-37c0-4181-878e-8e1353d95392.webp?v=1714704963","width":2000},{"alt":null,"id":23875350298723,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3aa90d9fe68dce67a77dc2f3e77126d1ab305543_976e1f92-f281-44b9-8ede-907db46a99c0.webp?v=1714704965"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3aa90d9fe68dce67a77dc2f3e77126d1ab305543_976e1f92-f281-44b9-8ede-907db46a99c0.webp?v=1714704965","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41879199809635,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB11","requires_shipping":true,"taxable":true,"featured_image":{"id":31470445101155,"product_id":7407818670179,"position":6,"created_at":"2024-05-03T10:55:55+08:00","updated_at":"2024-05-03T10:55:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97c8e7dad49a8c8f01f926c4b9f592da8b063ca3_59722b93-3f5f-47fc-9deb-ad4dc646cd78.webp?v=1714704955","variant_ids":[41879199809635]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具2-黑 - 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-PB11","featured_media":{"alt":null,"id":23875348496483,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97c8e7dad49a8c8f01f926c4b9f592da8b063ca3_59722b93-3f5f-47fc-9deb-ad4dc646cd78.webp?v=1714704955"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41879199809635,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB11","requires_shipping":true,"taxable":true,"featured_image":{"id":31470445101155,"product_id":7407818670179,"position":6,"created_at":"2024-05-03T10:55:55+08:00","updated_at":"2024-05-03T10:55:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97c8e7dad49a8c8f01f926c4b9f592da8b063ca3_59722b93-3f5f-47fc-9deb-ad4dc646cd78.webp?v=1714704955","variant_ids":[41879199809635]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具2-黑 - 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-PB11","featured_media":{"alt":null,"id":23875348496483,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/97c8e7dad49a8c8f01f926c4b9f592da8b063ca3_59722b93-3f5f-47fc-9deb-ad4dc646cd78.webp?v=1714704955"}},"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: "停產" }