$product = {"id":7416079974499,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max The Powerpuff Girls - 魔人啾啾的攻擊","handle":"iphone-xs-max-mod-nx-printable-sr04","description":null,"published_at":"2024-06-11T16:52:11+08:00","created_at":"2024-05-06T12:54:13+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":41917231202403,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SR04","requires_shipping":true,"taxable":true,"featured_image":{"id":31491167486051,"product_id":7416079974499,"position":6,"created_at":"2024-05-06T12:54:30+08:00","updated_at":"2024-05-06T12:54:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e34557d31c8134a47bad63d5c60e7f377b963c42_4d2f38b2-fae8-490f-ad63-b18cc800a065.webp?v=1714971270","variant_ids":[41917231202403]},"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-SR04","featured_media":{"alt":null,"id":23896574918755,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e34557d31c8134a47bad63d5c60e7f377b963c42_4d2f38b2-fae8-490f-ad63-b18cc800a065.webp?v=1714971270"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3f95ba85581a7834c55d55da6b4b50dcb44fcef_9e4d3778-bc8b-4be3-b369-afbf360ac39e.webp?v=1714971255","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/75894849c522f9950a1489f9b731e87038979812_e8bfaf8e-75f9-4054-81c8-39d845f0b562.webp?v=1714971257","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/316222abe37df7e9336a5ec598dcf4e7d911862c_2813c860-1ab0-450a-93f9-dc0397a77a7c.webp?v=1714971262","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa8cc2147a87187e605b284f7b45c96be6cf364f_788f7226-ad80-465e-a2cd-1a42d981c5ed.webp?v=1714971265","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/807e18180eda8e136a743c6682e48d7ea2e6a49e_76df904c-ceaf-49bb-9a2b-0ddc42ced05f.webp?v=1714971267","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e34557d31c8134a47bad63d5c60e7f377b963c42_4d2f38b2-fae8-490f-ad63-b18cc800a065.webp?v=1714971270","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ef71c145d5a7b819e11d255e37308a589facfd5_0f95794d-1809-4314-bc30-ef48dad0e118.webp?v=1714971272","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63103dfda2d7beca13c741a8bc4ff50e2c0c768f_6cb915c5-7cec-4cf3-be26-7cc45529177a.webp?v=1714971275","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9050252a6aa47087776980716e75d30a2f05b7d5_b8a63570-53fb-44b5-801b-2b9c5f261ca4.webp?v=1714971277"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3f95ba85581a7834c55d55da6b4b50dcb44fcef_9e4d3778-bc8b-4be3-b369-afbf360ac39e.webp?v=1714971255","options":["color"],"media":[{"alt":null,"id":23896571281507,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3f95ba85581a7834c55d55da6b4b50dcb44fcef_9e4d3778-bc8b-4be3-b369-afbf360ac39e.webp?v=1714971255"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3f95ba85581a7834c55d55da6b4b50dcb44fcef_9e4d3778-bc8b-4be3-b369-afbf360ac39e.webp?v=1714971255","width":2000},{"alt":null,"id":23896571641955,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/75894849c522f9950a1489f9b731e87038979812_e8bfaf8e-75f9-4054-81c8-39d845f0b562.webp?v=1714971257"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/75894849c522f9950a1489f9b731e87038979812_e8bfaf8e-75f9-4054-81c8-39d845f0b562.webp?v=1714971257","width":2000},{"alt":null,"id":23896573247587,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/316222abe37df7e9336a5ec598dcf4e7d911862c_2813c860-1ab0-450a-93f9-dc0397a77a7c.webp?v=1714971262"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/316222abe37df7e9336a5ec598dcf4e7d911862c_2813c860-1ab0-450a-93f9-dc0397a77a7c.webp?v=1714971262","width":2000},{"alt":null,"id":23896573837411,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa8cc2147a87187e605b284f7b45c96be6cf364f_788f7226-ad80-465e-a2cd-1a42d981c5ed.webp?v=1714971265"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fa8cc2147a87187e605b284f7b45c96be6cf364f_788f7226-ad80-465e-a2cd-1a42d981c5ed.webp?v=1714971265","width":2000},{"alt":null,"id":23896574361699,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/807e18180eda8e136a743c6682e48d7ea2e6a49e_76df904c-ceaf-49bb-9a2b-0ddc42ced05f.webp?v=1714971267"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/807e18180eda8e136a743c6682e48d7ea2e6a49e_76df904c-ceaf-49bb-9a2b-0ddc42ced05f.webp?v=1714971267","width":2000},{"alt":null,"id":23896574918755,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e34557d31c8134a47bad63d5c60e7f377b963c42_4d2f38b2-fae8-490f-ad63-b18cc800a065.webp?v=1714971270"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e34557d31c8134a47bad63d5c60e7f377b963c42_4d2f38b2-fae8-490f-ad63-b18cc800a065.webp?v=1714971270","width":2000},{"alt":null,"id":23896575508579,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ef71c145d5a7b819e11d255e37308a589facfd5_0f95794d-1809-4314-bc30-ef48dad0e118.webp?v=1714971272"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ef71c145d5a7b819e11d255e37308a589facfd5_0f95794d-1809-4314-bc30-ef48dad0e118.webp?v=1714971272","width":2000},{"alt":null,"id":23896576098403,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63103dfda2d7beca13c741a8bc4ff50e2c0c768f_6cb915c5-7cec-4cf3-be26-7cc45529177a.webp?v=1714971275"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63103dfda2d7beca13c741a8bc4ff50e2c0c768f_6cb915c5-7cec-4cf3-be26-7cc45529177a.webp?v=1714971275","width":2000},{"alt":null,"id":23896576950371,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9050252a6aa47087776980716e75d30a2f05b7d5_b8a63570-53fb-44b5-801b-2b9c5f261ca4.webp?v=1714971277"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9050252a6aa47087776980716e75d30a2f05b7d5_b8a63570-53fb-44b5-801b-2b9c5f261ca4.webp?v=1714971277","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41917231202403,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SR04","requires_shipping":true,"taxable":true,"featured_image":{"id":31491167486051,"product_id":7416079974499,"position":6,"created_at":"2024-05-06T12:54:30+08:00","updated_at":"2024-05-06T12:54:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e34557d31c8134a47bad63d5c60e7f377b963c42_4d2f38b2-fae8-490f-ad63-b18cc800a065.webp?v=1714971270","variant_ids":[41917231202403]},"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-SR04","featured_media":{"alt":null,"id":23896574918755,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e34557d31c8134a47bad63d5c60e7f377b963c42_4d2f38b2-fae8-490f-ad63-b18cc800a065.webp?v=1714971270"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41917231202403,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-SR04","requires_shipping":true,"taxable":true,"featured_image":{"id":31491167486051,"product_id":7416079974499,"position":6,"created_at":"2024-05-06T12:54:30+08:00","updated_at":"2024-05-06T12:54:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e34557d31c8134a47bad63d5c60e7f377b963c42_4d2f38b2-fae8-490f-ad63-b18cc800a065.webp?v=1714971270","variant_ids":[41917231202403]},"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-SR04","featured_media":{"alt":null,"id":23896574918755,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e34557d31c8134a47bad63d5c60e7f377b963c42_4d2f38b2-fae8-490f-ad63-b18cc800a065.webp?v=1714971270"}},"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: "停產" }