To inherit shared Recipes from an asset store
in an extended site store, create a relationship between the extended
site store and the asset store. In this tutorial, the name of the
new RecipeTutorial store relation type is com.mycompary.commerce.recipe. For more information,
see
Relationships between stores.
Procedure
- Start the WebSphere Commerce Test Server.
- Open the URL http://localhost/webapp/wcs/admin/servlet/db.jsp in
a browser.
- Copy the following two SQL statements into the input window:
insert into streltyp (name,streltyp_id) values
('com.mycompany.commerce.recipe',-100);
insert into storerel
(streltyp_id,relatedstore_id,store_id,sequence,state) values (-100,
10702,
11301,1,1);
insert into storerel
(streltyp_id,relatedstore_id,store_id,sequence,state) values (-100,
11301,
11301,0,1);
Note: You might need to change the numerical
values for your statement.
-100
is the primary key value. You do not need
to change this value unless you have a duplicate value in your STRELTYP table.
- 10702 is the storeId of the asset store. 11301 is
the storeId of the RecipeTutorial sample store. You can run the SQL
query
select * from store
to query the storeId of
your RecipeTutorial store and asset store when they do not match these
values.
- The name com.mycompany.commerce.recipe must
match the relationship value in the file
WC_eardir\xml\config\com.mycompany.commerce.project\wc-component.xml.
In this file, locate the following element to determine the value
for the relationship:
<_config:store-relationship key="recipe" value="com.mycompany.commerce.recipe"/>
- Click Submit Query.