Showing product description in the email confirmation

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

I woul like to know, what is the modifications that I should do in the S-Mart.cgi script, to make the confirmation sent to the email of the merchant, print the content of the 'descrip' field.

Thanks in advance.

-- Manuel Tavares (mar114@hotmail.com), July 20, 1999

Answers

Hi,

Look for these lines in the "Mail Program".

print MAIL sprintf "%-6.6s", $itemid; print MAIL sprintf "%-18.18s", $itemname; print MAIL sprintf "%13.13s", "\$$itemprice"; print MAIL sprintf "%10.10s", $itemquant; print MAIL sprintf "%18.18s", "\$$tmpprice"; print MAIL "\n"; Change to this.

print MAIL sprintf "%-6.6s", $itemid; print MAIL sprintf "%-18.18s", $itemname; print MAIL sprintf "%13.13s", "\$$itemprice"; print MAIL sprintf "%10.10s", $itemquant; print MAIL sprintf "%18.18s", "\$$tmpprice"; print MAIL "\n"; print MAIL sprintf "%30.30s", $ITEM{'descrip'}; print MAIL "\n";

You will have to change the numbers "%30.30s" to the size you need for your description. There are two "Mail Programs" if you want the description sent to you and the customer you will have to change them both.

Jim

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


Moderation questions? read the FAQ