Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
586313d6d7 |
No files matched your search
@@ -47,10 +47,7 @@ async function meilisearchProductTransformer(
|
|||||||
inventory_quantity?: number | null
|
inventory_quantity?: number | null
|
||||||
manage_inventory?: boolean | null
|
manage_inventory?: boolean | null
|
||||||
allow_backorder?: boolean | null
|
allow_backorder?: boolean | null
|
||||||
prices?: Array<{
|
calculated_price?: { calculated_amount?: number | null } | null
|
||||||
amount?: number | null
|
|
||||||
currency_code?: string | null
|
|
||||||
}> | null
|
|
||||||
}>
|
}>
|
||||||
| null
|
| null
|
||||||
| undefined
|
| undefined
|
||||||
@@ -66,18 +63,6 @@ async function meilisearchProductTransformer(
|
|||||||
variant.manage_inventory === false ||
|
variant.manage_inventory === false ||
|
||||||
(variant.inventory_quantity ?? 0) > 0
|
(variant.inventory_quantity ?? 0) > 0
|
||||||
|
|
||||||
// variants.calculated_price requiere currency_code/region_id en el
|
|
||||||
// contexto de pricing, que el workflow de sync interno del plugin no
|
|
||||||
// provee -- hace fallar TODO el job de indexado (confirmado en vivo:
|
|
||||||
// "Method calculatePrices requires currency_code in the pricing
|
|
||||||
// context"). variants.prices es la lista cruda de precios (sin
|
|
||||||
// resolver promociones/reglas), no necesita contexto -- alcanza para
|
|
||||||
// el filtro/orden por precio en la busqueda, que no necesita el
|
|
||||||
// precio final promocional.
|
|
||||||
const copPrice = variant?.prices?.find(
|
|
||||||
(price) => price.currency_code?.toLowerCase() === "cop",
|
|
||||||
)
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: document.id,
|
id: document.id,
|
||||||
name: document.title || "Producto ARI Shopping",
|
name: document.title || "Producto ARI Shopping",
|
||||||
@@ -88,7 +73,10 @@ async function meilisearchProductTransformer(
|
|||||||
brand: stringMetadata(metadata, "brand") || "ARI Shopping",
|
brand: stringMetadata(metadata, "brand") || "ARI Shopping",
|
||||||
ageRange: stringMetadata(metadata, "ageRange") || "Todas",
|
ageRange: stringMetadata(metadata, "ageRange") || "Todas",
|
||||||
tags: (tags || []).map((tag) => tag.value).filter(Boolean),
|
tags: (tags || []).map((tag) => tag.value).filter(Boolean),
|
||||||
price: typeof copPrice?.amount === "number" ? copPrice.amount : null,
|
price:
|
||||||
|
typeof variant?.calculated_price?.calculated_amount === "number"
|
||||||
|
? variant.calculated_price.calculated_amount
|
||||||
|
: null,
|
||||||
available,
|
available,
|
||||||
isNew: booleanMetadata(metadata, "isNew"),
|
isNew: booleanMetadata(metadata, "isNew"),
|
||||||
featured: booleanMetadata(metadata, "featured"),
|
featured: booleanMetadata(metadata, "featured"),
|
||||||
@@ -196,8 +184,7 @@ module.exports = defineConfig({
|
|||||||
"variants.inventory_quantity",
|
"variants.inventory_quantity",
|
||||||
"variants.manage_inventory",
|
"variants.manage_inventory",
|
||||||
"variants.allow_backorder",
|
"variants.allow_backorder",
|
||||||
"variants.prices.amount",
|
"variants.calculated_price.calculated_amount",
|
||||||
"variants.prices.currency_code",
|
|
||||||
],
|
],
|
||||||
indexSettings: {
|
indexSettings: {
|
||||||
// Tabla de ADR 0006 §3: Buscable / Filtrable-faceta / Ordenable.
|
// Tabla de ADR 0006 §3: Buscable / Filtrable-faceta / Ordenable.
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ spec:
|
|||||||
memory: 64Mi
|
memory: 64Mi
|
||||||
|
|
||||||
- name: migrations
|
- name: migrations
|
||||||
image: gitea.cruzcloud.net/devops/ecommerce-medusa:v1.0.127
|
image: gitea.cruzcloud.net/devops/ecommerce-medusa:v1.0.165
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
command:
|
command:
|
||||||
- node
|
- node
|
||||||
@@ -86,7 +86,7 @@ spec:
|
|||||||
|
|
||||||
containers:
|
containers:
|
||||||
- name: app
|
- name: app
|
||||||
image: gitea.cruzcloud.net/devops/ecommerce-medusa:v1.0.127
|
image: gitea.cruzcloud.net/devops/ecommerce-medusa:v1.0.165
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
envFrom:
|
envFrom:
|
||||||
- configMapRef:
|
- configMapRef:
|
||||||
|
|||||||
Reference in new issue
Block a user