Websphere commerce catalog sub system stores catalog related information in various tables. One such table is the CATGPENREL. This table holds the relationship between a catalog group (which is actually a group of catalog items or category at the store level) and an entity (which is a product from the CATENTRY table).
When there is an association between a category group and a catentry, it means that the catentry (product / SKU) is associated with a catalog group.
Before displaying a product on the frontend Websphere commerce checks if the product is associated with any category for a particular store or not.
There are three mandatory fields in this database table which also form the complex primary key for the table. These are
- CATGROUP_ID – This is the unique id of the catalog group (Category)
- CATALOG_ID – This is the unique id of the catalog for a particular store. This can be found from STORECAT table
- CATENTRY_ID – This is the unique id of the actual produc / sku which is a foreign key on CATENTRY table
The query to check if a product is web-ready or not is
select * from catgpenrel where catalog_id=(select catalog_id from storecat where storeent_id=<<store_id>>) and catentry_id=<<catentry_id>>
<<store_id>> is the unique id of the store in question
<<catentry_id>> is the unique catalog entry (product / SKU) id from CATENTRY table
No comments:
Post a Comment