[Yams-discuss] Bug "Automatic notification of third party of sales"
Brought to you by:
modred
From: pat e. <p_...@ho...> - 2000-03-09 15:25:15
|
Looking at this bug report, I think it should be widened to include non-email notification. My initial thought is to add a notify column and a vendor column to the product table (both potentially NULL). The notify column would hold an int which relates to the id of a notification table like: CREATE TABLE notification ( id integer NOT NULL DEFAULT 0 AUTO_INCREMENT, how enum("email", "fax", "direct"), PRIMARY KEY(id)); The vendor column could be something like: CREATE TABLE vendor ( id integer NOT NULL DEFAULT 0 AUTO_INCREMENT, vendor_name varchar(30), contact_f_name varchar(30), contact_l_name varchar(30), contact_phone varchar(12), contact_fax varchar(12), contact_email(30), notify_string varchar(30), # used to give email, fax, or # other notifcation address notify_format varchar(256), # contains the filename containing # a template for notifications PRIMARY KEY(id)); Then, when an item is sold, an immediate check can be made to determine whether or not to notify by checking for a non-NULL value in product.notify. If notification is needed, the value returned points to which notification routine would be run. The notification routine would then grab the vendor.notify_string and vendor.notify_format values and send the right thing to the right place. Having the vendor table also starts to build the infrastructure to do inventory/vendor maintenance. I've probably overlooked something here (and botched other stuff as well). Please level criticism at me :) -pate ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com |