Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed error #25

Merged
merged 1 commit into from
Nov 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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