<?php $cart = $this->cart(); ?>
<?php if ($cart->isActive()): ?>
  <?php $cartId = $this->source . '|' . $this->id; ?>
  <span class="btn-bookbag-toggle" data-cart-id="<?=$this->escapeHtmlAttr($this->id)?>" data-cart-source="<?=$this->escapeHtmlAttr($this->source)?>">
    <a class="cart-add hidden<?php if(!$cart->contains($cartId)): ?> correct<?php endif ?>"><!--
   --><span class="cart-link-label"><?=$this->transEsc('Add to Book Bag') ?><i class="cart-link-icon fa fa-plus" title="<?=$this->transEsc('Add to Book Bag') ?>"></i></span><!--
 --></a>
    <a class="cart-remove hidden<?php if($cart->contains($cartId)): ?> correct<?php endif ?>"><!--
   --><span class="cart-link-label"><?=$this->transEsc('Remove from Book Bag') ?> <i class="cart-link-icon fa fa-minus-circle" title="<?=$this->transEsc('Remove from Book Bag') ?>"></i></span>
    </a>
    <noscript>
      <form method="post" name="addForm" action="<?=$this->url('cart-processor')?>">
        <input type="hidden" name="ids[]" value="<?=$this->escapeHtmlAttr($cartId)?>" />
        <?php if ($cart->contains($cartId)): ?>
          <input class="btn btn-default" type="submit" name="delete" value="<?=$this->transEsc('Remove from Book Bag')?>"/>
        <?php else: ?>
          <input class="btn btn-default" type="submit" name="add" value="<?=$this->transEsc('Add to Book Bag')?>"/>
        <?php endif; ?>
      </form>
    </noscript>
  </span>
<?php endif; ?>
