$product = {"id":7416382586979,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 史迪奇 - 經典系列-史迪奇大臉款","handle":"iphone-8-mod-nx-printable-yf01","description":null,"published_at":"2024-06-11T16:57:33+08:00","created_at":"2024-05-06T14:46:07+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-史迪奇","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-stitch","device-iPhone 8","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-stitch","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":41919130861667,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-YF01","requires_shipping":true,"taxable":true,"featured_image":{"id":31491993108579,"product_id":7416382586979,"position":8,"created_at":"2024-05-06T14:46:26+08:00","updated_at":"2024-05-06T14:46:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa54aa5373bf9ebe84481fad9f089b1a6989a46a_d0e119ba-9f85-4084-a747-69109cfb6326.webp?v=1714977986","variant_ids":[41919130861667]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 史迪奇 - 經典系列-史迪奇大臉款 - 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":"NPB0105424-YF01","featured_media":{"alt":null,"id":23897406636131,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa54aa5373bf9ebe84481fad9f089b1a6989a46a_d0e119ba-9f85-4084-a747-69109cfb6326.webp?v=1714977986"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdf0b1180e418af618a2c83109c9116fe8b2b210_bcdc76dd-4b49-40f7-928b-4047921fd353.webp?v=1714977970","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e229a9a6e8ab426ea5007fc798afc6112f037f6_a0e5a948-8b50-462f-9aa6-bd0f02ce9e8e.webp?v=1714977972","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e28473a2bb0249abb5a2b6e66fd15a5807760da0_add86b1b-ed61-44e3-8ddd-3875cd5671f0.webp?v=1714977975","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2fc7335ea7eaf74c2913f7565e6b97b26d63573f_68d2799d-f1c7-432a-be24-856efaf1968e.webp?v=1714977977","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/579845c50cd781bf6da430214ab93d8303e4304a_a7223ca6-093c-498d-a1e2-d7506739d904.webp?v=1714977979","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6258ae2a6c1735005f92b4c2b7076418352060b0_a13dac00-9395-449b-a062-8de4e27f75ee.webp?v=1714977981","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89eb879f276183ca7f4ca9166bcad189a3f56ae6_8bda6a40-071e-4ed7-9c15-2033126aedfc.webp?v=1714977983","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa54aa5373bf9ebe84481fad9f089b1a6989a46a_d0e119ba-9f85-4084-a747-69109cfb6326.webp?v=1714977986","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/edd88aba848fb69cdca85da48db932730419733d_7a3978ce-cff4-40d6-901f-fb4ce6e4aae9.webp?v=1714977988","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65280af45f763fcecab9a9fbea75a53d6c3a0ad9_9029b5e8-f829-4fba-bd44-6acd892f7c03.webp?v=1714977990"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdf0b1180e418af618a2c83109c9116fe8b2b210_bcdc76dd-4b49-40f7-928b-4047921fd353.webp?v=1714977970","options":["color"],"media":[{"alt":null,"id":23897402245219,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdf0b1180e418af618a2c83109c9116fe8b2b210_bcdc76dd-4b49-40f7-928b-4047921fd353.webp?v=1714977970"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdf0b1180e418af618a2c83109c9116fe8b2b210_bcdc76dd-4b49-40f7-928b-4047921fd353.webp?v=1714977970","width":2000},{"alt":null,"id":23897402736739,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e229a9a6e8ab426ea5007fc798afc6112f037f6_a0e5a948-8b50-462f-9aa6-bd0f02ce9e8e.webp?v=1714977972"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e229a9a6e8ab426ea5007fc798afc6112f037f6_a0e5a948-8b50-462f-9aa6-bd0f02ce9e8e.webp?v=1714977972","width":2000},{"alt":null,"id":23897403555939,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e28473a2bb0249abb5a2b6e66fd15a5807760da0_add86b1b-ed61-44e3-8ddd-3875cd5671f0.webp?v=1714977975"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e28473a2bb0249abb5a2b6e66fd15a5807760da0_add86b1b-ed61-44e3-8ddd-3875cd5671f0.webp?v=1714977975","width":2000},{"alt":null,"id":23897404276835,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2fc7335ea7eaf74c2913f7565e6b97b26d63573f_68d2799d-f1c7-432a-be24-856efaf1968e.webp?v=1714977977"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2fc7335ea7eaf74c2913f7565e6b97b26d63573f_68d2799d-f1c7-432a-be24-856efaf1968e.webp?v=1714977977","width":2000},{"alt":null,"id":23897404735587,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/579845c50cd781bf6da430214ab93d8303e4304a_a7223ca6-093c-498d-a1e2-d7506739d904.webp?v=1714977979"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/579845c50cd781bf6da430214ab93d8303e4304a_a7223ca6-093c-498d-a1e2-d7506739d904.webp?v=1714977979","width":2000},{"alt":null,"id":23897405259875,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6258ae2a6c1735005f92b4c2b7076418352060b0_a13dac00-9395-449b-a062-8de4e27f75ee.webp?v=1714977981"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6258ae2a6c1735005f92b4c2b7076418352060b0_a13dac00-9395-449b-a062-8de4e27f75ee.webp?v=1714977981","width":2000},{"alt":null,"id":23897405718627,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89eb879f276183ca7f4ca9166bcad189a3f56ae6_8bda6a40-071e-4ed7-9c15-2033126aedfc.webp?v=1714977983"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89eb879f276183ca7f4ca9166bcad189a3f56ae6_8bda6a40-071e-4ed7-9c15-2033126aedfc.webp?v=1714977983","width":2000},{"alt":null,"id":23897406636131,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa54aa5373bf9ebe84481fad9f089b1a6989a46a_d0e119ba-9f85-4084-a747-69109cfb6326.webp?v=1714977986"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa54aa5373bf9ebe84481fad9f089b1a6989a46a_d0e119ba-9f85-4084-a747-69109cfb6326.webp?v=1714977986","width":2000},{"alt":null,"id":23897407160419,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/edd88aba848fb69cdca85da48db932730419733d_7a3978ce-cff4-40d6-901f-fb4ce6e4aae9.webp?v=1714977988"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/edd88aba848fb69cdca85da48db932730419733d_7a3978ce-cff4-40d6-901f-fb4ce6e4aae9.webp?v=1714977988","width":2000},{"alt":null,"id":23897407520867,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65280af45f763fcecab9a9fbea75a53d6c3a0ad9_9029b5e8-f829-4fba-bd44-6acd892f7c03.webp?v=1714977990"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65280af45f763fcecab9a9fbea75a53d6c3a0ad9_9029b5e8-f829-4fba-bd44-6acd892f7c03.webp?v=1714977990","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41919130861667,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-YF01","requires_shipping":true,"taxable":true,"featured_image":{"id":31491993108579,"product_id":7416382586979,"position":8,"created_at":"2024-05-06T14:46:26+08:00","updated_at":"2024-05-06T14:46:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa54aa5373bf9ebe84481fad9f089b1a6989a46a_d0e119ba-9f85-4084-a747-69109cfb6326.webp?v=1714977986","variant_ids":[41919130861667]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 史迪奇 - 經典系列-史迪奇大臉款 - 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":"NPB0105424-YF01","featured_media":{"alt":null,"id":23897406636131,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa54aa5373bf9ebe84481fad9f089b1a6989a46a_d0e119ba-9f85-4084-a747-69109cfb6326.webp?v=1714977986"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41919130861667,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-YF01","requires_shipping":true,"taxable":true,"featured_image":{"id":31491993108579,"product_id":7416382586979,"position":8,"created_at":"2024-05-06T14:46:26+08:00","updated_at":"2024-05-06T14:46:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa54aa5373bf9ebe84481fad9f089b1a6989a46a_d0e119ba-9f85-4084-a747-69109cfb6326.webp?v=1714977986","variant_ids":[41919130861667]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 史迪奇 - 經典系列-史迪奇大臉款 - 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":"NPB0105424-YF01","featured_media":{"alt":null,"id":23897406636131,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa54aa5373bf9ebe84481fad9f089b1a6989a46a_d0e119ba-9f85-4084-a747-69109cfb6326.webp?v=1714977986"}},"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: "停產" }