<?php
/**
 * @package DJ-Catalog2
 * @copyright Copyright (C) DJ-Extensions.com, All rights reserved.
 * @license http://www.gnu.org/licenses GNU/GPL
 * @author url: http://dj-extensions.com
 * @author email contact@dj-extensions.com
 */

defined ('_JEXEC') or die('Restricted access');

$basket = Djcatalog2HelperCart::getInstance(true);

$items = $basket->getItems();
$total = $basket->getTotal();

$cparams = Djcatalog2Helper::getParams();

?>
<div class="mod_djc2cart">
	<a href="<?php echo JRoute::_(DJCatalogHelperRoute::getCartRoute()); ?>">
		<div>
            <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
              <g id="ico_bag" transform="translate(-1625 100)">
                <rect id="Rectangle_35" data-name="Rectangle 35" width="32" height="32" transform="translate(1625 -100)" fill="none"/>
                <path id="Union_1" data-name="Union 1" d="M2.932,23.415A2.936,2.936,0,0,1,0,20.484V6.655a.87.87,0,0,1,.866-.867h3.1V4.832a4.833,4.833,0,0,1,9.665,0v.957h2.836a.876.876,0,0,1,.871.862V20.483a2.936,2.936,0,0,1-2.931,2.932Zm-1.2-2.932a1.206,1.206,0,0,0,1.2,1.2H14.4a1.206,1.206,0,0,0,1.2-1.2V7.521H13.631V9.273a.867.867,0,0,1-1.733,0V7.521h-6.2V9.273a.866.866,0,1,1-1.732,0V7.521H1.728ZM5.693,4.827v.957h6.2V4.827a3.1,3.1,0,1,0-6.2,0Z" transform="translate(1632.15 -95.35)" fill="#111"/>
              </g>
            </svg>
		</div>

		<div class="mod_djc2cart__count" style="display: <?php echo (empty($items)) ? 'none' : 'block'; ?>;">
			<?php echo JText::sprintf(count($items)); ?>
		</div>
	</a>
</div>
