$product = {"id":7408475603043,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 鈦戰機","handle":"iphone-12-mini-mod-nx-printable-pb73","description":null,"published_at":"2024-06-11T16:38:17+08:00","created_at":"2024-05-03T15:33:57+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 mini","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":41885906993251,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB73","requires_shipping":true,"taxable":true,"featured_image":{"id":31472374317155,"product_id":7408475603043,"position":8,"created_at":"2024-05-03T15:34:17+08:00","updated_at":"2024-05-03T15:34:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ec31b2d64b8c7406b88c2042ae2c9cf0e95ee3d_192d0768-9638-4107-b808-c6c86cd02f66.webp?v=1714721657","variant_ids":[41885906993251]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 鈦戰機 - 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":"NPB0118424-PB73","featured_media":{"alt":null,"id":23877291212899,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ec31b2d64b8c7406b88c2042ae2c9cf0e95ee3d_192d0768-9638-4107-b808-c6c86cd02f66.webp?v=1714721657"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da558215bbf06f95430a86d5f14be19761d236b7_d8cfb672-fb80-4403-9719-210abce68a35.webp?v=1714721640","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2d5b0b7e71bf23d4749aefb7d2b5ca445300eb6_55519946-62b0-4231-a225-36f225d3d559.webp?v=1714721642","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e35d0f8e0b7e2f664321549348806e6b10019e2_ebcab34f-4a6a-4054-a1e7-3b68dcda52a7.webp?v=1714721645","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84e8cae93aeb6ea4c8bd658981ebf526f9c27b13_94f2854c-7d52-4b2a-86b8-cdfd54285ec7.webp?v=1714721647","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0e6531dbef65dddc27c7758b992992008e76739_edf2ecbf-2e78-41a6-97e9-49a88188c5a2.webp?v=1714721650","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c68b391a06fe4e50eebe6c4be36c05de8b22f87d_168f2552-1d72-480d-a53f-e8f638cb4bde.webp?v=1714721652","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a56d19214493be721817561df1714d64a4e63e24_e6cf2e89-cc82-4c46-82b5-6540480eee32.webp?v=1714721655","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ec31b2d64b8c7406b88c2042ae2c9cf0e95ee3d_192d0768-9638-4107-b808-c6c86cd02f66.webp?v=1714721657","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b53a7753e6b31d55fc3dbdcc07f8f026bcfd3e55_5ad60c84-56d8-4b67-8d7f-f905d93088fd.webp?v=1714721659","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/acd7df8a57e7ed39d654ebe7bd09242d8e159b5c_3f6bd8fd-66d2-43ed-9579-ac3ea02d03a5.webp?v=1714721661","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68cbffed61d5b334d2d8e2811c0ee93b92ca17af_fba51566-b9e5-45b9-9a6c-6cafedbd99fe.webp?v=1714721664"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da558215bbf06f95430a86d5f14be19761d236b7_d8cfb672-fb80-4403-9719-210abce68a35.webp?v=1714721640","options":["color"],"media":[{"alt":null,"id":23877287739491,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da558215bbf06f95430a86d5f14be19761d236b7_d8cfb672-fb80-4403-9719-210abce68a35.webp?v=1714721640"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da558215bbf06f95430a86d5f14be19761d236b7_d8cfb672-fb80-4403-9719-210abce68a35.webp?v=1714721640","width":2000},{"alt":null,"id":23877288394851,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2d5b0b7e71bf23d4749aefb7d2b5ca445300eb6_55519946-62b0-4231-a225-36f225d3d559.webp?v=1714721642"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2d5b0b7e71bf23d4749aefb7d2b5ca445300eb6_55519946-62b0-4231-a225-36f225d3d559.webp?v=1714721642","width":2000},{"alt":null,"id":23877288755299,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e35d0f8e0b7e2f664321549348806e6b10019e2_ebcab34f-4a6a-4054-a1e7-3b68dcda52a7.webp?v=1714721645"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e35d0f8e0b7e2f664321549348806e6b10019e2_ebcab34f-4a6a-4054-a1e7-3b68dcda52a7.webp?v=1714721645","width":2000},{"alt":null,"id":23877289279587,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84e8cae93aeb6ea4c8bd658981ebf526f9c27b13_94f2854c-7d52-4b2a-86b8-cdfd54285ec7.webp?v=1714721647"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84e8cae93aeb6ea4c8bd658981ebf526f9c27b13_94f2854c-7d52-4b2a-86b8-cdfd54285ec7.webp?v=1714721647","width":2000},{"alt":null,"id":23877289738339,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0e6531dbef65dddc27c7758b992992008e76739_edf2ecbf-2e78-41a6-97e9-49a88188c5a2.webp?v=1714721650"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b0e6531dbef65dddc27c7758b992992008e76739_edf2ecbf-2e78-41a6-97e9-49a88188c5a2.webp?v=1714721650","width":2000},{"alt":null,"id":23877290197091,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c68b391a06fe4e50eebe6c4be36c05de8b22f87d_168f2552-1d72-480d-a53f-e8f638cb4bde.webp?v=1714721652"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c68b391a06fe4e50eebe6c4be36c05de8b22f87d_168f2552-1d72-480d-a53f-e8f638cb4bde.webp?v=1714721652","width":2000},{"alt":null,"id":23877290721379,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a56d19214493be721817561df1714d64a4e63e24_e6cf2e89-cc82-4c46-82b5-6540480eee32.webp?v=1714721655"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a56d19214493be721817561df1714d64a4e63e24_e6cf2e89-cc82-4c46-82b5-6540480eee32.webp?v=1714721655","width":2000},{"alt":null,"id":23877291212899,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ec31b2d64b8c7406b88c2042ae2c9cf0e95ee3d_192d0768-9638-4107-b808-c6c86cd02f66.webp?v=1714721657"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ec31b2d64b8c7406b88c2042ae2c9cf0e95ee3d_192d0768-9638-4107-b808-c6c86cd02f66.webp?v=1714721657","width":2000},{"alt":null,"id":23877291802723,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b53a7753e6b31d55fc3dbdcc07f8f026bcfd3e55_5ad60c84-56d8-4b67-8d7f-f905d93088fd.webp?v=1714721659"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b53a7753e6b31d55fc3dbdcc07f8f026bcfd3e55_5ad60c84-56d8-4b67-8d7f-f905d93088fd.webp?v=1714721659","width":2000},{"alt":null,"id":23877292228707,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/acd7df8a57e7ed39d654ebe7bd09242d8e159b5c_3f6bd8fd-66d2-43ed-9579-ac3ea02d03a5.webp?v=1714721661"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/acd7df8a57e7ed39d654ebe7bd09242d8e159b5c_3f6bd8fd-66d2-43ed-9579-ac3ea02d03a5.webp?v=1714721661","width":2000},{"alt":null,"id":23877292654691,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68cbffed61d5b334d2d8e2811c0ee93b92ca17af_fba51566-b9e5-45b9-9a6c-6cafedbd99fe.webp?v=1714721664"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68cbffed61d5b334d2d8e2811c0ee93b92ca17af_fba51566-b9e5-45b9-9a6c-6cafedbd99fe.webp?v=1714721664","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41885906993251,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB73","requires_shipping":true,"taxable":true,"featured_image":{"id":31472374317155,"product_id":7408475603043,"position":8,"created_at":"2024-05-03T15:34:17+08:00","updated_at":"2024-05-03T15:34:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ec31b2d64b8c7406b88c2042ae2c9cf0e95ee3d_192d0768-9638-4107-b808-c6c86cd02f66.webp?v=1714721657","variant_ids":[41885906993251]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 鈦戰機 - 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":"NPB0118424-PB73","featured_media":{"alt":null,"id":23877291212899,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ec31b2d64b8c7406b88c2042ae2c9cf0e95ee3d_192d0768-9638-4107-b808-c6c86cd02f66.webp?v=1714721657"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41885906993251,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB73","requires_shipping":true,"taxable":true,"featured_image":{"id":31472374317155,"product_id":7408475603043,"position":8,"created_at":"2024-05-03T15:34:17+08:00","updated_at":"2024-05-03T15:34:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ec31b2d64b8c7406b88c2042ae2c9cf0e95ee3d_192d0768-9638-4107-b808-c6c86cd02f66.webp?v=1714721657","variant_ids":[41885906993251]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 鈦戰機 - 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":"NPB0118424-PB73","featured_media":{"alt":null,"id":23877291212899,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ec31b2d64b8c7406b88c2042ae2c9cf0e95ee3d_192d0768-9638-4107-b808-c6c86cd02f66.webp?v=1714721657"}},"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: "停產" }