Skip to content

Commit cac2f18

Browse files
committed
Ajout d'une pop-up quand article ajouté au panier
1 parent cd4a15b commit cac2f18

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

Zenergy/Zenergy/Pages/home.html

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<div class="jumbotron">
2-
<h1>ASP.NET</h1>
3-
<p class="lead">ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS and JavaScript.</p>
4-
<p><a href="http://asp.net" class="btn btn-primary btn-lg">Learn more &raquo;</a></p>
5-
<p ng-cloak ng-show="isConnected">Connected AS : {{name}}</p>
2+
<h1>Zenergy</h1>
3+
<p class="lead">Welcome on our website. Here you can manage your account, subscribe to the club and to events. You can also visit our shop to buy some items </p>
4+
<p><a href="#Register" class="btn btn-primary btn-lg">Try it</a></p>
65
{{users}}
76
</div>

Zenergy/Zenergy/Scripts/Controllers/shopPageController.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,13 @@
3232
newCC.userId = tokenService.getUserId();
3333
newCC.productId = p.productId;
3434
newCC.productQuantity = 1;
35-
newCC.$save({ userId: tokenService.getUserId() });
35+
newCC.$save({ userId: tokenService.getUserId() },
36+
function(response){
37+
bootbox.alert("Item added in your cart");
38+
}, function (response) {
39+
bootbox.alert("Item already in your cart");
40+
}
41+
);
3642
}
3743

3844
}

0 commit comments

Comments
 (0)