Re: How can I record purchases to a database?
This WebDNA talk-list message is from 1998
It keeps the original formatting.
numero = 17830
interpreted = N
texte = Thanks for the reply.>The cart number is always available everywhere on a page in which you pass>the cart in the URL. There is no need to do any special contexts or pass>anything in with math. It's just there with [cart], just as if you passed>in fred=1234, and [fred] would be available anywhere on the page.I understand what you are telling me. I AM passing the [cart] in the URL. As I explain below, it is showing up fine elsewhere on the page.If what you say is correct, then I would expect that the following WebDNA would work. [lineitems][append db=NMI_Purchases.db]thisCart=[cart]&lineNum=[lineIndex]&Qty=[quantity]&SKU=[SKU]&ProdName=[ProdName]&Price=[price]&Extension=[format .2f][math][quantity]*[price][/math][/format][/append][/lineItems]This is the second sequence of contexts I tried that successfully looped through the line items and wrote each line's content to a separate record in my purchases.db database. That's most of what I want. It looks like this:thisCart lineNum Qty SKU ProdName Price Extension 1 3 BN-1218 Red Nylon 13.00 39.00 2 2 BN-1218P Red Nylon w/pocket 14.00 28.00On the page containing the WebDNA listed above, the appropriate cart number shows up everywhere but inside the [lineItems] context. As you can see, however, the cart number is not being written to the database.I am assuming that it is clear that I must use the expression thisCart=[cart] in order to assign the cart value to each record in the database. The value must be assigned to a field.If the [cart] value shuld appear anywhere i use it on the page as long as it has been passed to the page in the URL, please tell me what I have done incorrectly.Please be confident that I am not trying to make things difficult or cast WebCatalog or PCS in a bad light. I LOVE working with both. I respect the work you have done, particularly in the latest version. I plan on selling copies of it or stores on my own site to lots of customers. I'm sure I have just overlooked something somewhere. I've been looking at it for so long now, I'm probably overlooking the obvious. Any help would be appreciated . . . even if it's the news that I can't do what I want to do. If that's the case, I'll try something else.ThanksJerryJerry N. Nielsen Voice: (626)351-0201comm$TRUCT Associates Fax: (626)351-0033Managing Consultant Cellular: (818)257-29373835 Landfair RoadPasadena, CA 91107We con$TRUCT commerce sites that work the way YOU want them to!Thought for the day: The longest distance between to points is a shortcut.^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Associated Messages, from the most recent to the oldest:
Thanks for the reply.>The cart number is always available everywhere on a page in which you pass>the cart in the URL. There is no need to do any special contexts or pass>anything in with math. It's just there with
[cart], just as if you passed>in fred=1234, and [fred] would be available anywhere on the page.I understand what you are telling me. I AM passing the
[cart] in the URL. As I explain below, it is showing up fine elsewhere on the page.If what you say is correct, then I would expect that the following WebDNA would work.
[lineitems][append db=NMI_Purchases.db]thisCart=
[cart]&lineNum=[lineIndex]&Qty=[quantity]&SKU=[SKU]&ProdName=[ProdName]&Price=[price]&Extension=[format .2f]
[math][quantity]*[price][/math][/format][/append][/lineItems]This is the second sequence of contexts I tried that successfully looped through the line items and wrote each line's content to a separate record in my purchases.db database. That's most of what I want. It looks like this:thisCart lineNum Qty SKU ProdName Price Extension 1 3 BN-1218 Red Nylon 13.00 39.00 2 2 BN-1218P Red Nylon w/pocket 14.00 28.00On the page containing the WebDNA listed above, the appropriate cart number shows up everywhere but inside the
[lineitems] context. As you can see, however, the cart number is not being written to the database.I am assuming that it is clear that I must use the expression thisCart=
[cart] in order to assign the cart value to each record in the database. The value must be assigned to a field.If the
[cart] value shuld appear anywhere i use it on the page as long as it has been passed to the page in the URL, please tell me what I have done incorrectly.Please be confident that I am not trying to make things difficult or cast WebCatalog or PCS in a bad light. I LOVE working with both. I respect the work you have done, particularly in the latest version. I plan on selling copies of it or stores on my own site to lots of customers. I'm sure I have just overlooked something somewhere. I've been looking at it for so long now, I'm probably overlooking the obvious. Any help would be appreciated . . . even if it's the news that I can't do what I want to do. If that's the case, I'll try something else.ThanksJerryJerry N. Nielsen Voice: (626)351-0201comm$TRUCT Associates Fax: (626)351-0033Managing Consultant Cellular: (818)257-29373835 Landfair RoadPasadena, CA 91107We con$TRUCT commerce sites that work the way YOU want them to!Thought for the day: The longest distance between to points is a shortcut.^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jerry Nielsen
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Updating fields from different platforms (1998)
[WebDNA] WebDNA app store (2011)
WebDNA Solutions ... (1997)
Closed Wait States (2004)
2 databases (2000)
unable to launch acgi in WebCat (1997)
Database Structure? (1998)
using listfiles to build a database? more (2000)
[WebDNA] multi hyperlinks in text paragraphs (2014)
Multiple instances of database (2003)
I have observed and I am gone. (1998)
SSI *nix 4.5 build (2002)
Mac GUI editors (1997)
Upgrading old WebCat Database Files (1997)
Did you hear about this? (1997)
2.0Beta Command Ref (can't find this instruction) (1997)
WebCat2b15MacPlugIn - [authenticate] not [protect] (1997)
Email within tmpl ? (1997)
Using Cookie for client specific info? (1997)
image magick (2003)