Book Image

Deep Inside osCommerce: The Cookbook

By : Monika Mathe
Book Image

Deep Inside osCommerce: The Cookbook

By: Monika Mathe

Overview of this book

osCommerce has been around since March 2000. At present there are over 10,000 live, registered osCommerce sites, and about 100,000 registered community members. Apart from providing ready-made solutions to problems, as well as a huge repository of information, the osCommerce community is a living entity with which we can all interact. With the rising success and popularity of this remarkable piece of software, things can only get better.
Table of Contents (17 chapters)
Deep Inside osCommerce: The Cookbook
Credits
Foreword
About the Author
About the Reviewers
Introduction

32. Fill Up Also Purchased Products Search Result


This recipe allows you to show a determined number of products in the Also Purchased Products box even when sales have not been made yet. This module checks for sales and the number you'd like to display, and if the number generated by the regular Also Purchased Products query is too low, random products are added. This is a very important feature for new shops or shops already using the Also Purchased Products box for design purposes, and not wanting it to look different on different product pages.

Presentation

Your screen will look like this screenshot with your Also Purchased Products box filled to the brim (defined in admin to show six products):

Think this is hot stuff? Grab your oven gloves!

Ingredients

Note

Modified:

catalog/includes/modules/also_purchased_products.php

Cooking

  1. 1. Open catalog/includes/modules/also_purchased_products.php and find this in line 14:

$orders_query = tep_db_query("select p.products_id, p.products_image from...