$product = {"id":7163926642787,"title":"犀牛盾SolidSuit手機殼 - iPhone XS - 【聯名設計款】 - Snoopy 史努比 - 開心小花","handle":"iphone-xs-solidsuit-classic-pl65","description":null,"published_at":"2024-01-30T12:03:34+08:00","created_at":"2024-01-30T09:55:55+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師SolidSuit專區Snoopy 史努比","tags":["20%","20240304-reseller-\u003ereplace_to-","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-snoopy","device-iPhone XS","merge","reseller-solidsuit-snoopy","solidsuit","Top50","type-Solidsuit"],"price":83000,"price_min":83000,"price_max":83000,"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":41234906284131,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0106452-PL65","requires_shipping":true,"taxable":true,"featured_image":{"id":30865393221731,"product_id":7163926642787,"position":2,"created_at":"2024-01-30T09:56:01+08:00","updated_at":"2024-01-30T09:56:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b44183f96f014bb95ab3d9213650f70b6a3ea977_66f3e8e3-23dd-4ba9-a481-d3efc03dc307.webp?v=1706579761","variant_ids":[41234906284131]},"available":true,"name":"犀牛盾SolidSuit手機殼 - iPhone XS - 【聯名設計款】 - Snoopy 史努比 - 開心小花 - Black","public_title":"Black","options":["Black"],"price":83000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":null,"featured_media":{"alt":null,"id":23236746346595,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b44183f96f014bb95ab3d9213650f70b6a3ea977_66f3e8e3-23dd-4ba9-a481-d3efc03dc307.webp?v=1706579761"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41234906513507,"title":"Sage Green","option1":"Sage Green","option2":null,"option3":null,"sku":"SST01064P2-PL65","requires_shipping":true,"taxable":true,"featured_image":{"id":30865395613795,"product_id":7163926642787,"position":5,"created_at":"2024-01-30T09:56:08+08:00","updated_at":"2024-01-30T09:56:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/720ffca458c9c022d2437fad5d59b8fdf7f0bf2d_20c2e048-967e-4358-9be8-d42700dde01b.webp?v=1706579768","variant_ids":[41234906513507]},"available":true,"name":"犀牛盾SolidSuit手機殼 - iPhone XS - 【聯名設計款】 - Snoopy 史努比 - 開心小花 - Sage Green","public_title":"Sage Green","options":["Sage Green"],"price":83000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":null,"featured_media":{"alt":null,"id":23236748738659,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/720ffca458c9c022d2437fad5d59b8fdf7f0bf2d_20c2e048-967e-4358-9be8-d42700dde01b.webp?v=1706579768"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1b0c560ac9a7c5847c3522bb7dde2ab66109997_c7da21d8-aee8-469b-bf2a-40d95c7cb28f.webp?v=1706579758","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b44183f96f014bb95ab3d9213650f70b6a3ea977_66f3e8e3-23dd-4ba9-a481-d3efc03dc307.webp?v=1706579761","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01be63f57c2c12a4739cd4389b3330a56b2b87cf_615866ac-ffbe-422c-8e2e-c9dc28f0dc32.webp?v=1706579763","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e868604eeb4004eacd5440202f461e92807a365_90197182-6c2b-4bdf-b055-d25a65148d7e.webp?v=1706579765","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/720ffca458c9c022d2437fad5d59b8fdf7f0bf2d_20c2e048-967e-4358-9be8-d42700dde01b.webp?v=1706579768","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b6d8fceb84be54b189f85180f92bc3bc994da68_69b3e774-319e-484d-a97a-3d447c11b491.webp?v=1706579770","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02d442bbc3d8b06c0bdc0dd838c7a8d49234fcd8_c93832da-be12-486b-af80-6764172ca629.webp?v=1706579772"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1b0c560ac9a7c5847c3522bb7dde2ab66109997_c7da21d8-aee8-469b-bf2a-40d95c7cb28f.webp?v=1706579758","options":["color"],"media":[{"alt":null,"id":23236745494627,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1b0c560ac9a7c5847c3522bb7dde2ab66109997_c7da21d8-aee8-469b-bf2a-40d95c7cb28f.webp?v=1706579758"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1b0c560ac9a7c5847c3522bb7dde2ab66109997_c7da21d8-aee8-469b-bf2a-40d95c7cb28f.webp?v=1706579758","width":2000},{"alt":null,"id":23236746346595,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b44183f96f014bb95ab3d9213650f70b6a3ea977_66f3e8e3-23dd-4ba9-a481-d3efc03dc307.webp?v=1706579761"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b44183f96f014bb95ab3d9213650f70b6a3ea977_66f3e8e3-23dd-4ba9-a481-d3efc03dc307.webp?v=1706579761","width":2000},{"alt":null,"id":23236747198563,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01be63f57c2c12a4739cd4389b3330a56b2b87cf_615866ac-ffbe-422c-8e2e-c9dc28f0dc32.webp?v=1706579763"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/01be63f57c2c12a4739cd4389b3330a56b2b87cf_615866ac-ffbe-422c-8e2e-c9dc28f0dc32.webp?v=1706579763","width":2000},{"alt":null,"id":23236747886691,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e868604eeb4004eacd5440202f461e92807a365_90197182-6c2b-4bdf-b055-d25a65148d7e.webp?v=1706579765"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e868604eeb4004eacd5440202f461e92807a365_90197182-6c2b-4bdf-b055-d25a65148d7e.webp?v=1706579765","width":2000},{"alt":null,"id":23236748738659,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/720ffca458c9c022d2437fad5d59b8fdf7f0bf2d_20c2e048-967e-4358-9be8-d42700dde01b.webp?v=1706579768"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/720ffca458c9c022d2437fad5d59b8fdf7f0bf2d_20c2e048-967e-4358-9be8-d42700dde01b.webp?v=1706579768","width":2000},{"alt":null,"id":23236749983843,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b6d8fceb84be54b189f85180f92bc3bc994da68_69b3e774-319e-484d-a97a-3d447c11b491.webp?v=1706579770"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b6d8fceb84be54b189f85180f92bc3bc994da68_69b3e774-319e-484d-a97a-3d447c11b491.webp?v=1706579770","width":2000},{"alt":null,"id":23236751229027,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02d442bbc3d8b06c0bdc0dd838c7a8d49234fcd8_c93832da-be12-486b-af80-6764172ca629.webp?v=1706579772"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02d442bbc3d8b06c0bdc0dd838c7a8d49234fcd8_c93832da-be12-486b-af80-6764172ca629.webp?v=1706579772","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41234906284131,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0106452-PL65","requires_shipping":true,"taxable":true,"featured_image":{"id":30865393221731,"product_id":7163926642787,"position":2,"created_at":"2024-01-30T09:56:01+08:00","updated_at":"2024-01-30T09:56:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b44183f96f014bb95ab3d9213650f70b6a3ea977_66f3e8e3-23dd-4ba9-a481-d3efc03dc307.webp?v=1706579761","variant_ids":[41234906284131]},"available":true,"name":"犀牛盾SolidSuit手機殼 - iPhone XS - 【聯名設計款】 - Snoopy 史努比 - 開心小花 - Black","public_title":"Black","options":["Black"],"price":83000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":null,"featured_media":{"alt":null,"id":23236746346595,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b44183f96f014bb95ab3d9213650f70b6a3ea977_66f3e8e3-23dd-4ba9-a481-d3efc03dc307.webp?v=1706579761"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41234906513507,"title":"Sage Green","option1":"Sage Green","option2":null,"option3":null,"sku":"SST01064P2-PL65","requires_shipping":true,"taxable":true,"featured_image":{"id":30865395613795,"product_id":7163926642787,"position":5,"created_at":"2024-01-30T09:56:08+08:00","updated_at":"2024-01-30T09:56:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/720ffca458c9c022d2437fad5d59b8fdf7f0bf2d_20c2e048-967e-4358-9be8-d42700dde01b.webp?v=1706579768","variant_ids":[41234906513507]},"available":true,"name":"犀牛盾SolidSuit手機殼 - iPhone XS - 【聯名設計款】 - Snoopy 史努比 - 開心小花 - Sage Green","public_title":"Sage Green","options":["Sage Green"],"price":83000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":null,"featured_media":{"alt":null,"id":23236748738659,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/720ffca458c9c022d2437fad5d59b8fdf7f0bf2d_20c2e048-967e-4358-9be8-d42700dde01b.webp?v=1706579768"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41234906284131,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0106452-PL65","requires_shipping":true,"taxable":true,"featured_image":{"id":30865393221731,"product_id":7163926642787,"position":2,"created_at":"2024-01-30T09:56:01+08:00","updated_at":"2024-01-30T09:56:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b44183f96f014bb95ab3d9213650f70b6a3ea977_66f3e8e3-23dd-4ba9-a481-d3efc03dc307.webp?v=1706579761","variant_ids":[41234906284131]},"available":true,"name":"犀牛盾SolidSuit手機殼 - iPhone XS - 【聯名設計款】 - Snoopy 史努比 - 開心小花 - Black","public_title":"Black","options":["Black"],"price":83000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":null,"featured_media":{"alt":null,"id":23236746346595,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b44183f96f014bb95ab3d9213650f70b6a3ea977_66f3e8e3-23dd-4ba9-a481-d3efc03dc307.webp?v=1706579761"}},"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: "停產" }