$product = {"id":7369148956771,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Snoopy 史努比 - 開心小花","handle":"iphone-12-mini-mod-nx-printable-pl65","description":null,"published_at":"2024-06-11T16:13:18+08:00","created_at":"2024-04-23T15:33:51+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Snoopy 史努比","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-snoopy","device-iPhone 12 mini","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-snoopy","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":41793044611171,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PL65","requires_shipping":true,"taxable":true,"featured_image":{"id":31386915536995,"product_id":7369148956771,"position":5,"created_at":"2024-04-23T15:34:04+08:00","updated_at":"2024-04-23T15:34:04+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23e900264043ac81e1c3c6b2dd40628aee198c94_72fe116e-e228-4323-b2d9-0f70f24bb662.webp?v=1713857644","variant_ids":[41793044611171]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Snoopy 史努比 - 開心小花 - 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":"NPB0118424-PL65","featured_media":{"alt":null,"id":23789153484899,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23e900264043ac81e1c3c6b2dd40628aee198c94_72fe116e-e228-4323-b2d9-0f70f24bb662.webp?v=1713857644"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d4c2ef6bd916002fd2128639c3953f6a5058c1f_8d9ff5f0-80bb-4007-af9d-bd4be68e099e.webp?v=1713857633","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a464f8b50fb1146ef4cb29506b0ca902f59b48ba_b6d646d9-f89c-49c7-9e7a-f959ad3ef1ff.webp?v=1713857636","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4da83727917f171ddabc32a94a4d3c6931effba3_f85735b1-fad1-41b2-9fa5-5fde774174d5.webp?v=1713857638","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8dea67e59907309c6a3ece0e80779ca1cacb234c_4d603055-7e86-4796-83cc-6abe9811871b.webp?v=1713857641","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23e900264043ac81e1c3c6b2dd40628aee198c94_72fe116e-e228-4323-b2d9-0f70f24bb662.webp?v=1713857644","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b83a565b39da9e7d5694927a10336fa09038e41_ee57174d-ff6c-40e9-ac05-4693e45a4640.webp?v=1713857646","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12ca8ce9b20f145eeed3b2087f0a86fbdb8bde32_caf4d2b6-76c0-414a-8280-6482ceec1cfa.webp?v=1713857648","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/909279503bd05fd21f716330485d56c333c072f6_bef67a13-e294-4493-a8c3-780be88372be.webp?v=1713857651","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e18dadc0477ee19e706d0d654ea0d1bac8b39a98_156674be-068e-469c-b066-511f3b511f64.webp?v=1713857654","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9a23c97d227b6c5c40508484d88ea427a621552_d243f7b9-c161-4cde-9263-0cbc34f10d60.webp?v=1713857656","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9826bf0f6187f6f411d860cb44ff4c3af421911_961ebb5b-b042-4fe1-a5bf-24abfcc12f5c.webp?v=1713857658"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d4c2ef6bd916002fd2128639c3953f6a5058c1f_8d9ff5f0-80bb-4007-af9d-bd4be68e099e.webp?v=1713857633","options":["color"],"media":[{"alt":null,"id":23789150797923,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d4c2ef6bd916002fd2128639c3953f6a5058c1f_8d9ff5f0-80bb-4007-af9d-bd4be68e099e.webp?v=1713857633"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9d4c2ef6bd916002fd2128639c3953f6a5058c1f_8d9ff5f0-80bb-4007-af9d-bd4be68e099e.webp?v=1713857633","width":2000},{"alt":null,"id":23789151453283,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a464f8b50fb1146ef4cb29506b0ca902f59b48ba_b6d646d9-f89c-49c7-9e7a-f959ad3ef1ff.webp?v=1713857636"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a464f8b50fb1146ef4cb29506b0ca902f59b48ba_b6d646d9-f89c-49c7-9e7a-f959ad3ef1ff.webp?v=1713857636","width":2000},{"alt":null,"id":23789152010339,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4da83727917f171ddabc32a94a4d3c6931effba3_f85735b1-fad1-41b2-9fa5-5fde774174d5.webp?v=1713857638"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4da83727917f171ddabc32a94a4d3c6931effba3_f85735b1-fad1-41b2-9fa5-5fde774174d5.webp?v=1713857638","width":2000},{"alt":null,"id":23789152862307,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8dea67e59907309c6a3ece0e80779ca1cacb234c_4d603055-7e86-4796-83cc-6abe9811871b.webp?v=1713857641"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8dea67e59907309c6a3ece0e80779ca1cacb234c_4d603055-7e86-4796-83cc-6abe9811871b.webp?v=1713857641","width":2000},{"alt":null,"id":23789153484899,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23e900264043ac81e1c3c6b2dd40628aee198c94_72fe116e-e228-4323-b2d9-0f70f24bb662.webp?v=1713857644"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23e900264043ac81e1c3c6b2dd40628aee198c94_72fe116e-e228-4323-b2d9-0f70f24bb662.webp?v=1713857644","width":2000},{"alt":null,"id":23789153976419,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b83a565b39da9e7d5694927a10336fa09038e41_ee57174d-ff6c-40e9-ac05-4693e45a4640.webp?v=1713857646"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b83a565b39da9e7d5694927a10336fa09038e41_ee57174d-ff6c-40e9-ac05-4693e45a4640.webp?v=1713857646","width":2000},{"alt":null,"id":23789154730083,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12ca8ce9b20f145eeed3b2087f0a86fbdb8bde32_caf4d2b6-76c0-414a-8280-6482ceec1cfa.webp?v=1713857648"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/12ca8ce9b20f145eeed3b2087f0a86fbdb8bde32_caf4d2b6-76c0-414a-8280-6482ceec1cfa.webp?v=1713857648","width":2000},{"alt":null,"id":23789155287139,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/909279503bd05fd21f716330485d56c333c072f6_bef67a13-e294-4493-a8c3-780be88372be.webp?v=1713857651"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/909279503bd05fd21f716330485d56c333c072f6_bef67a13-e294-4493-a8c3-780be88372be.webp?v=1713857651","width":2000},{"alt":null,"id":23789155975267,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e18dadc0477ee19e706d0d654ea0d1bac8b39a98_156674be-068e-469c-b066-511f3b511f64.webp?v=1713857654"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e18dadc0477ee19e706d0d654ea0d1bac8b39a98_156674be-068e-469c-b066-511f3b511f64.webp?v=1713857654","width":2000},{"alt":null,"id":23789156532323,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9a23c97d227b6c5c40508484d88ea427a621552_d243f7b9-c161-4cde-9263-0cbc34f10d60.webp?v=1713857656"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b9a23c97d227b6c5c40508484d88ea427a621552_d243f7b9-c161-4cde-9263-0cbc34f10d60.webp?v=1713857656","width":2000},{"alt":null,"id":23789157187683,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9826bf0f6187f6f411d860cb44ff4c3af421911_961ebb5b-b042-4fe1-a5bf-24abfcc12f5c.webp?v=1713857658"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9826bf0f6187f6f411d860cb44ff4c3af421911_961ebb5b-b042-4fe1-a5bf-24abfcc12f5c.webp?v=1713857658","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41793044611171,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PL65","requires_shipping":true,"taxable":true,"featured_image":{"id":31386915536995,"product_id":7369148956771,"position":5,"created_at":"2024-04-23T15:34:04+08:00","updated_at":"2024-04-23T15:34:04+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23e900264043ac81e1c3c6b2dd40628aee198c94_72fe116e-e228-4323-b2d9-0f70f24bb662.webp?v=1713857644","variant_ids":[41793044611171]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Snoopy 史努比 - 開心小花 - 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":"NPB0118424-PL65","featured_media":{"alt":null,"id":23789153484899,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23e900264043ac81e1c3c6b2dd40628aee198c94_72fe116e-e228-4323-b2d9-0f70f24bb662.webp?v=1713857644"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41793044611171,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PL65","requires_shipping":true,"taxable":true,"featured_image":{"id":31386915536995,"product_id":7369148956771,"position":5,"created_at":"2024-04-23T15:34:04+08:00","updated_at":"2024-04-23T15:34:04+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23e900264043ac81e1c3c6b2dd40628aee198c94_72fe116e-e228-4323-b2d9-0f70f24bb662.webp?v=1713857644","variant_ids":[41793044611171]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - Snoopy 史努比 - 開心小花 - 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":"NPB0118424-PL65","featured_media":{"alt":null,"id":23789153484899,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23e900264043ac81e1c3c6b2dd40628aee198c94_72fe116e-e228-4323-b2d9-0f70f24bb662.webp?v=1713857644"}},"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: "停產" }