$product = {"id":7415913709667,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具1-黑","handle":"iphone-xs-max-mod-nx-printable-pb09","description":null,"published_at":"2024-06-11T16:47:48+08:00","created_at":"2024-05-06T12:23:44+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone XS Max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-star-wars","Top50","type-Mod NX Printable"],"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":41915476705379,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB09","requires_shipping":true,"taxable":true,"featured_image":{"id":31490717778019,"product_id":7415913709667,"position":2,"created_at":"2024-05-06T12:23:49+08:00","updated_at":"2024-05-06T12:23:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/412297726f2e3257d9bf3426e4ee19db3ff701e3_f93c9454-73b0-4c34-b41e-fe01d9141bb8.webp?v=1714969429","variant_ids":[41915476705379]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具1-黑 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-PB09","featured_media":{"alt":null,"id":23896124555363,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/412297726f2e3257d9bf3426e4ee19db3ff701e3_f93c9454-73b0-4c34-b41e-fe01d9141bb8.webp?v=1714969429"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57b23f9be02cefca25a294bdd6db28bf23cf9362_bad8e731-a2a7-46dd-9e02-a21019401ed2.webp?v=1714969426","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/412297726f2e3257d9bf3426e4ee19db3ff701e3_f93c9454-73b0-4c34-b41e-fe01d9141bb8.webp?v=1714969429","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05fb09bd03f4abc4de865bd07c889ed8f7928c91_1be87aef-60ea-4f20-b1f6-2c2ca1d4ddc8.webp?v=1714969431","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20df81bbbc5bea2b6a50a60a0844ec8645e7e703_f7e0ceb7-d6f2-4428-92d8-18b6c1c9c30c.webp?v=1714969434","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3587c8ce4e0fa99a7ed993dfbed6748b4d38ce4f_d74464bc-5d98-4948-b3d7-d5af780bb57c.webp?v=1714969436","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c487440bb6fb73148d4cbb4837192be08afb84e7_e5b20a06-8d2b-4848-bb0f-b4a193ff2f22.webp?v=1714969438","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c5735f77f8207003a20f31f3874b6589b526b2c5_5600c7d3-8cfc-44d4-a45b-934fc6cfe9d7.webp?v=1714969441","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8041d66ada562a55883e906073f7566df4cbc4f5_51ae1dbf-7af2-4f04-b23c-1b9bb510098b.webp?v=1714969443","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24a65c52538797616ef50950a32ed40a10280bcd_95a9bf84-311c-4021-b675-6841e9b7cada.webp?v=1714969446","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc47405314e403b19f441c4fab17b8ec91c56e43_ce942ae5-b8b7-4edd-b93a-61815122bd57.webp?v=1714969449"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57b23f9be02cefca25a294bdd6db28bf23cf9362_bad8e731-a2a7-46dd-9e02-a21019401ed2.webp?v=1714969426","options":["color"],"media":[{"alt":null,"id":23896124063843,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57b23f9be02cefca25a294bdd6db28bf23cf9362_bad8e731-a2a7-46dd-9e02-a21019401ed2.webp?v=1714969426"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57b23f9be02cefca25a294bdd6db28bf23cf9362_bad8e731-a2a7-46dd-9e02-a21019401ed2.webp?v=1714969426","width":2000},{"alt":null,"id":23896124555363,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/412297726f2e3257d9bf3426e4ee19db3ff701e3_f93c9454-73b0-4c34-b41e-fe01d9141bb8.webp?v=1714969429"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/412297726f2e3257d9bf3426e4ee19db3ff701e3_f93c9454-73b0-4c34-b41e-fe01d9141bb8.webp?v=1714969429","width":2000},{"alt":null,"id":23896124915811,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05fb09bd03f4abc4de865bd07c889ed8f7928c91_1be87aef-60ea-4f20-b1f6-2c2ca1d4ddc8.webp?v=1714969431"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05fb09bd03f4abc4de865bd07c889ed8f7928c91_1be87aef-60ea-4f20-b1f6-2c2ca1d4ddc8.webp?v=1714969431","width":2000},{"alt":null,"id":23896125472867,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20df81bbbc5bea2b6a50a60a0844ec8645e7e703_f7e0ceb7-d6f2-4428-92d8-18b6c1c9c30c.webp?v=1714969434"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/20df81bbbc5bea2b6a50a60a0844ec8645e7e703_f7e0ceb7-d6f2-4428-92d8-18b6c1c9c30c.webp?v=1714969434","width":2000},{"alt":null,"id":23896126193763,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3587c8ce4e0fa99a7ed993dfbed6748b4d38ce4f_d74464bc-5d98-4948-b3d7-d5af780bb57c.webp?v=1714969436"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3587c8ce4e0fa99a7ed993dfbed6748b4d38ce4f_d74464bc-5d98-4948-b3d7-d5af780bb57c.webp?v=1714969436","width":2000},{"alt":null,"id":23896126783587,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c487440bb6fb73148d4cbb4837192be08afb84e7_e5b20a06-8d2b-4848-bb0f-b4a193ff2f22.webp?v=1714969438"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c487440bb6fb73148d4cbb4837192be08afb84e7_e5b20a06-8d2b-4848-bb0f-b4a193ff2f22.webp?v=1714969438","width":2000},{"alt":null,"id":23896127176803,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c5735f77f8207003a20f31f3874b6589b526b2c5_5600c7d3-8cfc-44d4-a45b-934fc6cfe9d7.webp?v=1714969441"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c5735f77f8207003a20f31f3874b6589b526b2c5_5600c7d3-8cfc-44d4-a45b-934fc6cfe9d7.webp?v=1714969441","width":2000},{"alt":null,"id":23896127832163,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8041d66ada562a55883e906073f7566df4cbc4f5_51ae1dbf-7af2-4f04-b23c-1b9bb510098b.webp?v=1714969443"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8041d66ada562a55883e906073f7566df4cbc4f5_51ae1dbf-7af2-4f04-b23c-1b9bb510098b.webp?v=1714969443","width":2000},{"alt":null,"id":23896128520291,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24a65c52538797616ef50950a32ed40a10280bcd_95a9bf84-311c-4021-b675-6841e9b7cada.webp?v=1714969446"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/24a65c52538797616ef50950a32ed40a10280bcd_95a9bf84-311c-4021-b675-6841e9b7cada.webp?v=1714969446","width":2000},{"alt":null,"id":23896129372259,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc47405314e403b19f441c4fab17b8ec91c56e43_ce942ae5-b8b7-4edd-b93a-61815122bd57.webp?v=1714969449"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc47405314e403b19f441c4fab17b8ec91c56e43_ce942ae5-b8b7-4edd-b93a-61815122bd57.webp?v=1714969449","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41915476705379,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB09","requires_shipping":true,"taxable":true,"featured_image":{"id":31490717778019,"product_id":7415913709667,"position":2,"created_at":"2024-05-06T12:23:49+08:00","updated_at":"2024-05-06T12:23:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/412297726f2e3257d9bf3426e4ee19db3ff701e3_f93c9454-73b0-4c34-b41e-fe01d9141bb8.webp?v=1714969429","variant_ids":[41915476705379]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具1-黑 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-PB09","featured_media":{"alt":null,"id":23896124555363,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/412297726f2e3257d9bf3426e4ee19db3ff701e3_f93c9454-73b0-4c34-b41e-fe01d9141bb8.webp?v=1714969429"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915476705379,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB09","requires_shipping":true,"taxable":true,"featured_image":{"id":31490717778019,"product_id":7415913709667,"position":2,"created_at":"2024-05-06T12:23:49+08:00","updated_at":"2024-05-06T12:23:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/412297726f2e3257d9bf3426e4ee19db3ff701e3_f93c9454-73b0-4c34-b41e-fe01d9141bb8.webp?v=1714969429","variant_ids":[41915476705379]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具1-黑 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0108624-PB09","featured_media":{"alt":null,"id":23896124555363,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/412297726f2e3257d9bf3426e4ee19db3ff701e3_f93c9454-73b0-4c34-b41e-fe01d9141bb8.webp?v=1714969429"}},"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: "停產" }