Ecommerce – Changing SQL Queries Called by Menu Selections in home.asp

In home.asp, the SQL query called for a menu selection is defined on the line:

 sSQLStatementP = "WSQ:CATALOG:DEFAULT"

The screenshot below shows the line (highlighted) in p4MenuItem1 which was created in the prior section.

This line tells the Stream V Ecommerce System to locate the WSQ:CATALOG:DEFAULT record from the Textdata table and read the SQL statement stored within that record. The screenshot below shows the aforementioned Textdata record.

 

 

Additional Textdata records can be created to support displaying different items from each menu selection. As it may be desireable to display items from the same product line or with related descriptions. The Stream V Ecommerce System expects the Textdata record to begin with the type of ‘WSQ’ the Code and Id fields are also required but can be defined by the system administrator or web designer. Typically the Code field is the name of the primary table used in the SQL query defined in the record. The result set from the SQL query should only return the item numbers of the records to display.

In the screenshot below, we have created a new WSQ record WSQ:CATALOG:SILVER which will return all items from the CATALOG table that have SILVER in the catalog.description field. For this example a very simplistic SQL query was created however the Stream V Ecommerce system supports all standard SQL functions.

 

To have this SQL query called by the p4MenuItem1 menu selection in home.asp, we simply modify the line:

 sSQLStatementP = "WSQ:CATALOG:DEFAULT"

As shown in the screenshot below.

 

To sSQLStatementP = "WSQ:CATALOG:SILVER"

As shown in the screenshot below.

 

 

 

More:

General Ledger (GL)