Best Seller Display
Copyright © 2000, William Weiland
Overview
The best seller display module interfaces with the internal Merchant 4.0 statistics modules to provide your customers with similar best seller information previously only seen by the store owner in the admin interface. It goes a step further by breaking down the best seller information by category. Your customers will not see exact numbers sold, only relative ranking. As they see the best sellers listed, the display provides them with a convenient link to the individual products so that they too can see what all the excitement is about. You can reset the statistics through the existing admin statistics interface so that your best sellers can be kept current as product inventory changes.
Initial Setup
Use the Merchant admin upload feature to upload the module. Once uploaded, click the Add button to add it to the mall/domain.

In admin, under your store, click on the link for Utilities Configuration Screen. Assign the module and Update it to install it in your store.

Click the link for Best Seller Display to enter the configuration settings.


Configuration Settings
Enter data into the applicable input fields.

Hide based on Availability Group
If you have products in availability groups you should use this setting if you don't want non-eligible customers to view certain product names in the list.
1) If you select to "Hide", customers must be logged in to view products in availability groups. Hence, if you have all your products in availability groups, customers will not see the display until they login.
2) If you do NOT select to "Hide", all customer can view all products but only eligible logged in customers may link to products in availability groups. Non-eligible customers will see the name, but it will not be a link.

Table Border Width
Normally this is zero (0), but you may want to accent the table with a border.

Table Width
If you are placing the table in the category column, a setting of about 200 seems to be best.

Table Title
At the top bar of the table you can change the text from Best Sellers to things like Top Five or Favorite Five.

Title
You can control the background, font color and size with the four settings related to the title bar cell.

Table
You can control the background, font color and size with the four settings related to the main table cell(s).

Tight Table
By selecting this option, the product list will be separated with the <BR> tag instead of separate table cells. This will yield a tighter display.

Number of products to display
Enter a number for the length of the best seller list. A reasonable number is 3, 4, or 5.

Exclude categories from display
You can exclude specified categories from displaying the Best Seller Display box. Enter each category code. Terminate each code with the | character. Put one code on each line with the | at the end of the line.

Screen Locations
If you are using the OpenUI, you can place the Best Seller Display at several locations just by changing the settings here in admin. If you are using the MMUI look and feel, you will use the code discussed in editing requirements below to determine its placement. The MMUI will also need to have these settings turned on. If you put "No Display" for a screen, it will not display whether using the OpenUI or MMUI. You can put the Best Seller Display in any or all of the five Screen types (SFNT, CTGY, PROD, SRCH, PLST).


Editing Requirements (skip if using the OpenUI)
If you are using the Miva Merchant User Interface (mmui) you will need to make some very simple edits to the core files. Be sure to do that with a text editor (NO WYSIWYG editors) such as Programmer's File Editor (PFE) so as not to damage the mv files. ALWAYS BACKUP your unmodified mv files in case you make a mistake.

Placement of the Best Seller Display box is dependent on which screens you want it to show on. For the Product Display, Store Front, and Category Screens; the best position will be located in the MMUI_Begin_Screen function. For the Search and Product List, the best positions are located in the MMUI_Search and MMUI_ProductList functions respectively. You will need to view the code in these functions, then determine your desired location. As examples:

1) If you want it to show at the bottom of the category column, in the MMUI_Begin_Screen function, just above the last </TABLE> tag, enter the following lines:
<MvIF EXPR = "{g.Screen CIN 'PROD'}">
<TR><TD align="left">
<MvDO FILE="{g.Module_Root$'modules/util/bestsell.mv'}" NAME="l.currentbest" VALUE="{Statistics_Display_Category_BestSellers(Stores.d.id)}">
</TD></TR>
</MvIF>
This will only show on the Product Screen because of the use of the MvIF tag. As example, you could put <MvIF EXPR = "{g.Screen CIN 'PRODCTGYSFNT'}"> and this would display in the Product Display, Category, and Store Front screens.

2) Another location could be at the top right, just below the Checkout button on the nav bar. Locate the last TD tag in the MMUI_Begin_Screen function <TD ALIGN = "left" VALIGN = "top" WIDTH = "80%"> Between that line and the </MvIF> tag, insert the following:
<MvIF EXPR = "{g.Screen CIN 'SFNTCTGY'}">
<TABLE border=0 width="100%">
<TR><TD align="right"> </TD>
<TD align="right" valign="top">
<MvDO FILE="{g.Module_Root$'modules/util/bestsell.mv'}" NAME="l.currentbest" VALUE="{Statistics_Display_Category_BestSellers(Stores.d.id)}">
</TD></TR>
</TABLE>
</MvIF>
This will display on the Store Front and Category screens. As above, you could include the Product Display screen by adding it in the MvIF tag.