Re: Need help with Shipping/Price discounts

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 21942
interpreted = N
texte = >1. I want the totalshipcost to equal 0.00 when more than 5 products are >ordered. I've tried this in the formulas.db to no avail. > >shipcost [math][showif [quantity]>5]0*[/showif]2.00[/math]shipCost is evaluated once for each individual lineitem, so that would work if someone put a single lineitem in with a qty more than 5. If you want to know the total qty of *all* items in the cart, you'd need to add them all up using [math]. Also, set the unitShipCost formula to 0.0, because you're going to be doing the whole calculation in shipCost instead.shipCost [math show=f]totalQty=[lineitems][quantity]+[/lineitems]0[/math][math][ShowIf [totalQty]>5]0*[/ShowIf]2.00[/math]>2. I want a discount of $5.00 to be taken from the total order when 2 or >more products are ordered, total. Where is the best place for me to code >this? In the formula.db under Price?This is a little harder. I suggest you create a new SKU in your product database, called Discount, with a price of -5.00, and on your invoice template put a [AddLineItem cart=[cart]&sku=Discount] inside a [ShowIf] based on how many products were ordered. This basically adds a new item to the end of your list of products, so make sure it can only happen once (usually doing it on the final invoice page is good enough).Technical Support | ==== eCommerce and Beyond ==== Pacific Coast Software | WebCatalog, WebMerchant, 11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster, San Diego, CA 92128 | Typhoon 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Need help with Shipping/Price discounts (PCS Technical Support 1998)
  2. Need help with Shipping/Price discounts (bradeisenberg@iname.com 1998)
>1. I want the totalshipcost to equal 0.00 when more than 5 products are >ordered. I've tried this in the formulas.db to no avail. > >shipcost [math][showif [quantity]>5]0*[/showif]2.00[/math]shipCost is evaluated once for each individual lineitem, so that would work if someone put a single lineitem in with a qty more than 5. If you want to know the total qty of *all* items in the cart, you'd need to add them all up using [math]. Also, set the unitShipCost formula to 0.0, because you're going to be doing the whole calculation in shipCost instead.shipCost [math show=f]totalQty=[lineitems][quantity]+[/lineitems]0[/math][math][ShowIf [totalQty]>5]0*[/ShowIf]2.00[/math]>2. I want a discount of $5.00 to be taken from the total order when 2 or >more products are ordered, total. Where is the best place for me to code >this? In the formula.db under Price?This is a little harder. I suggest you create a new SKU in your product database, called Discount, with a price of -5.00, and on your invoice template put a [AddLineItem cart=[cart]&sku=Discount] inside a [showif] based on how many products were ordered. This basically adds a new item to the end of your list of products, so make sure it can only happen once (usually doing it on the final invoice page is good enough).Technical Support | ==== eCommerce and Beyond ==== Pacific Coast Software | WebCatalog, WebMerchant, 11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster, San Diego, CA 92128 | Typhoon 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/ PCS Technical Support

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:

PIXO (1997) [WebDNA] 2nd pair of eyes on redirect please (2011) WC2b15 - [HTMLx]...[/HTMLx] problems (1997) A new perspective ... (2005) JavaScript Image Problem (1998) [isfile] ? (1997) template includes encrypted template (1999) Further tests with the infamous shipCost (1997) Database monitoring (2005) One other big addition... (1997) Categories and Sub-categories (2003) problems with 2 tags (1997) [WebDNA] Admin Login Required to Serve any TPL Page (2009) [WebDNA] jumpstart me? - how to auto-upload to a remote server? (2010) Setting up WebCatalog with Retail Pro data (1996) [WebDNA] More wish-list requests implemented (2016) emailer on Windows Beta 18 (1997) quantity minimum problem (1997) .txt file (2000) Case statement (2003)