latest changes
Showing
... | @@ -13,30 +13,12 @@ | ... | @@ -13,30 +13,12 @@ |
<div class="home_sub_header"> | <div class="home_sub_header"> | ||
Featured Catagories | Featured Catagories | ||
</div> | </div> | ||
<div class="featured_catagory_list"> | <div class="featured_catagory_list" > | ||
<ul> | <ul *ngIf="categoriesService.activecategories && categoriesService.activecategories.length > 0"> | ||
<li (click)="goToPage('productlist')"> | <li *ngFor="let categories of categoriesService.activecategories" (click)="goToPage('catstorelist', categories)"> | ||
<img src="../assets/handsome-man-outdoors-drinking-coffee-with-sunglasses-guy-with-beard-instagram-effect_1212-818@3x.png"> | <img [src]="categories.catImage" onerror="this.src='../assets/handsome-man-outdoors-drinking-coffee-with-sunglasses-guy-with-beard-instagram-effect_1212-818@3x.png'"> | ||
<div class="featured_overlay"> | <div class="featured_overlay"> | ||
<h4>Men's Fashion</h4> | <h4>{{categories.catName}}</h4> | ||
</div> | |||
</li> | |||
<li (click)="goToPage('productlist')"> | |||
<img src="../assets/beautiful-woman-with-cocktail-suitcase-bed-hootel-room_118454-1593@3x.png"> | |||
<div class="featured_overlay"> | |||
<h4>Women's Fashion</h4> | |||
</div> | |||
</li> | |||
<li (click)="goToPage('productlist')"> | |||
<img src="./assets/[email protected]"> | |||
<div class="featured_overlay"> | |||
<h4>Bags</h4> | |||
</div> | |||
</li> | |||
<li (click)="goToPage('productlist')"> | |||
<img src="../assets/blue-striped-female-sneakers-colorful-background-top-view-flat-lay-minimal-background_77190-500@3x.png"> | |||
<div class="featured_overlay"> | |||
<h4>Shoes</h4> | |||
</div> | </div> | ||
</li> | </li> | ||
</ul> | </ul> | ||
... | ... |
src/app/catstorelist/catstorelist.module.ts
0 → 100644
src/app/catstorelist/catstorelist.page.html
0 → 100644
src/app/catstorelist/catstorelist.page.scss
0 → 100644
src/app/catstorelist/catstorelist.page.ts
0 → 100644
... | @@ -25,7 +25,7 @@ | ... | @@ -25,7 +25,7 @@ |
</div> | </div> | ||
<ion-slides pager="true" *ngIf="centerService.centers && centerService.centers.length > 0"> | <ion-slides pager="true" *ngIf="centerService.centers && centerService.centers.length > 0"> | ||
<ion-slide *ngFor="let center of centerService.centers"> | <ion-slide *ngFor="let center of centerService.centers"> | ||
<div class="banner_slide" (click)="goToPage('storelist')"> | <div class="banner_slide" (click)="goToPage('storelist', center)"> | ||
<h5>{{center.centerName}}</h5> | <h5>{{center.centerName}}</h5> | ||
<p>{{center.description}}</p> | <p>{{center.description}}</p> | ||
</div> | </div> | ||
... | @@ -39,7 +39,7 @@ | ... | @@ -39,7 +39,7 @@ |
<div class="featured_slider"> | <div class="featured_slider"> | ||
<ion-slides pager="false" [options]="slideOpts" *ngIf="shopperService.activeshoppers && shopperService.activeshoppers.length > 0"> | <ion-slides pager="false" [options]="slideOpts" *ngIf="shopperService.activeshoppers && shopperService.activeshoppers.length > 0"> | ||
<ion-slide *ngFor="let shopper of shopperService.activeshoppers"> | <ion-slide *ngFor="let shopper of shopperService.activeshoppers"> | ||
<div class="feature_product" (click)="goToPage('productlist')"> | <div class="feature_product" (click)="goToPage('productlist', shopper)"> | ||
<img [src]="shopper.featuredImage" onerror="this.src='./../../assets/getmi_malls/featured/featured1.png'"> | <img [src]="shopper.featuredImage" onerror="this.src='./../../assets/getmi_malls/featured/featured1.png'"> | ||
<div class="feature_overlay"> | <div class="feature_overlay"> | ||
<h5>{{shopper.name}}</h5> | <h5>{{shopper.name}}</h5> | ||
... | @@ -67,69 +67,21 @@ | ... | @@ -67,69 +67,21 @@ |
<div class="clear"></div> | <div class="clear"></div> | ||
</div> | </div> | ||
<div class="nearby_shop_list"> | <div class="nearby_shop_list"> | ||
<ul> | <ul *ngIf="centerService.nearcenters && centerService.nearcenters.length > 0"> | ||
<li (click)="goToPage('storelist')"> | <li *ngFor="let center of centerService.nearcenters" (click)="goToPage('storelist', center)"> | ||
<div class="nearby_image"> | |||
<img src="./../../assets/getmi_malls/mall_298/mall1.png"> | <div class="nearby_image"> | ||
<img [src]="center.centerImg" onerror="this.src='./../../assets/getmi_malls/mall_298/mall2.png'"> | |||
</div> | </div> | ||
<div class="nearby_detail"> | <div class="nearby_detail"> | ||
<h5> | <h5> | ||
<span class="floatLeft">Queen Victoria Building</span> | <span class="floatLeft">{{center.centerName}}</span> | ||
<span class="floatRight">5 | <span class="floatRight">0 | ||
<img src="../assets/Path61_2.png"> | <img src="../assets/Path61_2.png"> | ||
</span> | </span> | ||
<div class="clear"></div> | <div class="clear"></div> | ||
</h5> | </h5> | ||
<p>Men's & Women's Fashion</p> | <p>{{center.description}}</p> | ||
</div> | |||
<div class="clear"></div> | |||
</li> | |||
<li (click)="goToPage('storelist')"> | |||
<div class="nearby_image"> | |||
<img src="./../../assets/getmi_malls/mall_298/mall2.png"> | |||
</div> | |||
<div class="nearby_detail"> | |||
<h5> | |||
<span class="floatLeft">Westfield Knox</span> | |||
<span class="floatRight">4 | |||
<img src="../assets/Path61_2.png"> | |||
</span> | |||
<div class="clear"></div> | |||
</h5> | |||
<p>Your one-stop hub for Shopping & Fun</p> | |||
</div> | |||
<div class="clear"></div> | |||
</li> | |||
<li (click)="goToPage('storelist')"> | |||
<div class="nearby_image"> | |||
<img src="./../../assets/getmi_malls/mall_298/mall4.png"> | |||
</div> | |||
<div class="nearby_detail"> | |||
<h5> | |||
<span class="floatLeft">Chadstone</span> | |||
<span class="floatRight">5 | |||
<img src="../assets/Path61_2.png"> | |||
</span> | |||
<div class="clear"></div> | |||
</h5> | |||
<p>The fashion capital</p> | |||
</div> | |||
<div class="clear"></div> | |||
</li> | |||
<li (click)="goToPage('storelist')"> | |||
<div class="nearby_image"> | |||
<img src="./../../assets/getmi_malls/mall_298/mall5.png"> | |||
</div> | |||
<div class="nearby_detail"> | |||
<h5> | |||
<span class="floatLeft">Emporium Melbourne</span> | |||
<span class="floatRight">4 | |||
<img src="../assets/Path61_2.png"> | |||
</span> | |||
<div class="clear"></div> | |||
</h5> | |||
<p>The luxury shopping centre</p> | |||
</div> | </div> | ||
<div class="clear"></div> | <div class="clear"></div> | ||
</li> | </li> | ||
... | @@ -139,29 +91,11 @@ | ... | @@ -139,29 +91,11 @@ |
Featured Catagories | Featured Catagories | ||
</div> | </div> | ||
<div class="featured_catagory_list"> | <div class="featured_catagory_list"> | ||
<ul> | <ul *ngIf="categoriesService.activecategories && categoriesService.activecategories.length > 0"> | ||
<li (click)="goToPage('productlist')"> | <li *ngFor="let categories of categoriesService.activecategories" (click)="goToPage('catstorelist', categories)"> | ||
<img src="../assets/handsome-man-outdoors-drinking-coffee-with-sunglasses-guy-with-beard-instagram-effect_1212-818@3x.png"> | <img [src]="categories.catImage" onerror="this.src='../assets/handsome-man-outdoors-drinking-coffee-with-sunglasses-guy-with-beard-instagram-effect_1212-818@3x.png'"> | ||
<div class="featured_overlay"> | |||
<h4>Men's Fashion</h4> | |||
</div> | |||
</li> | |||
<li (click)="goToPage('productlist')"> | |||
<img src="../assets/beautiful-woman-with-cocktail-suitcase-bed-hootel-room_118454-1593@3x.png"> | |||
<div class="featured_overlay"> | |||
<h4>Women's Fashion</h4> | |||
</div> | |||
</li> | |||
<li (click)="goToPage('productlist')"> | |||
<img src="./assets/[email protected]"> | |||
<div class="featured_overlay"> | |||
<h4>Bags</h4> | |||
</div> | |||
</li> | |||
<li (click)="goToPage('productlist')"> | |||
<img src="../assets/blue-striped-female-sneakers-colorful-background-top-view-flat-lay-minimal-background_77190-500@3x.png"> | |||
<div class="featured_overlay"> | <div class="featured_overlay"> | ||
<h4>Shoes</h4> | <h4>{{categories.catName}}</h4> | ||
</div> | </div> | ||
</li> | </li> | ||
</ul> | </ul> | ||
... | ... |
... | @@ -19,7 +19,9 @@ | ... | @@ -19,7 +19,9 @@ |
<ion-row> | <ion-row> | ||
<ion-col size="8"> | <ion-col size="8"> | ||
<h3>{{product.prodName}}</h3> | <h3>{{product.prodName}}</h3> | ||
<p><strong><span><img src="../assets/Path61_2.png"></span>4</strong>Lulu Fashion, {{product.category}} | <p><strong><span><img src="../assets/Path61_2.png"></span>0</strong> {{product.category}}, {{product.subCate}} | ||
<br/> | |||
<span *ngFor="let tag of product.tag">#{{tag}}</span> | |||
</p> | </p> | ||
</ion-col> | </ion-col> | ||
<ion-col size="4"> | <ion-col size="4"> | ||
... | @@ -37,8 +39,8 @@ | ... | @@ -37,8 +39,8 @@ |
<li> | <li> | ||
<button id="custom_check_button"> | <button id="custom_check_button"> | ||
<label> | <label> | ||
<input id="{{size.sizeId}}" type="radio" name="services" value="{{size.sizeId}}" (click)="cartService.choose_size(size.sizeName)" [checked]="i==0"> | <input id="{{size}}" type="radio" name="services" value="{{size}}" (click)="cartService.choose_size(size)" [checked]="i==0"> | ||
<p>{{size.sizeName}}</p> | <p>{{size}}</p> | ||
</label> | </label> | ||
</button> | </button> | ||
</li> | </li> | ||
... | @@ -49,11 +51,11 @@ | ... | @@ -49,11 +51,11 @@ |
<h5>Description</h5> | <h5>Description</h5> | ||
<p>{{product.prodDesc}} | <p>{{product.prodDesc}} | ||
</p> | </p> | ||
<h5> | <!--<h5> | ||
<span class="floatLeft">Reviews</span><span class="floatRight" (click)="goToPage('reviewlist')">MORE</span> | <span class="floatLeft">Reviews</span><span class="floatRight" (click)="goToPage('reviewlist')">MORE</span> | ||
<div class="clear"></div> | <div class="clear"></div> | ||
</h5> | </h5> | ||
<div class="review_list"> | <div class="review_list"> | ||
<ul> | <ul> | ||
<li> | <li> | ||
<div class="review_image"> | <div class="review_image"> | ||
... | @@ -112,57 +114,23 @@ | ... | @@ -112,57 +114,23 @@ |
<div class="clear"></div> | <div class="clear"></div> | ||
</li> | </li> | ||
</ul> | </ul> | ||
</div> | </div> --> | ||
<h5> | <h5 *ngIf="product.similar && product.similar.length > 0"> | ||
<span class="floatLeft">Related Products</span><span class="floatRight">MORE</span> | <span class="floatLeft">Related Products</span><span class="floatRight" (click)="goToPage('productlist', data)">MORE</span> | ||
<div class="clear"></div> | <div class="clear"></div> | ||
</h5> | </h5> | ||
<div class="related_product_slider"> | <div class="related_product_slider"> | ||
<ul> | <ul *ngIf="product.similar && product.similar.length > 0"> | ||
<ion-slides pager="false" [options]="relatedProd"> | <ion-slides pager="false" [options]="relatedProd"> | ||
<ion-slide> | <ion-slide *ngFor="let similar of product.similar"> | ||
<li (click)="goToPage('productdetail')"> | <li (click)="viewProd(similar)"> | ||
<div class="product_image"> | |||
<img src="../assets/[email protected]"> | |||
<div class="fav_icon"> | |||
</div> | |||
</div> | |||
<h5>European Style V Neck</h5> | |||
<p>AU$99.00</p> | |||
</li> | |||
</ion-slide> | |||
<ion-slide> | |||
<li (click)="goToPage('productdetail')"> | |||
<div class="product_image"> | |||
<img src="../assets/Recommended-Ball-Gown-Floor-Length-V-Neck-Lace-Organza-Prom-Dress-OD850662@3x.png"> | |||
<div class="fav_icon"> | |||
</div> | |||
</div> | |||
<h5>European Style V Neck</h5> | |||
<p>AU$99.00</p> | |||
</li> | |||
</ion-slide> | |||
<ion-slide> | |||
<li (click)="goToPage('productdetail')"> | |||
<div class="product_image"> | |||
<img src="../assets/[email protected]"> | |||
<div class="fav_icon"> | |||
</div> | |||
</div> | |||
<h5>European Style V Neck</h5> | |||
<p>AU$99.00 <span class="offer">-8%</span></p> | |||
</li> | |||
</ion-slide> | |||
<ion-slide> | |||
<li (click)="goToPage('productdetail')"> | |||
<div class="product_image"> | <div class="product_image"> | ||
<img src="../assets/[email protected]"> | <img [src]="similar.image" onerror="this.src='../assets/[email protected]'"> | ||
<div class="fav_icon"> | <div class="fav_icon"> | ||
</div> | </div> | ||
<div class="featured_badge">Featured</div> | |||
</div> | </div> | ||
<h5>European Style V Neck</h5> | <h5>{{similar.prodName}}</h5> | ||
<p>AU$99.00<span>AU$110.00</span></p> | <p>{{similar.price}}</p> | ||
</li> | </li> | ||
</ion-slide> | </ion-slide> | ||
</ion-slides> | </ion-slides> | ||
... | ... |
... | @@ -23,19 +23,19 @@ | ... | @@ -23,19 +23,19 @@ |
</div> | </div> | ||
<div class="clear"></div> | <div class="clear"></div> | ||
</div> | </div> | ||
<div class="product_title"> | <div class="product_title" *ngIf="data"> | ||
Women's Fashion | {{data.shopName}} | ||
</div> | </div> | ||
<ul [class.grid_view]="onGrid" *ngIf="prodService.product && prodService.product.length > 0"> | <ul [class.grid_view]="onGrid" *ngIf="prodService.product && prodService.product.length > 0"> | ||
<li *ngFor="let product of prodService.product; let i = index" (click)="prodDetails(i)"> | <li *ngFor="let product of prodService.product; let i = index"> | ||
<div class="product_image"> | <div class="product_image"> | ||
<img [src]="product.image" onerror="this.src='../assets/[email protected]'"> | <img [src]="product.image" onerror="this.src='../assets/[email protected]'" (click)="prodDetails(i)"> | ||
<div class="fav_icon"> | <div class="fav_icon" (click)="changeFav(product.prodId)" *ngIf="checkFavStatus(product.prodId)"> | ||
</div> | </div> | ||
<div class="featured_badge" *ngIf="product.featured">Featured</div> | <div class="featured_badge" *ngIf="product.featured">Featured</div> | ||
</div> | </div> | ||
<h5>{{product.prodName}}</h5> | <h5 class="ellipse" (click)="prodDetails(i)">{{product.prodName}}</h5> | ||
<p>A$ {{product.price}}<span class="offer" *ngIf="product.discount > 0">-{{product.discount}}%</span></p> | <p (click)="prodDetails(i)">A$ {{product.price}}<span class="offer" *ngIf="product.discount > 0">-{{product.discount}}%</span></p> | ||
</li> | </li> | ||
</ul> | </ul> | ||
</div> | </div> | ||
... | ... |
... | @@ -41,20 +41,21 @@ export class CartsService { | ... | @@ -41,20 +41,21 @@ export class CartsService { |
} | } | ||
public async buyNow(product: Products) { | public async buyNow(product: Products) { | ||
this.color = 'Blue'; | |||
this.prodId = product.prodId; | this.prodId = product.prodId; | ||
const prodRef = firebase.firestore().collection('products').doc(this.prodId); | const prodRef = firebase.firestore().collection('products').doc(this.prodId); | ||
const cartRef: AngularFirestoreCollection<any> = this.afs.collection('carts', ref => ref.where('size', '==', this.size) | const cartRef: AngularFirestoreCollection<any> = this.afs.collection('carts', ref => ref.where('size', '==', this.size) | ||
.where('color', '==', this.color) | .where('color', '==', Object.keys(product.color)[0]) | ||
.where('custId', '==', this.custId) | .where('custId', '==', this.custId) | ||
.where('product', '==', prodRef) | .where('product', '==', prodRef) | ||
); | ); | ||
cartRef.valueChanges().pipe(take(1)).subscribe((value: Cart[]) => { | ; | ||
cartRef.valueChanges().pipe(take(1)).subscribe((value) => { | |||
console.log(value); | console.log(value); | ||
if (value.length === 0) { | if (value.length === 0) { | ||
product.image = product.image === undefined ? '../assets/[email protected]' : product.image; | |||
const cart: Cart = { | const cart: Cart = { | ||
color: this.color, | color: Object.keys(product.color)[0], | ||
custId: this.custId, | custId: this.custId, | ||
shopperId: product.shopperId, | shopperId: product.shopperId, | ||
product: firebase.firestore().doc(`products/${this.prodId}`), | product: firebase.firestore().doc(`products/${this.prodId}`), | ||
... | @@ -66,6 +67,7 @@ export class CartsService { | ... | @@ -66,6 +67,7 @@ export class CartsService { |
qty: 1, | qty: 1, | ||
size: this.size | size: this.size | ||
}; | }; | ||
console.log(cart); | |||
this.afs.collection('carts').add(cart).then((docRef) => { | this.afs.collection('carts').add(cart).then((docRef) => { | ||
const neworderId = docRef.id; | const neworderId = docRef.id; | ||
this.afs.collection('carts').doc(neworderId).update({cartId: docRef.id}).then(() => { | this.afs.collection('carts').doc(neworderId).update({cartId: docRef.id}).then(() => { | ||
... | @@ -76,7 +78,16 @@ export class CartsService { | ... | @@ -76,7 +78,16 @@ export class CartsService { |
console.error('Error adding document: ', error); | console.error('Error adding document: ', error); | ||
}); | }); | ||
} else { | } else { | ||
alert('Item already added in the cart'); | console.log(value); | ||
// alert('Item already added in the cart'); | |||
const cartId = value[0].cartId; | |||
// tslint:disable-next-line:radix | |||
const qty = parseInt(value[0].qty) + 1; | |||
this.afs.collection('carts').doc(cartId).update({qty: `${qty}`}).then(() => { | |||
console.log('Booking Successfully'); | |||
document.body.scrollTop = document.documentElement.scrollTop = 0; | |||
}); | |||
} | } | ||
}); | }); | ||
} | } | ||
... | @@ -101,7 +112,10 @@ export class CartsService { | ... | @@ -101,7 +112,10 @@ export class CartsService { |
qty: item.qty, | qty: item.qty, | ||
size: item.size, | size: item.size, | ||
}; | }; | ||
this.cartTotal += item.price; | console.log(item.price, item.qty); | ||
if (item.price) { | |||
this.cartTotal += item.price * item.qty; | |||
} | |||
/*const prodItem = item.product.get().then((property) => { | /*const prodItem = item.product.get().then((property) => { | ||
const response = property.data(); | const response = property.data(); | ||
cartItem.prodName = response.prodName; | cartItem.prodName = response.prodName; | ||
... | @@ -123,6 +137,32 @@ export class CartsService { | ... | @@ -123,6 +137,32 @@ export class CartsService { |
this.size = size; | this.size = size; | ||
} | } | ||
removeCount(index) { | |||
// tslint:disable-next-line:radix | |||
const qty = this.carts[index].qty > 1 ? this.carts[index].qty - 1 : this.carts[index].qty; | |||
this.carts[index].qty = qty; | |||
console.log(this.carts[index].qty); | |||
this.afs.collection('carts').doc(this.carts[index].cartId).update({ | |||
qty: this.carts[index].qty | |||
}); | |||
} | |||
addCount(index) { | |||
const qty = this.carts[index].qty + 1; | |||
this.cartTotal = 0; | |||
this.carts[index].qty = qty; | |||
this.afs.collection('carts').doc(this.carts[index].cartId).update({ | |||
qty: this.carts[index].qty | |||
}); | |||
} | |||
removeItem(index) { | |||
this.afs.collection('carts').doc(this.carts[index].cartId).delete(); | |||
} | |||
} | } |
src/config/category.service.ts
0 → 100644
src/config/services/category.ts
0 → 100644
Please
register
or
sign in
to comment