$product = {"id":7416357453923,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具3","handle":"iphone-8-mod-nx-printable-pb26","description":null,"published_at":"2024-06-11T16:56:51+08:00","created_at":"2024-05-06T14:41:15+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 8","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":41918862655587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB26","requires_shipping":true,"taxable":true,"featured_image":{"id":31491930685539,"product_id":7416357453923,"position":9,"created_at":"2024-05-06T14:41:37+08:00","updated_at":"2024-05-06T14:41:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/699c8850335afe119fcd023dbbc388783a244fb8_8c212882-1988-4d3c-acdc-e0f007508879.webp?v=1714977697","variant_ids":[41918862655587]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具3 - 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-PB26","featured_media":{"alt":null,"id":23897343688803,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/699c8850335afe119fcd023dbbc388783a244fb8_8c212882-1988-4d3c-acdc-e0f007508879.webp?v=1714977697"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8c56868b3c748c979275c3d27e99eb916ed9433_1fa32849-4936-4381-9aff-87aebcba12df.webp?v=1714977678","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6518ecc2b67b8750544e73cc95826cc4c0e81b51_c10bf4a1-9e05-4a74-bf42-dcf4eef9ce06.webp?v=1714977680","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f0f0218fe1e6083c45d00e43b2cb3451a84c72b_3ce70cba-71b7-4553-87eb-6b7f88b3625c.webp?v=1714977682","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81151665155417dcc3452a726c23419fefa4c4fa_55f71080-f788-4261-831d-48e608bdc59c.webp?v=1714977685","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54b416cdadaf9dcfb15324d62cd35bdd7c397b62_e5ed70df-52fe-4519-aa1b-b4c005bf8081.webp?v=1714977687","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd2025aee6fee5656c587276950b869749b71fd9_698d09a2-3bfe-49bb-8ff0-ea188f913ea3.webp?v=1714977690","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9438e434a0948190667c25a397dfd84ca8a042c_50a0df72-9854-404a-8588-2caeb1e65d04.webp?v=1714977692","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e3ad32f035b9a9d68f90d8eea12685953b7a270_8914a9d2-ed4b-4abf-9ed7-698d0ae56502.webp?v=1714977695","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/699c8850335afe119fcd023dbbc388783a244fb8_8c212882-1988-4d3c-acdc-e0f007508879.webp?v=1714977697","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c30a0f88229833dc76da8f36c108121a84e1754b_862ea2d7-3dca-4b1a-96ff-36cc0602cd28.webp?v=1714977699"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8c56868b3c748c979275c3d27e99eb916ed9433_1fa32849-4936-4381-9aff-87aebcba12df.webp?v=1714977678","options":["color"],"media":[{"alt":null,"id":23897339723875,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8c56868b3c748c979275c3d27e99eb916ed9433_1fa32849-4936-4381-9aff-87aebcba12df.webp?v=1714977678"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8c56868b3c748c979275c3d27e99eb916ed9433_1fa32849-4936-4381-9aff-87aebcba12df.webp?v=1714977678","width":2000},{"alt":null,"id":23897340346467,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6518ecc2b67b8750544e73cc95826cc4c0e81b51_c10bf4a1-9e05-4a74-bf42-dcf4eef9ce06.webp?v=1714977680"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6518ecc2b67b8750544e73cc95826cc4c0e81b51_c10bf4a1-9e05-4a74-bf42-dcf4eef9ce06.webp?v=1714977680","width":2000},{"alt":null,"id":23897340674147,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f0f0218fe1e6083c45d00e43b2cb3451a84c72b_3ce70cba-71b7-4553-87eb-6b7f88b3625c.webp?v=1714977682"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8f0f0218fe1e6083c45d00e43b2cb3451a84c72b_3ce70cba-71b7-4553-87eb-6b7f88b3625c.webp?v=1714977682","width":2000},{"alt":null,"id":23897341395043,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81151665155417dcc3452a726c23419fefa4c4fa_55f71080-f788-4261-831d-48e608bdc59c.webp?v=1714977685"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/81151665155417dcc3452a726c23419fefa4c4fa_55f71080-f788-4261-831d-48e608bdc59c.webp?v=1714977685","width":2000},{"alt":null,"id":23897341722723,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54b416cdadaf9dcfb15324d62cd35bdd7c397b62_e5ed70df-52fe-4519-aa1b-b4c005bf8081.webp?v=1714977687"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54b416cdadaf9dcfb15324d62cd35bdd7c397b62_e5ed70df-52fe-4519-aa1b-b4c005bf8081.webp?v=1714977687","width":2000},{"alt":null,"id":23897342312547,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd2025aee6fee5656c587276950b869749b71fd9_698d09a2-3bfe-49bb-8ff0-ea188f913ea3.webp?v=1714977690"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd2025aee6fee5656c587276950b869749b71fd9_698d09a2-3bfe-49bb-8ff0-ea188f913ea3.webp?v=1714977690","width":2000},{"alt":null,"id":23897342771299,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9438e434a0948190667c25a397dfd84ca8a042c_50a0df72-9854-404a-8588-2caeb1e65d04.webp?v=1714977692"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9438e434a0948190667c25a397dfd84ca8a042c_50a0df72-9854-404a-8588-2caeb1e65d04.webp?v=1714977692","width":2000},{"alt":null,"id":23897343230051,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e3ad32f035b9a9d68f90d8eea12685953b7a270_8914a9d2-ed4b-4abf-9ed7-698d0ae56502.webp?v=1714977695"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e3ad32f035b9a9d68f90d8eea12685953b7a270_8914a9d2-ed4b-4abf-9ed7-698d0ae56502.webp?v=1714977695","width":2000},{"alt":null,"id":23897343688803,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/699c8850335afe119fcd023dbbc388783a244fb8_8c212882-1988-4d3c-acdc-e0f007508879.webp?v=1714977697"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/699c8850335afe119fcd023dbbc388783a244fb8_8c212882-1988-4d3c-acdc-e0f007508879.webp?v=1714977697","width":2000},{"alt":null,"id":23897344213091,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c30a0f88229833dc76da8f36c108121a84e1754b_862ea2d7-3dca-4b1a-96ff-36cc0602cd28.webp?v=1714977699"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c30a0f88229833dc76da8f36c108121a84e1754b_862ea2d7-3dca-4b1a-96ff-36cc0602cd28.webp?v=1714977699","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41918862655587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB26","requires_shipping":true,"taxable":true,"featured_image":{"id":31491930685539,"product_id":7416357453923,"position":9,"created_at":"2024-05-06T14:41:37+08:00","updated_at":"2024-05-06T14:41:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/699c8850335afe119fcd023dbbc388783a244fb8_8c212882-1988-4d3c-acdc-e0f007508879.webp?v=1714977697","variant_ids":[41918862655587]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具3 - 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-PB26","featured_media":{"alt":null,"id":23897343688803,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/699c8850335afe119fcd023dbbc388783a244fb8_8c212882-1988-4d3c-acdc-e0f007508879.webp?v=1714977697"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41918862655587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB26","requires_shipping":true,"taxable":true,"featured_image":{"id":31491930685539,"product_id":7416357453923,"position":9,"created_at":"2024-05-06T14:41:37+08:00","updated_at":"2024-05-06T14:41:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/699c8850335afe119fcd023dbbc388783a244fb8_8c212882-1988-4d3c-acdc-e0f007508879.webp?v=1714977697","variant_ids":[41918862655587]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具3 - 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-PB26","featured_media":{"alt":null,"id":23897343688803,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/699c8850335afe119fcd023dbbc388783a244fb8_8c212882-1988-4d3c-acdc-e0f007508879.webp?v=1714977697"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null var sellingStatus if ($bumper) { $(document).ready(function() { var productImg = $product.images[0] var bumperVariants = $bumper.variants; var bumperColors = new Object(); var currentVariant = ''; var productType = ''; bumperVariants.forEach(variant => { bumperColors[`${variant.title.split(' (')[0].toLowerCase()}`] = variant.featured_image.src; }); if (productType === 'mod-nx-backplate' || productType === 'mod-backplate') { mergeImages( [productImg, bumperColors[currentVariant]], { crossOrigin: 'anonymous' } ).then(mergedImg => { $('.merged-img').attr('src', mergedImg); }); } else { mergeImages( [bumperColors[currentVariant], productImg], { crossOrigin: 'anonymous' } ).then(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: "停產" }