File: //home/artinside/public_html/lhh/themes/en/views/shop-cart.php
<?php
ob_start();
session_start();
require __DIR__ . "/../../../vendor/autoload.php";
use Anam\Phpcart\Cart;
$cart = new Cart(CARRINHO);
//$cart->clear();
?>
<a href="#" id="top-cart-trigger"><i class="fal fa-shopping-cart "></i><span class="top-cart-number" id="j_cart_count"><?= $cart->totalQuantity() ?></span></a>
<div class="top-cart-content">
<div class="top-cart-title">
<h4>Meus Itens</h4>
</div>
<div class="top-cart-items">
<?php
if ($cart->count() >= 1):
foreach ($cart->getItems() as $products):
?>
<div class="top-cart-item clearfix">
<div class="top-cart-item-image" style="background: url('<?= url("storage/{$products->cover}")?>') no-repeat center center; background-size: cover;">
<a href="<?= url("produto/{$products->uri}")?>"></a>
</div>
<div class="top-cart-item-desc">
<a href="<?= url("produto/{$products->uri}")?>" class="t400"><?= $products->name ?></a>
<?php if($products->firstVariation != "no-variations" AND $products->firstVariation != ""):?>
<span class="small">[<b><?= str_replace("_", ",", $products->firstVariation) ?></b>][<b><?= str_replace(".", ",", $products->multiplier) ?> metros</b>]</span>
<?php endif;?>
<!-- <span class="top-cart-item-price">R$ --><?//= preco_real($products->price) ?><!--</span>-->
<span class="top-cart-item-quantity t600">x <?= $products->quantity ?></span>
</div>
</div>
<?php
endforeach;
else:
?>
<div class="top-cart-item-desc">
<span class="top-cart-item-price">Ainda não existem itens no Carrinho</span>
</div>
<?php
endif;?>
</div>
<div class="top-cart-action clearfix">
<!-- <span class="fleft top-checkout-price t600 theme-text" style="font-size: 1.1em">R$ --><?//= preco_real($cart->getTotal()); ?><!--</span>-->
<a href="<?= url("carrinho")?>" class="button button-dark button-small button-rounded nomargin fright">Fazer Cotação</a>
</div>
</div>