RE: Cart Template

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 13159
interpreted = N
texte = Wayne -Rather than trying to add/set the [unitshipcost] directly from a form, what you'd want to do is take a variable that is either set to USA or International, then have a [unitshipcost] line in your formulas.db that checks to see if the variable is one or the other, then returns the appropriate value. I just did this, with something likeunitShipCost [showif [dest]=Int]8[/showif][hideif [dest]=Int]2[/hideif]The reason you can't directly set the unit ship cost from a form action is the same reason you can't set the price: if you could, browser could 'hack' the forms/URLs and change the prices/shipping on items at will. By doing the changes in your formulas.db (or by using contexts on a webcatalog page), you're manipulating prices in a way that cannot be affected by browser actions.I hope this helps,Marc Eagle StarNine Technologies http://www.smithmicro.com/ >Mark Wrote: >If you're doing shipping and handling for each product, use [unitshipcost] >instead. You can put the value (or a formula) in either the product >database or in formulas.db, you can put it into the shopping cart either >when you add the product or with a [setlineitem] context, you can display >it on the invoice page, and it should be added to the Grand Total correctly >(remember that the UnitShipCost won't be taxed unless you do some trickery >to add it to the price or something). > >Mark, >Can I add the value to [unitshipcost] to shopping cart and invoice page by >using a form element such as the following line which is used in the form >that adds the the product to the cart template. >
action=action=/WebCatalog/100h3o_storeinvoice/001h3o_shopcart.tmpl$add> > USA > International > >
>By using the above form elements I can have two different [unitshipcost] >values. The first [unitshipcost] value of $2.00 would be for our USA >customers and the second [unitshipcost] value of $8.00 would be for our >International customers. >I saw a company who was using your WebCatalog do this. But when I tried >it, I got an error message saying I do not have authorization to change >price. >Wayne M. Associated Messages, from the most recent to the oldest:

    
  1. RE: Cart Template (Marc Eagle 1997)
  2. RE: Cart Template (Wayne Morishige 1997)
  3. RE: Cart Template (Marc Eagle 1997)
Wayne -Rather than trying to add/set the [unitshipcost] directly from a form, what you'd want to do is take a variable that is either set to USA or International, then have a [unitshipcost] line in your formulas.db that checks to see if the variable is one or the other, then returns the appropriate value. I just did this, with something likeunitShipCost [showif [dest]=Int]8[/showif][hideif [dest]=Int]2[/hideif]The reason you can't directly set the unit ship cost from a form action is the same reason you can't set the price: if you could, browser could 'hack' the forms/URLs and change the prices/shipping on items at will. By doing the changes in your formulas.db (or by using contexts on a webcatalog page), you're manipulating prices in a way that cannot be affected by browser actions.I hope this helps,Marc Eagle StarNine Technologies http://www.smithmicro.com/ >Mark Wrote: >If you're doing shipping and handling for each product, use [unitshipcost] >instead. You can put the value (or a formula) in either the product >database or in formulas.db, you can put it into the shopping cart either >when you add the product or with a [setlineitem] context, you can display >it on the invoice page, and it should be added to the Grand Total correctly >(remember that the UnitShipCost won't be taxed unless you do some trickery >to add it to the price or something). > >Mark, >Can I add the value to [unitshipcost] to shopping cart and invoice page by >using a form element such as the following line which is used in the form >that adds the the product to the cart template. >
action=action=/WebCatalog/100h3o_storeinvoice/001h3o_shopcart.tmpl$add> > USA > International > >
>By using the above form elements I can have two different [unitshipcost] >values. The first [unitshipcost] value of $2.00 would be for our USA >customers and the second [unitshipcost] value of $8.00 would be for our >International customers. >I saw a company who was using your WebCatalog do this. But when I tried >it, I got an error message saying I do not have authorization to change >price. >Wayne M. Marc Eagle

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:

Hosting Service (1998) Mac 3.0.5b11 PI -- template cache and aliases (1999) Misunderstanding?? (1997) OT: Verbose messages - Web*4.2 (2000) Can webcat 3.0/4.0 handle 1,000,000 hits a day? (2000) [WebDNA] MD5 Hash issue (2009) WebDNA color code chart - oops (2002) [WebDNA] Tcpconnect to UPS - Error: couldn't connect to host (2010) OT: WebSTAR Modify Rules (2006) Need help with emailer- 2 issues (1997) Webcatalog 4.0 on Mac OS & WebStar (2000) Encrypt question. (2000) Multiple catalog databases and showcart (1997) Separate SSL Server (1997) beta 5 - OS X install issue (2000) Help name our technology! (1997) Nav. 4 probs with cart (1997) Looking for WebCat web hoster in Chicago/Illinois/Midwest (2000) listfiles, moving files (1998) Changing buttons (1999)