bugfix xmltographql

This commit is contained in:
2025-12-04 15:23:52 +01:00
parent 69452672d4
commit 5b4582b098

View File

@@ -1,11 +1,11 @@
function idmGetGrossNetPrices({priceNode, name}){
return {
gross: {
value: priceNode?.getAttribute(`${name}`) !== null ? +priceNode.getAttribute(`${name}`) : undefined,
value: priceNode?.getAttribute(`${name}`) !== null ? +priceNode?.getAttribute(`${name}`) : undefined,
formatted: priceNode?.getAttribute(`${name}_formatted`) ?? undefined,
},
net: {
value: priceNode?.getAttribute(`${name}_net`) !== null ? +priceNode.getAttribute(`${name}_net`) : undefined,
value: priceNode?.getAttribute(`${name}_net`) !== null ? +priceNode?.getAttribute(`${name}_net`) : undefined,
formatted: priceNode?.getAttribute(`${name}_net_formatted`) ?? undefined,
}
}
@@ -193,7 +193,7 @@ async function idmGetGraphQLData(link){
sizesNode.querySelectorAll(":scope > size").forEach(size=>{
const availabilityNode = size.querySelector(":scope > availability");
const shippingTimeNode = availabilityNode.querySelector(":scope > shipping_time");
const sizePriceNode = availabilityNode.querySelector(":scope > price");
const sizePriceNode = size.querySelector(":scope > price");
const weightNode = size.querySelector(":scope > weight");
sizes.push({