Please help to add product permalink at the image a tag, here is my code:
<?php
global $woocommerce; $items = $woocommerce->cart->get_cart();
foreach($items as $item => $values) {
$_product = wc_get_product( $values['data']->get_id());
//product image
$getProductDetail = wc_get_product( $values['product_id'] );
echo '<div class="cart-prd-img"><a href="'.esc_url( get_permalink( $product->id ) ).'">'.$getProductDetail->get_image().'</div>'; // accepts 2 arguments ( size, attr )
echo '<div class="cart-prd-name">'.$_product->get_title().'</div>';
'<br> Quantity: '.$values['quantity'].'<br>';
$price = get_post_meta($values['product_id'] , '_price', true);
echo " Price: ".$price."<br>";
} ?>