$product = {"id":7408429891683,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Pattern BB8-Galaxy","handle":"iphone-12-pro-max-mod-nx-printable-pb59","description":null,"published_at":"2024-06-11T16:37:01+08:00","created_at":"2024-05-03T15:25:07+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 12 pro 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":41885386047587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB59","requires_shipping":true,"taxable":true,"featured_image":{"id":31472259924067,"product_id":7408429891683,"position":10,"created_at":"2024-05-03T15:25:30+08:00","updated_at":"2024-05-03T15:25:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04943c61860768b8555ef546ff7eeb49d0a507a8_1b457efc-e44f-46f5-9d68-789c7b338b14.webp?v=1714721130","variant_ids":[41885386047587]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Pattern BB8-Galaxy - 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-PB59","featured_media":{"alt":null,"id":23877176229987,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04943c61860768b8555ef546ff7eeb49d0a507a8_1b457efc-e44f-46f5-9d68-789c7b338b14.webp?v=1714721130"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/409eb5716a2ccae42e9207e709fde424021e38a9_70447dd7-f3d2-459f-9671-a94b5beead13.webp?v=1714721109","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/48538acc3b0270bb8a18502cae1d84e6bbc10bf3_198a04e3-19c6-4eb9-a701-336413f5bf42.webp?v=1714721112","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d0a0eb76a415b4a3d9468f8e8b28f25102ef418_7a2f7835-9ede-4668-b6af-e50242a59fa9.webp?v=1714721114","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e830276b6d145bcd3609edbe83cd4edccdfa94d_b8170bd4-5179-4643-a56b-db8d90ecd776.webp?v=1714721116","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6eaa5b09c1437b3b78292d17759766c0d34a10dc_55a0e9e1-1d3b-4f86-9168-8b0bfb96cd9a.webp?v=1714721119","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37348dfca129efe3a39f1423dbdfcf8eb598476a_210bd1a7-3e47-4530-8cbb-866622de1d6b.webp?v=1714721121","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e45b7d80c32e74b3202396d9cdd3ba769cdb5d58_4fdbaad8-698c-4fba-b2b4-160743c9b08a.webp?v=1714721123","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f6613f538b918f44a7abccb8fce172729787c8d_4c956b71-73d4-4dc5-8ad6-2e934d00d05c.webp?v=1714721126","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e2f448e784a3a47e192ca6a4334cfa8759a89a5_748019a0-761d-4a1f-bd7d-28c3533914d0.webp?v=1714721128","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04943c61860768b8555ef546ff7eeb49d0a507a8_1b457efc-e44f-46f5-9d68-789c7b338b14.webp?v=1714721130"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/409eb5716a2ccae42e9207e709fde424021e38a9_70447dd7-f3d2-459f-9671-a94b5beead13.webp?v=1714721109","options":["color"],"media":[{"alt":null,"id":23877170200675,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/409eb5716a2ccae42e9207e709fde424021e38a9_70447dd7-f3d2-459f-9671-a94b5beead13.webp?v=1714721109"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/409eb5716a2ccae42e9207e709fde424021e38a9_70447dd7-f3d2-459f-9671-a94b5beead13.webp?v=1714721109","width":2000},{"alt":null,"id":23877171019875,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/48538acc3b0270bb8a18502cae1d84e6bbc10bf3_198a04e3-19c6-4eb9-a701-336413f5bf42.webp?v=1714721112"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/48538acc3b0270bb8a18502cae1d84e6bbc10bf3_198a04e3-19c6-4eb9-a701-336413f5bf42.webp?v=1714721112","width":2000},{"alt":null,"id":23877171413091,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d0a0eb76a415b4a3d9468f8e8b28f25102ef418_7a2f7835-9ede-4668-b6af-e50242a59fa9.webp?v=1714721114"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d0a0eb76a415b4a3d9468f8e8b28f25102ef418_7a2f7835-9ede-4668-b6af-e50242a59fa9.webp?v=1714721114","width":2000},{"alt":null,"id":23877171970147,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e830276b6d145bcd3609edbe83cd4edccdfa94d_b8170bd4-5179-4643-a56b-db8d90ecd776.webp?v=1714721116"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e830276b6d145bcd3609edbe83cd4edccdfa94d_b8170bd4-5179-4643-a56b-db8d90ecd776.webp?v=1714721116","width":2000},{"alt":null,"id":23877173051491,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6eaa5b09c1437b3b78292d17759766c0d34a10dc_55a0e9e1-1d3b-4f86-9168-8b0bfb96cd9a.webp?v=1714721119"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6eaa5b09c1437b3b78292d17759766c0d34a10dc_55a0e9e1-1d3b-4f86-9168-8b0bfb96cd9a.webp?v=1714721119","width":2000},{"alt":null,"id":23877173608547,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37348dfca129efe3a39f1423dbdfcf8eb598476a_210bd1a7-3e47-4530-8cbb-866622de1d6b.webp?v=1714721121"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37348dfca129efe3a39f1423dbdfcf8eb598476a_210bd1a7-3e47-4530-8cbb-866622de1d6b.webp?v=1714721121","width":2000},{"alt":null,"id":23877174296675,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e45b7d80c32e74b3202396d9cdd3ba769cdb5d58_4fdbaad8-698c-4fba-b2b4-160743c9b08a.webp?v=1714721123"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e45b7d80c32e74b3202396d9cdd3ba769cdb5d58_4fdbaad8-698c-4fba-b2b4-160743c9b08a.webp?v=1714721123","width":2000},{"alt":null,"id":23877174755427,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f6613f538b918f44a7abccb8fce172729787c8d_4c956b71-73d4-4dc5-8ad6-2e934d00d05c.webp?v=1714721126"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f6613f538b918f44a7abccb8fce172729787c8d_4c956b71-73d4-4dc5-8ad6-2e934d00d05c.webp?v=1714721126","width":2000},{"alt":null,"id":23877175410787,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e2f448e784a3a47e192ca6a4334cfa8759a89a5_748019a0-761d-4a1f-bd7d-28c3533914d0.webp?v=1714721128"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e2f448e784a3a47e192ca6a4334cfa8759a89a5_748019a0-761d-4a1f-bd7d-28c3533914d0.webp?v=1714721128","width":2000},{"alt":null,"id":23877176229987,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04943c61860768b8555ef546ff7eeb49d0a507a8_1b457efc-e44f-46f5-9d68-789c7b338b14.webp?v=1714721130"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04943c61860768b8555ef546ff7eeb49d0a507a8_1b457efc-e44f-46f5-9d68-789c7b338b14.webp?v=1714721130","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885386047587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB59","requires_shipping":true,"taxable":true,"featured_image":{"id":31472259924067,"product_id":7408429891683,"position":10,"created_at":"2024-05-03T15:25:30+08:00","updated_at":"2024-05-03T15:25:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04943c61860768b8555ef546ff7eeb49d0a507a8_1b457efc-e44f-46f5-9d68-789c7b338b14.webp?v=1714721130","variant_ids":[41885386047587]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Pattern BB8-Galaxy - 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-PB59","featured_media":{"alt":null,"id":23877176229987,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04943c61860768b8555ef546ff7eeb49d0a507a8_1b457efc-e44f-46f5-9d68-789c7b338b14.webp?v=1714721130"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885386047587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PB59","requires_shipping":true,"taxable":true,"featured_image":{"id":31472259924067,"product_id":7408429891683,"position":10,"created_at":"2024-05-03T15:25:30+08:00","updated_at":"2024-05-03T15:25:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04943c61860768b8555ef546ff7eeb49d0a507a8_1b457efc-e44f-46f5-9d68-789c7b338b14.webp?v=1714721130","variant_ids":[41885386047587]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Pattern BB8-Galaxy - 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-PB59","featured_media":{"alt":null,"id":23877176229987,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04943c61860768b8555ef546ff7eeb49d0a507a8_1b457efc-e44f-46f5-9d68-789c7b338b14.webp?v=1714721130"}},"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: "停產" }