$product = {"id":7416376098915,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - Weiweiboy - 可愛大王上甜點","handle":"iphone-8-mod-nx-printable-eo04","description":null,"published_at":"2024-06-11T16:57:22+08:00","created_at":"2024-05-06T14:45:01+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Weiweiboy","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-weiweiboy","device-iPhone 8","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-weiweiboy","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":41919066013795,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-EO04","requires_shipping":true,"taxable":true,"featured_image":{"id":31491975708771,"product_id":7416376098915,"position":3,"created_at":"2024-05-06T14:45:08+08:00","updated_at":"2024-05-06T14:45:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbd0916d892f36514c43d6907a204627c6b7480e_51829796-575c-44c9-93a1-5daebc46f333.webp?v=1714977908","variant_ids":[41919066013795]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - Weiweiboy - 可愛大王上甜點 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0105424-EO04","featured_media":{"alt":null,"id":23897389105251,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbd0916d892f36514c43d6907a204627c6b7480e_51829796-575c-44c9-93a1-5daebc46f333.webp?v=1714977908"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6eb3898725e621e9bff5b57cace6915df832c7ca_fe27a7b1-07c2-46af-a2f7-b85911b72c6b.webp?v=1714977903","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a225dd2ecf21d53efe0fe99379d8278dab15918c_9718e484-a8fe-4c0d-8223-b587255f6b48.webp?v=1714977905","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbd0916d892f36514c43d6907a204627c6b7480e_51829796-575c-44c9-93a1-5daebc46f333.webp?v=1714977908","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d18ca7e1b2cd016d7f234a17b041acf52d3d5514_4e089491-2ef3-4e96-9b8d-b1e9ee5cd6d5.webp?v=1714977910","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9cf8bbb7bb582fe9ef68d7f29a14a410a94c89b_15677159-e084-414e-95c9-dbad5212c915.webp?v=1714977912","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/067efce8c5b8a383997b3346b6d19f25184011af_eac70784-d1cd-465f-9154-2e9963aad53c.webp?v=1714977915","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f42dec7da8f5892b8b76be27070c2f8a48b5c75_55c61e04-4efc-40e5-99f4-c9300669754b.webp?v=1714977917","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7867074a320867c8311528fc3312987b68c02df8_8c7d7d04-411d-45a6-a925-fcf4fa12abcd.webp?v=1714977919","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5aaf6459405546abaa2f4aa41c352164d16f4e37_7ac4c97e-9490-40ba-a6f2-62a44f5a1a5a.webp?v=1714977921","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d7e9ee866a64e793067822848cd9b2e5245ad315_675a7548-a6ab-4627-958b-5af52c827edf.webp?v=1714977924"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6eb3898725e621e9bff5b57cace6915df832c7ca_fe27a7b1-07c2-46af-a2f7-b85911b72c6b.webp?v=1714977903","options":["color"],"media":[{"alt":null,"id":23897388122211,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6eb3898725e621e9bff5b57cace6915df832c7ca_fe27a7b1-07c2-46af-a2f7-b85911b72c6b.webp?v=1714977903"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6eb3898725e621e9bff5b57cace6915df832c7ca_fe27a7b1-07c2-46af-a2f7-b85911b72c6b.webp?v=1714977903","width":2000},{"alt":null,"id":23897388580963,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a225dd2ecf21d53efe0fe99379d8278dab15918c_9718e484-a8fe-4c0d-8223-b587255f6b48.webp?v=1714977905"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a225dd2ecf21d53efe0fe99379d8278dab15918c_9718e484-a8fe-4c0d-8223-b587255f6b48.webp?v=1714977905","width":2000},{"alt":null,"id":23897389105251,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbd0916d892f36514c43d6907a204627c6b7480e_51829796-575c-44c9-93a1-5daebc46f333.webp?v=1714977908"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbd0916d892f36514c43d6907a204627c6b7480e_51829796-575c-44c9-93a1-5daebc46f333.webp?v=1714977908","width":2000},{"alt":null,"id":23897389498467,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d18ca7e1b2cd016d7f234a17b041acf52d3d5514_4e089491-2ef3-4e96-9b8d-b1e9ee5cd6d5.webp?v=1714977910"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d18ca7e1b2cd016d7f234a17b041acf52d3d5514_4e089491-2ef3-4e96-9b8d-b1e9ee5cd6d5.webp?v=1714977910","width":2000},{"alt":null,"id":23897389891683,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9cf8bbb7bb582fe9ef68d7f29a14a410a94c89b_15677159-e084-414e-95c9-dbad5212c915.webp?v=1714977912"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9cf8bbb7bb582fe9ef68d7f29a14a410a94c89b_15677159-e084-414e-95c9-dbad5212c915.webp?v=1714977912","width":2000},{"alt":null,"id":23897390252131,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/067efce8c5b8a383997b3346b6d19f25184011af_eac70784-d1cd-465f-9154-2e9963aad53c.webp?v=1714977915"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/067efce8c5b8a383997b3346b6d19f25184011af_eac70784-d1cd-465f-9154-2e9963aad53c.webp?v=1714977915","width":2000},{"alt":null,"id":23897390809187,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f42dec7da8f5892b8b76be27070c2f8a48b5c75_55c61e04-4efc-40e5-99f4-c9300669754b.webp?v=1714977917"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f42dec7da8f5892b8b76be27070c2f8a48b5c75_55c61e04-4efc-40e5-99f4-c9300669754b.webp?v=1714977917","width":2000},{"alt":null,"id":23897391300707,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7867074a320867c8311528fc3312987b68c02df8_8c7d7d04-411d-45a6-a925-fcf4fa12abcd.webp?v=1714977919"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7867074a320867c8311528fc3312987b68c02df8_8c7d7d04-411d-45a6-a925-fcf4fa12abcd.webp?v=1714977919","width":2000},{"alt":null,"id":23897391693923,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5aaf6459405546abaa2f4aa41c352164d16f4e37_7ac4c97e-9490-40ba-a6f2-62a44f5a1a5a.webp?v=1714977921"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5aaf6459405546abaa2f4aa41c352164d16f4e37_7ac4c97e-9490-40ba-a6f2-62a44f5a1a5a.webp?v=1714977921","width":2000},{"alt":null,"id":23897392152675,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d7e9ee866a64e793067822848cd9b2e5245ad315_675a7548-a6ab-4627-958b-5af52c827edf.webp?v=1714977924"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d7e9ee866a64e793067822848cd9b2e5245ad315_675a7548-a6ab-4627-958b-5af52c827edf.webp?v=1714977924","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41919066013795,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-EO04","requires_shipping":true,"taxable":true,"featured_image":{"id":31491975708771,"product_id":7416376098915,"position":3,"created_at":"2024-05-06T14:45:08+08:00","updated_at":"2024-05-06T14:45:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbd0916d892f36514c43d6907a204627c6b7480e_51829796-575c-44c9-93a1-5daebc46f333.webp?v=1714977908","variant_ids":[41919066013795]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - Weiweiboy - 可愛大王上甜點 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0105424-EO04","featured_media":{"alt":null,"id":23897389105251,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbd0916d892f36514c43d6907a204627c6b7480e_51829796-575c-44c9-93a1-5daebc46f333.webp?v=1714977908"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41919066013795,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-EO04","requires_shipping":true,"taxable":true,"featured_image":{"id":31491975708771,"product_id":7416376098915,"position":3,"created_at":"2024-05-06T14:45:08+08:00","updated_at":"2024-05-06T14:45:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbd0916d892f36514c43d6907a204627c6b7480e_51829796-575c-44c9-93a1-5daebc46f333.webp?v=1714977908","variant_ids":[41919066013795]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - Weiweiboy - 可愛大王上甜點 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":860,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0105424-EO04","featured_media":{"alt":null,"id":23897389105251,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dbd0916d892f36514c43d6907a204627c6b7480e_51829796-575c-44c9-93a1-5daebc46f333.webp?v=1714977908"}},"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: "停產" }