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

52. Limit Flat Rate Shipping to a Specific Top Category Only


This recipe will be very useful for you if you have a setup similar to the demo shop. For this example we are setting a Flat Rate for shipping a single movie DVD. When additional items are added to the cart or a singular product in the cart is not a movie DVD, the shop's default shipping module, in this example, Table Rate, will be visible while the new Flat Rate module will be hidden.

Presentation

Your Checkout Shipping page will look like this with only a movie DVD in the cart:

If you add a second DVD or have a product from any other top category in the cart, your shipping calculation will use Table Rate:

This is what your Administration | Modules | Shipping area will look with the new Flat Fee module added:

Ready to put out a choice buffet?

Ingredients

Note

New:

catalog/includes/modules/shipping/flat1.php

(this is a clone of the catalog/includes/modules/shipping/flat.php file)

catalog/includes/languages/english/modules/shipping...