Commit 193fd2cd authored by pborate's avatar pborate

Updated ecm-product-detail..component.ts added path for sale breadcums.

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@175954 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 24c27a40
......@@ -74,7 +74,7 @@ export class EcmProductDetailsComponent implements OnInit {
this.route.params.subscribe( params => {
//let id: number = +params['id']; // (+) converts string 'id' to a number
// In a real app: dispatch action to load the details here.
this.itemCode = params['itemCode'];
this.itemCode = params['itemCode'].trim();
console.log( 'ngOnInit itemCode[' + this.itemCode + ']' );
window.scrollTo(0,0);
//this.getItemFromStore();
......@@ -86,6 +86,7 @@ export class EcmProductDetailsComponent implements OnInit {
}
getItemFromStore(){
console.log('inside get item from store');
let items: Observable<Item[]> = this.store.select('items');
let item;
......@@ -120,14 +121,18 @@ export class EcmProductDetailsComponent implements OnInit {
if(this.itemDetail.itemSubCategory){
this.scatCode = this.itemDetail.itemSubCategory.scatCode;
}
this.noOfReviews = this.itemDetail.itemRatings.NO_OF_REVIEWS;
let breadcrumb = [{label: 'Home', url: '/home'}, {label: this.itemDetail.itemCategory.shDescr,url: '/categories/' + this.itemDetail.itemSubCategory.catCode},{label: this.itemDetail.itemSubCategory.shDescr,url: '/products/' + this.itemDetail.itemSubCategory.scatCode}];
this.breadcrumbSerivce.breadcrumbs = breadcrumb;
console.log( "Changed scatCode.." + this.scatCode );
}
else{
let breadcrumb = [{label: 'Home', url: '/home'}, {label: this.itemDetail.itemCategory.shDescr,url: '/categories/' + this.itemDetail.itemCategory.catCode},{label: this.itemDetail.itemCategory.shDescr,url: '/products/' + this.itemDetail.itemCategory.catCode}];
this.breadcrumbSerivce.breadcrumbs = breadcrumb;
}
this.noOfReviews = this.itemDetail.itemRatings.NO_OF_REVIEWS;
if ( this.ecmTemplate ) {
console.log('template----',this.ecmTemplate);
......@@ -165,6 +170,7 @@ export class EcmProductDetailsComponent implements OnInit {
if(this.checkUser() !== 'undefined' && this.checkUser() !== null && this.checkUser() !== 'null')
{
console.log('ecm-product-detail activity ',data.item);
this.addToWishlist(data.item);
$event.caller[$event.callBack]();
this.showSnackbar('Item Added to your Wishlist');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment