forked from grandnode/grandnode
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Further improvements for "Allow on hold cart"
- Loading branch information
KrzysztofPajak
committed
Mar 26, 2020
1 parent
747bb7f
commit a432545
Showing
2 changed files
with
7 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
@model ProductDetailsModel.AddToCartModel | ||
@{ | ||
var shoppingCartType = Model.UpdateShoppingCartItemType.HasValue ? Model.UpdateShoppingCartItemType.Value : ShoppingCartType.ShoppingCart; | ||
} | ||
@if (!String.IsNullOrEmpty(Model.UpdatedShoppingCartItemId)) | ||
{ | ||
<input asp-for="UpdatedShoppingCartItemId" type="hidden" /> | ||
|
@@ -52,7 +55,7 @@ | |
} | ||
{ | ||
var addToCartText = ""; | ||
if (!String.IsNullOrEmpty(Model.UpdatedShoppingCartItemId) && Model.UpdateShoppingCartItemType.HasValue && Model.UpdateShoppingCartItemType.Value == ShoppingCartType.ShoppingCart) | ||
if (!String.IsNullOrEmpty(Model.UpdatedShoppingCartItemId) && Model.UpdateShoppingCartItemType.HasValue && (Model.UpdateShoppingCartItemType.Value == ShoppingCartType.ShoppingCart || Model.UpdateShoppingCartItemType.Value == ShoppingCartType.OnHoldCart)) | ||
{ | ||
addToCartText = T("ShoppingCart.AddToCart.Update").Text; | ||
} | ||
|
@@ -90,7 +93,7 @@ | |
}); | ||
}); | ||
</script> | ||
<button type="button" id="[email protected]" class="btn btn-info add-to-cart-button d-inline-flex" data-productid="@Model.ProductId" onclick="AjaxCart.addproducttocart_details('@Url.RouteUrl("AddProductToCart-Details", new { productId = Model.ProductId, shoppingCartTypeId = (int)ShoppingCartType.ShoppingCart })', '#product-details-form');return false;"> | ||
<button type="button" id="[email protected]" class="btn btn-info add-to-cart-button d-inline-flex" data-productid="@Model.ProductId" onclick="AjaxCart.addproducttocart_details('@Url.RouteUrl("AddProductToCart-Details", new { productId = Model.ProductId, shoppingCartTypeId = (int)shoppingCartType })', '#product-details-form');return false;"> | ||
<span>@addToCartText</span> | ||
</button> | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters