Pages

Showing posts with label store. Show all posts
Showing posts with label store. Show all posts

Tuesday, May 17, 2011

Deleting a published store in Websphere Commerce

If you want to delete any published store from websphere commerce, there are certain steps to perform as detailed out below.

First, open the accelerator, and select “Extended sites hub”. I am assuming here that there is an extended site. Once the hub opens select the option “View Stores”. Select the store and then click “Delete”. This will delete the store that the consumer can access.

There are other elements of the store that needs to be deleted from the database. A store can be linked to a StoreFrontAssetStore, CatalogAssetStore, etc. Also, stores are associated with fulfilment centres. Hence to delete these objects from the database, use dbclean utility provided by IBM. Following are the steps.

  1. Deleting Store Object
Use dbclean utility to clean up store objects in the database as below

dbclean -object store -type specified -db <<dbname>> -loglevel DEBUG -name <<StoreId>> -instancexml <<WC_Install_Dir>>/instances/<<instance_name>>/xml/<<instance_name>>.xml

  1. Deleting Contract Objects (Only for WCS Enterprise edition)
dbclean -object contract -type obsolete -instancexml <<WC_Install_Dir>>/instances/<<instance_name>>/xml/<<instance_name>>.xml -db <<dbname>> -loglevel DEBUG

  1. Deleting Fulfillment Centre Objects
Use dbclean utility to clean up fulfilment centre objects in the database as below

dbclean -object fulfillment_center -type obsolete -instancexml <<WC_Install_Dir>>/instances/<<instance_name>>/xml/<<instance_name>>.xml -db <<dbname> -loglevel DEBUG

Tuesday, November 30, 2010

Determining whether a product is “Web-Ready” in Websphere Commerce (WCS) or not


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

  1. CATGROUP_ID – This is the unique id of the catalog group (Category)
  2. CATALOG_ID – This is the unique id of the catalog for a particular store. This can be found from STORECAT table
  3. 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