Skip to content

Commit

Permalink
fix position, get position from product in taxon
Browse files Browse the repository at this point in the history
  • Loading branch information
damonsson committed Sep 30, 2019
1 parent f7eb4fe commit 5b2e27d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PropertyBuilder/ProductTaxonPositionPropertyBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ public function consumeEvent(TransformEvent $event): void
{
$this->buildProperty($event, ProductInterface::class,
function (ProductInterface $product, Document $document): void {
foreach ($product->getTaxons() as $taxon) {
foreach ($product->getProductTaxons() as $taxon) {
$document->set(
$this->taxonPositionNameResolver->resolvePropertyName($taxon->getCode()),
$this->taxonPositionNameResolver->resolvePropertyName($taxon->getTaxon()->getCode()),
$taxon->getPosition()
);
}
Expand Down

0 comments on commit 5b2e27d

Please sign in to comment.