$product = {"id":7369182085219,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Snoopy 史努比 - 冰淇淋甜筒","handle":"iphone-12-pro-max-mod-nx-printable-pl59","description":null,"published_at":"2024-06-11T16:13:59+08:00","created_at":"2024-04-23T15:39:37+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-Snoopy 史努比","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-snoopy","device-iPhone 12 pro max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-snoopy","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":41793363312739,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PL59","requires_shipping":true,"taxable":true,"featured_image":{"id":31387000897635,"product_id":7369182085219,"position":1,"created_at":"2024-04-23T15:39:39+08:00","updated_at":"2024-04-23T15:39:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/860f2c014b99c758805a81ee706afdf90639315d_2d7fa48f-0bed-4898-abb4-9f02172895a6.webp?v=1713857979","variant_ids":[41793363312739]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Snoopy 史努比 - 冰淇淋甜筒 - 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-PL59","featured_media":{"alt":null,"id":23789239304291,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/860f2c014b99c758805a81ee706afdf90639315d_2d7fa48f-0bed-4898-abb4-9f02172895a6.webp?v=1713857979"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/860f2c014b99c758805a81ee706afdf90639315d_2d7fa48f-0bed-4898-abb4-9f02172895a6.webp?v=1713857979","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51935e6bc8d29acbe9e962744a015585bb4837dc_68f9ec22-e373-4aef-be10-a8b1df71b4c0.webp?v=1713857982","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4e4a1e2870bedd961306c4322b1b4b561eb120a_85dbe3b0-4488-4110-b80c-98582c21134b.webp?v=1713857984","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5af208772cb8a0de0dbcfc2ab555d65e1c47fbc_e4baeccb-9d3a-4861-b292-d4339b2f8b44.webp?v=1713857986","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42f233476327393de91607500a228caa9ee753ba_e23d8c49-b665-483f-9fad-b4231291f2e8.webp?v=1713857989","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc1742d9bf81b1ad7ff36754a86669290f45c9b2_672cae8d-dd27-4631-ae62-718081e49932.webp?v=1713857991","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f20771f84eb26f64a90d1e9f49be95261f71b7a_315d2fee-f5a2-44a6-b347-e06f4213ef70.webp?v=1713857993","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5acfebfd4ea052b2501f5965af567b6178812e0f_a91cdfb3-0f81-4fd5-9bc9-4075b0b35b37.webp?v=1713857996","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fa3949306beec0e60ed2e8d22e36ea0b6e62d4d_7f6da3c3-7b4d-4ba5-9dbc-1684c8d83489.webp?v=1713857998","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31cbe3f2c7cdcd97e3f9b84112092797b01eb6c1_34dff638-aa58-4ac8-ace1-9bec674fb945.webp?v=1713858000"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/860f2c014b99c758805a81ee706afdf90639315d_2d7fa48f-0bed-4898-abb4-9f02172895a6.webp?v=1713857979","options":["color"],"media":[{"alt":null,"id":23789239304291,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/860f2c014b99c758805a81ee706afdf90639315d_2d7fa48f-0bed-4898-abb4-9f02172895a6.webp?v=1713857979"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/860f2c014b99c758805a81ee706afdf90639315d_2d7fa48f-0bed-4898-abb4-9f02172895a6.webp?v=1713857979","width":2000},{"alt":null,"id":23789239894115,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51935e6bc8d29acbe9e962744a015585bb4837dc_68f9ec22-e373-4aef-be10-a8b1df71b4c0.webp?v=1713857982"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51935e6bc8d29acbe9e962744a015585bb4837dc_68f9ec22-e373-4aef-be10-a8b1df71b4c0.webp?v=1713857982","width":2000},{"alt":null,"id":23789240385635,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4e4a1e2870bedd961306c4322b1b4b561eb120a_85dbe3b0-4488-4110-b80c-98582c21134b.webp?v=1713857984"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4e4a1e2870bedd961306c4322b1b4b561eb120a_85dbe3b0-4488-4110-b80c-98582c21134b.webp?v=1713857984","width":2000},{"alt":null,"id":23789240877155,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5af208772cb8a0de0dbcfc2ab555d65e1c47fbc_e4baeccb-9d3a-4861-b292-d4339b2f8b44.webp?v=1713857986"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5af208772cb8a0de0dbcfc2ab555d65e1c47fbc_e4baeccb-9d3a-4861-b292-d4339b2f8b44.webp?v=1713857986","width":2000},{"alt":null,"id":23789241499747,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42f233476327393de91607500a228caa9ee753ba_e23d8c49-b665-483f-9fad-b4231291f2e8.webp?v=1713857989"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42f233476327393de91607500a228caa9ee753ba_e23d8c49-b665-483f-9fad-b4231291f2e8.webp?v=1713857989","width":2000},{"alt":null,"id":23789241991267,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc1742d9bf81b1ad7ff36754a86669290f45c9b2_672cae8d-dd27-4631-ae62-718081e49932.webp?v=1713857991"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc1742d9bf81b1ad7ff36754a86669290f45c9b2_672cae8d-dd27-4631-ae62-718081e49932.webp?v=1713857991","width":2000},{"alt":null,"id":23789242548323,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f20771f84eb26f64a90d1e9f49be95261f71b7a_315d2fee-f5a2-44a6-b347-e06f4213ef70.webp?v=1713857993"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f20771f84eb26f64a90d1e9f49be95261f71b7a_315d2fee-f5a2-44a6-b347-e06f4213ef70.webp?v=1713857993","width":2000},{"alt":null,"id":23789243039843,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5acfebfd4ea052b2501f5965af567b6178812e0f_a91cdfb3-0f81-4fd5-9bc9-4075b0b35b37.webp?v=1713857996"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5acfebfd4ea052b2501f5965af567b6178812e0f_a91cdfb3-0f81-4fd5-9bc9-4075b0b35b37.webp?v=1713857996","width":2000},{"alt":null,"id":23789243629667,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fa3949306beec0e60ed2e8d22e36ea0b6e62d4d_7f6da3c3-7b4d-4ba5-9dbc-1684c8d83489.webp?v=1713857998"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fa3949306beec0e60ed2e8d22e36ea0b6e62d4d_7f6da3c3-7b4d-4ba5-9dbc-1684c8d83489.webp?v=1713857998","width":2000},{"alt":null,"id":23789244121187,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31cbe3f2c7cdcd97e3f9b84112092797b01eb6c1_34dff638-aa58-4ac8-ace1-9bec674fb945.webp?v=1713858000"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31cbe3f2c7cdcd97e3f9b84112092797b01eb6c1_34dff638-aa58-4ac8-ace1-9bec674fb945.webp?v=1713858000","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41793363312739,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PL59","requires_shipping":true,"taxable":true,"featured_image":{"id":31387000897635,"product_id":7369182085219,"position":1,"created_at":"2024-04-23T15:39:39+08:00","updated_at":"2024-04-23T15:39:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/860f2c014b99c758805a81ee706afdf90639315d_2d7fa48f-0bed-4898-abb4-9f02172895a6.webp?v=1713857979","variant_ids":[41793363312739]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Snoopy 史努比 - 冰淇淋甜筒 - 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-PL59","featured_media":{"alt":null,"id":23789239304291,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/860f2c014b99c758805a81ee706afdf90639315d_2d7fa48f-0bed-4898-abb4-9f02172895a6.webp?v=1713857979"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41793363312739,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PL59","requires_shipping":true,"taxable":true,"featured_image":{"id":31387000897635,"product_id":7369182085219,"position":1,"created_at":"2024-04-23T15:39:39+08:00","updated_at":"2024-04-23T15:39:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/860f2c014b99c758805a81ee706afdf90639315d_2d7fa48f-0bed-4898-abb4-9f02172895a6.webp?v=1713857979","variant_ids":[41793363312739]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - Snoopy 史努比 - 冰淇淋甜筒 - 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-PL59","featured_media":{"alt":null,"id":23789239304291,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/860f2c014b99c758805a81ee706afdf90639315d_2d7fa48f-0bed-4898-abb4-9f02172895a6.webp?v=1713857979"}},"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: "停產" }