diff --git a/src/app/sidebar/sidebar.component.ts b/src/app/sidebar/sidebar.component.ts index 6405d7c..ba4f1b4 100644 --- a/src/app/sidebar/sidebar.component.ts +++ b/src/app/sidebar/sidebar.component.ts @@ -63,12 +63,9 @@ export class SidebarComponent implements OnInit { getTotal(){ var subTotal; - for (const pr of this.productos) { - subTotal = pr.cantidad * pr.precio; + for (let i = 0; i < this.productos.length; i++) { + this.productos[i].cantidad; } - this.total = this.total + subTotal; - this.total = this.total * this.cont; - return this.total; } public aumentarContador(index) {