$product = {"id":7408457678947,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 史迪奇 - 貼紙系列-夏威夷舞蹈","handle":"iphone-12-pro-max-mod-nx-printable-yf07","description":null,"published_at":"2024-06-11T16:37:46+08:00","created_at":"2024-05-03T15:30:28+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 12 pro max","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":41885698490467,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-YF07","requires_shipping":true,"taxable":true,"featured_image":{"id":31472333324387,"product_id":7408457678947,"position":10,"created_at":"2024-05-03T15:30:53+08:00","updated_at":"2024-05-03T15:30:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/53160acfcb729bd67b1d8a7b86f21ea14002b321_afdb759a-b02e-4c65-b9de-96f8e84b1279.webp?v=1714721453","variant_ids":[41885698490467]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 史迪奇 - 貼紙系列-夏威夷舞蹈 - 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":"NPB0118724-YF07","featured_media":{"alt":null,"id":23877249859683,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/53160acfcb729bd67b1d8a7b86f21ea14002b321_afdb759a-b02e-4c65-b9de-96f8e84b1279.webp?v=1714721453"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbb86075dcdf8bc945e2b8c640e47bd7b02e9413_50296562-a580-44e4-976d-792179392405.webp?v=1714721431","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85408dd7dd6cece8974d71f8ea5d77c51701d41f_2fe024e0-e9b3-4547-84d0-8b9f61f30aad.webp?v=1714721434","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d0ebbea78b186b420a8569a52d09f9c9ea38461_02ef7bf0-3b96-4925-9b36-a9479faa65cd.webp?v=1714721436","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f496a5018b215b75d91a5cfe781782311c8bcb9b_ba1c6ac4-e0e5-4cb9-9f96-3b3420e4673b.webp?v=1714721438","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6233eb9bb6c0ae2bec5791a1478d2df9f6239347_b0a790b4-3f0a-41f5-bc5d-eac67edd1536.webp?v=1714721441","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec306e5db22b87f697890bd2db32f0763ddc3928_214e86ef-9484-494c-a2b7-9a0513ed9da5.webp?v=1714721443","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1ccd4a5d7c4e92a6383951f6ec822306c1b2ecc_49ffb8ba-e6bd-40f4-b2c5-af6acf4e8c84.webp?v=1714721446","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93330c0e1102634bbcbb2bb8f50a3d8d3da8bfbc_7722fbba-65d2-4703-b4e9-40fff079b4a9.webp?v=1714721448","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f36c091dcbb5c457d1b855176773d66d1d5e5014_411ddd43-9799-44e1-bcc4-68e758ac2e70.webp?v=1714721451","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/53160acfcb729bd67b1d8a7b86f21ea14002b321_afdb759a-b02e-4c65-b9de-96f8e84b1279.webp?v=1714721453"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbb86075dcdf8bc945e2b8c640e47bd7b02e9413_50296562-a580-44e4-976d-792179392405.webp?v=1714721431","options":["color"],"media":[{"alt":null,"id":23877245239395,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbb86075dcdf8bc945e2b8c640e47bd7b02e9413_50296562-a580-44e4-976d-792179392405.webp?v=1714721431"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bbb86075dcdf8bc945e2b8c640e47bd7b02e9413_50296562-a580-44e4-976d-792179392405.webp?v=1714721431","width":2000},{"alt":null,"id":23877245796451,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85408dd7dd6cece8974d71f8ea5d77c51701d41f_2fe024e0-e9b3-4547-84d0-8b9f61f30aad.webp?v=1714721434"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85408dd7dd6cece8974d71f8ea5d77c51701d41f_2fe024e0-e9b3-4547-84d0-8b9f61f30aad.webp?v=1714721434","width":2000},{"alt":null,"id":23877246222435,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d0ebbea78b186b420a8569a52d09f9c9ea38461_02ef7bf0-3b96-4925-9b36-a9479faa65cd.webp?v=1714721436"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d0ebbea78b186b420a8569a52d09f9c9ea38461_02ef7bf0-3b96-4925-9b36-a9479faa65cd.webp?v=1714721436","width":2000},{"alt":null,"id":23877246812259,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f496a5018b215b75d91a5cfe781782311c8bcb9b_ba1c6ac4-e0e5-4cb9-9f96-3b3420e4673b.webp?v=1714721438"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f496a5018b215b75d91a5cfe781782311c8bcb9b_ba1c6ac4-e0e5-4cb9-9f96-3b3420e4673b.webp?v=1714721438","width":2000},{"alt":null,"id":23877247336547,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6233eb9bb6c0ae2bec5791a1478d2df9f6239347_b0a790b4-3f0a-41f5-bc5d-eac67edd1536.webp?v=1714721441"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6233eb9bb6c0ae2bec5791a1478d2df9f6239347_b0a790b4-3f0a-41f5-bc5d-eac67edd1536.webp?v=1714721441","width":2000},{"alt":null,"id":23877247828067,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec306e5db22b87f697890bd2db32f0763ddc3928_214e86ef-9484-494c-a2b7-9a0513ed9da5.webp?v=1714721443"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec306e5db22b87f697890bd2db32f0763ddc3928_214e86ef-9484-494c-a2b7-9a0513ed9da5.webp?v=1714721443","width":2000},{"alt":null,"id":23877248417891,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1ccd4a5d7c4e92a6383951f6ec822306c1b2ecc_49ffb8ba-e6bd-40f4-b2c5-af6acf4e8c84.webp?v=1714721446"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1ccd4a5d7c4e92a6383951f6ec822306c1b2ecc_49ffb8ba-e6bd-40f4-b2c5-af6acf4e8c84.webp?v=1714721446","width":2000},{"alt":null,"id":23877248942179,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93330c0e1102634bbcbb2bb8f50a3d8d3da8bfbc_7722fbba-65d2-4703-b4e9-40fff079b4a9.webp?v=1714721448"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93330c0e1102634bbcbb2bb8f50a3d8d3da8bfbc_7722fbba-65d2-4703-b4e9-40fff079b4a9.webp?v=1714721448","width":2000},{"alt":null,"id":23877249302627,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f36c091dcbb5c457d1b855176773d66d1d5e5014_411ddd43-9799-44e1-bcc4-68e758ac2e70.webp?v=1714721451"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f36c091dcbb5c457d1b855176773d66d1d5e5014_411ddd43-9799-44e1-bcc4-68e758ac2e70.webp?v=1714721451","width":2000},{"alt":null,"id":23877249859683,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/53160acfcb729bd67b1d8a7b86f21ea14002b321_afdb759a-b02e-4c65-b9de-96f8e84b1279.webp?v=1714721453"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/53160acfcb729bd67b1d8a7b86f21ea14002b321_afdb759a-b02e-4c65-b9de-96f8e84b1279.webp?v=1714721453","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885698490467,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-YF07","requires_shipping":true,"taxable":true,"featured_image":{"id":31472333324387,"product_id":7408457678947,"position":10,"created_at":"2024-05-03T15:30:53+08:00","updated_at":"2024-05-03T15:30:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/53160acfcb729bd67b1d8a7b86f21ea14002b321_afdb759a-b02e-4c65-b9de-96f8e84b1279.webp?v=1714721453","variant_ids":[41885698490467]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 史迪奇 - 貼紙系列-夏威夷舞蹈 - 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":"NPB0118724-YF07","featured_media":{"alt":null,"id":23877249859683,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/53160acfcb729bd67b1d8a7b86f21ea14002b321_afdb759a-b02e-4c65-b9de-96f8e84b1279.webp?v=1714721453"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885698490467,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-YF07","requires_shipping":true,"taxable":true,"featured_image":{"id":31472333324387,"product_id":7408457678947,"position":10,"created_at":"2024-05-03T15:30:53+08:00","updated_at":"2024-05-03T15:30:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/53160acfcb729bd67b1d8a7b86f21ea14002b321_afdb759a-b02e-4c65-b9de-96f8e84b1279.webp?v=1714721453","variant_ids":[41885698490467]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 史迪奇 - 貼紙系列-夏威夷舞蹈 - 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":"NPB0118724-YF07","featured_media":{"alt":null,"id":23877249859683,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/53160acfcb729bd67b1d8a7b86f21ea14002b321_afdb759a-b02e-4c65-b9de-96f8e84b1279.webp?v=1714721453"}},"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: "停產" }