Skip to content

Commit

Permalink
Update product-to-tiny.js
Browse files Browse the repository at this point in the history
  • Loading branch information
leomp12 authored Jan 23, 2025
1 parent 5a9fe5c commit bc4f283
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functions/lib/integration/parsers/product-to-tiny.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ module.exports = (product, originalTinyProduct, appData, storeId) => {
tinyProduct.marca = product.brands[0].name
}
if (product.category_tree) {
tinyProduct.categoria = product.category_tree.replace(/\s?>\s?/g, ' >> ')
tinyProduct.categoria = product.category_tree.replace(/\s?>\s?/g, ' >> ').replace(/&+/g, 'e')
} else if (product.categories && product.categories.length) {
tinyProduct.categoria = product.categories.map(({ name }) => name).join(' >> ')
tinyProduct.categoria = product.categories.map(({ name }) => name).join(' >> ').replace(/&+/g, 'e')
}

if (product.pictures && product.pictures.length && !appData.disable_image_exportation) {
Expand Down

0 comments on commit bc4f283

Please sign in to comment.