-
diff --git a/assets/src/app/components/cart/cart.component.html b/assets/src/app/components/cart/cart.component.html
index e398c47..8368118 100644
--- a/assets/src/app/components/cart/cart.component.html
+++ b/assets/src/app/components/cart/cart.component.html
@@ -2,7 +2,7 @@
-

+
@@ -12,7 +12,7 @@
{{theme.name}}
License Type:
Unit Price:
@@ -28,15 +28,45 @@
${{ theme.price }}
Payment:
-
-
\ No newline at end of file
+
+
+
diff --git a/assets/src/app/components/cart/cart.component.ts b/assets/src/app/components/cart/cart.component.ts
index 735e6cd..b55b38f 100644
--- a/assets/src/app/components/cart/cart.component.ts
+++ b/assets/src/app/components/cart/cart.component.ts
@@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core';
import { CartService } from '../../commons/services/cart/cart.service';
import { ActivatedRoute } from '@angular/router';
import { Title } from '@angular/platform-browser';
+import { domain_url } from '../../commons/constants/global.constants';
@Component({
selector: 'app-cart',
@@ -13,6 +14,9 @@ export class CartComponent implements OnInit {
theme;
discount;
dis_price;
+ url = domain_url;
+ category;
+
constructor(
private cartService: CartService,
private route: ActivatedRoute,
@@ -51,6 +55,36 @@ export class CartComponent implements OnInit {
)
}
+ buyTheme(event,theme_id){
+ console.log('clicked');
+ this.cartService.buyThemeService(theme_id)
+ .then(
+ response => {
+ return response;
+ }
+ )
+ .catch(
+ error => {
+ return error;
+ }
+ )
+ }
+
+ changeLicense(event,theme_id,license_id){
+ this.cartService.editLicenseService(theme_id,license_id)
+ .then(
+ response => {
+ this.themeCart();
+ return response;
+ }
+ )
+ .catch(
+ error => {
+ return error;
+ }
+ )
+ }
+
}
diff --git a/assets/src/app/components/details/details.component.html b/assets/src/app/components/details/details.component.html
index bcd60f4..dfc36d4 100644
--- a/assets/src/app/components/details/details.component.html
+++ b/assets/src/app/components/details/details.component.html
@@ -22,7 +22,7 @@
{{ theme.name }}
-

+
@@ -108,7 +108,7 @@
{{ theme.name }}
Screenshots
-
+
@@ -342,12 +342,17 @@
Reviews
Be the first to know!
Get the updates about new products.
+
+ {{ message }}
+
+
\ No newline at end of file
diff --git a/assets/src/app/components/details/details.component.ts b/assets/src/app/components/details/details.component.ts
index 6565c90..50170bc 100644
--- a/assets/src/app/components/details/details.component.ts
+++ b/assets/src/app/components/details/details.component.ts
@@ -1,6 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { DetailsService } from '../../commons/services/details/details.service';
+import { domain_url } from '../../commons/constants/global.constants';
import { Title } from '@angular/platform-browser';
import { FormBuilder, FormGroup, FormControl, Validators } from '@angular/forms';
@@ -19,6 +20,9 @@ export class DetailsComponent implements OnInit {
reviews;
content;
token;
+ subscribe;
+ message;
+ url = domain_url
constructor(
private route: ActivatedRoute,
@@ -40,6 +44,10 @@ export class DetailsComponent implements OnInit {
rating : new FormControl('')
});
+ this.subscribe = this.fb.group({
+ email : new FormControl('', Validators.required),
+ });
+
}
get review(){
@@ -50,6 +58,10 @@ export class DetailsComponent implements OnInit {
return this.review.get('rating');
}
+ get email(){
+ return this.subscribe.get('email');
+ }
+
// get details of the theme
getThemeDetails(){
this.detailsService.getThemeDetailsService(this.theme_id)
@@ -90,6 +102,7 @@ export class DetailsComponent implements OnInit {
this.getThemeDetails();
this.review.reset();
this.currentRate =0
+ return response;
}
)
.catch(
@@ -99,6 +112,20 @@ export class DetailsComponent implements OnInit {
)
}
+ // subscribe user (details page)
+ subscribeMarket(){
+ this.detailsService.subscribeService(this.subscribe.value)
+ .then(
+ response => {
+ this.message = response.message;
+ return response;
+ }
+ )
+ .catch(
+ error => {
+ return error;
+ }
+ )
+ }
-
}
diff --git a/assets/src/app/components/home/home.component.html b/assets/src/app/components/home/home.component.html
index 0310313..d51b351 100644
--- a/assets/src/app/components/home/home.component.html
+++ b/assets/src/app/components/home/home.component.html
@@ -5,7 +5,12 @@
Bringing to you Switfkind’s hottest themes ready for custom use.
We created themes so everyone can finish projects on time ship faster.
-
See products
+
+
+ See products
+
+
+
@@ -66,7 +71,12 @@
@@ -136,12 +146,18 @@
{{ theme.name }}
Be the first to know!
Get the updates about new products.
+
+ {{ message }}
+
+