$product = {"id":6987905433699,"title":"iPhone 13 mini SolidSuit (MagSafe 兼容) 涼丰 經典小熊","handle":"iphone-13-mini-solidsuit-classic-magsafe-gd33","description":null,"published_at":"2023-08-03T02:13:05+08:00","created_at":"2023-07-30T19:46:52+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-liang-feng","device-iPhone 13 Mini","merge","reseller-liang-feng"],"price":125000,"price_min":125000,"price_max":125000,"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":43103464620131,"title":"Black \/ Classic","option1":"Black","option2":"Classic","option3":null,"sku":"MST0122852-GD33","requires_shipping":true,"taxable":true,"featured_image":{"id":30287546220643,"product_id":6987905433699,"position":1,"created_at":"2023-07-30T19:46:55+08:00","updated_at":"2023-07-30T19:46:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-GD33.png?v=1690717615","variant_ids":[43103464620131]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) 涼丰 經典小熊 - Black \/ Classic","public_title":"Black \/ Classic","options":["Black","Classic"],"price":125000,"weight":1250,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-GD33","featured_media":{"alt":null,"id":22646255976547,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-GD33.png?v=1690717615"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-GD33.png?v=1690717615","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db2bbbf41697780574f52906e9bf54701686ba03.webp?v=1784014340","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b1f2ffee3389ee9d996835f49fbcf8c3ffbbe13.webp?v=1784014341","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db2bbbf41697780574f52906e9bf54701686ba03_76c03d18-460b-4d96-b7bc-0dac419a8c29.webp?v=1784018342","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b1f2ffee3389ee9d996835f49fbcf8c3ffbbe13_d0ee3ad6-b270-4811-baa5-1cf7204cec6b.webp?v=1784018347","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db2bbbf41697780574f52906e9bf54701686ba03_7f37d058-61d3-4cff-b765-9b4033e9f823.webp?v=1784018622","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b1f2ffee3389ee9d996835f49fbcf8c3ffbbe13_4109da2b-9ac2-4e89-ac4b-a60e2e528cd0.webp?v=1784018623","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db2bbbf41697780574f52906e9bf54701686ba03_ef060a17-8ad1-4582-ac07-cc12822296fc.webp?v=1784018715","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b1f2ffee3389ee9d996835f49fbcf8c3ffbbe13_c5b32bdb-c768-46f5-8603-73ef4dc61a25.webp?v=1784018716","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b1f2ffee3389ee9d996835f49fbcf8c3ffbbe13_d0b72201-c12f-487f-a072-391c14f6911a.webp?v=1785816284","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db2bbbf41697780574f52906e9bf54701686ba03_47229cb1-8683-4e8e-966c-d332bc470b3b.webp?v=1785816286","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b1f2ffee3389ee9d996835f49fbcf8c3ffbbe13_0a1c522d-1782-44c9-8970-5ecd89cdaa37.webp?v=1785817343","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db2bbbf41697780574f52906e9bf54701686ba03_aae57ab7-6d84-47dc-a33c-a6ff910bbf64.webp?v=1785817343","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b1f2ffee3389ee9d996835f49fbcf8c3ffbbe13_eb47538d-1552-4553-92ca-d9efb42af924.webp?v=1785817407","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db2bbbf41697780574f52906e9bf54701686ba03_c47d7c93-623c-40e9-a76e-893440772c60.webp?v=1785817407","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b1f2ffee3389ee9d996835f49fbcf8c3ffbbe13_1fa0a47d-eed0-45e6-a60e-758b0ad096fa.webp?v=1785817454","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db2bbbf41697780574f52906e9bf54701686ba03_cfe4835b-c47d-4ce8-9b09-11c175d6859c.webp?v=1785817454"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-GD33.png?v=1690717615","options":["color","Types"],"media":[{"alt":null,"id":22646255976547,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-GD33.png?v=1690717615"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-GD33.png?v=1690717615","width":2000},{"alt":null,"id":27761796218979,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db2bbbf41697780574f52906e9bf54701686ba03.webp?v=1784014340"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db2bbbf41697780574f52906e9bf54701686ba03.webp?v=1784014340","width":2000},{"alt":null,"id":27761796644963,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b1f2ffee3389ee9d996835f49fbcf8c3ffbbe13.webp?v=1784014341"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b1f2ffee3389ee9d996835f49fbcf8c3ffbbe13.webp?v=1784014341","width":2000},{"alt":null,"id":27762603786339,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db2bbbf41697780574f52906e9bf54701686ba03_76c03d18-460b-4d96-b7bc-0dac419a8c29.webp?v=1784018342"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db2bbbf41697780574f52906e9bf54701686ba03_76c03d18-460b-4d96-b7bc-0dac419a8c29.webp?v=1784018342","width":2000},{"alt":null,"id":27762604441699,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b1f2ffee3389ee9d996835f49fbcf8c3ffbbe13_d0ee3ad6-b270-4811-baa5-1cf7204cec6b.webp?v=1784018347"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b1f2ffee3389ee9d996835f49fbcf8c3ffbbe13_d0ee3ad6-b270-4811-baa5-1cf7204cec6b.webp?v=1784018347","width":2000},{"alt":null,"id":27762632294499,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db2bbbf41697780574f52906e9bf54701686ba03_7f37d058-61d3-4cff-b765-9b4033e9f823.webp?v=1784018622"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db2bbbf41697780574f52906e9bf54701686ba03_7f37d058-61d3-4cff-b765-9b4033e9f823.webp?v=1784018622","width":2000},{"alt":null,"id":27762632458339,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b1f2ffee3389ee9d996835f49fbcf8c3ffbbe13_4109da2b-9ac2-4e89-ac4b-a60e2e528cd0.webp?v=1784018623"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b1f2ffee3389ee9d996835f49fbcf8c3ffbbe13_4109da2b-9ac2-4e89-ac4b-a60e2e528cd0.webp?v=1784018623","width":2000},{"alt":null,"id":27762652676195,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db2bbbf41697780574f52906e9bf54701686ba03_ef060a17-8ad1-4582-ac07-cc12822296fc.webp?v=1784018715"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db2bbbf41697780574f52906e9bf54701686ba03_ef060a17-8ad1-4582-ac07-cc12822296fc.webp?v=1784018715","width":2000},{"alt":null,"id":27762652840035,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b1f2ffee3389ee9d996835f49fbcf8c3ffbbe13_c5b32bdb-c768-46f5-8603-73ef4dc61a25.webp?v=1784018716"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b1f2ffee3389ee9d996835f49fbcf8c3ffbbe13_c5b32bdb-c768-46f5-8603-73ef4dc61a25.webp?v=1784018716","width":2000},{"alt":null,"id":27981399588963,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b1f2ffee3389ee9d996835f49fbcf8c3ffbbe13_d0b72201-c12f-487f-a072-391c14f6911a.webp?v=1785816284"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b1f2ffee3389ee9d996835f49fbcf8c3ffbbe13_d0b72201-c12f-487f-a072-391c14f6911a.webp?v=1785816284","width":2000},{"alt":null,"id":27981400375395,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db2bbbf41697780574f52906e9bf54701686ba03_47229cb1-8683-4e8e-966c-d332bc470b3b.webp?v=1785816286"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db2bbbf41697780574f52906e9bf54701686ba03_47229cb1-8683-4e8e-966c-d332bc470b3b.webp?v=1785816286","width":2000},{"alt":null,"id":27981721239651,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b1f2ffee3389ee9d996835f49fbcf8c3ffbbe13_0a1c522d-1782-44c9-8970-5ecd89cdaa37.webp?v=1785817343"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b1f2ffee3389ee9d996835f49fbcf8c3ffbbe13_0a1c522d-1782-44c9-8970-5ecd89cdaa37.webp?v=1785817343","width":2000},{"alt":null,"id":27981721305187,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db2bbbf41697780574f52906e9bf54701686ba03_aae57ab7-6d84-47dc-a33c-a6ff910bbf64.webp?v=1785817343"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db2bbbf41697780574f52906e9bf54701686ba03_aae57ab7-6d84-47dc-a33c-a6ff910bbf64.webp?v=1785817343","width":2000},{"alt":null,"id":27981724319843,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b1f2ffee3389ee9d996835f49fbcf8c3ffbbe13_eb47538d-1552-4553-92ca-d9efb42af924.webp?v=1785817407"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b1f2ffee3389ee9d996835f49fbcf8c3ffbbe13_eb47538d-1552-4553-92ca-d9efb42af924.webp?v=1785817407","width":2000},{"alt":null,"id":27981724352611,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db2bbbf41697780574f52906e9bf54701686ba03_c47d7c93-623c-40e9-a76e-893440772c60.webp?v=1785817407"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db2bbbf41697780574f52906e9bf54701686ba03_c47d7c93-623c-40e9-a76e-893440772c60.webp?v=1785817407","width":2000},{"alt":null,"id":27981726056547,"position":16,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b1f2ffee3389ee9d996835f49fbcf8c3ffbbe13_1fa0a47d-eed0-45e6-a60e-758b0ad096fa.webp?v=1785817454"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b1f2ffee3389ee9d996835f49fbcf8c3ffbbe13_1fa0a47d-eed0-45e6-a60e-758b0ad096fa.webp?v=1785817454","width":2000},{"alt":null,"id":27981726122083,"position":17,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db2bbbf41697780574f52906e9bf54701686ba03_cfe4835b-c47d-4ce8-9b09-11c175d6859c.webp?v=1785817454"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db2bbbf41697780574f52906e9bf54701686ba03_cfe4835b-c47d-4ce8-9b09-11c175d6859c.webp?v=1785817454","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43103464620131,"title":"Black \/ Classic","option1":"Black","option2":"Classic","option3":null,"sku":"MST0122852-GD33","requires_shipping":true,"taxable":true,"featured_image":{"id":30287546220643,"product_id":6987905433699,"position":1,"created_at":"2023-07-30T19:46:55+08:00","updated_at":"2023-07-30T19:46:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-GD33.png?v=1690717615","variant_ids":[43103464620131]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) 涼丰 經典小熊 - Black \/ Classic","public_title":"Black \/ Classic","options":["Black","Classic"],"price":125000,"weight":1250,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-GD33","featured_media":{"alt":null,"id":22646255976547,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-GD33.png?v=1690717615"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43103464620131,"title":"Black \/ Classic","option1":"Black","option2":"Classic","option3":null,"sku":"MST0122852-GD33","requires_shipping":true,"taxable":true,"featured_image":{"id":30287546220643,"product_id":6987905433699,"position":1,"created_at":"2023-07-30T19:46:55+08:00","updated_at":"2023-07-30T19:46:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-GD33.png?v=1690717615","variant_ids":[43103464620131]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) 涼丰 經典小熊 - Black \/ Classic","public_title":"Black \/ Classic","options":["Black","Classic"],"price":125000,"weight":1250,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-GD33","featured_media":{"alt":null,"id":22646255976547,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-228-GD33.png?v=1690717615"}},"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: "停產" }