Skip to content

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.

4.0 KB
Raw Blame
<div class="prices d-flex justify-content-center align-items-start flex-column">
    <template v-if="variant.ProductPrice.EnteredPrice">
        @*Display empty space*@
    </template>
    <template v-else-if="variant.ProductPrice.CallForPrice">
        <div class="product-price call-for-price col-12 px-0">
            <span>@Loc["Products.CallForPrice"]</span>
        </div>
    </template>
    <template v-else>
        <template v-if="variant.ProductPrice.IsReservation">
            <div class="rental-price mb-2">
                <label class="mb-0">@Loc["Products.Price.ReservationPrice"]:</label>
                <span>{{variant.ProductPrice.ReservationPrice}}</span>
            </div>
        </template>
        <template v-if="variant.ProductPrice.IsAuction">
            <div class="actual-price">
                <template v-if="variant.ProductPrice.HighestBidValue > 0">
                    <label class="mb-0">@Loc["Products.Price.CurrentPrice"]:</label>
                    <span>{{variant.ProductPrice.HighestBid}}</span>
                </template>
                <template v-else>
                    <label class="mb-0">@Loc["Products.Price.StartPrice"]:</label>
                    <span>{{variant.ProductPrice.StartPrice}}</span>
                </template>
            </div>
        </template>
        <template v-if="variant.ProductPrice.CatalogPrice !== null">
            <div class="catalog-product-price col-12 px-0 mb-2">
                <label class="col-form-label mb-0">@Loc["Products.Price.CatalogPrice"]:</label>
                <span class="h6 mb-0">{{variant.ProductPrice.CatalogPrice}}</span>
            </div>
        </template>
        <template v-if="!(variant.ProductPrice.IsAuction && variant.ProductPrice.DisableBuyButton)">
            <div v-bind:class="{ 'product-price col-12 px-0 d-inline-flex align-items-center': (variant.ProductPrice.PriceWithDiscount !== null), 'non-discounted-price col-12 px-0 d-flex align-items-center': (variant.ProductPrice.PriceWithDiscount == null) }">
                <span v-bind:class="['price-value-' + variant.ProductPrice.ProductId, { 'actual-price': (variant.ProductPrice.PriceWithDiscount == null) }]">
                    <template v-if="variant.ProductPrice.IsAuction">
                        <strong class="actual-price">@Loc["Products.BuyNowPrice"]:</strong>
                    </template>
                    <template v-if="variant.ProductPrice.PriceWithDiscount == null">
                        <span class="actual-price" v-html="variant.ProductPrice.Price"></span>
                    </template>
                    <template v-else>
                        <strong>{{variant.ProductPrice.Price}}</strong>
                    </template>
                </span>
                <template v-if="variant.ProductPrice.OldPrice !== null">
                    <div class="old-product-price">
                        <span class="old-price mx-2">{{variant.ProductPrice.OldPrice}}</span>
                    </div>
                </template>
            </div>
        </template>
        <template v-else>
            <template v-if="variant.ProductPrice.OldPrice !== null">
                <div class="old-product-price">
                    <span class="old-price mx-2">{{variant.ProductPrice.OldPrice}}</span>
                </div>
            </template>
        </template>
        <template v-if="variant.ProductPrice.PriceWithDiscount !== null">
            <div class="d-inline-flex align-items-center product-price discounted-price col-12 px-0">
                <label class="mb-0 mx-2">@Loc["Products.Price.WithDiscount"]:</label>
                <span :class="'your-price price-value-' + variant.ProductPrice.ProductId">
                    <strong class="actual-price" v-html="variant.ProductPrice.PriceWithDiscount"></strong>
                </span>
            </div>
        </template>
        <template v-if="variant.ProductPrice.BasePricePAngV !== null">
            <div class="base-price-pangv ms-2">
                {{variant.ProductPrice.BasePricePAngV}}
            </div>
        </template>
    </template>
</div>