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

10. Add Images to Infoboxes


This recipe teaches you to add images to infoboxes. Potentially, there are three scenarios where you need an image in a box:

  • You want to display an image in an existing box.

  • You want to add a new box with an image.

  • You want to display an image (either in an existing or a new box) that links to an internal or external page.

Presentation

Your screen will look similar to this one if you add an image to your shopping-cart infobox:

Let's whip up this one for you!

Ingredients

Note

New:

catalog/images/monika.jpg

Modified:

catalog/includes/boxes/shopping_cart.php

Cooking

  1. 1. Open catalog/includes/boxes/shopping_cart.php and find this code in line 63:

new infoBox($info_box_contents);
  • Add directly above this line the following code, using your own image saved in the images folder:

$info_box_contents[] = array('align' => 'center',
'text' => tep_image(DIR_WS_IMAGES . 'monika.jpg', 'Monika Mathé', SMALL_IMAGE_WIDTH, ''));

That slid perfectly out of the mold! Bon appetit...