$product = {"id":7407862382691,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 伊沃克人2-塗鴉藝術","handle":"iphone-14-plus-mod-nx-printable-pb39","description":null,"published_at":"2024-06-11T16:24:55+08:00","created_at":"2024-05-03T11:04:45+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 14 Plus","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":41879770628195,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB39","requires_shipping":true,"taxable":true,"featured_image":{"id":31470564606051,"product_id":7407862382691,"position":8,"created_at":"2024-05-03T11:05:04+08:00","updated_at":"2024-05-03T11:05:04+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bba6e1ac089acae07c653e7b98ef78e00eddca07_bdd460f5-85e7-4722-b0dd-8fc275edfcf0.webp?v=1714705504","variant_ids":[41879770628195]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 伊沃克人2-塗鴉藝術 - 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":"NPB0126124-PB39","featured_media":{"alt":null,"id":23875468460131,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bba6e1ac089acae07c653e7b98ef78e00eddca07_bdd460f5-85e7-4722-b0dd-8fc275edfcf0.webp?v=1714705504"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ac1d0d39083a0972cb29f9352daf3dc370c3f44_62f5057c-06bf-4d50-bf5a-ffd950abd2cf.webp?v=1714705488","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd8c141e296c4f59ecea09b50961769943469284_ba9c6ade-eb26-4bcc-b1b4-0bd07070a35f.webp?v=1714705490","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1ffe729b469f906dad75c66b2499b38ecd58dd4_18bc20f3-c30e-408a-86d0-4df9d425cd4d.webp?v=1714705493","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/197b92090ae588e6ce775f6a4d53f71fbecdbc7e_915622c1-8269-4ac9-9b27-ed8c3c0d0571.webp?v=1714705495","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a685b55c42135df8b99b4cac2ea26b2c1de438d3_b220efb0-c2a2-4468-94ad-66ec224ff9df.webp?v=1714705497","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec626b932496c920273def4429b6b273b0e96748_283885ad-3463-4448-93a6-f4885417700d.webp?v=1714705500","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39cd90157225c788b1c4ebc08dccce7ae1ff751f_98bba15c-daae-4da2-bb9a-c7aaca25771f.webp?v=1714705502","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bba6e1ac089acae07c653e7b98ef78e00eddca07_bdd460f5-85e7-4722-b0dd-8fc275edfcf0.webp?v=1714705504","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a8c65b2189fcc2e284ffa43fb4f65daf0515b41_51eccf47-8657-4565-8460-fcb201ea9f48.webp?v=1714705507","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/583260deb886fb9e982a0aa18da7fcb2c5d87293_57dcc267-86ee-4aba-a884-06709be43116.webp?v=1714705509"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ac1d0d39083a0972cb29f9352daf3dc370c3f44_62f5057c-06bf-4d50-bf5a-ffd950abd2cf.webp?v=1714705488","options":["color"],"media":[{"alt":null,"id":23875465445475,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ac1d0d39083a0972cb29f9352daf3dc370c3f44_62f5057c-06bf-4d50-bf5a-ffd950abd2cf.webp?v=1714705488"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ac1d0d39083a0972cb29f9352daf3dc370c3f44_62f5057c-06bf-4d50-bf5a-ffd950abd2cf.webp?v=1714705488","width":2000},{"alt":null,"id":23875465904227,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd8c141e296c4f59ecea09b50961769943469284_ba9c6ade-eb26-4bcc-b1b4-0bd07070a35f.webp?v=1714705490"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fd8c141e296c4f59ecea09b50961769943469284_ba9c6ade-eb26-4bcc-b1b4-0bd07070a35f.webp?v=1714705490","width":2000},{"alt":null,"id":23875466362979,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1ffe729b469f906dad75c66b2499b38ecd58dd4_18bc20f3-c30e-408a-86d0-4df9d425cd4d.webp?v=1714705493"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1ffe729b469f906dad75c66b2499b38ecd58dd4_18bc20f3-c30e-408a-86d0-4df9d425cd4d.webp?v=1714705493","width":2000},{"alt":null,"id":23875466723427,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/197b92090ae588e6ce775f6a4d53f71fbecdbc7e_915622c1-8269-4ac9-9b27-ed8c3c0d0571.webp?v=1714705495"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/197b92090ae588e6ce775f6a4d53f71fbecdbc7e_915622c1-8269-4ac9-9b27-ed8c3c0d0571.webp?v=1714705495","width":2000},{"alt":null,"id":23875467083875,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a685b55c42135df8b99b4cac2ea26b2c1de438d3_b220efb0-c2a2-4468-94ad-66ec224ff9df.webp?v=1714705497"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a685b55c42135df8b99b4cac2ea26b2c1de438d3_b220efb0-c2a2-4468-94ad-66ec224ff9df.webp?v=1714705497","width":2000},{"alt":null,"id":23875467608163,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec626b932496c920273def4429b6b273b0e96748_283885ad-3463-4448-93a6-f4885417700d.webp?v=1714705500"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec626b932496c920273def4429b6b273b0e96748_283885ad-3463-4448-93a6-f4885417700d.webp?v=1714705500","width":2000},{"alt":null,"id":23875467935843,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39cd90157225c788b1c4ebc08dccce7ae1ff751f_98bba15c-daae-4da2-bb9a-c7aaca25771f.webp?v=1714705502"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39cd90157225c788b1c4ebc08dccce7ae1ff751f_98bba15c-daae-4da2-bb9a-c7aaca25771f.webp?v=1714705502","width":2000},{"alt":null,"id":23875468460131,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bba6e1ac089acae07c653e7b98ef78e00eddca07_bdd460f5-85e7-4722-b0dd-8fc275edfcf0.webp?v=1714705504"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bba6e1ac089acae07c653e7b98ef78e00eddca07_bdd460f5-85e7-4722-b0dd-8fc275edfcf0.webp?v=1714705504","width":2000},{"alt":null,"id":23875468886115,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a8c65b2189fcc2e284ffa43fb4f65daf0515b41_51eccf47-8657-4565-8460-fcb201ea9f48.webp?v=1714705507"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5a8c65b2189fcc2e284ffa43fb4f65daf0515b41_51eccf47-8657-4565-8460-fcb201ea9f48.webp?v=1714705507","width":2000},{"alt":null,"id":23875469443171,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/583260deb886fb9e982a0aa18da7fcb2c5d87293_57dcc267-86ee-4aba-a884-06709be43116.webp?v=1714705509"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/583260deb886fb9e982a0aa18da7fcb2c5d87293_57dcc267-86ee-4aba-a884-06709be43116.webp?v=1714705509","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41879770628195,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB39","requires_shipping":true,"taxable":true,"featured_image":{"id":31470564606051,"product_id":7407862382691,"position":8,"created_at":"2024-05-03T11:05:04+08:00","updated_at":"2024-05-03T11:05:04+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bba6e1ac089acae07c653e7b98ef78e00eddca07_bdd460f5-85e7-4722-b0dd-8fc275edfcf0.webp?v=1714705504","variant_ids":[41879770628195]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 伊沃克人2-塗鴉藝術 - 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":"NPB0126124-PB39","featured_media":{"alt":null,"id":23875468460131,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bba6e1ac089acae07c653e7b98ef78e00eddca07_bdd460f5-85e7-4722-b0dd-8fc275edfcf0.webp?v=1714705504"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41879770628195,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB39","requires_shipping":true,"taxable":true,"featured_image":{"id":31470564606051,"product_id":7407862382691,"position":8,"created_at":"2024-05-03T11:05:04+08:00","updated_at":"2024-05-03T11:05:04+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bba6e1ac089acae07c653e7b98ef78e00eddca07_bdd460f5-85e7-4722-b0dd-8fc275edfcf0.webp?v=1714705504","variant_ids":[41879770628195]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 伊沃克人2-塗鴉藝術 - 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":"NPB0126124-PB39","featured_media":{"alt":null,"id":23875468460131,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bba6e1ac089acae07c653e7b98ef78e00eddca07_bdd460f5-85e7-4722-b0dd-8fc275edfcf0.webp?v=1714705504"}},"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: "停產" }