Skip to content

Commit

Permalink
Merge pull request #25 from Jelmer-Ketelaar/dev
Browse files Browse the repository at this point in the history
Fixed error
  • Loading branch information
Jelmer-Ketelaar authored Nov 29, 2021
2 parents 5dbcb14 + 6bf8951 commit 397c92b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/Command/ProductsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$items = $this->products->getProducts()['items'];
$countryAttributes = $this->attributes->getProductAttributeOptions('land');
$wineHouseAttributes = $this->attributes->getProductAttributeOptions('wijnhuis');
/*$grapeAttributes = $this->attributes->getProductAttributeOptions('druiven');
dump($grapeAttributes);
die();*/

foreach ($items as $magentoProduct) {
// var_dump($magentoProduct['custom_attributes'][0]['value']);
Expand Down Expand Up @@ -112,6 +115,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
->setImage($magentoProduct['media_gallery_entries'][0]['file'])
->setLand($this->findCountryForId($countryAttributes, $this->findAttributeValueForCode($magentoProduct['custom_attributes'], 'land')))
->setWineHouse($this->findCountryForId($wineHouseAttributes, $this->findAttributeValueForCode($magentoProduct['custom_attributes'], 'wijnhuis')));
// ->setWineHouse($this->findCountryForId($grapeAttributes, $this->findAttributeValueForCode($magentoProduct['custom_attributes'], 'wijnhuis')));
//->setWijnsoort($magentoProduct['custom_attributes'][0]['value']);
} else if ($updatedAt > $product->getUpdatedAt()) {
$product
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public function setImage(string $image): self
return $this;
}

public function getLand(): ?int
public function getLand(): ?string
{
return $this->land;
}
Expand Down
1 change: 1 addition & 0 deletions templates/wines/modal.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
</tr>
<tr>
<th>Wijnhuis</th>
<td style="margin-left: 5vw !important;">{{ match.product.wineHouse }}</td>
</tr>
</tbody>
</table>
Expand Down

0 comments on commit 397c92b

Please sign in to comment.