$product = {"id":7416175100003,"title":"犀牛盾Mod NX手機殼 - iPhone X The Powerpuff Girls - 毛毛","handle":"iphone-x-mod-nx-printable-sr07","description":null,"published_at":"2024-06-11T16:52:39+08:00","created_at":"2024-05-06T14:05:47+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-The Powerpuff Girls","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-the-power-puff-girls","device-iPhone X","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-the-power-puff-girls","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":41917744873571,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0106424-SR07","requires_shipping":true,"taxable":true,"featured_image":{"id":31491566305379,"product_id":7416175100003,"position":8,"created_at":"2024-05-06T14:06:07+08:00","updated_at":"2024-05-06T14:06:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e5d45b145922101529d821f1d808f13bc5f9268_1eeb7039-07e7-47e2-ab91-513f28f22b20.webp?v=1714975567","variant_ids":[41917744873571]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone X The Powerpuff Girls - 毛毛 - 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":"NPB0106424-SR07","featured_media":{"alt":null,"id":23896978260067,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e5d45b145922101529d821f1d808f13bc5f9268_1eeb7039-07e7-47e2-ab91-513f28f22b20.webp?v=1714975567"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2d985eafd35e6d8450662ff270c5339ab2f3cab_466a79ef-7d73-4f4d-84d8-aa21bf1722d5.webp?v=1714975549","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/21a281e7069e6e842340176e256923f0b08098c6_f2ef6d85-14fe-4260-a1bf-0fdf42082747.webp?v=1714975552","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68f542cdb8bf06a21454dfe16d6a5fca6557ed61_2f06e03f-414e-4dda-b187-712c0c7e8a6d.webp?v=1714975554","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9019015aad412d4da32cf377042e827714d9672_c69d12e0-8b10-4afe-a587-000bc76e2650.webp?v=1714975557","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44f76dba93296fc5628e4bd06dffe4b976ac3566_0e046303-39f0-44fa-b560-5fb8b71e5a52.webp?v=1714975559","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8cc6243a7290dc16cd3b958231d39f2fd59bf961_f3e20369-1dc4-4fdc-9ca2-47f1dd564588.webp?v=1714975562","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/48df6c4beb57adffbc7c61365d54b52150dfd4d6_6a51802b-82d6-4f71-bf2a-6f02c9bdb776.webp?v=1714975564","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e5d45b145922101529d821f1d808f13bc5f9268_1eeb7039-07e7-47e2-ab91-513f28f22b20.webp?v=1714975567","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/524d6b886356bf25137bd2dba5936e82687b14b5_5426664e-5c4b-44cf-9a79-f2a21715a8fb.webp?v=1714975569","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b266bb3d599db461d8a940a2613fb8b47f78a8c_75d9bbe0-c84c-4285-815e-9e3e6b0ae466.webp?v=1714975571"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2d985eafd35e6d8450662ff270c5339ab2f3cab_466a79ef-7d73-4f4d-84d8-aa21bf1722d5.webp?v=1714975549","options":["color"],"media":[{"alt":null,"id":23896974327907,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2d985eafd35e6d8450662ff270c5339ab2f3cab_466a79ef-7d73-4f4d-84d8-aa21bf1722d5.webp?v=1714975549"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2d985eafd35e6d8450662ff270c5339ab2f3cab_466a79ef-7d73-4f4d-84d8-aa21bf1722d5.webp?v=1714975549","width":2000},{"alt":null,"id":23896974983267,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/21a281e7069e6e842340176e256923f0b08098c6_f2ef6d85-14fe-4260-a1bf-0fdf42082747.webp?v=1714975552"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/21a281e7069e6e842340176e256923f0b08098c6_f2ef6d85-14fe-4260-a1bf-0fdf42082747.webp?v=1714975552","width":2000},{"alt":null,"id":23896975442019,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68f542cdb8bf06a21454dfe16d6a5fca6557ed61_2f06e03f-414e-4dda-b187-712c0c7e8a6d.webp?v=1714975554"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68f542cdb8bf06a21454dfe16d6a5fca6557ed61_2f06e03f-414e-4dda-b187-712c0c7e8a6d.webp?v=1714975554","width":2000},{"alt":null,"id":23896975999075,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9019015aad412d4da32cf377042e827714d9672_c69d12e0-8b10-4afe-a587-000bc76e2650.webp?v=1714975557"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9019015aad412d4da32cf377042e827714d9672_c69d12e0-8b10-4afe-a587-000bc76e2650.webp?v=1714975557","width":2000},{"alt":null,"id":23896976392291,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44f76dba93296fc5628e4bd06dffe4b976ac3566_0e046303-39f0-44fa-b560-5fb8b71e5a52.webp?v=1714975559"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44f76dba93296fc5628e4bd06dffe4b976ac3566_0e046303-39f0-44fa-b560-5fb8b71e5a52.webp?v=1714975559","width":2000},{"alt":null,"id":23896977244259,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8cc6243a7290dc16cd3b958231d39f2fd59bf961_f3e20369-1dc4-4fdc-9ca2-47f1dd564588.webp?v=1714975562"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8cc6243a7290dc16cd3b958231d39f2fd59bf961_f3e20369-1dc4-4fdc-9ca2-47f1dd564588.webp?v=1714975562","width":2000},{"alt":null,"id":23896977670243,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/48df6c4beb57adffbc7c61365d54b52150dfd4d6_6a51802b-82d6-4f71-bf2a-6f02c9bdb776.webp?v=1714975564"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/48df6c4beb57adffbc7c61365d54b52150dfd4d6_6a51802b-82d6-4f71-bf2a-6f02c9bdb776.webp?v=1714975564","width":2000},{"alt":null,"id":23896978260067,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e5d45b145922101529d821f1d808f13bc5f9268_1eeb7039-07e7-47e2-ab91-513f28f22b20.webp?v=1714975567"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e5d45b145922101529d821f1d808f13bc5f9268_1eeb7039-07e7-47e2-ab91-513f28f22b20.webp?v=1714975567","width":2000},{"alt":null,"id":23896978948195,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/524d6b886356bf25137bd2dba5936e82687b14b5_5426664e-5c4b-44cf-9a79-f2a21715a8fb.webp?v=1714975569"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/524d6b886356bf25137bd2dba5936e82687b14b5_5426664e-5c4b-44cf-9a79-f2a21715a8fb.webp?v=1714975569","width":2000},{"alt":null,"id":23896979734627,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b266bb3d599db461d8a940a2613fb8b47f78a8c_75d9bbe0-c84c-4285-815e-9e3e6b0ae466.webp?v=1714975571"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b266bb3d599db461d8a940a2613fb8b47f78a8c_75d9bbe0-c84c-4285-815e-9e3e6b0ae466.webp?v=1714975571","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $bumper = null; $variants = [{"id":41917744873571,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0106424-SR07","requires_shipping":true,"taxable":true,"featured_image":{"id":31491566305379,"product_id":7416175100003,"position":8,"created_at":"2024-05-06T14:06:07+08:00","updated_at":"2024-05-06T14:06:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e5d45b145922101529d821f1d808f13bc5f9268_1eeb7039-07e7-47e2-ab91-513f28f22b20.webp?v=1714975567","variant_ids":[41917744873571]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone X The Powerpuff Girls - 毛毛 - 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":"NPB0106424-SR07","featured_media":{"alt":null,"id":23896978260067,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e5d45b145922101529d821f1d808f13bc5f9268_1eeb7039-07e7-47e2-ab91-513f28f22b20.webp?v=1714975567"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41917744873571,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0106424-SR07","requires_shipping":true,"taxable":true,"featured_image":{"id":31491566305379,"product_id":7416175100003,"position":8,"created_at":"2024-05-06T14:06:07+08:00","updated_at":"2024-05-06T14:06:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e5d45b145922101529d821f1d808f13bc5f9268_1eeb7039-07e7-47e2-ab91-513f28f22b20.webp?v=1714975567","variant_ids":[41917744873571]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone X The Powerpuff Girls - 毛毛 - 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":"NPB0106424-SR07","featured_media":{"alt":null,"id":23896978260067,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e5d45b145922101529d821f1d808f13bc5f9268_1eeb7039-07e7-47e2-ab91-513f28f22b20.webp?v=1714975567"}},"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: "停產" }