Merge pull request #189 from dotnet-architecture/anonymous-signin
Anonymous signin
This commit is contained in:
@@ -22,7 +22,7 @@
|
|||||||
<section class="esh-basket-title col-xs-2">Cost</section>
|
<section class="esh-basket-title col-xs-2">Cost</section>
|
||||||
</article>
|
</article>
|
||||||
<div class="esh-catalog-items row">
|
<div class="esh-catalog-items row">
|
||||||
@for (int i=0; i< Model.Items.Count; i++)
|
@for (int i = 0; i < Model.Items.Count; i++)
|
||||||
{
|
{
|
||||||
var item = Model.Items[i];
|
var item = Model.Items[i];
|
||||||
<article class="esh-basket-items row">
|
<article class="esh-basket-items row">
|
||||||
@@ -42,9 +42,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
@*<div class="esh-catalog-item col-md-4">
|
}
|
||||||
@item.ProductId
|
|
||||||
</div>*@
|
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<article class="esh-basket-titles esh-basket-titles--clean row">
|
<article class="esh-basket-titles esh-basket-titles--clean row">
|
||||||
@@ -54,7 +52,7 @@
|
|||||||
|
|
||||||
<article class="esh-basket-items row">
|
<article class="esh-basket-items row">
|
||||||
<section class="esh-basket-item col-xs-10"></section>
|
<section class="esh-basket-item col-xs-10"></section>
|
||||||
<section class="esh-basket-item esh-basket-item--mark col-xs-2">$ @Model.Total()</section>
|
<section class="esh-basket-item esh-basket-item--mark col-xs-2">$ @Model.Total().ToString("N2")</section>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<article class="esh-basket-items row">
|
<article class="esh-basket-items row">
|
||||||
@@ -64,10 +62,12 @@
|
|||||||
</section>
|
</section>
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
}
|
|
||||||
<section class="esh-basket-item col-xs-push-8 col-xs-4">
|
<section class="esh-basket-item col-xs-push-8 col-xs-4">
|
||||||
<button class="btn esh-basket-checkout" name="updatebutton" value="" type="submit"
|
<button class="btn esh-basket-checkout" name="updatebutton" value="" type="submit"
|
||||||
asp-action="Index">[ Update ]</button>
|
asp-action="Index">
|
||||||
|
[ Update ]
|
||||||
|
</button>
|
||||||
<input type="submit" asp-action="Checkout"
|
<input type="submit" asp-action="Checkout"
|
||||||
class="btn esh-basket-checkout"
|
class="btn esh-basket-checkout"
|
||||||
value="[ Checkout ]" name="action" />
|
value="[ Checkout ]" name="action" />
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
|
|
||||||
<article class="esh-basket-items row">
|
<article class="esh-basket-items row">
|
||||||
<section class="esh-basket-item col-xs-10"></section>
|
<section class="esh-basket-item col-xs-10"></section>
|
||||||
<section class="esh-basket-item esh-basket-item--mark col-xs-2">$ @Model.BasketModel.Total()</section>
|
<section class="esh-basket-item esh-basket-item--mark col-xs-2">$ @Model.BasketModel.Total().ToString("N2")</section>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<article class="esh-basket-items row">
|
<article class="esh-basket-items row">
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ namespace Microsoft.eShopWeb.RazorPages.Pages.Basket
|
|||||||
if (_username != null) return;
|
if (_username != null) return;
|
||||||
|
|
||||||
_username = Guid.NewGuid().ToString();
|
_username = Guid.NewGuid().ToString();
|
||||||
var cookieOptions = new CookieOptions();
|
var cookieOptions = new CookieOptions { IsEssential = true };
|
||||||
cookieOptions.Expires = DateTime.Today.AddYears(10);
|
cookieOptions.Expires = DateTime.Today.AddYears(10);
|
||||||
Response.Cookies.Append(Constants.BASKET_COOKIENAME, _username, cookieOptions);
|
Response.Cookies.Append(Constants.BASKET_COOKIENAME, _username, cookieOptions);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,10 @@
|
|||||||
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
|
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Pages\Shared\Components\Basket\Default.cshtml" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.App" />
|
<PackageReference Include="Microsoft.AspNetCore.App" />
|
||||||
|
|||||||
Reference in New Issue
Block a user