@using System.Linq
@using MrCMS.Helpers
@using MrCMS.Web.Apps.Ecommerce.Entities.Products
@using MrCMS.Web.Apps.Ecommerce.Models
@using MrCMS.Web.Apps.Ecommerce.Pages
@model ProductAddedToCart
@{
    var productvariant = ViewData["productvariant"] as ProductVariant;
    var quantity = ViewData["quantity"] is int ? (int) ViewData["quantity"] : 1;    
}
<div class="margin-bottom-20">
    <div class="row">
        <div class="col-sm-9">
            <h1 class="green-tick">@quantity item@(quantity != 1 ? "s were" : " was") added to your basket</h1>
        </div>
        <div class="col-sm-3">
            <a href="@(productvariant.Product.Categories.Any() ? "/" + productvariant.Product.Categories.OrderBy(x => x.DisplayOrder).Take(1).SingleOrDefault().UrlSegment : UniquePageHelper.GetUrl<ProductSearch>())" class="btn btn-default btn-block">Continue Shopping</a>
        </div>
    </div>
</div>
<div class="row productaddedtocart">
    @{ Html.RenderAction("ItemDetails", "ProductAddedToCart", new { productvariant });}
</div>
@{Html.RenderAction("CustomersAlsoBought", "ProductAddedToCart", new { productvariant });}
@{Html.RenderAction("RelatedProducts", "ProductAddedToCart", new { productvariant });}
