Community Add-Ons

Add file to this package
Top » Features

Multiple Sales Per Product
for osCommerce Online Merchant v2.2

This add-on is register_globals compatible

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.

Legend:  Download   Report

Expand All / Collapse All

Multiple Sales Per Product 3 Mar 2011  

The March 3, 2011 revision adds a configuration variable that determines whether you are allowed to create unending sale prices. This will appear under My Store in Configuration. If set to true then the expiration date for the sale can be left blank to create sale prices that never expire. If set to false a valid expiration date will be required in order to create a new sale price or named sale. Note that this only applies when you create or edit a sale, it does NOT have any effect on sale prices that are already stored in the database. All of the PHP files for this contribution have been updated to accommodate this new feature.

The complete contribution is enclosed with update instructions for those who already have installed it. Upgrade basically involves replacing all of the admin side PHP files for the contribution, installing a new configuration variable into the database, and making some minor modifications to one function in admin/includes/functions/general.php to allow for reposting variables.

Multiple Sales Per Product 29 Oct 2010  
Multiple Sales Per Product 15 Oct 2010  
Mulitple Sales Per Product 28 Jul 2010  
Multiple Sales Per Product with multi-item set bugfix 12 Mar 2010  
Multiple Sales Per Product now with multi-item set 27 Feb 2010  
Multiple Sales Per Product bugfix+ 7 Jan 2010  
Multiple Sales Per Product adjustment 12 Sep 2009  
Multiple Sales Per Product another fix 11 Sep 2009  
Multiple Sales Per Product fix 10 Sep 2009  
Multiple Sales Per Product 18 Aug 2009