[ic] how to NOT use products.txt

Corey Gilmore interchange-users@lists.akopia.com
Wed May 30 22:12:01 2001


$ head -n2 products.txt
sku	description	comment	display	image	icon	div_icon	price	category	nontaxable	weight	related	featured	inactive	flypage	required	type
CFG001-1	Video Stream for CFG001	<font class="bodycopy">This is the webcast for <a href="cfg001.html" class="bodylink">cfg001</a><br>It has all options of a normal product, except it should only be displayed from WITHIN a conference flypage</font>					75.00		1				1			deliverymethod

no idea how that will wrap.

In case the tabs get munged up: description is Video Stream for CFG001,
comment is the html snippet within the font tags, division=none,
type=conference delivery method, no image, no icon, no div_icon, price:
75.00, taxable: no, no related, feqtured, or required items.  inactive:
no, weight: no, flypage: none.

I do have a products/products.sql...

$ cat dbconf/products.mysql
# MiniVend database definition
Database  products  products.txt __SQLDSN__
#ifdef SQLUSER
Database  products  USER         __SQLUSER__
#endif
#ifdef SQLPASS
Database  products  PASS         __SQLPASS__
#endif
Database  products  KEY          sku
Database  products  COLUMN_DEF   "sku=char(14) NOT NULL PRIMARY KEY"
Database  products  COLUMN_DEF   "description=VARCHAR(128) NOT NULL"
Database  products  COLUMN_DEF   "title=VARCHAR(128) DEFAULT '' NOT NULL, index(title)"
Database  products  COLUMN_DEF   "template_page=VARCHAR(64)"
Database  products  COLUMN_DEF   "comment=TEXT"
Database  products  COLUMN_DEF   "display=VARCHAR(128)"
Database  products  COLUMN_DEF   "image=VARCHAR(64)"
Database  products  COLUMN_DEF   "icon=VARCHAR(64)"
Database  products  COLUMN_DEF   "div_icon=VARCHAR(64)"
Database  products  COLUMN_DEF   "price=DECIMAL(12,2) NOT NULL, index(price)"
Database  products  COLUMN_DEF   "category=VARCHAR(64) NOT NULL, index(category)"
Database  products  COLUMN_DEF   "nontaxable=CHAR(3)"
Database  products  COLUMN_DEF   "weight=VARCHAR(12) DEFAULT '0' NOT NULL"
Database  products  COLUMN_DEF   "size=VARCHAR(96)"
Database  products  COLUMN_DEF   "color=VARCHAR(96)"
Database  products  COLUMN_DEF   "related=text"
Database  products  COLUMN_DEF   "featured=VARCHAR(32)"
Database  products  COLUMN_DEF   "type=VARCHAR(64), index(type)"
Database  products  NUMERIC      price

mysql> desc products;
+-------------+---------------+------+-----+---------+-------+
| Field       | Type          | Null | Key | Default | Extra |
+-------------+---------------+------+-----+---------+-------+
| sku         | varchar(14)   |      | PRI |         |       |
| description | varchar(128)  |      |     |         |       |
| comment     | text          | YES  |     | NULL    |       |
| display     | varchar(64)   | YES  |     | NULL    |       |
| image       | varchar(64)   | YES  |     | NULL    |       |
| icon        | varchar(64)   | YES  |     | NULL    |       |
| div_icon    | varchar(64)   | YES  |     | NULL    |       |
| price       | decimal(12,2) |      | MUL | 0.00    |       |
| category    | varchar(64)   |      | MUL |         |       |
| nontaxable  | char(3)       | YES  |     | NULL    |       |
| weight      | decimal(12,4) | YES  |     | NULL    |       |
| related     | varchar(64)   | YES  |     | NULL    |       |
| featured    | varchar(64)   | YES  |     | NULL    |       |
| inactive    | char(3)       | YES  |     | NULL    |       |
| flypage     | varchar(64)   | YES  |     | NULL    |       |
| required    | varchar(64)   | YES  |     | NULL    |       |
| type        | varchar(64)   | YES  | MUL | NULL    |       |
+-------------+---------------+------+-----+---------+-------+
17 rows in set (0.00 sec)

baffled,
.cfg

On Wed, 30 May 2001, Dan B wrote:

> At 06:27 PM 5/30/2001 -0400, you wrote:
> >Well, I did what you said (except that I'd already modified the database
> >beforehand), and for some reason, I cannot get the field to display still.
> >If i click on no meta, I can configure the normal meta options for the
> >field, but for it doesn't show up in my products.  I CAN reference the
> >field using the item-field tag, but I am puzzled at why it doesn't
> >display.
> >
> >If I click 'No Meta Display' again, I see two identical textedit boxes.
> >Are the meta options stored in a file or table I can edit to fix this?
> >
> >thanks,
> >.cfg
>
> Would you mind posting the the first two lines of your products.txt file
> and your dbconf/mysql/products.mysql file?  SHOW TABLE 'products' would be
> handy too.
>
> You do have a products/products.sql file, right?
>
> You're 90% there.
>
> Dan Browning, Cyclone Computer Systems, danb@cyclonecomputers.com
>
> _______________________________________________
> Interchange-users mailing list
> Interchange-users@lists.akopia.com
> http://lists.akopia.com/mailman/listinfo/interchange-users
>