Most Popular and Recently Added Products
|Top Previous Next|
The top products and latest additions may be displayed in shopping cart catalog and search pages by inserting PHP code in the page where it is to appear.
The scripts that produce these lists may be included in...
And this is how to use the PHP include version...
Note that the second version only works in a PHP script.
To add a parameter to the PHP include version, set it as a variable before the include statement. For example:
Number of Products Shown
If not otherwise specified, the top.js.php script will display the last 10 new products and latest additions. To display a lower number of products, add the parameter "items=x" where x is the number of products to display.
This include will display the 5 most popular and latest additions:
Or for the PHP include version use:
$items = 5;
Redirect To A Different Product Page
In shops where only custom catalog pages are used and a direct link to the default storefront script is not desired, the top.js.php product links can be redirected to the custom catalog pages by adding a "redirect=x" parameter, where x is the local file name or URL.
This include will display the 10 most popular and latest additions in a custom product page named "product.html".
The Layout Parameter
By setting the layout parameter you can control which lists are shown. These are the possible values of the parameter:
This example will show only the latest additions, using the PHP include, and will limit the list to 4 items:
$layout = 2;
$items = 4;
The Mode Parameter
By setting the mode parameter you can select if the top list should be formatted as a table or an unordered list. This is only available when using the php version. These are the possible values of the parameter:
Table Header Text
The text that appears at the top of the listings is set in the corresponding language file, language/xx/topjs.inc.php, where xx is the language abbreviation. For example, the text for English language is set in language/en/topjs.inc.php.
Colors, and Fonts