$product = {"id":7415962599523,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max The Powerpuff Girls - 花花","handle":"iphone-xs-max-mod-nx-printable-sr05","description":null,"published_at":"2024-06-11T16:49:03+08:00","created_at":"2024-05-06T12:32:53+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-The Powerpuff Girls","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-the-power-puff-girls","device-iPhone XS Max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-the-power-puff-girls","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":41915980775523,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SR05","requires_shipping":true,"taxable":true,"featured_image":{"id":31490848718947,"product_id":7415962599523,"position":6,"created_at":"2024-05-06T12:33:08+08:00","updated_at":"2024-05-06T12:33:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0437ddf9c5f7a9151f761b59b780e512e7cd233_6cf56e6c-9ad4-4817-b56d-10f47c7b13af.webp?v=1714969988","variant_ids":[41915980775523]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max The Powerpuff Girls - 花花 - 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-SR05","featured_media":{"alt":null,"id":23896255561827,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0437ddf9c5f7a9151f761b59b780e512e7cd233_6cf56e6c-9ad4-4817-b56d-10f47c7b13af.webp?v=1714969988"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd8b4f1f3e68d86644cadf01007db889384efdd1_bccdc285-6c36-476f-b9cd-56bbe3ffda09.webp?v=1714969975","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f8d6bbf3f470e7869e6e2c2b554e58a98e70d1f_b557922a-f638-49be-a39a-b033c277c1c0.webp?v=1714969978","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb50184724a824c2124477b92ea4e0fc1ad0e5fe_ecc0b383-d9e6-4e17-bc9b-194896415156.webp?v=1714969980","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00e2f907268b738f3cfe41b68c41c1579c4f3a64_9a00b1cc-00e1-44e7-97bc-a872d75a78e2.webp?v=1714969983","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/734da88f99127a8c99224be4023de440c388c88e_0535ad48-0ae3-44a7-b4d1-e385a4048127.webp?v=1714969985","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0437ddf9c5f7a9151f761b59b780e512e7cd233_6cf56e6c-9ad4-4817-b56d-10f47c7b13af.webp?v=1714969988","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc88b34361fbb32aa43a3dc4903c200b062492cf_65233d56-d35c-4d91-84ee-b8f024926db5.webp?v=1714969990","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b91f1a37665be705bdb9fef9023f4898e60ec829_a6c3bd4f-7e4f-412b-bf45-61472ca95e65.webp?v=1714969993","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f3409d8b9b85fc9c796f3573c9a67a5217ddded_07eb5561-0be6-48f1-8797-f413b2b22592.webp?v=1714969995","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae2903c829dd5f0e37585b9aa6a9d83b8edc5d18_6d9ee52a-c360-4162-99f4-d850dfd3516c.webp?v=1714969997"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd8b4f1f3e68d86644cadf01007db889384efdd1_bccdc285-6c36-476f-b9cd-56bbe3ffda09.webp?v=1714969975","options":["color"],"media":[{"alt":null,"id":23896252153955,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd8b4f1f3e68d86644cadf01007db889384efdd1_bccdc285-6c36-476f-b9cd-56bbe3ffda09.webp?v=1714969975"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd8b4f1f3e68d86644cadf01007db889384efdd1_bccdc285-6c36-476f-b9cd-56bbe3ffda09.webp?v=1714969975","width":2000},{"alt":null,"id":23896253661283,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f8d6bbf3f470e7869e6e2c2b554e58a98e70d1f_b557922a-f638-49be-a39a-b033c277c1c0.webp?v=1714969978"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f8d6bbf3f470e7869e6e2c2b554e58a98e70d1f_b557922a-f638-49be-a39a-b033c277c1c0.webp?v=1714969978","width":2000},{"alt":null,"id":23896254185571,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb50184724a824c2124477b92ea4e0fc1ad0e5fe_ecc0b383-d9e6-4e17-bc9b-194896415156.webp?v=1714969980"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb50184724a824c2124477b92ea4e0fc1ad0e5fe_ecc0b383-d9e6-4e17-bc9b-194896415156.webp?v=1714969980","width":2000},{"alt":null,"id":23896254742627,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00e2f907268b738f3cfe41b68c41c1579c4f3a64_9a00b1cc-00e1-44e7-97bc-a872d75a78e2.webp?v=1714969983"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00e2f907268b738f3cfe41b68c41c1579c4f3a64_9a00b1cc-00e1-44e7-97bc-a872d75a78e2.webp?v=1714969983","width":2000},{"alt":null,"id":23896255266915,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/734da88f99127a8c99224be4023de440c388c88e_0535ad48-0ae3-44a7-b4d1-e385a4048127.webp?v=1714969985"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/734da88f99127a8c99224be4023de440c388c88e_0535ad48-0ae3-44a7-b4d1-e385a4048127.webp?v=1714969985","width":2000},{"alt":null,"id":23896255561827,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0437ddf9c5f7a9151f761b59b780e512e7cd233_6cf56e6c-9ad4-4817-b56d-10f47c7b13af.webp?v=1714969988"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0437ddf9c5f7a9151f761b59b780e512e7cd233_6cf56e6c-9ad4-4817-b56d-10f47c7b13af.webp?v=1714969988","width":2000},{"alt":null,"id":23896256413795,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc88b34361fbb32aa43a3dc4903c200b062492cf_65233d56-d35c-4d91-84ee-b8f024926db5.webp?v=1714969990"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc88b34361fbb32aa43a3dc4903c200b062492cf_65233d56-d35c-4d91-84ee-b8f024926db5.webp?v=1714969990","width":2000},{"alt":null,"id":23896256807011,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b91f1a37665be705bdb9fef9023f4898e60ec829_a6c3bd4f-7e4f-412b-bf45-61472ca95e65.webp?v=1714969993"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b91f1a37665be705bdb9fef9023f4898e60ec829_a6c3bd4f-7e4f-412b-bf45-61472ca95e65.webp?v=1714969993","width":2000},{"alt":null,"id":23896257527907,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f3409d8b9b85fc9c796f3573c9a67a5217ddded_07eb5561-0be6-48f1-8797-f413b2b22592.webp?v=1714969995"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f3409d8b9b85fc9c796f3573c9a67a5217ddded_07eb5561-0be6-48f1-8797-f413b2b22592.webp?v=1714969995","width":2000},{"alt":null,"id":23896258019427,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae2903c829dd5f0e37585b9aa6a9d83b8edc5d18_6d9ee52a-c360-4162-99f4-d850dfd3516c.webp?v=1714969997"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae2903c829dd5f0e37585b9aa6a9d83b8edc5d18_6d9ee52a-c360-4162-99f4-d850dfd3516c.webp?v=1714969997","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41915980775523,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SR05","requires_shipping":true,"taxable":true,"featured_image":{"id":31490848718947,"product_id":7415962599523,"position":6,"created_at":"2024-05-06T12:33:08+08:00","updated_at":"2024-05-06T12:33:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0437ddf9c5f7a9151f761b59b780e512e7cd233_6cf56e6c-9ad4-4817-b56d-10f47c7b13af.webp?v=1714969988","variant_ids":[41915980775523]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max The Powerpuff Girls - 花花 - 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-SR05","featured_media":{"alt":null,"id":23896255561827,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0437ddf9c5f7a9151f761b59b780e512e7cd233_6cf56e6c-9ad4-4817-b56d-10f47c7b13af.webp?v=1714969988"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915980775523,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SR05","requires_shipping":true,"taxable":true,"featured_image":{"id":31490848718947,"product_id":7415962599523,"position":6,"created_at":"2024-05-06T12:33:08+08:00","updated_at":"2024-05-06T12:33:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0437ddf9c5f7a9151f761b59b780e512e7cd233_6cf56e6c-9ad4-4817-b56d-10f47c7b13af.webp?v=1714969988","variant_ids":[41915980775523]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max The Powerpuff Girls - 花花 - 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-SR05","featured_media":{"alt":null,"id":23896255561827,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0437ddf9c5f7a9151f761b59b780e512e7cd233_6cf56e6c-9ad4-4817-b56d-10f47c7b13af.webp?v=1714969988"}},"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: "停產" }