Listing Engine

Sections:
Database Table
Database
Listings Edited by Customers
Engine Overiew
Drilldown browsing
Listing Browser Setup
Listing.asp Parameters
Listing Manager
Listing Repair Job

The Listing Engine is part of the SendSafe E-Business framework. It manages the sale and display of listings of all kinds: real estate, classfieds, product reviews, etc.

Website and database customization is required.

The listing engine comes standard with 4 types of listings:


LISTING ENGINE OVERVIEW

Using with the engine typically requires only including links to the listing engine page. The listing engine page is very similar to the browser.asp (E-Business framework page).

Each listing Engine can run any number of unique DB ListingExt* tables. To facilitate this broad configurablity the system is dvidied up into customizable include files. The structure is as follows:

  1. listing.asp (top level listing file) - a different file is needed for each different ListingExt* table.
    1. #include ListingDisplayLogic.inc.asp (Custom Display logic)
    2. #include ListingSearchCriteriaLogic.inc.asp (Custom Search Request logic)
    3. #include Listing.inc.asp (General purpose management code)

ListingSearchCriteriaLogic.inc.asp

The following functions define the include file interface:
FunctionDescription
leStartRenderSearchEntryForm()

This function will render a search form. This form is then used by leSetupSQLClauseForExtSCriteria() to construct the needed SQL..

The location of the display of the search critera can be controlled via CSS. The default location is setup in the listing.asp file by the placement of this rendering function.

This function MUST NEVER be called before the #include listing.inc.asp occurs.

leEndRenderSearchEntryForm()

This function will end the render process for a search form. This form is used by leSetupSQLClauseForExtSCriteria() to construct the needed SQL.

This function is called from within the renderListingBrowserResults() subroutine inside #include listing.inc.asp.

leSetupSQLClauseForExtSCriteria()

This function builds an SQL clause which replaces the WHERE SQL clause in record selection.

If this function returns an empty string then the default clause which searches searchableDescription is used.

This clause must no begin with an 'AND' or a 'WHERE' verb. The clause must not include ordering. The bwRestrictions restrcition clause will be appened and is built from listingBrowsingRestrictions.

Different search critera can be be handled for different listing types.

leOverrideDefaultConfig()

This function is used to override the default configuration of this instance of the listing page.

Different search critera can be be handled for different listing types.

leRenderMatrixListingDescription()

This function is used to render the description part of a matrix of listings.

Different displays can be be handled for different listing types.

leRenderShowcaseListing()

This function is used to render the showcase page description for listings.

Different displays can be be handled for different listing types.


LISTING PURCHASED AND EDITED BY CUSTOMER

Listings can be optionally purchased edited by the customer. For example if a classified or real estate listing is purchased then the customer can edit or create these listings off the MyAccount page. The Order Status page shows the items purchased and if it is an editiable listing then the customer can edit it from the order status page.

To edit listings on the Listing Manager page the following settings are required:

The purchase process involves a few steps:

  1. When a listing is purchased each listing is a subscription with deplexed lineitems and must follow those requirements and rules.
  2. On the order status webpage, when a customer clicks on a lineitem containing a listing THEN if a listing records does not EXIST one is created by the order status webpage.


DRILLDOWN BROWSING

Listing drilldown browsing functions the same as E-Business framework product browsing (see for more information: Product Browser and Product Browser drilldown browsing).

Some background notes:

  1. The selection of category and subcategory incons is the same and used the function getIconFileNameFromCat() (in pagetools.inc.asp). The same rules for icon file names as used in product browsing apply.


DATABASE

The information which comprises each listing is contained in two tables: the base listing table and a custom listingext table.

ListingExt table:
The name of the ListingExt table must match the type of listing which it contains; where the ListingType is used as a postfix. For example: a real estate listing would be named ListingExt1 and a classified listing would be named ListingExt2


LISTING BROWSER SETUP

All the files which make up the E-Business framework can be found in the .\includes\ directory. Setup is performed by editing the file: includes\pageconfig.inc.asp

' Enable descriptions/labels for category drilldown (CSC) linkage
General Listing Browser settings
autoCatTitleTopListingCategory = "Listing Categories"Sets the title for the TOP LEVEL listing page.
listingBrowsingRestrictions = "and ApprovedForDisplay > 0 and ProcessingStep > 2"This is an additional SQL clause that is used for display restritions; can be set to null to allow all records to be displayed.
listingDisplayedRowLimit = 12"This is the number of listing rows displayed per page.
listingMatrixDescMinWidth = 175This is the minium width of the matrix listing column.
listingBrowserMatrixDisplayImgWidth = 150This is the default width of the thumbnail image file.
listingBrowserMatrixDisplayImgHeight = 150This is the default height of the thumbnail image file.
listingDefaultForceCatListInsteadOfMatrix = falseIf true the system defaults to category lists instead of matrix displays unless overridden by URL param CatListMode=YES/NO.
listingDefaultForceSubCatListInsteadOfMatrix = falseIf true the system defaults to subcategory lists instead of matrix displays unless overridden by URL param SubCatListMode=YES/NO.
listingBrowserDisplayCatLabelsEnabled = trueDisplay a category number bar at the top of the category and subcategory listings.
byPassListingAccessControl = falseBypassed listing access control; i.e. enable/disable login access control.
listingSortColumn = "FullName"This is the default column that lists of results will be sorted by during drilldown.
listingExtBrowserFields = ""This is a list of fields from the ListingExt? table which are used in NON-SHOWCASE displays.
listingCatDrilldownLabeling = falseThis is a list of fields from the ListingExt? table which are used in SHOWCASE displays.

Filter and Sort by options
listingfilterAndSortEnabled = trueEnable filter/sort dropdown on the listing display pages
listingfilterAndSortLabels = "Sort by date added|Sort by high price|Sort by low price"Label for the entires in the filer/sort dropdown.
listingfilterAndSortClauses = "order by DateSubmitted desc|order by ListPrice desc|order by ListPrice" The SQL clause used for dropdown options.
listingfilterAndSortLegend = "" This is an optional label for the sort and filter dropdown

 


LISTING.ASP PARAMETERS

The basic search is done by passing on the URL parameter line THE NAME OF A COLUMN and a VALUE to search for in that column. For example:

This URL will search for all items which have "Hot dog bun" in the SUBCATERGORY column.

NOTE: Start=0 is required and will make sure that the list begins with the 1st item found.

Queries
"LType"Required parameter. This param selects the extended listing record type (i.e. 1,2,3,4, etc.). This value is saved in a cookie for reuse until over ridden.
"PopMode"YES / NO - if in popup mode access is granted and the results displayed without additional nav and format elements.
"SLE"If set to YES, then the listing engine will supress performing a query and listing any results. This flag is used by the search form to suppress listings untul all needed data has been entered.
"AdvSearch" Generates a multi-row list of all items that match this search phrase (searches Multi columns in the DB) This flag is typically only used by the [ SEARCH ENTRY BOX ] to perform free-form product searches The columns that are searched are: keywords and fullname
"TopList" SUBCATEOGRY LIST (The Standard): TopList=SubCat THEN this will result in a list of all the categories with Hyperlinks to all SUBCATEGORIES user the category. See below for subcat usage.
"TopList" ITEMS LIST: TopList=yes THEN this result in a list of all the categories with Hyperlinks which immediately list all items in a subcategory (INSTEAD of listing the subcategories).
"TopList" TopList=brands THEN the brands browsing list is displayed.
"Lev2List" THEN this will result in a list of all subcategories within this Category
"lev2list" SPESUBALL THEN this is a special case reserved word which will cause a list of all subcategories to be displayed in list mode (SPE SUB ALL).
resetLev2 yes will cause the cached LastLev2List value to be reset (this is the last category visited)
"L1" FirstLetter Only of search phrase, must include (default type of) search parameter Example: listing.asp?Category=m&L1=yesy&start=0
QL SearchCoumn (i.e. CATEGORY, BRANDS, SUBCATEGORY, etc.) NOTE: QL & SL must ONLY appear after STARTS=0
SP Phrase to searh for in QL NOTE: QL & SL must ONLY appear after STARTS=0
Start Warning! IF no search parameters are provided THEN the start-param must only appear at the beginning of the list Search parameters entered after the "start" parameter will be ignored unless they are QL OR SP.
ShowCase

Yes/No - Turns product showcase on & off; Showcase is typically only used with the SKU=xxxx which matches an exact product. i.e. listing.asp?SKU=GR295&showcase=yes&Start=0

NOTE: You can combine ShowCase=Yes with a search that will match more than one product and open a showcase page showing multiple products. For example: "subcategory=bread&ShowCase=Yes"

SEARCHDEBUG YES -- will enable debug dump / NO -- will turn debug dump off

Here is an example of drilldown browsing and direct parts access links. The following settings are in effect for this example:

(2) The next drilldown shows categories
http://www.mybiz.com/listing.asp?TopList=subcat&Start=0
SQL = Select distinct category From Listing, ListingExt where Listing.itemcodeid = ListingExt.itemcodeid and dateAdded is not null order by category

(3) The next drilldown shows subcategories
http://www.mybiz.com/listing.asp?Lev2List=2000&Start=0
SQL = Select distinct subcategory, category From Listing, ListingExt where Listing.itemcodeid = ListingExt.itemcodeid and category like '%2000%' and dateAdded is not null and brands = 'Chevrolet' order by subcategory

(4) The final drilldown level shows parts
Cookie: svnLastLev2List=2000 =yields=> category=2000
http://www.mybiz.com/listing.asp?Subcategory=Corvette&Start=0
SQL = Select InformationLink, Category, SubCategory, Brands, Listing.itemCodeId, PictureFileB, producttype, PriceEa, QtyInStock, OutOfStockMsg, FullName, sku , FeaturedDesc , description From Listing, ListingExt where Listing.itemcodeid = ListingExt.itemcodeid and SUBCATEGORY = 'Corvette' and dateAdded is not null and brands = 'Chevrolet' and category like '%2000%' order by SUBCATEGORY, fullName

(5) Showcase
Cookie: svnLastLev2List=2000 =yields=> category=2000
http://www.mybiz.com/listing.asp?ItemCodeId=1827144522&showcase=yes
SQL = Select InformationLink, Category, SubCategory, Brands, Listing.itemCodeId, PictureFileB, producttype, PriceEa, QtyInStock, OutOfStockMsg, FullName, sku , FFParams, logo, PictureFileA, longDesc , FeaturedDesc , description From Listing, ListingExt where Listing.itemcodeid = ListingExt.itemcodeid and Listing.itemCodeId = '1827144522' order by Listing.itemCodeId, fullName

This direct link: This link will set toplevel brands filtering but will not set category (svnLastLev2List)
SETS cookie: svnSearchRefinementByBrandsVal=Chevrolet
http://www.mybiz.com/listing.asp?ItemCodeId=1827144522&brandsTL=Chevrolet&showcase=yes

This direct link: This link will not set toplevel brands
http://www.mybiz.com/listing.asp?ItemCodeId=1827144522&showcase=yes

 


Listing Repair Job

This job periodically scans listings for user and admin entry errors and corrects the errors. The repairs performed are:

  1. Find listings with '#' image processing required prefixes in the picturefile fields but no matching job.
  2. Find listings with '#' image processing required prefixes in the picturefile fields but the filename specified is missing. PictureFileA is substitued in all cases.



Parameter value
param1 This should be the same parameter used for param1 in a Replication job stripped of the user specified upload directory i.e. \en\uploads would be entered (from a replication job with \en\uploads\157117208).
param2 This should be the same parameter used for param2 in a Replication job.
param3 starting index key (optional)