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

33. Limit New Products to Those with an Image


This recipe is very important when most of your products have images, but some do not. As soon as new products are added, they appear in the list of the New Products box and will distort the look of the box, even when you have set Image required to false in Administration | Configuration | Images.

Presentation

Products without images or with an image placeholder (which is an image telling the customer that there is no image) will be removed from the selection if you use this query.

Otherwise, your screenshot would have looked like this, where you allow products with no image specified to be shown:

Ingredients

Note

Modified:

catalog/includes/modules/new_products.php

Cooking

  1. 1. Open catalog/includes/modules/new_products.php and find this in line 20, which runs the queries for new products depending on a category selected:

if ( (!isset($new_products_category_id)) ||
($new_products_category_id == '0') ) {
$new_products_query = tep_db_query("select...