Skip to content

Commit

Permalink
Some fixes on templating
Browse files Browse the repository at this point in the history
  • Loading branch information
lruozzi9 committed Apr 17, 2023
1 parent d3c8eb9 commit 12d71cd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/Form/Type/AddProductsToCartType.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
{
/** @var WishlistProductInterface $wishlistProduct */
foreach ($options['wishlist_products'] as $key => $wishlistProduct) {
if (is_int($key)) {
$key = (string) $key;
}
$builder
->add($key, AddToCartType::class, [
'label' => false,
Expand Down
6 changes: 4 additions & 2 deletions src/Resources/views/WishlistDetails/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@
</div>
</div>

{% for childForm in form.children if childForm.vars.name != '_token' %}
{% include "@BitBagSyliusWishlistPlugin/WishlistDetails/_item.html.twig" %}
{% for childForm in form.children %}
{% if childForm.vars.name != '_token' %}
{% include "@BitBagSyliusWishlistPlugin/WishlistDetails/_item.html.twig" %}
{% endif %}
{% endfor %}

<div class="bb-wishlist-actions">
Expand Down

0 comments on commit 12d71cd

Please sign in to comment.