$product = {"id":7415095328867,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 【獨家設計款】 - 春夏犬の時裝週","handle":"iphone-12-mini-mod-nx-magsafe-printable-b071","description":null,"published_at":"2024-06-11T17:57:50+08:00","created_at":"2024-05-05T20:21:52+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"MOD NX MagSafe 客製化","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","device-iPhone 12 mini","discountable-item","member","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller","reseller-modnx-magsafe-original-design","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":41911816716387,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-B071","requires_shipping":true,"taxable":true,"featured_image":{"id":31488149487715,"product_id":7415095328867,"position":8,"created_at":"2024-05-05T20:22:11+08:00","updated_at":"2024-05-05T20:22:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/acaeddd9be7cc71ad937f14ed680fdd00d46a814_26bd66ac-5a51-47cf-90b5-7fa8ab4fb339.webp?v=1714911731","variant_ids":[41911816716387]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 【獨家設計款】 - 春夏犬の時裝週 - 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":"MPB0118424-B071","featured_media":{"alt":null,"id":23893494136931,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/acaeddd9be7cc71ad937f14ed680fdd00d46a814_26bd66ac-5a51-47cf-90b5-7fa8ab4fb339.webp?v=1714911731"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b93a7d15251ba11ea07959dd2491c0b8888f763e_f573b224-8c6e-42bf-849f-2a88b5de8ade.webp?v=1714911715","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/46d6734ae34294b6421eb3e083493259b9b1bde1_d158c8e8-3b1a-430a-9169-b8613e222fd7.webp?v=1714911717","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/737a434a5c0db6368453091ae339b7cd3e5acbd8_3ee77192-09ff-4535-8c6a-21d32fbc91cf.webp?v=1714911719","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89042cc9a155e254aecce8f04ba4ccfee2729937_71819f70-2ed7-4555-8343-993464f75f82.webp?v=1714911722","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bd9f8821390798b72414b5335733a44ef8b1e74_a7cc526b-1426-4852-a912-5ebe03fbf0fd.webp?v=1714911724","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b3c72d5f485b2ab9f0e3d5ed3bacb37e366b833_63db829d-88ca-4e6a-ae0e-4e93e70121c1.webp?v=1714911726","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6db95dc7cb7788c233417fc79067b0c5da4b97e_95e32b79-57f1-4d56-a270-4b197d008602.webp?v=1714911728","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/acaeddd9be7cc71ad937f14ed680fdd00d46a814_26bd66ac-5a51-47cf-90b5-7fa8ab4fb339.webp?v=1714911731","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f335b5d3de058e16e65db347b475c33a146509ac_b5fb6f3e-8068-43b4-bb89-80e27fecf891.webp?v=1714911733","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/867fbaf362cdedd16469d6c0e4395e4f29b60c57_c70cbc90-93aa-437f-8389-f01b0ed63c50.webp?v=1714911735","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e638eea7b905465919639117a774d7ca1ae6cc9b_7fc30fdc-9822-4920-8d94-a770440dd258.webp?v=1714911738"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b93a7d15251ba11ea07959dd2491c0b8888f763e_f573b224-8c6e-42bf-849f-2a88b5de8ade.webp?v=1714911715","options":["color"],"media":[{"alt":null,"id":23893490106467,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b93a7d15251ba11ea07959dd2491c0b8888f763e_f573b224-8c6e-42bf-849f-2a88b5de8ade.webp?v=1714911715"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b93a7d15251ba11ea07959dd2491c0b8888f763e_f573b224-8c6e-42bf-849f-2a88b5de8ade.webp?v=1714911715","width":2000},{"alt":null,"id":23893490729059,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/46d6734ae34294b6421eb3e083493259b9b1bde1_d158c8e8-3b1a-430a-9169-b8613e222fd7.webp?v=1714911717"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/46d6734ae34294b6421eb3e083493259b9b1bde1_d158c8e8-3b1a-430a-9169-b8613e222fd7.webp?v=1714911717","width":2000},{"alt":null,"id":23893491548259,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/737a434a5c0db6368453091ae339b7cd3e5acbd8_3ee77192-09ff-4535-8c6a-21d32fbc91cf.webp?v=1714911719"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/737a434a5c0db6368453091ae339b7cd3e5acbd8_3ee77192-09ff-4535-8c6a-21d32fbc91cf.webp?v=1714911719","width":2000},{"alt":null,"id":23893492072547,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89042cc9a155e254aecce8f04ba4ccfee2729937_71819f70-2ed7-4555-8343-993464f75f82.webp?v=1714911722"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89042cc9a155e254aecce8f04ba4ccfee2729937_71819f70-2ed7-4555-8343-993464f75f82.webp?v=1714911722","width":2000},{"alt":null,"id":23893492531299,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bd9f8821390798b72414b5335733a44ef8b1e74_a7cc526b-1426-4852-a912-5ebe03fbf0fd.webp?v=1714911724"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bd9f8821390798b72414b5335733a44ef8b1e74_a7cc526b-1426-4852-a912-5ebe03fbf0fd.webp?v=1714911724","width":2000},{"alt":null,"id":23893492924515,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b3c72d5f485b2ab9f0e3d5ed3bacb37e366b833_63db829d-88ca-4e6a-ae0e-4e93e70121c1.webp?v=1714911726"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b3c72d5f485b2ab9f0e3d5ed3bacb37e366b833_63db829d-88ca-4e6a-ae0e-4e93e70121c1.webp?v=1714911726","width":2000},{"alt":null,"id":23893493645411,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6db95dc7cb7788c233417fc79067b0c5da4b97e_95e32b79-57f1-4d56-a270-4b197d008602.webp?v=1714911728"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c6db95dc7cb7788c233417fc79067b0c5da4b97e_95e32b79-57f1-4d56-a270-4b197d008602.webp?v=1714911728","width":2000},{"alt":null,"id":23893494136931,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/acaeddd9be7cc71ad937f14ed680fdd00d46a814_26bd66ac-5a51-47cf-90b5-7fa8ab4fb339.webp?v=1714911731"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/acaeddd9be7cc71ad937f14ed680fdd00d46a814_26bd66ac-5a51-47cf-90b5-7fa8ab4fb339.webp?v=1714911731","width":2000},{"alt":null,"id":23893494857827,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f335b5d3de058e16e65db347b475c33a146509ac_b5fb6f3e-8068-43b4-bb89-80e27fecf891.webp?v=1714911733"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f335b5d3de058e16e65db347b475c33a146509ac_b5fb6f3e-8068-43b4-bb89-80e27fecf891.webp?v=1714911733","width":2000},{"alt":null,"id":23893495218275,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/867fbaf362cdedd16469d6c0e4395e4f29b60c57_c70cbc90-93aa-437f-8389-f01b0ed63c50.webp?v=1714911735"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/867fbaf362cdedd16469d6c0e4395e4f29b60c57_c70cbc90-93aa-437f-8389-f01b0ed63c50.webp?v=1714911735","width":2000},{"alt":null,"id":23893495971939,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e638eea7b905465919639117a774d7ca1ae6cc9b_7fc30fdc-9822-4920-8d94-a770440dd258.webp?v=1714911738"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e638eea7b905465919639117a774d7ca1ae6cc9b_7fc30fdc-9822-4920-8d94-a770440dd258.webp?v=1714911738","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41911816716387,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-B071","requires_shipping":true,"taxable":true,"featured_image":{"id":31488149487715,"product_id":7415095328867,"position":8,"created_at":"2024-05-05T20:22:11+08:00","updated_at":"2024-05-05T20:22:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/acaeddd9be7cc71ad937f14ed680fdd00d46a814_26bd66ac-5a51-47cf-90b5-7fa8ab4fb339.webp?v=1714911731","variant_ids":[41911816716387]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 【獨家設計款】 - 春夏犬の時裝週 - 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":"MPB0118424-B071","featured_media":{"alt":null,"id":23893494136931,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/acaeddd9be7cc71ad937f14ed680fdd00d46a814_26bd66ac-5a51-47cf-90b5-7fa8ab4fb339.webp?v=1714911731"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41911816716387,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-B071","requires_shipping":true,"taxable":true,"featured_image":{"id":31488149487715,"product_id":7415095328867,"position":8,"created_at":"2024-05-05T20:22:11+08:00","updated_at":"2024-05-05T20:22:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/acaeddd9be7cc71ad937f14ed680fdd00d46a814_26bd66ac-5a51-47cf-90b5-7fa8ab4fb339.webp?v=1714911731","variant_ids":[41911816716387]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 【獨家設計款】 - 春夏犬の時裝週 - 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":"MPB0118424-B071","featured_media":{"alt":null,"id":23893494136931,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/acaeddd9be7cc71ad937f14ed680fdd00d46a814_26bd66ac-5a51-47cf-90b5-7fa8ab4fb339.webp?v=1714911731"}},"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: "停產" }