Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

[mv] Art/Frames and CommonAdjust (new thread name)



******    message to minivend-users from "Mr. Christopher F. Miller" <cfm@maine.com>     ******



It looks to me like you have some dosish DB experience.  That is
good.  It looks to me as well that this might be your first minivend
catalog because you are not following any minivend standards: code,
price, description.  Maybe they are not required any more, maybe
I'm just old and set in my ways, but defaults and conventions make
my life easier.  And the first minivend catalog generally
requires a good dose of head-banging.  Harder walls are better.

--

See if this works for a start.  Rename your art table to products.
Pick the most appropriate "code" and "description" fields.  Set your
price to anything arbitrary.  Get minivend to work with that.

Once you have it running you can play with renaming your fields and
working in the joins.


THEN play with CommonAdjust, something like:
CommonAdjust &{Vend::Art::pricing();}
Where Art.pm is a custom pm you install in lib/Vend.  You
can model your own db queries off those in Data.pm.

It's not a two hour project.  You did not include your pricing function
so I can only guess that it might be a week project for a programmer
comfortable with minivend guts and infrastructure just to get solid proof 
of concept.  If you are not comfortable with minivend guts I think
you should examine other approaches. TIMTOWTDI

cfm

******    message to minivend-users from Marty Vance <mvance@lwm.com>     ******

This is a multi-part message in MIME format.
--------------AA7A3AFFA6D1BA20279F4623
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

"Mr. Christopher F. Miller" wrote:

> ******    message to minivend-users from "Mr. Christopher F. Miller" <cfm@maine.com>     ******
>
> On Tue, Feb 01, 2000 at 05:47:07PM -0600, Marty Vance wrote:
> > ******    message to minivend-users from Marty Vance <mvance@lwm.com>     ******
> >
> > "Mr. Christopher F. Miller" wrote:
> >
> > > ******    message to minivend-users from "Mr. Christopher F. Miller" <cfm@maine.com>     ******
> > >
> > > Make a price field.  Set it to zero.  Minivend will
> > > be happier that way.
> > >
> > > Then play with the examples in CommonAdjust section
> > > and you should get the hang of it.
> > >
> > > SQL has nothing to do with it.  See how much easier it is.  ;^>
> > >
> > > cfm
> > >
> >
> > Ok, there are up to 5 sizes per art/frame.  The art and frames are in separate tables.  Does this
> > mean I have to add a size field to those tables, containing a string such as 'S=Small, M=Medium,
> > L=Large'?  Or is there a way I can set the sizes to use the size table that already exists and
> > contains the price info?
>
> "Size table that already exists" doesn't make much sense to me though
> I'm sure you've been drowning in it.   Why don't you post the table defs
> and pricing function?
>
> >
> >
> > Marty Vance
> > LiveWire
> > mvance@lwm.com
> > www.lwm.com
> >

Ok, Christopher, here are all my create table commands:

create table art (artID varchar(5) DEFAULT '' NOT NULL,
galleryID int(2) DEFAULT '0' NOT NULL,
ratioID int(2) DEFAULT '0' NOT NULL,
orientationID char(1) DEFAULT '' NOT NULL,
title varchar(255) DEFAULT '' NOT NULL,
artist varchar(255) DEFAULT '' NOT NULL,
suggestedframeID char(4) DEFAULT '' NOT NULL,
price int(1) DEFAULT '0' NOT NULL,
timestamp timestamp(14),
_rowid int(11) DEFAULT '0' NOT NULL auto_increment,
PRIMARY KEY (artID),
KEY _rowID (_rowID)
);
create table aspect (ratioID int(2) DEFAULT '0' NOT NULL,
ratio char(3) DEFAULT '' NOT NULL,
_rowid int(11) DEFAULT '0' NOT NULL auto_increment,
PRIMARY KEY (ratioID),
KEY _rowID (_rowID)
);
create table color (groupID int(2) DEFAULT '0' NOT NULL,
color varchar(20) DEFAULT '' NOT NULL,
timestamp timestamp(14),
_rowid int(11) DEFAULT '0' NOT NULL auto_increment,
PRIMARY KEY (groupID),
KEY _rowID (_rowID)
);
create table frame (frameID char(4) DEFAULT '' NOT NULL,
description text DEFAULT '' NOT NULL,
groupID int(2) DEFAULT '0' NOT NULL,
ratio66 char(1) default 'N' NOT NULL,
ratio75 char(1) default 'N' NOT NULL,
ratio80 char(1) default 'N' NOT NULL,
history text DEFAULT '' NOT NULL,
price int(1) DEFAULT '0' NOT NULL,
timestamp timestamp(14),
_rowID int(11) DEFAULT '0' NOT NULL auto_increment,
PRIMARY KEY (frameID),
KEY _rowID (_rowID)
);
create table frametosize (frameID char(4) DEFAULT '' NOT NULL,
sizeID int(2) DEFAULT '0' NOT NULL,
timestamp timestamp(14),
_rowid int(11) DEFAULT '0' NOT NULL auto_increment,
KEY (sizeID),
KEY _rowID (_rowID)
);
create table frameratio (frameID char(4) DEFAULT '' NOT NULL,
ratioID int(2) DEFAULT '0' NOT NULL,
timestamp timestamp(14),
_rowid int(11) DEFAULT '0' NOT NULL auto_increment,
KEY (ratioID),
KEY _rowID (_rowID)
);

create table gallery (galleryID int(2) DEFAULT '0' NOT NULL,
description text DEFAULT '' NOT NULL,
timestamp timestamp(14),
_rowid int(11) DEFAULT '0' NOT NULL auto_increment,
PRIMARY KEY (galleryID),
KEY _rowID (_rowID)
);
create table orientation (orientationID char(1) DEFAULT '' NOT NULL,
description text DEFAULT '' NOT NULL,
timestamp timestamp(14),
_rowid int(11)  DEFAULT '0' NOT NULL auto_increment,
PRIMARY KEY (orientationID),
KEY _rowID (_rowID)
);
create table price (sizeID int(2) DEFAULT '0' NOT NULL,
groupID int(1) DEFAULT '0' NOT NULL,
artprice decimal(6,2) DEFAULT '0.00' NOT NULL,
frameprice decimal(6,2) DEFAULT '0.00' NOT NULL,
mirrorprice decimal(6,2) DEFAULT '0.00' NOT NULL,
timestamp timestamp(14),
_rowid int(11) DEFAULT '0' NOT NULL auto_increment,
KEY (groupID),
KEY _rowID (_rowID)
);
create table size (sizeID int(2) DEFAULT '0' NOT NULL,
description text  DEFAULT '' NOT NULL,
width text  DEFAULT '' NOT NULL,
height text DEFAULT '' NOT NULL,
ratioID int(2) DEFAULT '0' NOT NULL,
timestamp timestamp(14),
_rowid int(11) DEFAULT '0' NOT NULL auto_increment,
PRIMARY KEY (sizeID),
KEY _rowID (_rowID)
);
create table ecard (ecardID char(12) default '' NOT NULL,
senderName varchar(40) default '' not null,
senderMail text default '' not null,
receiverName varchar(40) default '' not null,
receiverMail text default '' not null,
artID varchar(5) default '' not null,
frameID char(4) default '' not null,
message text default '' not null,
timestamp timestamp(14),
readtime timestamp(14),
readStatus int(1) default '0' not null,
primary key (ecardID)
);


Marty Vance
LiveWire
mvance@lwm.com
www.lwm.com

-- 

Christopher F. Miller, Publisher                             cfm@maine.com
MaineStreet Communications, Inc         208 Portland Road, Gray, ME  04039
1.207.657.5078                                       http://www.maine.com/
Database publishing, e-commerce, office/internet integration, Debian linux.
-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: