-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #440 from commercetools/wishlist
Apply changes from sunrise java wishlist implementation.
- Loading branch information
Showing
7 changed files
with
94 additions
and
77 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
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
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,72 +1,67 @@ | ||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
{{> common/htmlhead}} | ||
{{> common/htmlhead}} | ||
</head> | ||
|
||
<body> | ||
<div class="darkbg hidden"></div> | ||
{{> common/header}} | ||
<div class="my-orders"> | ||
<div class="darkbg hidden"></div> | ||
{{> common/header}} | ||
<div class="my-orders"> | ||
<div class="container"> | ||
<div class="my-account-title"> | ||
<span class="my-account-title-text icon-user">{{i18n "my-account:myAccount.title"}}</span> | ||
</div> | ||
<div class="row"> | ||
<div class="col-sm-12"> | ||
<div class="my-orders-wrapper"> | ||
<div class="row"> | ||
<div class="col-sm-3"> | ||
{{> myaccount/my-account-sidebar myWishlistTab=true}} | ||
</div> | ||
<div id="my-account-desktop-content" class="col-sm-9"> | ||
<div class="my-orders-order-content"> | ||
<div class="row"> | ||
<div class="col-sm-12"> | ||
<div class="my-orders-title hidden-xs"> | ||
<span>{{content.contentTitle}}</span> | ||
<span class="my-account-wishlist-items-number">{{content.itemsInTotal}}</span> | ||
</div> | ||
</div> | ||
</div> | ||
{{> myaccount/my-account-wishlist-pagination}} | ||
<div class="my-account-wishlist-items-wrapper"> | ||
<div class="my-account-title"> | ||
<span class="my-account-title-text icon-user">{{i18n "my-account:myWishlist.title"}}</span> | ||
| ||
<span class="items-total-txt">{{i18n "my-account:myWishlist.itemsTotal" count=content.itemsInTotal}}</span> | ||
</div> | ||
<div class="row"> | ||
<div class="col-sm-12"> | ||
<div class="my-orders-wrapper"> | ||
<div class="row"> | ||
{{#each content.products.list}} | ||
<div class="col-sm-6 col-md-4"> | ||
{{> catalog/product-thumbnail thumbnail=this index=@index wishlist=true}} | ||
<div class="my-account-wishlist-remove-btn"> | ||
<button>{{i18n "catalog:removeBtn.title"}}</button> | ||
</div> | ||
<div id="my-account-desktop-content" class="col-sm-12"> | ||
<div class="my-orders-order-content"> | ||
<div class="my-account-wishlist-items-wrapper"> | ||
<div class="row"> | ||
{{#each content.products.list}} | ||
<div class="col-sm-6 col-md-3"> | ||
{{> catalog/product-thumbnail thumbnail=this index=@index wishlist=true}} | ||
<form id="form-remove-from-wishlist{{index}}" name="remove-from-wishlist" | ||
action="{{@root.meta._links.removeFromWishlist.href}}" method="post"> | ||
<input type="hidden" name="csrfToken" | ||
value="{{@root.meta.csrfToken}}"/> | ||
<input type="hidden" name="lineItemId" value="{{product.lineItemId}}"> | ||
|
||
<div class="my-account-wishlist-remove-btn"> | ||
<button type="submit">{{i18n | ||
"catalog:removeBtn.title"}}</button> | ||
</div> | ||
</form> | ||
</div> | ||
{{/each}} | ||
</div> | ||
</div> | ||
<div class="my-account-wishlist-pagination-bottom"> | ||
</div> | ||
<div class="my-account-wishlist-clear-btn"> | ||
<form id="form-clear-wishlist" name="clear-wishlist" | ||
action="{{@root.meta._links.clearWishlist.href}}" method="post"> | ||
<input type="hidden" name="csrfToken" | ||
value="{{@root.meta.csrfToken}}"/> | ||
|
||
<button type="submit">{{i18n "my-account:myWishlist.clear"}}</button> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
{{/each}} | ||
</div> | ||
</div> | ||
<div class="my-account-wishlist-pagination-bottom"> | ||
<div class="row"> | ||
<div class="col-sm-12 hidden-xs text-center custom-pagination"> | ||
<ul class="page-numbers"> | ||
{{> common/pagination pagination=content.pagination}} | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="my-account-wishlist-clear-btn"> | ||
<button>{{content.clearWishlistBtn}}</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{{!-- {{> common/wishlist}} --}} | ||
{{> common/footer}} | ||
{{> common/htmlscripts}} | ||
</div> | ||
{{> common/footer}} | ||
{{> common/htmlscripts}} | ||
</body> | ||
|
||
</html> |
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,5 +1,9 @@ | ||
<form id="form-add-to-wishlist{{index}}" name="add-to-wishlist" action="{{@root.meta._links.addToWishlist.href}}"> | ||
<button type="submit" class="btn pdp-product-heart"> | ||
<form id="form-add-to-wishlist{{index}}" method="post" name="add-to-wishlist" action="{{@root.meta._links.addToWishlist.href}}"> | ||
<input type="hidden" name="csrfToken" value="{{@root.meta.csrfToken}}"/> | ||
<input type="hidden" name="productId" value="{{product.productId}}"> | ||
<input type="hidden" name="variantId" value="{{product.variantId}}"> | ||
|
||
<button type="submit" class="btn pdp-product-heart"> | ||
<span class="sr-only">{{i18n "catalog:wishlist.add"}}</span> | ||
</button> | ||
</form> |
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
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
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,19 +1,19 @@ | ||
{{#if @root.meta.features.wishlist.active}} | ||
<div class="wishlist"> | ||
<button id="wishlist-open-btn" class="hidden-xs wishlist-btn"> | ||
<div class="wishlist-number">{{wishlist.quantity}}</div> | ||
</button> | ||
<div class="wishlist-items hidden"> | ||
<p class="wishlist-title"> | ||
<div class="wishlist"> | ||
<button id="wishlist-open-btn" class="hidden-xs wishlist-btn"> | ||
<div class="wishlist-number">{{wishlist.quantity}}</div> | ||
</button> | ||
<div class="wishlist-items hidden"> | ||
<p class="wishlist-title"> | ||
{{i18n "catalog:wishlist.title"}} <span>({{wishlist.quantity}})</span> | ||
</p> | ||
<span class="recently-added-title">{{i18n "catalog:wishlist.recentlyAdded"}}</span> | ||
<div class="clearfix"> | ||
</p> | ||
<span class="recently-added-title">{{i18n "catalog:wishlist.recentlyAdded"}}</span> | ||
<div class="clearfix"> | ||
{{#each wishlist.list}} | ||
<img class="pull-left img-responsive wishlist-img" src="{{imageUrl}}" alt="{{name}}"> | ||
{{/each}} | ||
</div> | ||
<a href="{{wishlist.url}}" id="wishlist-view-btn" class="btn view-wishlist-btn">{{i18n "catalog:wishlist.view"}}</a> | ||
</div> | ||
</div> | ||
{{/if}} | ||
</div> | ||
<a href="{{@root.meta._links.myWishlist.href}}" id="wishlist-view-btn" class="btn view-wishlist-btn"> | ||
{{i18n "catalog:wishlist.view"}} | ||
</a> | ||
</div> | ||
</div> |