<template>
<div class="row no-margin catalog-content-wrap">
<div class="col-md-4 col-sm-4 col-xs-6 mob-product" v-for="product in $parent.products">
<div class="product" data-product-id="product.id" onmouseenter="$(this).addClass('active')" onmouseleave="$(this).removeClass('active')" >
<div class="product-link text-center">
<div class="img-wrap">
<a :href=" '/product/' + product.slug">
<img class="img-responsive" :src="Website.origin + '/uploads/thumbs/' + product.picture.name" />
</a>
</div>
<a class="product_name" :href=" '/product/' + product.slug" :data-title="product.title">{{product.title }}</a>
<div class="price" v-if="product.price > 0 && product.stock == 1">
<span>{{product.price}}</span> {{$parent.currency}}
</div>
<div class="product-other-info">
<a class="buy" v-if="product.price > 0 && product.stock == 1" href="javascript:void(0);" onclick="Cart.add(this)" :data-product-id="product.id"><i class="fa fa-shopping-basket" aria-hidden="true"></i> {{$parent.loc.buy}}</a>
</div>
</div>
</div>
</div>
</div>
</template>
<template>
<div class="row no-margin catalog-content-wrap">
<product v-for="product in $parent.products" ></product>
</div>
</template>
<product :key="product.id"
v-for="product in $parent.products"
v-model="product">
</product>
<template>
<div class="product" data-product-id="value.id" @click="onChecked" >
<!-- product template -->
</div>
</template>
<style>
.product { /** some thing **/ }
</style>
<script>
export default {
name: 'product',
props: ['value'],
methods: {
onChecked() {
this.$emit('input', this.value.id);
}
}
}
</script>