Use strict alias mapping for article-to-product components
This commit is contained in:
@@ -1471,30 +1471,6 @@ try {
|
||||
$lineTotal = $unitPrice !== null ? round($qty * $unitPrice, 2) : null;
|
||||
$sellableItemId = resolve_sellable_item_id($pdo, $articleNumber, $title);
|
||||
$autoMappingMeta = null;
|
||||
if ($sellableItemId === null) {
|
||||
$inferredComponents = infer_components_from_title($pdo, $title);
|
||||
if ($inferredComponents !== []) {
|
||||
$autoMappingMeta = ensure_sellable_mapping_from_title_components(
|
||||
$pdo,
|
||||
$articleNumber,
|
||||
$title,
|
||||
$inferredComponents
|
||||
);
|
||||
$sellableItemId = (int) $autoMappingMeta['sellableItemId'];
|
||||
}
|
||||
}
|
||||
if ($sellableItemId === null) {
|
||||
$fallbackProductId = resolve_product_id_fallback($pdo, $articleNumber, $title);
|
||||
if ($fallbackProductId !== null) {
|
||||
$autoMappingMeta = ensure_sellable_mapping_from_product_fallback(
|
||||
$pdo,
|
||||
$fallbackProductId,
|
||||
'',
|
||||
$title
|
||||
);
|
||||
$sellableItemId = (int) $autoMappingMeta['sellableItemId'];
|
||||
}
|
||||
}
|
||||
$lineNo = $index + 1;
|
||||
|
||||
$lineInsert->execute([
|
||||
|
||||
Reference in New Issue
Block a user