Passing Variable (was How to add product size)
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 14179
interpreted = N
texte = Am seeking advice on passing a size variable to the shopping cart as afollow up....Grant responded to my question of Oct 22 about adding aproduct size option to my form for products that have more than onesize (see response below). I was doing #3, but #2 makes more sense!But am having problems passing the selected size from my product page tothe shopping cart. I'm calling the form variable size -- i.e.,
and then on the shopping cart I'm trying to show the size immediatelyafter the product name; i.e.,[ProductName] ([size]).Am getting the value showing up on the shopping cart sometimes (Size7instead of Size 7), and other times am simply getting the name of thevariable (i.e., size ).I suspect there's a problem in my HTML form programming (admittedly notmy strong suit)...any advice on getting this straightened out, please?I've spent too many hours on this this, it's getting late, and won't seeany of Monday Nite Football if this continues! :-(Thanks in advance,Daledstokdyk@dvs.mv.com------------------------------------------------------------------------Grant's response:Depending on how many variations you have, this can go several ways. Inallcases, I recommend using [include] to help you maintain consistencythroughoutyour site.1) All products that are sizeable use the exact same list of sizes, andyouhave a database field called [needsSize] that is 'T' or 'F' if theproductneeds a size popup.- --- SizePopup.inc ---Size 5 Size 6 Size 7 Size 8 Then use [ShowIf [needsSize]=T][include SizePopup.inc][/Showif]2) There are just a few different lists of sizesCreate SizePopup1.inc, SizePopup2.inc, SizePopup3.inc, each of whichhavetheunique lists of sizes in them. Add a field to the database called[SizeType]that indicates which type of size poup it needs, 1, 2 or 3Then use [ShowIf [needsSize]=T][includeSizePopup[SizeType].inc][/ShowIf]3) There is a huge variety of size lists, basically unique to eachproductEither put the literal HTML for the whole popup into a field in thedatabase,or create a related database (linked by SKU) that has all the sizelistingsinit for each SKU.Grant Hulbert, V.P. Engineering
Associated Messages, from the most recent to the oldest:
Am seeking advice on passing a size variable to the shopping cart as afollow up....Grant responded to my question of Oct 22 about adding aproduct size option to my form for products that have more than onesize (see response below). I was doing #3, but #2 makes more sense!But am having problems passing the selected size from my product page tothe shopping cart. I'm calling the form variable size -- i.e., and then on the shopping cart I'm trying to show the size immediatelyafter the product name; i.e.,[ProductName] ([size]).Am getting the value showing up on the shopping cart sometimes (Size7instead of Size 7), and other times am simply getting the name of thevariable (i.e., size ).I suspect there's a problem in my HTML form programming (admittedly notmy strong suit)...any advice on getting this straightened out, please?I've spent too many hours on this this, it's getting late, and won't seeany of Monday Nite Football if this continues! :-(Thanks in advance,Daledstokdyk@dvs.mv.com------------------------------------------------------------------------Grant's response:Depending on how many variations you have, this can go several ways. Inallcases, I recommend using [include] to help you maintain consistencythroughoutyour site.1) All products that are sizeable use the exact same list of sizes, andyouhave a database field called [needsSize] that is 'T' or 'F' if theproductneeds a size popup.- --- SizePopup.inc ---Size 5 Size 6 Size 7 Size 8 Then use [ShowIf [needsSize]=T][include SizePopup.inc][/Showif]2) There are just a few different lists of sizesCreate SizePopup1.inc, SizePopup2.inc, SizePopup3.inc, each of whichhavetheunique lists of sizes in them. Add a field to the database called[SizeType]that indicates which type of size poup it needs, 1, 2 or 3Then use [ShowIf [needsSize]=T][includeSizePopup[SizeType].inc][/ShowIf]3) There is a huge variety of size lists, basically unique to eachproductEither put the literal HTML for the whole popup into a field in thedatabase,or create a related database (linked by SKU) that has all the sizelistingsinit for each SKU.Grant Hulbert, V.P. Engineering
Dale Stokdyk
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:
Re:2nd WebCatalog2 Feature Request (1996)
Multiple fields on 1 input (1997)
[DOS] (1999)
Problems with cybercash (2000)
test (2002)
WebCat2b13MacPlugIn - syntax to convert date (1997)
[WebDNA] sum in a search (2009)
sort problems....bug or brain fart? (1997)
Formating found categories (1997)
combining strings (1997)
Interfacing WebMerchant to www.fedex.com (1997)
[WebDNA] Now: Listfields does not work with tables - Was: [OT] MySQL Users (2011)
Questions on Mac WC 3.0.5b13 (2000)
learning PHP (2007)
Happy Holidays! (1998)
unitshipcost vs shipcosts (1997)
suffix mapping, use of cache, etc. (1997)
Summ=T Problem (1997)
how do you and/or in a search? (1997)
getchars broken? (1997)