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

47. Add the Products' Manufacturers to Your Order Confirmation Email


It is always a good idea to display manufacturer's names with product names in the order email if a certain product could be associated with several different manufacturers. This recipe shows you how to add the manufacturer's name for each product using a function, just as promised in the previous recipe.

Presentation

Your product listing in the Order Confirmation email will look like the following Screenshot:

Keen's, Colemans, or Hot Oriental?

Ingredients

Note

Modified:

catalog/includes/functions/general.php

catalog/checkout_process.php

Cooking

  1. 1. Open catalog/includes/functions/general.php and add the following new function before the closing ?> PHP tag to get the manufacturer's name for a given product:

function tep_get_manufacturers_name($products_id) {
$manufacturers_query = tep_db_query("select m.manufacturers_name from " .
TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS .
" p where p.manufacturers_id = m.manufacturers_id...