projects/congarevenuecloud/ecommerce/src/lib/modules/catalog/services/product-attribute.service.ts
This service is a work in progress.
Product attributes represent a characteristic of a product that can have different values like color, vendor etc.
import { ProductAttributeService, AObjectService} from '@congarevenuecloud/ecommerce';
export class MyComponent implements OnInit{
constructor( private productAttributeService: ProductAttributeService)
}
// or
export class MyService extends AObjectService {
private productAttributeService: ProductAttributeService = this.injector.get(ProductAttributeService);
}
AObjectService
Properties |
|
Methods |
getAttributeValueDefaults | ||||||||
getAttributeValueDefaults(productAttributeList: Array
|
||||||||
Method returns ProductAttributeValue with default attribute values for a given list of ProductAttributes. Example:Example :
Parameters :
Returns :
any
object of instance of an ProductAttributeValue. |
getAttributeWithDefaults | ||||||||
getAttributeWithDefaults(product: Product)
|
||||||||
Method returns attribute with default values for the product.
Parameters :
Returns :
ProductAttribute
A ProductAttribute instance with default values. |
getProductAttributes | ||||||||||||
getProductAttributes(product: Product, attributeGroupName?: string)
|
||||||||||||
Method gets a list of product attributes for a given product. Can further filter the list by a group. Example:Example :
Parameters :
Returns :
Observable<Array<ProductAttribute>>
A hot observable containing list of product attributes for the given product. |
setDescribeInformationOnProductAttributes | ||||||||
setDescribeInformationOnProductAttributes(attributes: Array
|
||||||||
Method returns an array of product attributes. Adds an additional property to all attributes returned called '_.describe'. This property contains metadata information about the attribute. Example:Example :
Parameters :
Returns :
Observable<Array<ProductAttribute>>
An array of product attributes with metadata information for each attribute. |
updateAllowPicklistValues | ||||||||||||
updateAllowPicklistValues(product: Product, attributeActions: Array
|
||||||||||||
Method updates the picklist values of the attributes for Allow rule action . Example:Example :
Parameters :
Returns :
Observable<Product>
returns an observable of product record. |
Protected productAttributeGrpMemberService |
Type : ProductAttributeGroupMemberService
|
Default value : this.injector.get(ProductAttributeGroupMemberService)
|
type |
Default value : ProductAttribute
|