Skip to content

Commit cac990a

Browse files
Lec52
1 parent 4664436 commit cac990a

File tree

7 files changed

+39
-10
lines changed

7 files changed

+39
-10
lines changed

ionic.config.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"name": "WooIonic",
33
"app_id": "",
4-
"type": "ionic-angular"
4+
"type": "ionic-angular",
5+
"integrations": {
6+
"cordova": {}
7+
}
58
}

package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"@angular/platform-browser": "4.0.0",
2020
"@angular/platform-browser-dynamic": "4.0.0",
2121
"@ionic-native/core": "^3.6.1",
22+
"@ionic-native/network": "^4.2.1",
2223
"@ionic-native/onesignal": "^3.6.1",
2324
"@ionic-native/paypal": "^3.5.0",
2425
"@ionic-native/splash-screen": "3.4.2",
@@ -33,8 +34,9 @@
3334
},
3435
"devDependencies": {
3536
"@ionic/app-scripts": "1.3.0",
36-
"@ionic/cli-plugin-cordova": "1.4.0",
37-
"@ionic/cli-plugin-ionic-angular": "1.3.1",
37+
"@ionic/cli-plugin-cordova": "1.6.2",
38+
"@ionic/cli-plugin-ionic-angular": "1.4.1",
39+
"ionic": "3.10.3",
3840
"typescript": "~2.2.1"
3941
},
4042
"cordovaPlugins": [

src.rar

-794 KB
Binary file not shown.

src/pages/cart/cart.html

+22-5
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,37 @@
2121
</ion-card>
2222

2323

24-
<ion-list>
25-
<ion-item *ngFor="let item of cartItems; let i = index">
24+
<ion-card *ngFor="let item of cartItems; let i = index">
25+
<ion-item color="light">
2626

2727
<ion-thumbnail item-left>
2828
<img [src]="item.product.featured_src" style="width: 60px !important; height: 60px !important;"/>
2929
</ion-thumbnail>
3030
<h2>{{ item.product.title }}</h2>
3131
<p>{{ item.qty }} • {{ item.product.price }}</p>
32-
<button ion-button clear item-right color="danger" (click)="removeFromCart(item, i)">
32+
<!-- <button ion-button clear item-right color="danger" (click)="removeFromCart(item, i)">
3333
<ion-icon name="close-circle"></ion-icon>
34-
</button>
34+
</button> -->
3535

3636
</ion-item>
37-
</ion-list>
37+
38+
<ion-item class="compact">
39+
<ion-row no-padding>
40+
<ion-col col-8>
41+
<button ion-button icon-only clear color="danger" (click)="changeQty(item, i, -1)">
42+
<ion-icon name="remove-circle"></ion-icon>
43+
</button>
44+
<button ion-button clear color="danger"> {{ item.qty }} </button>
45+
<button ion-button icon-only clear color="danger" (click)="changeQty(item, i, 1)">
46+
<ion-icon name="add-circle"></ion-icon>
47+
</button>
48+
</ion-col>
49+
<ion-col col-4 style="text-align: right;">
50+
<button ion-button small outline (click)="removeFromCart(item, i)" color="danger" style="width: 64px;">Remove</button>
51+
</ion-col>
52+
</ion-row>
53+
</ion-item>
54+
</ion-card>
3855

3956

4057
<ion-grid>

src/pages/cart/cart.scss

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
page-cart {
2-
2+
.compact .item-inner .input-wrapper ion-label {
3+
margin: 0 !important;
4+
}
35
}

src/pages/cart/cart.ts

+1
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,6 @@ export class Cart {
7878
})
7979

8080
}
81+
8182

8283
}

src/pages/home/home.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ export class HomePage {
2525

2626
this.page = 2;
2727

28-
this.WooCommerce = this.woocommerce.initialize();
28+
this.WooCommerce = WC({
29+
url: "http://samarth.cloudapp.net",
30+
consumerKey: "ck_d6c5feec9ea1c407d2f91661c5137c6e3e48ae3b",
31+
consumerSecret: "cs_de8e6cf03a5afd10491dfb1756415ac5a0169ae8"
32+
});
2933

3034
this.loadMoreProducts(null);
3135

0 commit comments

Comments
 (0)