Announcement:Materials and articles for ProductCart 5 can be found at our brand new support center.

Create an account to edit articles | See Formatting Syntax for Wiki syntax | We look forward to your contribution!

Table of Contents

Moving the small search box to the root directory


Starting with v3.5 the small search box (SmallSearchBox08.asp) will display a waiting dialog window while search results are loading. If you have moved your home page to the site root this new feature will not function properly. This document contains information about how to retain the waiting dialog box on your custom home page.


The following assumptions are used in this section:

  • The “productcart” directory has not been renamed. If you have renamed it, no problem. Just adjust the links accordingly.
  • The “productcart” directory is in the root. That is, the file SmallSearchBox08.asp (which contains the small search box) is two levels down from the root and will be moved two levels up. If this is not the case, change some of the links mentioned below so that they are consistent with your directory structure.

To Do

The following is a list of tasks to be performed. Please make sure you follow these instructions carefully. Please also note that ProductCart does not provide technical support on implementing these code changes.

Some of the steps below assume that you are using Adobe® Dreamweaver®. If not, you can perform the same tasks manually (e.g. change links for files and folder so that they point to the correct location).

  1. Recreate locally the Web store that you have on your Web server. You don't need all the files locally, you just need the folder structure.
  2. Create a Web site in Dreamweaver where the root folder of the Web site is the root folder of your local Web store.
  3. Download the file “SmallSearchBox08.asp” to the your local “pc” folder.
  4. Open the file with Dreamweaver and save it to the root. When the software asks you whether links should “Update links?”, say “Yes”.
  5. With the same file still open, you will need to find the following strings:
    response.Write(pcf_ModalWindow(dictLanguage.Item(Session("language")&"_advSrca_23"), "small_search", 200))

    … and replace them with:

    <link href='ProductCart/pc/screen.css' rel='stylesheet' type='text/css' />
    <script type='text/javascript' src='ProductCart/includes/javascripts/highslide.html.packed.js'></script>
    <a href="javascript:;" id="small_search" onclick="return hs.htmlExpand(this, { contentId: 'modal_small_search', align: 'center', width: 200 } )" class="highslide"></a>
    <div id='modal_small_search' class="highslide-maincontent">
        <div align='center'>Searching... Please Wait.</div>
    <script language="JavaScript">
    function pcf_Close_small_search() { var t=setTimeout("hs.close('small_search')",50) }
    function pcf_Open_small_search() { document.getElementById('small_search').onclick() }
    hs.graphicsDir = 'productcart/pc/images/highslide/';

  6. You are almost done. Since you might include the small search box in a file that does not contain ProductCart store settings, you will need to change two variables in the code. Specifically, locate the string:

    pcIntPreferredCountSearch =(scPrdRow*scPrdRowsPerPage)

    …and change it with:

    pcIntPreferredCountSearch = 12
    bType = "h"

    where the first variable indicates how many results should be returned in the search and the second one indicates the way results should be presented. The options for this second variable are:

    1. h = horizontal
    2. l = list
    3. m = list, with multiple add to cart
    4. p = vertical (one item per row)
  7. Save the file.
    You can now include “SmallSearchBox08.asp” in an ASP file that exists in the root of your Web site and have the small search box work from there.

If you have changed the name of the “ProductCart” folder (which is very common) use the name of your renamed folder in place of “ProductCart” in the code above.


Here is an example using one of the demo stores that allow you to test our shopping cart software on the ProductCart Web site. In this example, the “productcart” folder was renamed “apparel” (you will be running a search against the demo store that showcases our Apparel Add-on).

QR Code
QR Code Moving the small search box to the root directory (generated for current page)