$product = {"id":7407919956067,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具2-白","handle":"iphone-14-plus-mod-nx-printable-pb12","description":null,"published_at":"2024-06-11T16:26:33+08:00","created_at":"2024-05-03T11:15:59+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 14 Plus","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":41880540119139,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31470702395491,"product_id":7407919956067,"position":7,"created_at":"2024-05-03T11:16:16+08:00","updated_at":"2024-05-03T11:16:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0d3d20461db0492cb2554ff62772fb9fd01fadf_d802e606-d525-4033-9d8c-1e20ded3d97a.webp?v=1714706176","variant_ids":[41880540119139]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具2-白 - 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":"NPB0126124-PB12","featured_media":{"alt":null,"id":23875606446179,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0d3d20461db0492cb2554ff62772fb9fd01fadf_d802e606-d525-4033-9d8c-1e20ded3d97a.webp?v=1714706176"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98f540965b83f2f45b65c07147f35ca32819aa36_ebbc8253-567e-4321-a998-21d2dca9f4a6.webp?v=1714706162","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90c5851c3c5739681f0b3d5c447818f075dbe77c_db2ac8ec-a6e6-4d30-b890-8b73149ab7bf.webp?v=1714706165","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37836598909a72d2d9521a655e8fde045d75201e_d2058767-9beb-4d5d-b0b6-ee8c10e3beb6.webp?v=1714706167","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80ec9e3873179934cfcce7e1b9b88a35bd841646_1e7215b6-3cef-4287-a465-3b0067bdac96.webp?v=1714706169","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d05de37e254e3582ee3b417889659d593d8d4307_589245c3-2e39-464a-8163-20542863c7de.webp?v=1714706172","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/505df47cc0e1ad9d25e3dde0d0fef727d6c4f334_1f35e914-fc1a-49a7-a705-f547695a3513.webp?v=1714706174","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0d3d20461db0492cb2554ff62772fb9fd01fadf_d802e606-d525-4033-9d8c-1e20ded3d97a.webp?v=1714706176","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17cc576700f7afc7b569f21f4dff59d664913dab_d1b228f2-2f81-48e0-9976-f8e543694bbd.webp?v=1714706179","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be752223142148367da8c8f837cd393e78ff25ee_8935c32d-7bcb-49b3-b943-e64a99eba7d8.webp?v=1714706181","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0310a5d9439a2e05f2d15e40bcaeecb0807b2acb_26c6d6cf-9405-49c4-8815-e348e3d3319c.webp?v=1714706183"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98f540965b83f2f45b65c07147f35ca32819aa36_ebbc8253-567e-4321-a998-21d2dca9f4a6.webp?v=1714706162","options":["color"],"media":[{"alt":null,"id":23875603857507,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98f540965b83f2f45b65c07147f35ca32819aa36_ebbc8253-567e-4321-a998-21d2dca9f4a6.webp?v=1714706162"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98f540965b83f2f45b65c07147f35ca32819aa36_ebbc8253-567e-4321-a998-21d2dca9f4a6.webp?v=1714706162","width":2000},{"alt":null,"id":23875604152419,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90c5851c3c5739681f0b3d5c447818f075dbe77c_db2ac8ec-a6e6-4d30-b890-8b73149ab7bf.webp?v=1714706165"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90c5851c3c5739681f0b3d5c447818f075dbe77c_db2ac8ec-a6e6-4d30-b890-8b73149ab7bf.webp?v=1714706165","width":2000},{"alt":null,"id":23875604676707,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37836598909a72d2d9521a655e8fde045d75201e_d2058767-9beb-4d5d-b0b6-ee8c10e3beb6.webp?v=1714706167"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37836598909a72d2d9521a655e8fde045d75201e_d2058767-9beb-4d5d-b0b6-ee8c10e3beb6.webp?v=1714706167","width":2000},{"alt":null,"id":23875605102691,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80ec9e3873179934cfcce7e1b9b88a35bd841646_1e7215b6-3cef-4287-a465-3b0067bdac96.webp?v=1714706169"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80ec9e3873179934cfcce7e1b9b88a35bd841646_1e7215b6-3cef-4287-a465-3b0067bdac96.webp?v=1714706169","width":2000},{"alt":null,"id":23875605528675,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d05de37e254e3582ee3b417889659d593d8d4307_589245c3-2e39-464a-8163-20542863c7de.webp?v=1714706172"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d05de37e254e3582ee3b417889659d593d8d4307_589245c3-2e39-464a-8163-20542863c7de.webp?v=1714706172","width":2000},{"alt":null,"id":23875606052963,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/505df47cc0e1ad9d25e3dde0d0fef727d6c4f334_1f35e914-fc1a-49a7-a705-f547695a3513.webp?v=1714706174"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/505df47cc0e1ad9d25e3dde0d0fef727d6c4f334_1f35e914-fc1a-49a7-a705-f547695a3513.webp?v=1714706174","width":2000},{"alt":null,"id":23875606446179,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0d3d20461db0492cb2554ff62772fb9fd01fadf_d802e606-d525-4033-9d8c-1e20ded3d97a.webp?v=1714706176"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0d3d20461db0492cb2554ff62772fb9fd01fadf_d802e606-d525-4033-9d8c-1e20ded3d97a.webp?v=1714706176","width":2000},{"alt":null,"id":23875606904931,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17cc576700f7afc7b569f21f4dff59d664913dab_d1b228f2-2f81-48e0-9976-f8e543694bbd.webp?v=1714706179"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17cc576700f7afc7b569f21f4dff59d664913dab_d1b228f2-2f81-48e0-9976-f8e543694bbd.webp?v=1714706179","width":2000},{"alt":null,"id":23875607560291,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be752223142148367da8c8f837cd393e78ff25ee_8935c32d-7bcb-49b3-b943-e64a99eba7d8.webp?v=1714706181"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be752223142148367da8c8f837cd393e78ff25ee_8935c32d-7bcb-49b3-b943-e64a99eba7d8.webp?v=1714706181","width":2000},{"alt":null,"id":23875608019043,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0310a5d9439a2e05f2d15e40bcaeecb0807b2acb_26c6d6cf-9405-49c4-8815-e348e3d3319c.webp?v=1714706183"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0310a5d9439a2e05f2d15e40bcaeecb0807b2acb_26c6d6cf-9405-49c4-8815-e348e3d3319c.webp?v=1714706183","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41880540119139,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31470702395491,"product_id":7407919956067,"position":7,"created_at":"2024-05-03T11:16:16+08:00","updated_at":"2024-05-03T11:16:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0d3d20461db0492cb2554ff62772fb9fd01fadf_d802e606-d525-4033-9d8c-1e20ded3d97a.webp?v=1714706176","variant_ids":[41880540119139]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具2-白 - 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":"NPB0126124-PB12","featured_media":{"alt":null,"id":23875606446179,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0d3d20461db0492cb2554ff62772fb9fd01fadf_d802e606-d525-4033-9d8c-1e20ded3d97a.webp?v=1714706176"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41880540119139,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB12","requires_shipping":true,"taxable":true,"featured_image":{"id":31470702395491,"product_id":7407919956067,"position":7,"created_at":"2024-05-03T11:16:16+08:00","updated_at":"2024-05-03T11:16:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0d3d20461db0492cb2554ff62772fb9fd01fadf_d802e606-d525-4033-9d8c-1e20ded3d97a.webp?v=1714706176","variant_ids":[41880540119139]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具2-白 - 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":"NPB0126124-PB12","featured_media":{"alt":null,"id":23875606446179,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d0d3d20461db0492cb2554ff62772fb9fd01fadf_d802e606-d525-4033-9d8c-1e20ded3d97a.webp?v=1714706176"}},"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: "停產" }