latest changes
Showing
| ... | ... | @@ -13,30 +13,12 @@ |
| <div class="home_sub_header"> | ||
| Featured Catagories | ||
| </div> | ||
| <div class="featured_catagory_list"> | ||
| <ul> | ||
| <li (click)="goToPage('productlist')"> | ||
| <img src="../assets/handsome-man-outdoors-drinking-coffee-with-sunglasses-guy-with-beard-instagram-effect_1212-818@3x.png"> | ||
| <div class="featured_catagory_list" > | ||
| <ul *ngIf="categoriesService.activecategories && categoriesService.activecategories.length > 0"> | ||
| <li *ngFor="let categories of categoriesService.activecategories" (click)="goToPage('catstorelist', categories)"> | ||
| <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"> | ||
| <h4>Shoes</h4> | ||
| <h4>{{categories.catName}}</h4> | ||
| </div> | ||
| </li> | ||
| </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 @@ |
| </div> | ||
| <ion-slides pager="true" *ngIf="centerService.centers && centerService.centers.length > 0"> | ||
| <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> | ||
| <p>{{center.description}}</p> | ||
| </div> | ||
| ... | ... | @@ -39,7 +39,7 @@ |
| <div class="featured_slider"> | ||
| <ion-slides pager="false" [options]="slideOpts" *ngIf="shopperService.activeshoppers && shopperService.activeshoppers.length > 0"> | ||
| <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'"> | ||
| <div class="feature_overlay"> | ||
| <h5>{{shopper.name}}</h5> | ||
| ... | ... | @@ -67,69 +67,21 @@ |
| <div class="clear"></div> | ||
| </div> | ||
| <div class="nearby_shop_list"> | ||
| <ul> | ||
| <li (click)="goToPage('storelist')"> | ||
| <div class="nearby_image"> | ||
| <img src="./../../assets/getmi_malls/mall_298/mall1.png"> | ||
| </div> | ||
| <div class="nearby_detail"> | ||
| <h5> | ||
| <span class="floatLeft">Queen Victoria Building</span> | ||
| <span class="floatRight">5 | ||
| <img src="../assets/Path61_2.png"> | ||
| </span> | ||
| <div class="clear"></div> | ||
| </h5> | ||
| <p>Men's & Women's Fashion</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> | ||
| <ul *ngIf="centerService.nearcenters && centerService.nearcenters.length > 0"> | ||
| <li *ngFor="let center of centerService.nearcenters" (click)="goToPage('storelist', center)"> | ||
| <li (click)="goToPage('storelist')"> | ||
| <div class="nearby_image"> | ||
| <img src="./../../assets/getmi_malls/mall_298/mall5.png"> | ||
| <img [src]="center.centerImg" onerror="this.src='./../../assets/getmi_malls/mall_298/mall2.png'"> | ||
| </div> | ||
| <div class="nearby_detail"> | ||
| <h5> | ||
| <span class="floatLeft">Emporium Melbourne</span> | ||
| <span class="floatRight">4 | ||
| <span class="floatLeft">{{center.centerName}}</span> | ||
| <span class="floatRight">0 | ||
| <img src="../assets/Path61_2.png"> | ||
| </span> | ||
| <div class="clear"></div> | ||
| </h5> | ||
| <p>The luxury shopping centre</p> | ||
| <p>{{center.description}}</p> | ||
| </div> | ||
| <div class="clear"></div> | ||
| </li> | ||
| ... | ... | @@ -139,29 +91,11 @@ |
| Featured Catagories | ||
| </div> | ||
| <div class="featured_catagory_list"> | ||
| <ul> | ||
| <li (click)="goToPage('productlist')"> | ||
| <img 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"> | ||
| <ul *ngIf="categoriesService.activecategories && categoriesService.activecategories.length > 0"> | ||
| <li *ngFor="let categories of categoriesService.activecategories" (click)="goToPage('catstorelist', categories)"> | ||
| <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>Shoes</h4> | ||
| <h4>{{categories.catName}}</h4> | ||
| </div> | ||
| </li> | ||
| </ul> | ||
| ... | ... |
| ... | ... | @@ -19,7 +19,9 @@ |
| <ion-row> | ||
| <ion-col size="8"> | ||
| <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> | ||
| </ion-col> | ||
| <ion-col size="4"> | ||
| ... | ... | @@ -37,8 +39,8 @@ |
| <li> | ||
| <button id="custom_check_button"> | ||
| <label> | ||
| <input id="{{size.sizeId}}" type="radio" name="services" value="{{size.sizeId}}" (click)="cartService.choose_size(size.sizeName)" [checked]="i==0"> | ||
| <p>{{size.sizeName}}</p> | ||
| <input id="{{size}}" type="radio" name="services" value="{{size}}" (click)="cartService.choose_size(size)" [checked]="i==0"> | ||
| <p>{{size}}</p> | ||
| </label> | ||
| </button> | ||
| </li> | ||
| ... | ... | @@ -49,7 +51,7 @@ |
| <h5>Description</h5> | ||
| <p>{{product.prodDesc}} | ||
| </p> | ||
| <h5> | ||
| <!--<h5> | ||
| <span class="floatLeft">Reviews</span><span class="floatRight" (click)="goToPage('reviewlist')">MORE</span> | ||
| <div class="clear"></div> | ||
| </h5> | ||
| ... | ... | @@ -112,57 +114,23 @@ |
| <div class="clear"></div> | ||
| </li> | ||
| </ul> | ||
| </div> | ||
| <h5> | ||
| <span class="floatLeft">Related Products</span><span class="floatRight">MORE</span> | ||
| </div> --> | ||
| <h5 *ngIf="product.similar && product.similar.length > 0"> | ||
| <span class="floatLeft">Related Products</span><span class="floatRight" (click)="goToPage('productlist', data)">MORE</span> | ||
| <div class="clear"></div> | ||
| </h5> | ||
| <div class="related_product_slider"> | ||
| <ul> | ||
| <ul *ngIf="product.similar && product.similar.length > 0"> | ||
| <ion-slides pager="false" [options]="relatedProd"> | ||
| <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</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')"> | ||
| <ion-slide *ngFor="let similar of product.similar"> | ||
| <li (click)="viewProd(similar)"> | ||
| <div class="product_image"> | ||
| <img src="../assets/[email protected]"> | ||
| <img [src]="similar.image" onerror="this.src='../assets/[email protected]'"> | ||
| <div class="fav_icon"> | ||
| </div> | ||
| <div class="featured_badge">Featured</div> | ||
| </div> | ||
| <h5>European Style V Neck</h5> | ||
| <p>AU$99.00<span>AU$110.00</span></p> | ||
| <h5>{{similar.prodName}}</h5> | ||
| <p>{{similar.price}}</p> | ||
| </li> | ||
| </ion-slide> | ||
| </ion-slides> | ||
| ... | ... |
| ... | ... | @@ -23,19 +23,19 @@ |
| </div> | ||
| <div class="clear"></div> | ||
| </div> | ||
| <div class="product_title"> | ||
| Women's Fashion | ||
| <div class="product_title" *ngIf="data"> | ||
| {{data.shopName}} | ||
| </div> | ||
| <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"> | ||
| <img [src]="product.image" onerror="this.src='../assets/[email protected]'"> | ||
| <div class="fav_icon"> | ||
| <img [src]="product.image" onerror="this.src='../assets/[email protected]'" (click)="prodDetails(i)"> | ||
| <div class="fav_icon" (click)="changeFav(product.prodId)" *ngIf="checkFavStatus(product.prodId)"> | ||
| </div> | ||
| <div class="featured_badge" *ngIf="product.featured">Featured</div> | ||
| </div> | ||
| <h5>{{product.prodName}}</h5> | ||
| <p>A$ {{product.price}}<span class="offer" *ngIf="product.discount > 0">-{{product.discount}}%</span></p> | ||
| <h5 class="ellipse" (click)="prodDetails(i)">{{product.prodName}}</h5> | ||
| <p (click)="prodDetails(i)">A$ {{product.price}}<span class="offer" *ngIf="product.discount > 0">-{{product.discount}}%</span></p> | ||
| </li> | ||
| </ul> | ||
| </div> | ||
| ... | ... |
| ... | ... | @@ -41,20 +41,21 @@ export class CartsService { |
| } | ||
| public async buyNow(product: Products) { | ||
| this.color = 'Blue'; | ||
| this.prodId = product.prodId; | ||
| const prodRef = firebase.firestore().collection('products').doc(this.prodId); | ||
| 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('product', '==', prodRef) | ||
| ); | ||
| cartRef.valueChanges().pipe(take(1)).subscribe((value: Cart[]) => { | ||
| ; | ||
| cartRef.valueChanges().pipe(take(1)).subscribe((value) => { | ||
| console.log(value); | ||
| if (value.length === 0) { | ||
| product.image = product.image === undefined ? '../assets/[email protected]' : product.image; | ||
| const cart: Cart = { | ||
| color: this.color, | ||
| color: Object.keys(product.color)[0], | ||
| custId: this.custId, | ||
| shopperId: product.shopperId, | ||
| product: firebase.firestore().doc(`products/${this.prodId}`), | ||
| ... | ... | @@ -66,6 +67,7 @@ export class CartsService { |
| qty: 1, | ||
| size: this.size | ||
| }; | ||
| console.log(cart); | ||
| this.afs.collection('carts').add(cart).then((docRef) => { | ||
| const neworderId = docRef.id; | ||
| this.afs.collection('carts').doc(neworderId).update({cartId: docRef.id}).then(() => { | ||
| ... | ... | @@ -76,7 +78,16 @@ export class CartsService { |
| console.error('Error adding document: ', error); | ||
| }); | ||
| } 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 { |
| qty: item.qty, | ||
| 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 response = property.data(); | ||
| cartItem.prodName = response.prodName; | ||
| ... | ... | @@ -123,6 +137,32 @@ export class CartsService { |
| 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