$product = {"id":7769640435811,"title":"iPhone XS Max Mod NX ilovedoodle The Sun and Cat - 太陽與貓","handle":"iphone-xs-max-mod-nx-printable-xf52","description":null,"published_at":"2025-07-16T17:15:05+08:00","created_at":"2025-04-15T18:48:42+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-I Love Doodle","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-ilovedoodle","device-iPhone XS Max","merge","reseller-ilovedoodle"],"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":43303294337123,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0108624-XF52","requires_shipping":true,"taxable":true,"featured_image":{"id":34196776779875,"product_id":7769640435811,"position":3,"created_at":"2025-07-16T14:51:08+08:00","updated_at":"2025-07-16T14:51:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54071ce599974db54b283a30adfdf0d50731a23d_397221ea-0df0-463b-94ca-57ca772d2d88.webp?v=1752648670","variant_ids":[43303294337123]},"available":true,"name":"iPhone XS Max Mod NX ilovedoodle The Sun and Cat - 太陽與貓 - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-XF52","featured_media":{"alt":null,"id":25829539053667,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54071ce599974db54b283a30adfdf0d50731a23d_397221ea-0df0-463b-94ca-57ca772d2d88.webp?v=1752648670"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cea560bcb1385d6bad9485f71e84aa992eaa9c2d.webp?v=1744714129","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/129cd5ae7d72b01c41cd6236251c5c71d7099406_71f8c4bb-fea0-4c22-b119-cb13f6c3a2a8.webp?v=1752648670","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54071ce599974db54b283a30adfdf0d50731a23d_397221ea-0df0-463b-94ca-57ca772d2d88.webp?v=1752648670","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e61c6468d7108a4b67910ef5858ea79d0e8c5122_5f99872d-3cad-4071-921f-273344f9db33.webp?v=1752648671","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5de5012f8e96b4cb73c28741ebca74f8d9fa11a_dee1b38e-0f0f-4e2b-8a92-427425bceceb.webp?v=1752648671","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/099068fa288bd1f577a33f60b9978a422217d778_86f9c4d0-8aa9-49ef-9c47-43273e4f330a.webp?v=1752648672","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d71901a3839346906d9059192b9958451f17a29_ebaedbf2-30a2-4139-aefd-34c0d0d86ee5.webp?v=1752648672","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1f3e1314543bba8445fb21183d0aa710db8f010_a703cc2d-1c34-4496-8ce8-6a173c3ae4d1.webp?v=1752648673"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cea560bcb1385d6bad9485f71e84aa992eaa9c2d.webp?v=1744714129","options":["color"],"media":[{"alt":null,"id":25496033263715,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cea560bcb1385d6bad9485f71e84aa992eaa9c2d.webp?v=1744714129"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cea560bcb1385d6bad9485f71e84aa992eaa9c2d.webp?v=1744714129","width":2000},{"alt":null,"id":25829538660451,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/129cd5ae7d72b01c41cd6236251c5c71d7099406_71f8c4bb-fea0-4c22-b119-cb13f6c3a2a8.webp?v=1752648670"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/129cd5ae7d72b01c41cd6236251c5c71d7099406_71f8c4bb-fea0-4c22-b119-cb13f6c3a2a8.webp?v=1752648670","width":2000},{"alt":null,"id":25829539053667,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54071ce599974db54b283a30adfdf0d50731a23d_397221ea-0df0-463b-94ca-57ca772d2d88.webp?v=1752648670"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54071ce599974db54b283a30adfdf0d50731a23d_397221ea-0df0-463b-94ca-57ca772d2d88.webp?v=1752648670","width":2000},{"alt":null,"id":25829539348579,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e61c6468d7108a4b67910ef5858ea79d0e8c5122_5f99872d-3cad-4071-921f-273344f9db33.webp?v=1752648671"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e61c6468d7108a4b67910ef5858ea79d0e8c5122_5f99872d-3cad-4071-921f-273344f9db33.webp?v=1752648671","width":2000},{"alt":null,"id":25829539807331,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5de5012f8e96b4cb73c28741ebca74f8d9fa11a_dee1b38e-0f0f-4e2b-8a92-427425bceceb.webp?v=1752648671"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5de5012f8e96b4cb73c28741ebca74f8d9fa11a_dee1b38e-0f0f-4e2b-8a92-427425bceceb.webp?v=1752648671","width":2000},{"alt":null,"id":25829540003939,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/099068fa288bd1f577a33f60b9978a422217d778_86f9c4d0-8aa9-49ef-9c47-43273e4f330a.webp?v=1752648672"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/099068fa288bd1f577a33f60b9978a422217d778_86f9c4d0-8aa9-49ef-9c47-43273e4f330a.webp?v=1752648672","width":2000},{"alt":null,"id":25829540331619,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d71901a3839346906d9059192b9958451f17a29_ebaedbf2-30a2-4139-aefd-34c0d0d86ee5.webp?v=1752648672"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d71901a3839346906d9059192b9958451f17a29_ebaedbf2-30a2-4139-aefd-34c0d0d86ee5.webp?v=1752648672","width":2000},{"alt":null,"id":25829540593763,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1f3e1314543bba8445fb21183d0aa710db8f010_a703cc2d-1c34-4496-8ce8-6a173c3ae4d1.webp?v=1752648673"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e1f3e1314543bba8445fb21183d0aa710db8f010_a703cc2d-1c34-4496-8ce8-6a173c3ae4d1.webp?v=1752648673","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43303294337123,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0108624-XF52","requires_shipping":true,"taxable":true,"featured_image":{"id":34196776779875,"product_id":7769640435811,"position":3,"created_at":"2025-07-16T14:51:08+08:00","updated_at":"2025-07-16T14:51:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54071ce599974db54b283a30adfdf0d50731a23d_397221ea-0df0-463b-94ca-57ca772d2d88.webp?v=1752648670","variant_ids":[43303294337123]},"available":true,"name":"iPhone XS Max Mod NX ilovedoodle The Sun and Cat - 太陽與貓 - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-XF52","featured_media":{"alt":null,"id":25829539053667,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54071ce599974db54b283a30adfdf0d50731a23d_397221ea-0df0-463b-94ca-57ca772d2d88.webp?v=1752648670"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43303294337123,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0108624-XF52","requires_shipping":true,"taxable":true,"featured_image":{"id":34196776779875,"product_id":7769640435811,"position":3,"created_at":"2025-07-16T14:51:08+08:00","updated_at":"2025-07-16T14:51:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54071ce599974db54b283a30adfdf0d50731a23d_397221ea-0df0-463b-94ca-57ca772d2d88.webp?v=1752648670","variant_ids":[43303294337123]},"available":true,"name":"iPhone XS Max Mod NX ilovedoodle The Sun and Cat - 太陽與貓 - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-XF52","featured_media":{"alt":null,"id":25829539053667,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54071ce599974db54b283a30adfdf0d50731a23d_397221ea-0df0-463b-94ca-57ca772d2d88.webp?v=1752648670"}},"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: "停產" }