mirror of
https://github.com/badlogic/heissepreise.git
synced 2024-06-20 15:35:49 +02:00
Fix id of dm-de items, category of billa items.
This commit is contained in:
parent
6569b17da2
commit
b0edbf88a5
|
@ -37,14 +37,13 @@ exports.getCanonical = function (item, today) {
|
|||
let categoryCode = billaCategory.replace("B2-", "").substring(0, 2);
|
||||
let [ci, cj] = fromCategoryCode(categoryCode);
|
||||
categoryCode = toCategoryCode(ci - 1, cj - 1);
|
||||
const category = getCategory(categoryCode);
|
||||
|
||||
return utils.convertUnit(
|
||||
{
|
||||
id: item.data.articleId,
|
||||
name: item.data.name,
|
||||
description: item.data.description ?? "",
|
||||
category,
|
||||
categoryCode,
|
||||
price: item.data.price.final,
|
||||
priceHistory: [{ date: today, price: item.data.price.final }],
|
||||
isWeighted: item.data.isWeightArticle,
|
||||
|
|
|
@ -15,7 +15,7 @@ exports.getCanonical = function (item, today) {
|
|||
let unit = item.contentUnit || item.basePriceUnit;
|
||||
return utils.convertUnit(
|
||||
{
|
||||
id: item.gtin,
|
||||
id: String(item.gtin),
|
||||
name: `${item.brandName} ${item.title}`,
|
||||
// description: "", not available
|
||||
price: item.price.value,
|
||||
|
|
Loading…
Reference in New Issue
Block a user