Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.
C# aspnet-corecsharpdockerdotnetecommerceecommerce-platformmongodbmulti-storemulti-vendornosqlonline-shopshoppingcart
<article v-bind:class="{ mobile: isMobile()}" class="card product-box mb-2">
<div class="picture-container">
<a class="img-container" :href="Model.Url" :title="Model.DefaultPictureModel.Title">
<img class="card-img main-product-img" :src="Model.DefaultPictureModel.ImageUrl" :alt="Model.DefaultPictureModel.AlternateText" loading="lazy" :title="Model.DefaultPictureModel.Title">
<template v-if="Model.SecondPictureModel.ImageUrl !== null">
<img class="card-img hover-img" :src="Model.SecondPictureModel.ImageUrl" :alt="Model.SecondPictureModel.AlternateText" loading="lazy">
</template>
</a>
<a title="@Loc["Products.QuickView"]" class="btn btn-secondary quick-view-button" data-bs-target="ModalQuickView" data-cart-action="quickview" :data-url="Model.QuickViewUrl">
<i class="b-icon bi bi-search" aria-hidden="true"></i>
<span>@Loc["Products.QuickView"]</span>
</a>
<template v-if="Model.Flag !== null">
<div class="product-label">
<div class="badge text-bg-info">{{Model.Flag}}</div>
</div>
</template>
</div>
<div class="card-body">
<div class="card-title h3 mb-0">
<a :href="Model.Url">
{{Model.Name}}
</a>
</div>
<template v-if="Model.ShowSku && Model.Sku !== null">
<span class="sku">{{Model.Sku}}</span>
</template>
<div class="prices-rating">
<template v-if="Model.ReviewOverviewModel.AllowCustomerReviews">
<div class="rating">
<template v-if="Model.ReviewOverviewModel.TotalReviews > 0">
<b-form-rating :id="'rating-inline-grid-' + Model.Id" class="p-0" variant="warning" aria-label="Rating" no-border size="sm" show-value precision="2" readonly inline :value="Model.ReviewOverviewModel.RatingSum / Model.ReviewOverviewModel.TotalReviews"></b-form-rating>
</template>
<template v-else>
<b-form-rating :id="'rating-inline-grid-' + Model.Id" class="p-0" variant="warning" no-border size="sm" show-value precision="2" readonly inline :value="0"></b-form-rating>
</template>
<a :href="Model.Url">{{Model.ReviewOverviewModel.TotalReviews}} @Loc["Reviews.Overview.Reviews"]</a>
</div>
</template>
<template v-if="Model.ProductType == 40">
<template v-if="Model.EndTime !== null">
<div class="countdown-box alert alert-info w-100 mb-1">
<template v-if="new Date(Model.EndTime).getTime() > new Date().getTime()">
<countdown :end-time="new Date(Model.EndTime).getTime()">
<template v-slot:process="{ timeObj }">
<span class="col-form-label">@Loc["AddToCart.Timeleft"]</span>
<span>{{ `${timeObj.d}` }}@Loc["Countdown.Days"]</span>
<span>{{ `${timeObj.h}` }}@Loc["Countdown.Hours"]</span>
<span>{{ `${timeObj.m}` }}@Loc["Countdown.Minutes"]</span>
<span>{{ `${timeObj.s}` }}@Loc["Countdown.Seconds"]</span>
</template>
<template v-slot:finish>
<span>@Loc["ShoppingCart.Auctionends"]</span>
</template>
</countdown>
</template>
<template v-else>
<div class="d-inline-flex flex-wrap justify-content-center">
<label class="ended-label mb-0">@Loc["ShoppingCart.Auctionends"]:</label>
<div class="count-date" v-html="new Date(Model.EndTimeLocalTime).toLocaleString()"></div>
</div>
</template>
</div>
</template>
</template>
<div class="prices" v-bind:class="{ 'reservation-price': Model.ProductType == 15 }">
<template v-if="Model.ProductType != 25">
<div class="actual-price price">
{{Model.ProductPrice.Price}}
</div>
</template>
<template v-else>
<div class="actual-price price">
<template v-if="Model.ProductPrice.HighestBidValue > 0 ">
{{Model.ProductPrice.HighestBid}}
</template>
<template v-else>
{{Model.ProductPrice.StartPrice}}
</template>
</div>
</template>
<template v-if="Model.ProductPrice.OldPrice !== null">
<div class="old-price price">
{{Model.ProductPrice.OldPrice}}
</div>
</template>
</div>
</div>
</div>
<div class="card-footer">
<template v-if="Model.SpecificationAttributeModels.length > 0">
<div class="spec-container">
<table>
<tbody>
<tr class="attr" v-for="item in Model.SpecificationAttributeModels" v-bind:id="item.SpecificationAttributeId">
<td>
<div class="spec-name">
{{item.SpecificationAttributeName}}
</div>
</td>
<td>
<div class="spec-value">
<span v-html="item.ValueRaw"></span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</template>
<template v-if="Model.ProductAttributeModels.length > 0">
<div class="attr-container">
<table>
<tbody>
<tr v-for="item in Model.ProductAttributeModels" v-bind:id="item.ProductAttributeId">
<td>
<div class="attr-name">
{{item.Name}}
</div>
</td>
<td>
<div class="attr-value">
<template v-for="spec in item.Values">
<template v-if="item.AttributeControlType == 1 || item.AttributeControlType == 2 || item.AttributeControlType == 3 || item.AttributeControlType == 50">
<a class="btn btn-sm btn-light name" :href="'/'+ Model.SeName + '?' + item.Name + '=' + spec.Name">
{{spec.Name}}
</a>
</template>
<template v-if="item.AttributeControlType == 40">
<template v-if="spec.PictureModel.FullSizeImageUrl !== null">
<a class="btn btn-sm btn-light name color-container" :title="spec.Name" @@click="productImage($event)" :data-href="spec.PictureModel.FullSizeImageUrl">
<span class="color" :style="'background-color:' + spec.ColorSquaresRgb"> </span>
</a>
</template>
<template v-else>
<a class="btn btn-sm btn-light name color-container" :title="spec.Name" :href="'/'+ Model.SeName + '?' + item.Name + '=' + spec.Name">
<span class="color" :style="'background-color:' + spec.ColorSquaresRgb"> </span>
</a>
</template>
</template>
<template v-if="item.AttributeControlType == 45">
<template v-if="spec.PictureModel.FullSizeImageUrl !== null">
<a class="btn btn-sm btn-light p-1 name image-container" v-on:click="productImage" :data-href="spec.PictureModel.FullSizeImageUrl">
<img :src="spec.ImageSquaresPictureModel?.ImageUrl" :alt="spec.Name"/>
</a>
</template>
<template v-else>
<a class="btn btn-sm btn-light p-1 name image-container" :href="'/'+ Model.SeName + '?' + item.Name + '=' + spec.Name">
<img :src="spec.ImageSquaresPictureModel?.ImageUrl" alt="spec.Name"/>
</a>
</template>
</template>
</template>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</template>
<div class="desc" v-html="Model.ShortDescription"></div>
<template v-if="Model.ShowQty">
<input class="form-control input-group-addon catalog-quantity" type="number" min="1" :id="'addtocart_' + Model.Id + '_EnteredQuantity'" :name="'addtocart_' + Model.Id + '_EnteredQuantity'" value="1">
</template>
<div class="btn-group">
<template v-if="!Model.ProductPrice.DisableWishlistButton && Model.ProductType == 0">
<button data-bs-toggle="tooltip" data-bs-placement="bottom" title="@Loc["ShoppingCart.AddToWishlist"]" class="btn btn-secondary" data-cart-action="add" :data-url="Model.AddToWishlistUrl" :data-show-qty="Model.ShowQty" :data-product-id="Model.Id">
<span class="visually-hidden">AddToWishlist</span>
<i class="b-icon bi bi-heart" aria-hidden="true"></i>
</button>
</template>
<template v-if="!Model.ProductPrice.DisableBuyButton">
<button class="btn btn-info justify-content-center w-100" data-cart-action="add" :data-url="Model.AddToCartUrl" :data-show-qty="Model.ShowQty" :data-product-id="Model.Id">
<i class="b-icon bi bi-cart2 mx-auto d-sm-none d-block" aria-hidden="true"></i>
<span class="add-cart-text d-sm-block d-none">
<template v-if="Model.ProductType == 20">
@Loc["ShoppingCart.Reservation"]
</template>
<template v-else>
<template v-if="Model.ProductPrice.AvailableForPreOrder">
@Loc["ShoppingCart.PreOrder"]
</template>
<template v-else>
@Loc["ShoppingCart.AddToCart"]
</template>
</template>
</span>
<span class="visually-hidden">AddToCart</span>
</button>
</template>
<template v-else>
<template v-if="Model.ProductType == 40">
<button class="btn btn-info justify-content-center w-100" data-cart-action="add" :data-url="Model.AddToCartUrl" :data-show-qty="Model.ShowQty" :data-product-id="Model.Id">
<i class="b-icon bi bi-hammer mx-auto d-sm-none d-block" aria-hidden="true"></i>
<span class="add-cart-text d-sm-block d-none">@Loc["ShoppingCart.Bids"]</span>
<span class="visually-hidden">AddToCart</span>
</button>
</template>
</template>
<template v-if="!Model.ProductPrice.DisableAddToCompareListButton && Model.ProductType == 0">
<button data-bs-toggle="tooltip" data-bs-placement="bottom" title="@Loc["ShoppingCart.AddToCompareList"]" class="btn btn-secondary" data-cart-action="compare" :data-product-id="Model.Id">
<span class="visually-hidden">AddToCompareList</span>
<i class="b-icon bi bi-shuffle" aria-hidden="true"></i>
</button>
</template>
</div>
</div>
</article>