[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
[mv] Re: Art/Frames and CommonAdjust (new thread name)
****** message to minivend-users from Marty Vance <mvance@lwm.com> ******
"Mr. Christopher F. Miller" wrote:
> 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.
Christopher,
You're right about one thing: This is my first MV catalog. However, all my db experience can be summed
up to what
I've done for this project. I basically started working here and was told "Here, implement Minivend".
The db was in place already, I've been modifying it as necessary. My Perl experience is just above basic
(the first script I wrote used references in just about every line...I have yet to delve into module
programming).
As to the pricing structure, here's a walkthrough.
1. The user enters the catalogs and begins browsing through the art.
2. The user selects a piece of art, which brings them to a page where they select their frame and size.
This page is very heavy
on javascript. the art is shown in the middle of the page, and as the user clicks on thumbnails of the
frames, the frames appear
around the art. The user then selects the size from a select box (the options of which are rebuilt every
time a frame is selected--
not every frame is available for every size/aspect ratio). The art has one price schedule, and the
frames are broken up into four
groups, each group has its own price structure.
3. The user clicks "add to cart", which then must show the artID, title, artist, art price frameID,
frame description, and frame price.
Here is the full contents of my price table:
+--------+---------+----------+------------+-------------+----------------+--------+
| sizeID | groupID | artprice | frameprice | mirrorprice | timestamp | _rowid |
+--------+---------+----------+------------+-------------+----------------+--------+
| 1 | 1 | 44.00 | 60.00 | 60.00 | 00000000000000 | 1 |
| 1 | 2 | 44.00 | 108.00 | 108.00 | 00000000000000 | 2 |
| 2 | 1 | 94.00 | 65.00 | 65.00 | 00000000000000 | 3 |
| 2 | 2 | 94.00 | 129.00 | 129.00 | 00000000000000 | 4 |
| 3 | 1 | 130.00 | 65.00 | 65.00 | 00000000000000 | 5 |
| 3 | 2 | 130.00 | 131.00 | 131.00 | 00000000000000 | 6 |
| 4 | 1 | 24.00 | 45.00 | 45.00 | 00000000000000 | 7 |
| 4 | 2 | 24.00 | 80.00 | 80.00 | 00000000000000 | 8 |
| 4 | 3 | 24.00 | 113.00 | 113.00 | 00000000000000 | 9 |
| 4 | 4 | 24.00 | 128.00 | 128.00 | 00000000000000 | 10 |
| 5 | 1 | 32.00 | 57.00 | 57.00 | 00000000000000 | 11 |
| 5 | 2 | 32.00 | 94.00 | 94.00 | 00000000000000 | 12 |
| 5 | 3 | 32.00 | 127.00 | 127.00 | 00000000000000 | 13 |
| 5 | 4 | 32.00 | 160.00 | 160.00 | 00000000000000 | 14 |
| 6 | 1 | 58.00 | 55.00 | 55.00 | 00000000000000 | 15 |
| 6 | 2 | 58.00 | 105.00 | 105.00 | 00000000000000 | 16 |
| 6 | 3 | 58.00 | 178.00 | 178.00 | 00000000000000 | 17 |
| 6 | 4 | 58.00 | 194.00 | 194.00 | 00000000000000 | 18 |
| 7 | 1 | 80.00 | 55.00 | 55.00 | 00000000000000 | 19 |
| 7 | 2 | 80.00 | 112.00 | 112.00 | 00000000000000 | 20 |
| 7 | 3 | 80.00 | 200.00 | 200.00 | 00000000000000 | 21 |
| 7 | 4 | 80.00 | 232.00 | 232.00 | 00000000000000 | 22 |
| 8 | 1 | 110.00 | 63.00 | 63.00 | 00000000000000 | 23 |
| 8 | 2 | 110.00 | 129.00 | 129.00 | 00000000000000 | 24 |
| 8 | 3 | 110.00 | 239.00 | 239.00 | 00000000000000 | 25 |
| 9 | 1 | 38.00 | 55.00 | 55.00 | 00000000000000 | 26 |
| 9 | 2 | 38.00 | 99.00 | 99.00 | 00000000000000 | 27 |
| 10 | 1 | 72.00 | 56.00 | 56.00 | 00000000000000 | 28 |
| 10 | 2 | 72.00 | 109.00 | 109.00 | 00000000000000 | 29 |
+--------+---------+----------+------------+-------------+----------------+--------+
The mirrors are unimportant at this point. That field only exists for the adminitrators to change it.
Mirrors basically take the place of art (but there is a dedicated page for mirrors, which has the same
basic functionality as the frame selection page).
The root of my original question is "how do I get minivend to use the existing price table for
CommonAdjust?"
Thanks for your input. Maybe this info will help you give me a better solution. I did create price
fields in the art and frame tables, as you originally suggested, set to 0.
Marty Vance
LiveWire
mvance@lwm.com
www.lwm.com
-
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