Skip to content

Commit

Permalink
fix(import-products): remove description qnt pages
Browse files Browse the repository at this point in the history
  • Loading branch information
wisley7l committed Jul 2, 2024
1 parent 63bc266 commit 5ef1f43
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 3 additions & 2 deletions functions/lib/cron-events-horus.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,13 +255,14 @@ module.exports = async (appSdk) => {
promises.push(productsStocksEvents(horus, storeId, opts))
const now = new Date()

// if ((now.getHours() - 6) % 24 === 0 && now.getMinutes() === 3) {
if (now.getMinutes() % 10 === 0) {
if ((now.getHours() - 6) % 24 === 0 && now.getMinutes() === 3) {
// if (now.getMinutes() % 10 === 0) {
// run at 3 am (UTC -3) everyday
promises.push(productsPriceEvents(horus, storeId, opts))
}

if (now.getMinutes() % 30 === 0) {
// new Product
// run at 30 in 30min
promises.push(checkProductsImports({ appSdk, storeId }, horus, opts))
}
Expand Down
6 changes: 2 additions & 4 deletions functions/lib/integration/imports/products-to-ecom.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ module.exports = async ({ appSdk, storeId, auth }, productHorus, opts) => {
LARGURA_ITEM,
COMPRIMENTO_ITEM,
ALTURA_ITEM,
QTD_PAGINAS,
// QTD_PAGINAS,
SALDO_DISPONIVEL,
VLR_CAPA,
STATUS_ITEM,
Expand Down Expand Up @@ -250,13 +250,11 @@ module.exports = async ({ appSdk, storeId, auth }, productHorus, opts) => {
if (
DESC_SINOPSE ||
OBS_ESPECIAIS ||
INFO_COMP_ITEM ||
QTD_PAGINAS
INFO_COMP_ITEM
) {
body.body_html = DESC_SINOPSE || ''
body.body_html += OBS_ESPECIAIS ? `<br/>${OBS_ESPECIAIS}<br/>` : '<br/>'
body.body_html += INFO_COMP_ITEM ? `${INFO_COMP_ITEM}<br/>` : ''
body.body_html += QTD_PAGINAS ? ` Quantidade de páginas: ${QTD_PAGINAS} <br/>` : ''
}

const fieldsGtin = ['COD_BARRA_ITEM', 'COD_BARRA_ITEM_ALT', 'COD_ISBN_ITEM']
Expand Down

0 comments on commit 5ef1f43

Please sign in to comment.