projects/congarevenuecloud/elements/src/lib/mini-cart/services/mini-cart.service.ts
Mini Cart Service involves business logic of mini cart component to show lineitems added to cart.
import { MiniCartService, AObjectService} from '@congarevenuecloud/ecommerce';
export class MyComponent implements OnInit{
constructor( private miniCartService: MiniCartService)
}
// or
export class MyService extends AObjectService {
private miniCartService: MiniCartService = this.injector.get(MiniCartService);
}
Methods |
constructor(productConfigurationService: ProductConfigurationService, revalidateCartService: RevalidateCartService, cartItemService: CartItemService)
|
||||||||||||
Parameters :
|
checkForAmend | ||||||||
checkForAmend(item: CartItem)
|
||||||||
This method checks if the given cart item can be Amended
Parameters :
Returns :
boolean
True if the item can be Amended, false otherwise. |
checkForRenew | ||||||||
checkForRenew(item: CartItem)
|
||||||||
This method checks if the given cart item can be Renewed
Parameters :
Returns :
boolean
True if the item can be Renewed, false otherwise. |