(Enterprise)Registering the relationship between the extended site stores and asset stores
For extended sites, we must run a series of SQL statements to register store relationships in the STRELTYP table. This is required to support two new store relationship types, one for price rules and the other for catalog filters. As a result, our extended site stores can use price rules and catalog filters created in Management Center.
Task info
This task applies only to extended sites.
Procedure
- Run the following SQL statement to find the storeId values for all the stores in the extended site, so that you have the values available for the remaining steps in this procedure:
select STORE_ID from store;
- For each extended site store, run the following SQL statements. For example, if you have three extended site stores, we must perform steps 2.a through 2.d for each of the three stores:
- Run the following SQL statement to register the relationship between the storefront asset store and the extended site store, to support price rules:
insert into storerel (STRELTYP_ID, RELATEDSTORE_ID, STORE_ID, SEQUENCE, STATE, OPTCOUNTER) values (-31, storefront_asset_store_id, esite_store_id, 1.0, 1, 0);
where:
- Run the following SQL statement to register the relationship between the extended site store and itself, to support price rules:
insert into storerel (STRELTYP_ID, RELATEDSTORE_ID, STORE_ID, SEQUENCE, STATE, OPTCOUNTER) values (-31, esite_store_id, the_same_esite_store_id, 0.0, 1, 0);
where:
- esite_store_id
- The storeId of the extended site store.
- the_same_esite_store_id
- The storeId of the same extended site store. In other words, the SQL must have two consecutive storeId values that are the same, as shown in this example for an extended site store with the storeId 12345:
insert into storerel (STRELTYP_ID, RELATEDSTORE_ID, STORE_ID, SEQUENCE, STATE, OPTCOUNTER) values (-31, 12345, 12345, 0.0, 1, 0);
- Run the following SQL statement to register the relationship between the storefront asset store and the extended site store, to support catalog filters:
insert into storerel (STRELTYP_ID, RELATEDSTORE_ID, STORE_ID, SEQUENCE, STATE, OPTCOUNTER) values (-32, storefront_asset_store_id, esite_store_id, 1.0, 1, 0);
where:
- Run the following SQL statement to register the relationship between the extended site store and itself, to support catalog filters:
insert into storerel (STRELTYP_ID, RELATEDSTORE_ID, STORE_ID, SEQUENCE, STATE, OPTCOUNTER) values (-32, esite_store_id, the_same_esite_store_id, 0.0, 1, 0);
where:
- esite_store_id
- The storeId of the extended site store.
- the_same_esite_store_id
- The storeId of the same extended site store. In other words, the SQL must have two consecutive storeId values that are the same, as shown in this example for an extended site store wit the storeId 12345:
insert into storerel (STRELTYP_ID, RELATEDSTORE_ID, STORE_ID, SEQUENCE, STATE, OPTCOUNTER) values (-32, 12345, 12345, 0.0, 1, 0);
Previous topic: Registering your existing offer and list price lists in the STORETPC table
Next topic: Deciding whether to migrate list price data
Related concepts
Price rules: An overview
Price lists