Append concept name to product name in catalog
This commit is contained in:
@@ -54,6 +54,12 @@ class Product
|
||||
$product['@code'] = $entity->getCode();
|
||||
$product['name'] = preg_replace('/[\r\n\s]+/', ' ', $entity->getName()) . ' - ' . $entity->getRegion()->getName();
|
||||
|
||||
//TODO: Don't hardcode concept uids here, make them configurable
|
||||
$conceptUid = $entity->getConcept()->getUid();
|
||||
if ($conceptUid !== 3 && $conceptUid !== 4) {
|
||||
$product['name'] .= ' (' . $entity->getConcept()->getName() . ')';
|
||||
}
|
||||
|
||||
$product['facts']['fact'] = array_map(function ($fact) {
|
||||
/** @var Fact $fact */
|
||||
return htmlspecialchars($fact->getName());
|
||||
|
||||
Reference in New Issue
Block a user