$product = {"id":7415876747363,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 路克 vs 黑武士","handle":"iphone-xs-max-mod-nx-printable-pb109","description":null,"published_at":"2024-06-11T16:46:48+08:00","created_at":"2024-05-06T12:16:24+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 XS 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":41915103772771,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB109","requires_shipping":true,"taxable":true,"featured_image":{"id":31490633138275,"product_id":7415876747363,"position":1,"created_at":"2024-05-06T12:16:27+08:00","updated_at":"2024-05-06T12:16:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6aba77db699bf943bde338765f6b9f354aa7318_cfdc103f-a2ec-4c5a-9fe5-1cfcf2fda265.webp?v=1714968987","variant_ids":[41915103772771]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS 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":"NPB0108624-PB109","featured_media":{"alt":null,"id":23896039620707,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6aba77db699bf943bde338765f6b9f354aa7318_cfdc103f-a2ec-4c5a-9fe5-1cfcf2fda265.webp?v=1714968987"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6aba77db699bf943bde338765f6b9f354aa7318_cfdc103f-a2ec-4c5a-9fe5-1cfcf2fda265.webp?v=1714968987","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ec7932a82a8331b910604de98581e34f02d9198_968a6faf-3340-44c8-9e4f-b6c971205636.webp?v=1714968989","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca780d8c3291ddb9170fefd2feab1b4e9b81197f_a22b714a-ed41-4d20-ac17-c40086b3c95a.webp?v=1714968992","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6de673314e1530ce2019a3e80c86427d83bdf56_8180399e-6609-4aaa-afc8-6100432fc319.webp?v=1714968994","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df5dff8b28f8cb05d9ac797f4fbb0807510ff554_04378970-2267-4883-be1a-9621869973ec.webp?v=1714968997","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/165eed9113e6dfd61e445f756bc9576cf776791e_d4ab4b63-2b40-4668-8977-167c731f33cf.webp?v=1714968999","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/794da70b8175053a281c83b9e2c748055ab59b16_ecb8b6e7-006a-4119-8951-6c7534498c6f.webp?v=1714969002","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0d596754d6cff22aace9ce7c7c80e5098872c6d_33307737-c03f-4199-b2d8-b9bddc9ab431.webp?v=1714969005","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc648f6fd3f9669f68f86af3d16180550e1003ce_fdbb2c88-42c5-4663-bd3c-7b9d9f1dac04.webp?v=1714969007","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5546bb277ecd4f8a7bd26129c13a0e8b4b906037_509ba294-dadc-4fdf-9160-b20a2831477c.webp?v=1714969009"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6aba77db699bf943bde338765f6b9f354aa7318_cfdc103f-a2ec-4c5a-9fe5-1cfcf2fda265.webp?v=1714968987","options":["color"],"media":[{"alt":null,"id":23896039620707,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6aba77db699bf943bde338765f6b9f354aa7318_cfdc103f-a2ec-4c5a-9fe5-1cfcf2fda265.webp?v=1714968987"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6aba77db699bf943bde338765f6b9f354aa7318_cfdc103f-a2ec-4c5a-9fe5-1cfcf2fda265.webp?v=1714968987","width":2000},{"alt":null,"id":23896040308835,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ec7932a82a8331b910604de98581e34f02d9198_968a6faf-3340-44c8-9e4f-b6c971205636.webp?v=1714968989"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4ec7932a82a8331b910604de98581e34f02d9198_968a6faf-3340-44c8-9e4f-b6c971205636.webp?v=1714968989","width":2000},{"alt":null,"id":23896040472675,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca780d8c3291ddb9170fefd2feab1b4e9b81197f_a22b714a-ed41-4d20-ac17-c40086b3c95a.webp?v=1714968992"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ca780d8c3291ddb9170fefd2feab1b4e9b81197f_a22b714a-ed41-4d20-ac17-c40086b3c95a.webp?v=1714968992","width":2000},{"alt":null,"id":23896040734819,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6de673314e1530ce2019a3e80c86427d83bdf56_8180399e-6609-4aaa-afc8-6100432fc319.webp?v=1714968994"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6de673314e1530ce2019a3e80c86427d83bdf56_8180399e-6609-4aaa-afc8-6100432fc319.webp?v=1714968994","width":2000},{"alt":null,"id":23896041259107,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df5dff8b28f8cb05d9ac797f4fbb0807510ff554_04378970-2267-4883-be1a-9621869973ec.webp?v=1714968997"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df5dff8b28f8cb05d9ac797f4fbb0807510ff554_04378970-2267-4883-be1a-9621869973ec.webp?v=1714968997","width":2000},{"alt":null,"id":23896041488483,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/165eed9113e6dfd61e445f756bc9576cf776791e_d4ab4b63-2b40-4668-8977-167c731f33cf.webp?v=1714968999"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/165eed9113e6dfd61e445f756bc9576cf776791e_d4ab4b63-2b40-4668-8977-167c731f33cf.webp?v=1714968999","width":2000},{"alt":null,"id":23896042045539,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/794da70b8175053a281c83b9e2c748055ab59b16_ecb8b6e7-006a-4119-8951-6c7534498c6f.webp?v=1714969002"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/794da70b8175053a281c83b9e2c748055ab59b16_ecb8b6e7-006a-4119-8951-6c7534498c6f.webp?v=1714969002","width":2000},{"alt":null,"id":23896042340451,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0d596754d6cff22aace9ce7c7c80e5098872c6d_33307737-c03f-4199-b2d8-b9bddc9ab431.webp?v=1714969005"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0d596754d6cff22aace9ce7c7c80e5098872c6d_33307737-c03f-4199-b2d8-b9bddc9ab431.webp?v=1714969005","width":2000},{"alt":null,"id":23896042668131,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc648f6fd3f9669f68f86af3d16180550e1003ce_fdbb2c88-42c5-4663-bd3c-7b9d9f1dac04.webp?v=1714969007"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc648f6fd3f9669f68f86af3d16180550e1003ce_fdbb2c88-42c5-4663-bd3c-7b9d9f1dac04.webp?v=1714969007","width":2000},{"alt":null,"id":23896043225187,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5546bb277ecd4f8a7bd26129c13a0e8b4b906037_509ba294-dadc-4fdf-9160-b20a2831477c.webp?v=1714969009"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5546bb277ecd4f8a7bd26129c13a0e8b4b906037_509ba294-dadc-4fdf-9160-b20a2831477c.webp?v=1714969009","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41915103772771,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB109","requires_shipping":true,"taxable":true,"featured_image":{"id":31490633138275,"product_id":7415876747363,"position":1,"created_at":"2024-05-06T12:16:27+08:00","updated_at":"2024-05-06T12:16:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6aba77db699bf943bde338765f6b9f354aa7318_cfdc103f-a2ec-4c5a-9fe5-1cfcf2fda265.webp?v=1714968987","variant_ids":[41915103772771]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS 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":"NPB0108624-PB109","featured_media":{"alt":null,"id":23896039620707,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6aba77db699bf943bde338765f6b9f354aa7318_cfdc103f-a2ec-4c5a-9fe5-1cfcf2fda265.webp?v=1714968987"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915103772771,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB109","requires_shipping":true,"taxable":true,"featured_image":{"id":31490633138275,"product_id":7415876747363,"position":1,"created_at":"2024-05-06T12:16:27+08:00","updated_at":"2024-05-06T12:16:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6aba77db699bf943bde338765f6b9f354aa7318_cfdc103f-a2ec-4c5a-9fe5-1cfcf2fda265.webp?v=1714968987","variant_ids":[41915103772771]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS 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":"NPB0108624-PB109","featured_media":{"alt":null,"id":23896039620707,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6aba77db699bf943bde338765f6b9f354aa7318_cfdc103f-a2ec-4c5a-9fe5-1cfcf2fda265.webp?v=1714968987"}},"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: "停產" }