$product = {"id":7827165249635,"title":"AirPods 1 AirPods Case Tour de France TDF Logo","handle":"airpods-1-airpods-case-bundle-front-crossover-design-tdf17","description":null,"published_at":"2025-07-14T12:00:12+08:00","created_at":"2025-06-26T15:02:26+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-tour-de-france","device-Airpods 1","merge","reseller-tour-de-france"],"price":75000,"price_min":75000,"price_max":75000,"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":43496982085731,"title":"Sage Green","option1":"Sage Green","option2":null,"option3":null,"sku":"ABT01170P2-TDF17","requires_shipping":true,"taxable":true,"featured_image":{"id":34081226195043,"product_id":7827165249635,"position":5,"created_at":"2025-06-26T15:02:31+08:00","updated_at":"2025-06-26T15:02:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f572ca631dc0aa5e74b33c5e9e975f07afdbe7d1.webp?v=1750921353","variant_ids":[43496982085731]},"available":true,"name":"AirPods 1 AirPods Case Tour de France TDF Logo - Sage Green","public_title":"Sage Green","options":["Sage Green"],"price":75000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"ABT01170P2-TDF17","featured_media":{"alt":null,"id":25742377418851,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f572ca631dc0aa5e74b33c5e9e975f07afdbe7d1.webp?v=1750921353"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43496985002083,"title":"Blush Pink","option1":"Blush Pink","option2":null,"option3":null,"sku":"ABT0117057-TDF17","requires_shipping":true,"taxable":true,"featured_image":{"id":34081226522723,"product_id":7827165249635,"position":7,"created_at":"2025-06-26T15:02:33+08:00","updated_at":"2025-06-26T15:02:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59e631ce02b287d41def07644ee9812a39e8d31e.webp?v=1750921354","variant_ids":[43496985002083]},"available":true,"name":"AirPods 1 AirPods Case Tour de France TDF Logo - Blush Pink","public_title":"Blush Pink","options":["Blush Pink"],"price":75000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"ABT0117057-TDF17","featured_media":{"alt":null,"id":25742377582691,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59e631ce02b287d41def07644ee9812a39e8d31e.webp?v=1750921354"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43496985034851,"title":"Transparent","option1":"Transparent","option2":null,"option3":null,"sku":"ABT01170R4-TDF17","requires_shipping":true,"taxable":true,"featured_image":{"id":34081225277539,"product_id":7827165249635,"position":2,"created_at":"2025-06-26T15:02:30+08:00","updated_at":"2025-06-26T15:02:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/520a3b15cadd3fb7e6be2e55b9ee98a163f2c305.webp?v=1750921352","variant_ids":[43496985034851]},"available":true,"name":"AirPods 1 AirPods Case Tour de France TDF Logo - Transparent","public_title":"Transparent","options":["Transparent"],"price":75000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"ABT01170R4-TDF17","featured_media":{"alt":null,"id":25742376697955,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/520a3b15cadd3fb7e6be2e55b9ee98a163f2c305.webp?v=1750921352"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43496985067619,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"ABT0117052-TDF17","requires_shipping":true,"taxable":true,"featured_image":{"id":34081225900131,"product_id":7827165249635,"position":4,"created_at":"2025-06-26T15:02:31+08:00","updated_at":"2025-06-26T15:02:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0073a105cdf04098ff2b87871e60c12c31fc3ef.webp?v=1750921353","variant_ids":[43496985067619]},"available":true,"name":"AirPods 1 AirPods Case Tour de France TDF Logo - Black","public_title":"Black","options":["Black"],"price":75000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"ABT0117052-TDF17","featured_media":{"alt":null,"id":25742376992867,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0073a105cdf04098ff2b87871e60c12c31fc3ef.webp?v=1750921353"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43496985100387,"title":"Violet","option1":"Violet","option2":null,"option3":null,"sku":"ABT01170P1-TDF17","requires_shipping":true,"taxable":true,"featured_image":{"id":34081225048163,"product_id":7827165249635,"position":1,"created_at":"2025-06-26T15:02:29+08:00","updated_at":"2025-06-26T15:02:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd8484eabe6db9732b40abfe4f04a0506cf8dbe2.webp?v=1750921351","variant_ids":[43496985100387]},"available":true,"name":"AirPods 1 AirPods Case Tour de France TDF Logo - Violet","public_title":"Violet","options":["Violet"],"price":75000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"ABT01170P1-TDF17","featured_media":{"alt":null,"id":25742376468579,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd8484eabe6db9732b40abfe4f04a0506cf8dbe2.webp?v=1750921351"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43496985165923,"title":"Cobalt Blue","option1":"Cobalt Blue","option2":null,"option3":null,"sku":"ABT01170O9-TDF17","requires_shipping":true,"taxable":true,"featured_image":{"id":34081226686563,"product_id":7827165249635,"position":8,"created_at":"2025-06-26T15:02:33+08:00","updated_at":"2025-06-26T15:02:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/878e14d9ef535797fa81bf411a69804c1d4fe415.webp?v=1750921355","variant_ids":[43496985165923]},"available":true,"name":"AirPods 1 AirPods Case Tour de France TDF Logo - Cobalt Blue","public_title":"Cobalt Blue","options":["Cobalt Blue"],"price":75000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"ABT01170O9-TDF17","featured_media":{"alt":null,"id":25742377713763,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/878e14d9ef535797fa81bf411a69804c1d4fe415.webp?v=1750921355"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd8484eabe6db9732b40abfe4f04a0506cf8dbe2.webp?v=1750921351","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/520a3b15cadd3fb7e6be2e55b9ee98a163f2c305.webp?v=1750921352","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9419899691c6ad1c9e0278b376dbf9f438f7625f.webp?v=1750921352","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0073a105cdf04098ff2b87871e60c12c31fc3ef.webp?v=1750921353","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f572ca631dc0aa5e74b33c5e9e975f07afdbe7d1.webp?v=1750921353","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db00734b298d45fb9cca049a5c25e94d76a362d0.webp?v=1750921354","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59e631ce02b287d41def07644ee9812a39e8d31e.webp?v=1750921354","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/878e14d9ef535797fa81bf411a69804c1d4fe415.webp?v=1750921355"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd8484eabe6db9732b40abfe4f04a0506cf8dbe2.webp?v=1750921351","options":["color"],"media":[{"alt":null,"id":25742376468579,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd8484eabe6db9732b40abfe4f04a0506cf8dbe2.webp?v=1750921351"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd8484eabe6db9732b40abfe4f04a0506cf8dbe2.webp?v=1750921351","width":2000},{"alt":null,"id":25742376697955,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/520a3b15cadd3fb7e6be2e55b9ee98a163f2c305.webp?v=1750921352"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/520a3b15cadd3fb7e6be2e55b9ee98a163f2c305.webp?v=1750921352","width":2000},{"alt":null,"id":25742376861795,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9419899691c6ad1c9e0278b376dbf9f438f7625f.webp?v=1750921352"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9419899691c6ad1c9e0278b376dbf9f438f7625f.webp?v=1750921352","width":2000},{"alt":null,"id":25742376992867,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0073a105cdf04098ff2b87871e60c12c31fc3ef.webp?v=1750921353"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0073a105cdf04098ff2b87871e60c12c31fc3ef.webp?v=1750921353","width":2000},{"alt":null,"id":25742377418851,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f572ca631dc0aa5e74b33c5e9e975f07afdbe7d1.webp?v=1750921353"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f572ca631dc0aa5e74b33c5e9e975f07afdbe7d1.webp?v=1750921353","width":2000},{"alt":null,"id":25742377517155,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db00734b298d45fb9cca049a5c25e94d76a362d0.webp?v=1750921354"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db00734b298d45fb9cca049a5c25e94d76a362d0.webp?v=1750921354","width":2000},{"alt":null,"id":25742377582691,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59e631ce02b287d41def07644ee9812a39e8d31e.webp?v=1750921354"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59e631ce02b287d41def07644ee9812a39e8d31e.webp?v=1750921354","width":2000},{"alt":null,"id":25742377713763,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/878e14d9ef535797fa81bf411a69804c1d4fe415.webp?v=1750921355"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/878e14d9ef535797fa81bf411a69804c1d4fe415.webp?v=1750921355","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43496982085731,"title":"Sage Green","option1":"Sage Green","option2":null,"option3":null,"sku":"ABT01170P2-TDF17","requires_shipping":true,"taxable":true,"featured_image":{"id":34081226195043,"product_id":7827165249635,"position":5,"created_at":"2025-06-26T15:02:31+08:00","updated_at":"2025-06-26T15:02:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f572ca631dc0aa5e74b33c5e9e975f07afdbe7d1.webp?v=1750921353","variant_ids":[43496982085731]},"available":true,"name":"AirPods 1 AirPods Case Tour de France TDF Logo - Sage Green","public_title":"Sage Green","options":["Sage Green"],"price":75000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"ABT01170P2-TDF17","featured_media":{"alt":null,"id":25742377418851,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f572ca631dc0aa5e74b33c5e9e975f07afdbe7d1.webp?v=1750921353"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43496985002083,"title":"Blush Pink","option1":"Blush Pink","option2":null,"option3":null,"sku":"ABT0117057-TDF17","requires_shipping":true,"taxable":true,"featured_image":{"id":34081226522723,"product_id":7827165249635,"position":7,"created_at":"2025-06-26T15:02:33+08:00","updated_at":"2025-06-26T15:02:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59e631ce02b287d41def07644ee9812a39e8d31e.webp?v=1750921354","variant_ids":[43496985002083]},"available":true,"name":"AirPods 1 AirPods Case Tour de France TDF Logo - Blush Pink","public_title":"Blush Pink","options":["Blush Pink"],"price":75000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"ABT0117057-TDF17","featured_media":{"alt":null,"id":25742377582691,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59e631ce02b287d41def07644ee9812a39e8d31e.webp?v=1750921354"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43496985034851,"title":"Transparent","option1":"Transparent","option2":null,"option3":null,"sku":"ABT01170R4-TDF17","requires_shipping":true,"taxable":true,"featured_image":{"id":34081225277539,"product_id":7827165249635,"position":2,"created_at":"2025-06-26T15:02:30+08:00","updated_at":"2025-06-26T15:02:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/520a3b15cadd3fb7e6be2e55b9ee98a163f2c305.webp?v=1750921352","variant_ids":[43496985034851]},"available":true,"name":"AirPods 1 AirPods Case Tour de France TDF Logo - Transparent","public_title":"Transparent","options":["Transparent"],"price":75000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"ABT01170R4-TDF17","featured_media":{"alt":null,"id":25742376697955,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/520a3b15cadd3fb7e6be2e55b9ee98a163f2c305.webp?v=1750921352"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43496985067619,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"ABT0117052-TDF17","requires_shipping":true,"taxable":true,"featured_image":{"id":34081225900131,"product_id":7827165249635,"position":4,"created_at":"2025-06-26T15:02:31+08:00","updated_at":"2025-06-26T15:02:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0073a105cdf04098ff2b87871e60c12c31fc3ef.webp?v=1750921353","variant_ids":[43496985067619]},"available":true,"name":"AirPods 1 AirPods Case Tour de France TDF Logo - Black","public_title":"Black","options":["Black"],"price":75000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"ABT0117052-TDF17","featured_media":{"alt":null,"id":25742376992867,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0073a105cdf04098ff2b87871e60c12c31fc3ef.webp?v=1750921353"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43496985100387,"title":"Violet","option1":"Violet","option2":null,"option3":null,"sku":"ABT01170P1-TDF17","requires_shipping":true,"taxable":true,"featured_image":{"id":34081225048163,"product_id":7827165249635,"position":1,"created_at":"2025-06-26T15:02:29+08:00","updated_at":"2025-06-26T15:02:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd8484eabe6db9732b40abfe4f04a0506cf8dbe2.webp?v=1750921351","variant_ids":[43496985100387]},"available":true,"name":"AirPods 1 AirPods Case Tour de France TDF Logo - Violet","public_title":"Violet","options":["Violet"],"price":75000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"ABT01170P1-TDF17","featured_media":{"alt":null,"id":25742376468579,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd8484eabe6db9732b40abfe4f04a0506cf8dbe2.webp?v=1750921351"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43496985165923,"title":"Cobalt Blue","option1":"Cobalt Blue","option2":null,"option3":null,"sku":"ABT01170O9-TDF17","requires_shipping":true,"taxable":true,"featured_image":{"id":34081226686563,"product_id":7827165249635,"position":8,"created_at":"2025-06-26T15:02:33+08:00","updated_at":"2025-06-26T15:02:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/878e14d9ef535797fa81bf411a69804c1d4fe415.webp?v=1750921355","variant_ids":[43496985165923]},"available":true,"name":"AirPods 1 AirPods Case Tour de France TDF Logo - Cobalt Blue","public_title":"Cobalt Blue","options":["Cobalt Blue"],"price":75000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"ABT01170O9-TDF17","featured_media":{"alt":null,"id":25742377713763,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/878e14d9ef535797fa81bf411a69804c1d4fe415.webp?v=1750921355"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43496982085731,"title":"Sage Green","option1":"Sage Green","option2":null,"option3":null,"sku":"ABT01170P2-TDF17","requires_shipping":true,"taxable":true,"featured_image":{"id":34081226195043,"product_id":7827165249635,"position":5,"created_at":"2025-06-26T15:02:31+08:00","updated_at":"2025-06-26T15:02:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f572ca631dc0aa5e74b33c5e9e975f07afdbe7d1.webp?v=1750921353","variant_ids":[43496982085731]},"available":true,"name":"AirPods 1 AirPods Case Tour de France TDF Logo - Sage Green","public_title":"Sage Green","options":["Sage Green"],"price":75000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"ABT01170P2-TDF17","featured_media":{"alt":null,"id":25742377418851,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f572ca631dc0aa5e74b33c5e9e975f07afdbe7d1.webp?v=1750921353"}},"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: "停產"
}