Re: ConverChars
This WebDNA talk-list message is from 1999
It keeps the original formatting.
numero = 23817
interpreted = N
texte = >I don't actually want to replace the value in the database itself. I have>simplified the logic to using only one character, so now all I am really>trying to do is something like the following:>>temp1=[ConvertChars db=shapes.db][GetChars>start=1&end=1][style][/GetChars][/ConvertChars]>>I can see temp1 gets the value I expect as it gets displays it on the page.No, actually it's *not* getting the value you think it is, or it would use that value in the link below. It's not getting the value because your code above does not assign temp1 to a value, it simply displays a value on the page, next to a string of text that looks like temp1=.If you really want that value assigned to a variable named temp1, you have to use a [text] context, like this:[text]temp1=[ConvertChars db=shapes.db][GetChars start=1&end=1][style][/GetChars][/ConvertChars][/text]Then when you use the [temp1] tag somewhere further on down the page, it will have an actual value, which means your link will probably work properly, assuming there's an actual record in your db with the sku you're referring to. But if the dynamic SKU you're creating does not appear in the db to begin with, you'll have to make some more changes before this will work:
add to cartSincerely,Ken GromeWebDNA Consultant
Associated Messages, from the most recent to the oldest:
>I don't actually want to replace the value in the database itself. I have>simplified the logic to using only one character, so now all I am really>trying to do is something like the following:>>temp1=[ConvertChars db=shapes.db][GetChars>start=1&end=1][style][/GetChars][/ConvertChars]>>I can see temp1 gets the value I expect as it gets displays it on the page.No, actually it's *not* getting the value you think it is, or it would use that value in the link below. It's not getting the value because your code above does not assign temp1 to a value, it simply displays a value on the page, next to a string of text that looks like temp1=.If you really want that value assigned to a variable named temp1, you have to use a
[text] context, like this:
[text]temp1=[ConvertChars db=shapes.db][GetChars start=1&end=1][style][/GetChars][/ConvertChars][/text]Then when you use the [temp1] tag somewhere further on down the page, it will have an actual value, which means your link will probably work properly, assuming there's an actual record in your db with the sku you're referring to. But if the dynamic SKU you're creating does not appear in the db to begin with, you'll have to make some more changes before this will work:
[cart]&db=catalog.db>add to cartSincerely,Ken GromeWebDNA Consultant
Kenneth Grome
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:
WebCat2b13MacPlugIn - [showif][search][/showif] (1997)
Accepting credit cards (1997)
WebCat2b13MacPlugIn - [showif][search][/showif] (1997)
6.0 Serial - Moving to New Server (2004)
Shopping cart now bad (1997)
Replace context problem ... (1997)
Changing in a founditems tag (1999)
No luck with taxes (1997)
Quickie question on the email templates (1997)
All of a Sudden Type 2 errors (1999)
unable to launch acgi in WebCat (1997)
HTML editing and webcatalog (2000)
[WebDNA] Why doesn't this returnraw redirect to the new page? (2009)
Locking up with WebCatalog... (1997)
[WebDNA] WebDNA History (2012)
WebCat Beta NT 18 (1997)
Multiple Ad databases? (1997)
different ship dates and shopping carts -- how to? (1997)
Greeting Card System (2000)
Search results templates (1996)