Multiple Sales Per Product

for osCommerce Online Merchant v2.2

Our store often sets up sale prices several months in advance due to the lead time for the magazines in which we advertise. Many times the same products are repeated from ad to ad but the sale price changes. Since osCommerce as written only allows one sale price per product but has the potential to set more than one since sale prices are in their own file linked to the products I decided to see about writing my own contribution to allow sales to be set in advance and activated automatically at the proper time. This contribution also allows you to create named sales. The names can be anything you like such as "July Magazine Ad" or "April 15 Newspaper Ad" or "Summer Sale Flyer" or whatever else you like. Each named sale will have its own beginning and ending dates which can overlap if you like. When you create a new sale for a product and associate it with an named sale the product sale will automatically take its beginning and ending dates from the named sale so you won't need to enter those again. On the catalog side specials.php the user will now be able to choose which sale items to view, whether all items on sale, items on sale that aren't associated with a named sale, or only items that are part of a specific named sale. I’ve modified the stock osCommerce specials maintenance just enough to allow for the new beginning date and named sale features but focused my attention on writing a new sale price entry file that focuses on products. Only those sales for the focal product are listed. You can choose different products using either an advanced search or a drop down list of all products. One button click will return you to category/product maintenance with the current focal product selected. I've also added a button in the product information info box of categories.php to take you directly to sale maintenance for that product. This could make life easier since the stock osCommerce specials maintenance provides no way to search for the sale information for a specific product.

Files