$product = {"id":7411226542179,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Care Bears - Cheer Bear","handle":"iphone-14-plus-mod-nx-magsafe-printable-yb03","description":null,"published_at":"2024-06-11T17:39:17+08:00","created_at":"2024-05-04T23:48:59+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Care Bears","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-carebears","device-iPhone 14 Plus","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-carebears","Top50","type-Mod NX Printable MagSafe Printable"],"price":110000,"price_min":110000,"price_max":110000,"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":41896230125667,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-YB03","requires_shipping":true,"taxable":true,"featured_image":{"id":31479899619427,"product_id":7411226542179,"position":9,"created_at":"2024-05-04T23:49:20+08:00","updated_at":"2024-05-04T23:49:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2db58d8e8cfe6b6f8564a27f09b6983c67c3f4fd_1139766c-cbc7-47a4-b379-0c3fb00a9cb4.webp?v=1714837760","variant_ids":[41896230125667]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Care Bears - Cheer Bear - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-YB03","featured_media":{"alt":null,"id":23885150027875,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2db58d8e8cfe6b6f8564a27f09b6983c67c3f4fd_1139766c-cbc7-47a4-b379-0c3fb00a9cb4.webp?v=1714837760"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7d20872b4b646333b07fd6d48c236f4306354f3_cc9c0ea1-c346-49bd-afba-8a9332d7b2d7.webp?v=1714837742","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73fdc3d3038779f17aaee6fad21dad0607529503_6def7c17-be30-4219-8d2e-e3f10b505fb2.webp?v=1714837744","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fa67c547c2d9812aa9e59dce2c6829f5121ed51_eeb8b07a-4bdb-4568-80ad-d0045ea2e4e1.webp?v=1714837746","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/038a7c7a599c455416f75456af8e8752c796198a_a5aff29a-865c-4bf3-b5ec-3a2b3dafc65e.webp?v=1714837748","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29105f8c6cf970a9bfdfbc25212ddf22ffa1f69c_1e4e4929-07ff-4b9e-b47d-9c83f7facd13.webp?v=1714837751","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68dfe7efb0680a5a212748e9bb503d6f677ffc17_76396240-ed6e-469e-a5ab-ce4ec98cf2f2.webp?v=1714837753","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5cc1ef7cec3b69dec7b73e794d67922eb619dd8_41c61561-15fa-4c33-a6ea-91abb4971734.webp?v=1714837755","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d963ff9eb293f60b0d4d75ca08d16005b9ee8a8_c87b889f-a23e-4e49-93fb-d5c1b3576cbc.webp?v=1714837758","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2db58d8e8cfe6b6f8564a27f09b6983c67c3f4fd_1139766c-cbc7-47a4-b379-0c3fb00a9cb4.webp?v=1714837760","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f226d91508ca539de6bfa0ff44f60c5092346bc_ce771c5a-a8f7-4e51-b667-d6c095d89264.webp?v=1714837762"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7d20872b4b646333b07fd6d48c236f4306354f3_cc9c0ea1-c346-49bd-afba-8a9332d7b2d7.webp?v=1714837742","options":["color"],"media":[{"alt":null,"id":23885144981603,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7d20872b4b646333b07fd6d48c236f4306354f3_cc9c0ea1-c346-49bd-afba-8a9332d7b2d7.webp?v=1714837742"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a7d20872b4b646333b07fd6d48c236f4306354f3_cc9c0ea1-c346-49bd-afba-8a9332d7b2d7.webp?v=1714837742","width":2000},{"alt":null,"id":23885145538659,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73fdc3d3038779f17aaee6fad21dad0607529503_6def7c17-be30-4219-8d2e-e3f10b505fb2.webp?v=1714837744"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73fdc3d3038779f17aaee6fad21dad0607529503_6def7c17-be30-4219-8d2e-e3f10b505fb2.webp?v=1714837744","width":2000},{"alt":null,"id":23885145931875,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fa67c547c2d9812aa9e59dce2c6829f5121ed51_eeb8b07a-4bdb-4568-80ad-d0045ea2e4e1.webp?v=1714837746"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7fa67c547c2d9812aa9e59dce2c6829f5121ed51_eeb8b07a-4bdb-4568-80ad-d0045ea2e4e1.webp?v=1714837746","width":2000},{"alt":null,"id":23885146816611,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/038a7c7a599c455416f75456af8e8752c796198a_a5aff29a-865c-4bf3-b5ec-3a2b3dafc65e.webp?v=1714837748"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/038a7c7a599c455416f75456af8e8752c796198a_a5aff29a-865c-4bf3-b5ec-3a2b3dafc65e.webp?v=1714837748","width":2000},{"alt":null,"id":23885147570275,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29105f8c6cf970a9bfdfbc25212ddf22ffa1f69c_1e4e4929-07ff-4b9e-b47d-9c83f7facd13.webp?v=1714837751"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29105f8c6cf970a9bfdfbc25212ddf22ffa1f69c_1e4e4929-07ff-4b9e-b47d-9c83f7facd13.webp?v=1714837751","width":2000},{"alt":null,"id":23885148192867,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68dfe7efb0680a5a212748e9bb503d6f677ffc17_76396240-ed6e-469e-a5ab-ce4ec98cf2f2.webp?v=1714837753"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68dfe7efb0680a5a212748e9bb503d6f677ffc17_76396240-ed6e-469e-a5ab-ce4ec98cf2f2.webp?v=1714837753","width":2000},{"alt":null,"id":23885148913763,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5cc1ef7cec3b69dec7b73e794d67922eb619dd8_41c61561-15fa-4c33-a6ea-91abb4971734.webp?v=1714837755"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5cc1ef7cec3b69dec7b73e794d67922eb619dd8_41c61561-15fa-4c33-a6ea-91abb4971734.webp?v=1714837755","width":2000},{"alt":null,"id":23885149405283,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d963ff9eb293f60b0d4d75ca08d16005b9ee8a8_c87b889f-a23e-4e49-93fb-d5c1b3576cbc.webp?v=1714837758"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d963ff9eb293f60b0d4d75ca08d16005b9ee8a8_c87b889f-a23e-4e49-93fb-d5c1b3576cbc.webp?v=1714837758","width":2000},{"alt":null,"id":23885150027875,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2db58d8e8cfe6b6f8564a27f09b6983c67c3f4fd_1139766c-cbc7-47a4-b379-0c3fb00a9cb4.webp?v=1714837760"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2db58d8e8cfe6b6f8564a27f09b6983c67c3f4fd_1139766c-cbc7-47a4-b379-0c3fb00a9cb4.webp?v=1714837760","width":2000},{"alt":null,"id":23885150519395,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f226d91508ca539de6bfa0ff44f60c5092346bc_ce771c5a-a8f7-4e51-b667-d6c095d89264.webp?v=1714837762"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f226d91508ca539de6bfa0ff44f60c5092346bc_ce771c5a-a8f7-4e51-b667-d6c095d89264.webp?v=1714837762","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41896230125667,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-YB03","requires_shipping":true,"taxable":true,"featured_image":{"id":31479899619427,"product_id":7411226542179,"position":9,"created_at":"2024-05-04T23:49:20+08:00","updated_at":"2024-05-04T23:49:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2db58d8e8cfe6b6f8564a27f09b6983c67c3f4fd_1139766c-cbc7-47a4-b379-0c3fb00a9cb4.webp?v=1714837760","variant_ids":[41896230125667]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Care Bears - Cheer Bear - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-YB03","featured_media":{"alt":null,"id":23885150027875,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2db58d8e8cfe6b6f8564a27f09b6983c67c3f4fd_1139766c-cbc7-47a4-b379-0c3fb00a9cb4.webp?v=1714837760"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41896230125667,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-YB03","requires_shipping":true,"taxable":true,"featured_image":{"id":31479899619427,"product_id":7411226542179,"position":9,"created_at":"2024-05-04T23:49:20+08:00","updated_at":"2024-05-04T23:49:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2db58d8e8cfe6b6f8564a27f09b6983c67c3f4fd_1139766c-cbc7-47a4-b379-0c3fb00a9cb4.webp?v=1714837760","variant_ids":[41896230125667]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - Care Bears - Cheer Bear - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-YB03","featured_media":{"alt":null,"id":23885150027875,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2db58d8e8cfe6b6f8564a27f09b6983c67c3f4fd_1139766c-cbc7-47a4-b379-0c3fb00a9cb4.webp?v=1714837760"}},"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: "停產" }