PDA

View Full Version : Specials Maintenance - Administration



michael_s
04-20-2011, 02:03 PM
I created this program to help me keep better track of my Sale Specials. I found that the Oscommerce base Specials was limited in applying sales across the various manufacturers, categories and products.

************************************************** ************************************************** ******************

This has been tested and is running on:
Apache2.
linux
PHP 5.2.+
MYSL 5.0.+
osCommerce Online Merchant v2.2 RC2a


I have a test machine also that is not on the web that runs:
Apache2.
window
PHP 5.2.+
MYSL 5.0.+
osCommerce Online Merchant v2.2 RC2a


I have not tested on other osCommerce version at this point.

************************************************** ************************************************** ******************

forum url: http://forums.oscommerce.com/topic/374258-specials-maintenance-administration/

************************************************** ************************************************** ******************

What this contribution should accomplish:

1) This contribution changes the way in which special pricing is handling by adding two new fields to the specials file:
a ) With both a start date and end date you can set up your special to start and end automatically. This is
accomplished via the function/special_maintenance.php program these fields are check and updated.

b ) The specials_limit_quantity allows you to set how many units of a product can be sold at sale price. An
example would be you have 8 units of a product and you want to sell only 3 at the sale price, you would
set the specials_limit_quantity to 5. Now the database fields would be compared each time and if the limit
is reached before the sale end date the products sale would end and would revert back to it's regular price.
At present this will not stop a customer from buying more than allowed if they go over the limit with the one
purchase they are making as the special file does not update the status until after the completed purchase.
With a future update I will be looking at possibly change the way in which this is handled.


2) filtering products by:
a ) manufacturers.
b ) category and subcategory or exclude subcategory with checkbox checked.
c ) products name.
d ) all active products or with include inactive products checkbox checked the inactive products will be included.
e ) same as above except exclude specials checkbox checked
f ) all active/inactive specials with both checboxes checked, or only active or inactive depending on checkbox checked.


3) sorting by:
a ) when all products listed:
* product id (default)
* product model
* product name
* product quantity
* product price
b ) when only active/inactive specials listed:
* product id (default)
* product model
* product name
* product quantity
* product price
* product specials end date
* product specials start date
* product specials limit quantity sales


4) Allow update of specials by selected criteria above
a ) at the global level
* update specials sales price: (required except using reset dates button)
+ the amount can be in currency or in a percentage, which is chosen by the drop down.
+ this is required to be greater than zero and less the regular price of item or less than 100%.
* update start date field: (not required)
+ if no start date is given than the item will be set to go on sale as soon as it is updated.
+ if start date is entered which must be entered as MM/DD/YYYY that will be the date for the sale to start.
* update end date field: (not required)
+ if no end date is given than the item will remain on sale until you change the status with the status icon or by entering an end date at which point when the end date comes it will end the sale on the item.
+ if end date is entered which must be entered as MM/DD/YYYY that will be the date for the sale to end.

REMEMBER THAT AT THE GLOBAL LEVEL AS PRODUCTS UNDER THE SELECTION CRITERIA WILL BE UPDATED INCLUDED PRODUCTS ON OTHER PAGES IF THERE IS MORE THAN ONE PAGE!!
THOSE PRODUCTS THAT WOULD BE PRICED EQUAL TO OR GREATER THAN REGULAR PRICE WILL NOT BE AFFECTED AS THE PROGRAM ONLY DEALS WITH SPECIAL LOWER PRICES (SALES).


b ) at the local (individual) level
* update specials sales price: (required)
+ the amount can be in currency or in a percentage, which is chosen by the drop down.
+ this is required to be greater than zero and less the regular price of item or less than 100%.
* update start date field: (not required)
+ if no start date is given than the item will be set to go on sale as soon as it is updated.
+ if start date is entered which must be entered as MM/DD/YYYY that will be the date for the sale to start.
* update end date field: (not required)
+ if no end date is given than the item will remain on sale until you change the status with the status icon or by entering an end date at which point when the end date comes it will end the sale on the item.
+ if end date is entered which must be entered as MM/DD/YYYY that will be the date for the sale to end.
* update specials limit quantity field: (not required)
+ special limit must be < product limit.


5) Error handling:
a ) specials sales price:
* price must be greater than 0 < product regular price, percentage must be greater than 0 < 100%.
b ) start date field:
* must be in correct format and valid date.
c ) end date field:
* must be in correct format and valid date and greater than (if no start date entered than greater present date else greater than start date).
d ) specials limit quantity:
* special limit must be < product limit.
e ) checkboxes:
* Exclude Specials cannot be checked at the same time as Active Specials Only and/or Inactive Specials Only.


************************************************** ************************************************** ******************

More... (http://addons.oscommerce.com/info/7975)