$product = {"id":7407908454499,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-氣球布置-幽默系列","handle":"iphone-14-plus-mod-nx-printable-pc10","description":null,"published_at":"2024-06-11T16:26:14+08:00","created_at":"2024-05-03T11:13:48+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":41880385290339,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PC10","requires_shipping":true,"taxable":true,"featured_image":{"id":31470674182243,"product_id":7407908454499,"position":5,"created_at":"2024-05-03T11:14:00+08:00","updated_at":"2024-05-03T11:14:00+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e7ad639d103d493fb9f6bb17a659dea1a6b6afc_632fd941-5f43-44cf-82e0-bd8c364dc153.webp?v=1714706040","variant_ids":[41880385290339]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-氣球布置-幽默系列 - 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-PC10","featured_media":{"alt":null,"id":23875578200163,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e7ad639d103d493fb9f6bb17a659dea1a6b6afc_632fd941-5f43-44cf-82e0-bd8c364dc153.webp?v=1714706040"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e46214a57b3c90a01778e2200de963cc38561d8f_5a4efe0b-44f3-4703-9356-ed87abdeb3bc.webp?v=1714706031","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ed914b843243049224106e0f50fcf7ed3fc51f2_584052f0-da00-4ea5-ab2f-44ffc850a62b.webp?v=1714706033","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/61ed7beb7f5f3d117ea1b5e02e1d4c3e8bcceee7_4f8242f1-a349-4859-a390-bb06569cad02.webp?v=1714706036","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8abce8dc45767974e00155c241e1cb7c9cbf4d37_0dfe3aa9-7daf-41f2-ad13-cea169b88cf0.webp?v=1714706038","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e7ad639d103d493fb9f6bb17a659dea1a6b6afc_632fd941-5f43-44cf-82e0-bd8c364dc153.webp?v=1714706040","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/210dfc411c0c0b64a273c5b91dbc147eee8f6cd0_d5e976ef-208b-4d29-854c-edc54f9dcd60.webp?v=1714706043","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3c7b6e3ba1807adb3178cf85169ff78d329f77f_763a0955-0871-4d4b-9fe5-80d33e3ef4aa.webp?v=1714706045","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/999ec96663be5b1ebb2111adefa00b9f8ac7ee04_2b1b4f69-831e-4d5c-9f0f-346f34502c88.webp?v=1714706047","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/941339b962f3042675a51530335b218cf0ea28d5_798768ce-cca6-45f9-8dc9-93c43603809f.webp?v=1714706050","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de0216ccdfd850f406a9c3cbd016c3511b00ff26_92711fe0-f2a1-422e-ae6c-4fdec4e45b36.webp?v=1714706052"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e46214a57b3c90a01778e2200de963cc38561d8f_5a4efe0b-44f3-4703-9356-ed87abdeb3bc.webp?v=1714706031","options":["color"],"media":[{"alt":null,"id":23875576135779,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e46214a57b3c90a01778e2200de963cc38561d8f_5a4efe0b-44f3-4703-9356-ed87abdeb3bc.webp?v=1714706031"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e46214a57b3c90a01778e2200de963cc38561d8f_5a4efe0b-44f3-4703-9356-ed87abdeb3bc.webp?v=1714706031","width":2000},{"alt":null,"id":23875576463459,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ed914b843243049224106e0f50fcf7ed3fc51f2_584052f0-da00-4ea5-ab2f-44ffc850a62b.webp?v=1714706033"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ed914b843243049224106e0f50fcf7ed3fc51f2_584052f0-da00-4ea5-ab2f-44ffc850a62b.webp?v=1714706033","width":2000},{"alt":null,"id":23875577184355,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/61ed7beb7f5f3d117ea1b5e02e1d4c3e8bcceee7_4f8242f1-a349-4859-a390-bb06569cad02.webp?v=1714706036"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/61ed7beb7f5f3d117ea1b5e02e1d4c3e8bcceee7_4f8242f1-a349-4859-a390-bb06569cad02.webp?v=1714706036","width":2000},{"alt":null,"id":23875577839715,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8abce8dc45767974e00155c241e1cb7c9cbf4d37_0dfe3aa9-7daf-41f2-ad13-cea169b88cf0.webp?v=1714706038"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8abce8dc45767974e00155c241e1cb7c9cbf4d37_0dfe3aa9-7daf-41f2-ad13-cea169b88cf0.webp?v=1714706038","width":2000},{"alt":null,"id":23875578200163,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e7ad639d103d493fb9f6bb17a659dea1a6b6afc_632fd941-5f43-44cf-82e0-bd8c364dc153.webp?v=1714706040"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e7ad639d103d493fb9f6bb17a659dea1a6b6afc_632fd941-5f43-44cf-82e0-bd8c364dc153.webp?v=1714706040","width":2000},{"alt":null,"id":23875578560611,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/210dfc411c0c0b64a273c5b91dbc147eee8f6cd0_d5e976ef-208b-4d29-854c-edc54f9dcd60.webp?v=1714706043"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/210dfc411c0c0b64a273c5b91dbc147eee8f6cd0_d5e976ef-208b-4d29-854c-edc54f9dcd60.webp?v=1714706043","width":2000},{"alt":null,"id":23875579084899,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3c7b6e3ba1807adb3178cf85169ff78d329f77f_763a0955-0871-4d4b-9fe5-80d33e3ef4aa.webp?v=1714706045"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3c7b6e3ba1807adb3178cf85169ff78d329f77f_763a0955-0871-4d4b-9fe5-80d33e3ef4aa.webp?v=1714706045","width":2000},{"alt":null,"id":23875579412579,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/999ec96663be5b1ebb2111adefa00b9f8ac7ee04_2b1b4f69-831e-4d5c-9f0f-346f34502c88.webp?v=1714706047"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/999ec96663be5b1ebb2111adefa00b9f8ac7ee04_2b1b4f69-831e-4d5c-9f0f-346f34502c88.webp?v=1714706047","width":2000},{"alt":null,"id":23875579871331,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/941339b962f3042675a51530335b218cf0ea28d5_798768ce-cca6-45f9-8dc9-93c43603809f.webp?v=1714706050"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/941339b962f3042675a51530335b218cf0ea28d5_798768ce-cca6-45f9-8dc9-93c43603809f.webp?v=1714706050","width":2000},{"alt":null,"id":23875580166243,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de0216ccdfd850f406a9c3cbd016c3511b00ff26_92711fe0-f2a1-422e-ae6c-4fdec4e45b36.webp?v=1714706052"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/de0216ccdfd850f406a9c3cbd016c3511b00ff26_92711fe0-f2a1-422e-ae6c-4fdec4e45b36.webp?v=1714706052","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41880385290339,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PC10","requires_shipping":true,"taxable":true,"featured_image":{"id":31470674182243,"product_id":7407908454499,"position":5,"created_at":"2024-05-03T11:14:00+08:00","updated_at":"2024-05-03T11:14:00+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e7ad639d103d493fb9f6bb17a659dea1a6b6afc_632fd941-5f43-44cf-82e0-bd8c364dc153.webp?v=1714706040","variant_ids":[41880385290339]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-氣球布置-幽默系列 - 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-PC10","featured_media":{"alt":null,"id":23875578200163,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e7ad639d103d493fb9f6bb17a659dea1a6b6afc_632fd941-5f43-44cf-82e0-bd8c364dc153.webp?v=1714706040"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41880385290339,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PC10","requires_shipping":true,"taxable":true,"featured_image":{"id":31470674182243,"product_id":7407908454499,"position":5,"created_at":"2024-05-03T11:14:00+08:00","updated_at":"2024-05-03T11:14:00+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e7ad639d103d493fb9f6bb17a659dea1a6b6afc_632fd941-5f43-44cf-82e0-bd8c364dc153.webp?v=1714706040","variant_ids":[41880385290339]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-氣球布置-幽默系列 - 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-PC10","featured_media":{"alt":null,"id":23875578200163,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e7ad639d103d493fb9f6bb17a659dea1a6b6afc_632fd941-5f43-44cf-82e0-bd8c364dc153.webp?v=1714706040"}},"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: "停產" }