RE: Cart Template
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 13124
interpreted = N
texte = Wayne ->I trying to create a shopping cart template that will include a Price +>Shipping&Handling column and then have this column summed up correctly in>the grand total. To do this, I tried using the following math formula in>the Price + Shipping&Handling column:
$[format>.2f][math]{shipcost]+[price][/math][/format] | >The [shipcost] is deternimed on our products page. Each product on our>product page has two radio buttons. The first button is titled US and the>second is named International. Our users will have to click on one of these>buttons to determine their shipping cost. The name of the variables for>both buttons are shipcost. The predefine values of the shipcost>variable is then passed on to the cart template via a form.>My problem is that I cannot get the grand-total on the cart template to>reflect the correct answer when the products selected are itemized and>summed up on the cart template. Is there a way to add the shipping cost>for each product to the price and have it summed in the grand-total.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).I hope this helps,Marc EagleStarNine Technologieshttp://www.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Wayne ->I trying to create a shopping cart template that will include a Price +>Shipping&Handling column and then have this column summed up correctly in>the grand total. To do this, I tried using the following math formula in>the Price + Shipping&Handling column:
$[format>.2f][math]{shipcost]+[price][/math][/format] | >The [shipcost] is deternimed on our products page. Each product on our>product page has two radio buttons. The first button is titled US and the>second is named International. Our users will have to click on one of these>buttons to determine their shipping cost. The name of the variables for>both buttons are shipcost. The predefine values of the shipcost>variable is then passed on to the cart template via a form.>My problem is that I cannot get the grand-total on the cart template to>reflect the correct answer when the products selected are itemized and>summed up on the cart template. Is there a way to add the shipping cost>for each product to the price and have it summed in the grand-total.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).I hope this helps,Marc EagleStarNine Technologieshttp://www.smithmicro.com/
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:
WebCatalog on Linux/MacOSX/etc (2000)
Duplicate Cart ID (2001)
New syntax feedback for 4.0 (2000)
Dummy Credit Card Number for debug? (1997)
Price override - solved (2004)
Menu to select product variations (1997)
Generating unique SKU from [cart] - FIXED! (1997)
Re[2]: Strange database format import (2000)
WebMerchant & CC Response (2002)
[WebDNA] [OT] WebDNA Wiki - need grammar check / suggestions (2009)
WC1.6 to WC2 date formatting (1997)
In Digest Dijon (2000)
Is everybody getting all the posts? (2002)
Re:2nd WebCatalog2 Feature Request (1996)
[WebDNA] El Capitan with WebDNA 8.1 fastCGI (2015)
[BULK] [WebDNA] New Webdna framework ! ... (addresses some initial concerns... coming into the design of a large project) (2012)
Monthly Reports (2000)
New Web Site Developers Database (1996)
Textarea Breaks (2000)
[format xs] freeze (1997)