<?php if(!empty($this->actions)): ?>
<form action="<?php echo $this->action; ?>" id="<?php echo $this->formId; ?>" method="post">
<div class="formbody">
<input type="hidden" name="FORM_SUBMIT" value="<?php echo $this->formSubmit; ?>">
<input type="hidden" name="REQUEST_TOKEN" value="{{request_token}}">
<?php endif; ?>

<?php if ($this->collection->hasErrors()): ?>
<p class="error"><?php echo implode('</p><p class="error">', $this->collection->getErrors()); ?></p>
<?php endif; ?>

<?php foreach($this->items as $item): $i=0; ?>
<div class="row no-gutters col-24 bg-light mb-3 p-3 border rounded">

<?php if(!$this->isNotification): ?>
<div class="col-md-3"><?php echo $this->getGallery('images', $item['item'])->generateMainImage(); ?></div><?php endif; ?>
<div class="col px-3">
    <?php if($this->linkProducts && $item['href']): ?><a href="<?php echo $item['href']; ?>"><?php echo $item['name']; ?></a><?php else: ?><?php echo $item['name']; ?><?php endif; ?>
    <?php if(!empty($item['attributes'])): ?>
    <ul>
        <?php foreach($item['attributes'] as $name => $value): ?>
        <li><strong><?= $this->attributeLabel($name) ?>:</strong> <?= $this->attributeValue($name, $value, ['html'=>true, 'item'=>$item['item']]) ?></li>
        <?php endforeach; ?>
    </ul>
    <?php endif; ?>
</div>
<?php if($this->isEditable): ?>
<div class="col-md-auto col-24">
  <div class="input-group">
      <!--<input name="quantity[<?php echo $item['id']; ?>]" type="text" class="text form-control" value="" placeholder="1" maxlength="10">-->
      <div class="btn-group">
        <a href="<?php echo $item['cart_href']; ?>" class="btn btn-success"><?= $GLOBALS['TL_LANG']['MSC']['buttonLabel']['add_to_cart'] ?></a>
        <a href="<?php echo $item['remove_href']; ?>" class="btn btn-dark" title="<?php echo $item['remove_title']; ?>"><?php echo $item['remove_link']; ?></a>
      </div>
  </div>
</div>
<?php endif; ?>

<?php if($item['item']->hasErrors()): ?>
        <div class="col-24"><p class="error"><?php echo implode('</p><p class="error">', $item['item']->getErrors()); ?></p></div>
<?php endif; ?>

</div>
<?php endforeach; ?>

<?php if(!empty($this->actions)): ?>
</div>
<div class="submit_container">
<?php foreach($this->actions as $action) echo $action->generate($this->collection).' '; ?>
</div>
</form>
<?php endif; ?>
