$product = {"id":7414982443107,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 爪哇族2-塗鴉藝術","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb40","description":null,"published_at":"2024-06-11T17:54:48+08:00","created_at":"2024-05-05T20:00:29+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-star-wars","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":41910604759139,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB40","requires_shipping":true,"taxable":true,"featured_image":{"id":31487841599587,"product_id":7414982443107,"position":1,"created_at":"2024-05-05T20:00:31+08:00","updated_at":"2024-05-05T20:00:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/022f0e051686c2c764771bf33d20135a719681ea_cfe2e255-eb63-4def-86d2-7ae92c2c6ad8.webp?v=1714910431","variant_ids":[41910604759139]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 爪哇族2-塗鴉藝術 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-PB40","featured_media":{"alt":null,"id":23893185560675,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/022f0e051686c2c764771bf33d20135a719681ea_cfe2e255-eb63-4def-86d2-7ae92c2c6ad8.webp?v=1714910431"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/022f0e051686c2c764771bf33d20135a719681ea_cfe2e255-eb63-4def-86d2-7ae92c2c6ad8.webp?v=1714910431","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdba2788f83cba4e6bb1519cf08a345384eb9796_065799e8-116e-44a7-8486-d7bdcbdaa7d9.webp?v=1714910434","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff9b5d36b41bfe347cefff4a9c32aa573e408513_a0e12251-4248-40d2-a19a-bc8dc6b8bb8e.webp?v=1714910436","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6f256da3ea21c8b12dd6cae8ff3c37774f8284b_d9968b36-5951-4b4f-83e2-f6a3dc3885e5.webp?v=1714910438","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e2e04c98c0dddb695883d14dad9107fcd2cc41f_b5c6ffd2-7158-4961-9bb3-48f2f3b94dac.webp?v=1714910441","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea1ed75001dba5a2465bd90b58f40f4159cd5780_70c944d0-f249-4b01-822f-8abe5e9399e4.webp?v=1714910443","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb8e14d81ce5158c0696c141cb44a85b8b276a4e_98974a3c-794d-4bd8-a9ce-f95511cfaa57.webp?v=1714910445","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b04d348710b496c119198c975a02372f807b22ff_87739dc4-145e-4b50-b325-b33ed24eaa51.webp?v=1714910447","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5d606a6c6a4efc829b1a639b217c11afe7af361_24311e88-9c7e-4100-a3d6-c773b00767a4.webp?v=1714910450","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b00d3eb9a6fcf85fc4b47a9838ddecb761f8726_f959bd5b-6ba5-4623-a108-bd63fa496261.webp?v=1714910452","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eda58381ed6781ed171eb901250a7a469100473_c722f1c8-63d9-4ffc-abe9-579197488cf1.webp?v=1714910454"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/022f0e051686c2c764771bf33d20135a719681ea_cfe2e255-eb63-4def-86d2-7ae92c2c6ad8.webp?v=1714910431","options":["color"],"media":[{"alt":null,"id":23893185560675,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/022f0e051686c2c764771bf33d20135a719681ea_cfe2e255-eb63-4def-86d2-7ae92c2c6ad8.webp?v=1714910431"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/022f0e051686c2c764771bf33d20135a719681ea_cfe2e255-eb63-4def-86d2-7ae92c2c6ad8.webp?v=1714910431","width":2000},{"alt":null,"id":23893186084963,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdba2788f83cba4e6bb1519cf08a345384eb9796_065799e8-116e-44a7-8486-d7bdcbdaa7d9.webp?v=1714910434"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cdba2788f83cba4e6bb1519cf08a345384eb9796_065799e8-116e-44a7-8486-d7bdcbdaa7d9.webp?v=1714910434","width":2000},{"alt":null,"id":23893186510947,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff9b5d36b41bfe347cefff4a9c32aa573e408513_a0e12251-4248-40d2-a19a-bc8dc6b8bb8e.webp?v=1714910436"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff9b5d36b41bfe347cefff4a9c32aa573e408513_a0e12251-4248-40d2-a19a-bc8dc6b8bb8e.webp?v=1714910436","width":2000},{"alt":null,"id":23893187035235,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6f256da3ea21c8b12dd6cae8ff3c37774f8284b_d9968b36-5951-4b4f-83e2-f6a3dc3885e5.webp?v=1714910438"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6f256da3ea21c8b12dd6cae8ff3c37774f8284b_d9968b36-5951-4b4f-83e2-f6a3dc3885e5.webp?v=1714910438","width":2000},{"alt":null,"id":23893187690595,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e2e04c98c0dddb695883d14dad9107fcd2cc41f_b5c6ffd2-7158-4961-9bb3-48f2f3b94dac.webp?v=1714910441"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e2e04c98c0dddb695883d14dad9107fcd2cc41f_b5c6ffd2-7158-4961-9bb3-48f2f3b94dac.webp?v=1714910441","width":2000},{"alt":null,"id":23893188247651,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea1ed75001dba5a2465bd90b58f40f4159cd5780_70c944d0-f249-4b01-822f-8abe5e9399e4.webp?v=1714910443"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ea1ed75001dba5a2465bd90b58f40f4159cd5780_70c944d0-f249-4b01-822f-8abe5e9399e4.webp?v=1714910443","width":2000},{"alt":null,"id":23893188804707,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb8e14d81ce5158c0696c141cb44a85b8b276a4e_98974a3c-794d-4bd8-a9ce-f95511cfaa57.webp?v=1714910445"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eb8e14d81ce5158c0696c141cb44a85b8b276a4e_98974a3c-794d-4bd8-a9ce-f95511cfaa57.webp?v=1714910445","width":2000},{"alt":null,"id":23893189591139,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b04d348710b496c119198c975a02372f807b22ff_87739dc4-145e-4b50-b325-b33ed24eaa51.webp?v=1714910447"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b04d348710b496c119198c975a02372f807b22ff_87739dc4-145e-4b50-b325-b33ed24eaa51.webp?v=1714910447","width":2000},{"alt":null,"id":23893190246499,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5d606a6c6a4efc829b1a639b217c11afe7af361_24311e88-9c7e-4100-a3d6-c773b00767a4.webp?v=1714910450"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b5d606a6c6a4efc829b1a639b217c11afe7af361_24311e88-9c7e-4100-a3d6-c773b00767a4.webp?v=1714910450","width":2000},{"alt":null,"id":23893190803555,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b00d3eb9a6fcf85fc4b47a9838ddecb761f8726_f959bd5b-6ba5-4623-a108-bd63fa496261.webp?v=1714910452"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b00d3eb9a6fcf85fc4b47a9838ddecb761f8726_f959bd5b-6ba5-4623-a108-bd63fa496261.webp?v=1714910452","width":2000},{"alt":null,"id":23893191295075,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eda58381ed6781ed171eb901250a7a469100473_c722f1c8-63d9-4ffc-abe9-579197488cf1.webp?v=1714910454"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eda58381ed6781ed171eb901250a7a469100473_c722f1c8-63d9-4ffc-abe9-579197488cf1.webp?v=1714910454","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41910604759139,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB40","requires_shipping":true,"taxable":true,"featured_image":{"id":31487841599587,"product_id":7414982443107,"position":1,"created_at":"2024-05-05T20:00:31+08:00","updated_at":"2024-05-05T20:00:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/022f0e051686c2c764771bf33d20135a719681ea_cfe2e255-eb63-4def-86d2-7ae92c2c6ad8.webp?v=1714910431","variant_ids":[41910604759139]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 爪哇族2-塗鴉藝術 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-PB40","featured_media":{"alt":null,"id":23893185560675,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/022f0e051686c2c764771bf33d20135a719681ea_cfe2e255-eb63-4def-86d2-7ae92c2c6ad8.webp?v=1714910431"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41910604759139,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB40","requires_shipping":true,"taxable":true,"featured_image":{"id":31487841599587,"product_id":7414982443107,"position":1,"created_at":"2024-05-05T20:00:31+08:00","updated_at":"2024-05-05T20:00:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/022f0e051686c2c764771bf33d20135a719681ea_cfe2e255-eb63-4def-86d2-7ae92c2c6ad8.webp?v=1714910431","variant_ids":[41910604759139]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 爪哇族2-塗鴉藝術 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-PB40","featured_media":{"alt":null,"id":23893185560675,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/022f0e051686c2c764771bf33d20135a719681ea_cfe2e255-eb63-4def-86d2-7ae92c2c6ad8.webp?v=1714910431"}},"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: "停產" }