Turning Your database into a autoresponder catalog?

greenspun.com : LUSENET : S-Mart Shopping Cart : One Thread

Here's a fun one for all of you CGI Guru's...

What I Want to do is this...

I want to take my s-mart database file (the file that holds my inventory) and some how make it so I can have an autoresponder READ the file, format it a little and then send it out as a e-mail catalog..

Here's what I have...

The autoresponder is on my system so somehow I need something to just read the file and basicly take it from this look:

6966|Item 1|65.00|Great Item|1/item1.jpg|||stuff| 6967|Item 2|60.00|Super Item|1/item2.jpg|||stuff| 6968|Item 3|60.00|Awesome Item|1/item3.jpg|||stuff|

To Something Like This...

6966|Item 1|65.00|Great Item 6967|Item 2|60.00|Super Item 6968|Item 3|60.00|Awesome Item

Removing the last few fields... I Also Need to add some text to the top and bottom of this Autoresponder.

So Maybe Something Like This...

Hello and thanks for requestion our catalog if you would like to see all images in full color visit our webpage http://www.mypage.com or feel free to call us at 1-800-555-1212

Item # | Item Name | Item Price $| Item Description

<>

Again Thanks For Requesting our catalog.

I Put <> Where The Catalog Would Go And Text Above And Below...

And Anytime someone requests a catalog it will read the current demo.db file to send a current catalog. (my catalog changes many times every day)

So How Can this Be Done? ANY ONE?

Thanks In Advance For Putting your brains to work! Greg

-- Greg (autographs@combase.com), July 25, 1999

Answers

Hi,

If you are useing the catalog generated pages that is already calling your "demo.db" file. If you want to send someone a catalog you could copy the send mail part of the cgi and modify it to call the list all items. Change the sub routine to send_catalog. Then on your web site have a button and a input box to enter there e-mail for a catalog. The button will call the send_catalog sub routine. They will get a catalog that will look just like your list all items page. You do not need to use your autoresponder if you set it up like this. If you would like to try it let me know I will help you to set it up.

Jim

-- James L. Farmer (jim@team-blankets.com), July 29, 1999.


Moderation questions? read the FAQ