Re: Problem 2 of 2 (was: Shipping Confusion)

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 33713
interpreted = N
texte = Sorry I didn't get back to you last week; I was out of the office due to the birth of my son.I was vague in my original response, partly because I dislike handing out the entire answer; you will learn more by banging around and making mistakes than you will by my providing a complete answer.Both of your issues here can be dealt with by the [lineitems] and [hideif] contexts. Within your [lineitems] context, you can chose which lines you wish to display by testing the SKU. For example, if you wrap all of your lineitem fields with [hideif [SKU]=TUBE]....[/hideif], then the line item you added for a shipping tube doesn't display (but its cost will be added in the suntotal).To get the shipping tube line in the cart in the first place, you can put a [lineitems] context anywhere on any page prior to the final invoice. I put things like this on the page where I am getting their user information, but before the invoice page. One thing you may not realize is that in an order context, you can have many [lineitem] contexts. One at the top have one which doesn't display anything, yet adds a line item; one at the bottom which displays the lines, but suppresses the shipping tube display. Actually I would display it, but as an additional shipping charge at the bottom of the invoice.And, to show you that there is almost always more than one way to do it, you could instead set the ShipCost to be $5 for the entire shipment, if you find any posters in the [lineitems] context.Hope this helps get those neurons firing...John PeacockChristopher Mackay wrote: > > My second issue is calculating shipping costs. We're selling books, > whose shipping is $5/book. Simple. We're also selling posters. The > mailing tubes cost $5 to ship, too, but people can order multiple > copies of one poster or single copies of different posters -- all of > which can go into the same $5 tube. Right now, it would cost a cost > of $20 to ship 4 posters, which is absurd. > > John Peacock had this suggestion, which a) I don't know how to > implement and b) will have customers complaining that they only want > to buy the posters -- not mailing tubes: > > Set the UnitShipCost for the posters to be $0 and then scan the cart for > any posters on the page just before you purchase. I would add a new > line item for the Poster Shipping Tube instead of trying to mess with > the shipping. Then if the person bought posters and books, you would > have shipping for books in shipping and the Poster Tube as a seperate > line item. > > For now, I think I'd settle for this solution if I could figure out > how to make it work! How does one search the lineitems and add a > lineitem based on the result? The logic is simple enough, but I'm > having a hard time with it... > > Here's a simplified version of the code I've got at this point on my > invoice.tpl: > > [orderfile cart=[cart]] > > [SetHeader > cart=[cart]]shipVia=[url][__shipVia][/url]&shipToState=[url][__shipToState][/url]&CartIPAddress=[ipAddress][/SetHeader] > > [lineitems] > [SetLineItem > cart=[cart]&index=[lineindex]]quantity=[interpret][quantity[lineindex]][/interpret]&textA=[url][lookup > db=tantramar_publishing.db&lookinfield=sku&value=[url][sku][/url]&returnfield=title][/url][/SetLineItem] > [/lineitems] > >

Final Invoice

> >

HREF=shoppingcart.tpl?command=showcart&db=tantramar_publishing.db&cart=[cart]>Change > Quantities, Shipping, or Shipping destination | > Shop Some More

> >

Your Final Invoice Contains the Following Items:

> >

Your Order Number is #[cart]

> >
> > > > [lineItems] > > > > > > > > > [/lineItems] > > > > > > > > > > > > > > > > > > > >
[lineIndex][quantity][sku][textA]$[price]$[format .2f][math][quantity]*[price][/math][/format]
Subtotal$[subTotal]
[ShipTostate] Tax Rate: [taxRate]%$[taxTotal]
Shipping & Handling
> (all items shipped via [shipVia])
$[shippingTotal]
Grand Total$[grandTotal]
> >

Please enter the following information so that we may process your order.

> >

> > [include file=invoiceinfo.inc] > >

>

>
> > [/orderfile] > -- > > Regards, > > Christopher Mackay, Multimedia Developer > Tantramar Interactive, http://www.tantramar.com/ > 506/364-1097 cell: 364-7659 fax: 536-2409 > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > Web Archive of this list is at: http://search.smithmicro.com/------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Problem 2 of 2 (was: Shipping Confusion) (Christopher Mackay 2000)
  2. Re: Problem 2 of 2 (was: Shipping Confusion) (Christopher Mackay 2000)
  3. Re: Problem 2 of 2 (was: Shipping Confusion) (Rob Marquardt 2000)
  4. Re: Problem 2 of 2 (was: Shipping Confusion) (John Peacock 2000)
  5. Re: Problem 2 of 2 (was: Shipping Confusion) (John Butler 2000)
  6. Re: Problem 2 of 2 (was: Shipping Confusion) (Christopher Mackay 2000)
  7. Re: Problem 2 of 2 (was: Shipping Confusion) (John Peacock 2000)
  8. Re: Problem 2 of 2 (was: Shipping Confusion) (Christopher Mackay 2000)
  9. Re: Problem 2 of 2 (was: Shipping Confusion) (John Butler 2000)
  10. Problem 2 of 2 (was: Shipping Confusion) (Christopher Mackay 2000)
Sorry I didn't get back to you last week; I was out of the office due to the birth of my son.I was vague in my original response, partly because I dislike handing out the entire answer; you will learn more by banging around and making mistakes than you will by my providing a complete answer.Both of your issues here can be dealt with by the [lineitems] and [hideif] contexts. Within your [lineitems] context, you can chose which lines you wish to display by testing the SKU. For example, if you wrap all of your lineitem fields with [hideif [SKU]=TUBE]....[/hideif], then the line item you added for a shipping tube doesn't display (but its cost will be added in the suntotal).To get the shipping tube line in the cart in the first place, you can put a [lineitems] context anywhere on any page prior to the final invoice. I put things like this on the page where I am getting their user information, but before the invoice page. One thing you may not realize is that in an order context, you can have many [lineitem] contexts. One at the top have one which doesn't display anything, yet adds a line item; one at the bottom which displays the lines, but suppresses the shipping tube display. Actually I would display it, but as an additional shipping charge at the bottom of the invoice.And, to show you that there is almost always more than one way to do it, you could instead set the ShipCost to be $5 for the entire shipment, if you find any posters in the [lineitems] context.Hope this helps get those neurons firing...John PeacockChristopher Mackay wrote: > > My second issue is calculating shipping costs. We're selling books, > whose shipping is $5/book. Simple. We're also selling posters. The > mailing tubes cost $5 to ship, too, but people can order multiple > copies of one poster or single copies of different posters -- all of > which can go into the same $5 tube. Right now, it would cost a cost > of $20 to ship 4 posters, which is absurd. > > John Peacock had this suggestion, which a) I don't know how to > implement and b) will have customers complaining that they only want > to buy the posters -- not mailing tubes: > > Set the UnitShipCost for the posters to be $0 and then scan the cart for > any posters on the page just before you purchase. I would add a new > line item for the Poster Shipping Tube instead of trying to mess with > the shipping. Then if the person bought posters and books, you would > have shipping for books in shipping and the Poster Tube as a seperate > line item. > > For now, I think I'd settle for this solution if I could figure out > how to make it work! How does one search the lineitems and add a > lineitem based on the result? The logic is simple enough, but I'm > having a hard time with it... > > Here's a simplified version of the code I've got at this point on my > invoice.tpl: > > [orderfile cart=[cart]] > > [SetHeader > cart=[cart]]shipVia=[url][__shipVia][/url]&shipToState=[url][__shipToState][/url]&CartIPAddress=[ipaddress][/SetHeader] > > [lineitems] > [SetLineItem > cart=[cart]&index=[lineindex]]quantity=[interpret][quantity[lineindex]][/interpret]&textA=[url][lookup > db=tantramar_publishing.db&lookinfield=sku&value=[url][sku][/url]&returnfield=title][/url][/SetLineItem] > [/lineitems] > >

Final Invoice

> >

HREF=shoppingcart.tpl?command=showcart&db=tantramar_publishing.db&cart=[cart]>Change > Quantities, Shipping, or Shipping destination | > [cart]>Shop Some More

> >

Your Final Invoice Contains the Following Items:

> >

Your Order Number is #[cart]

> >
> [cart]> > > > [lineitems] > > > > > > > > > [/lineItems] > > > > > > > > > > > > > > > > > > > >
[lineIndex][quantity][sku][textA]$[price]$[format .2f][math][quantity]*[price][/math][/format]
Subtotal$[subTotal]
[ShipTostate] Tax Rate: [taxRate]%$[taxTotal]
Shipping & Handling
> (all items shipped via [shipVia])
$[shippingTotal]
Grand Total$[grandTotal]
> >

Please enter the following information so that we may process your order.

> >

> > [include file=invoiceinfo.inc] > >

>

>
> > [/orderfile] > -- > > Regards, > > Christopher Mackay, Multimedia Developer > Tantramar Interactive, http://www.tantramar.com/ > 506/364-1097 cell: 364-7659 fax: 536-2409 > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > Web Archive of this list is at: http://search.smithmicro.com/------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ John Peacock

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:

uploads (2000) Searching multiple Databases (1997) NT Setup (1998) Review comparison by PC Magazine: Open for On-line Business (1997) WC 2.0 frames feature (1997) IP lookup tool via tcpconnect (2002) ListVariables Problem (2003) !@#$$@@# formulas database, tax and freight. (2002) WebDelivery downloads alias, not original ? (1997) WC2b15 File Corruption (1997) Re:Emailer tracking (1997) Re[2]: Balancing randomness (2000) New Image Gallery using WebDNA and ImageMagick (2003) [ShowNext] (1997) emailer settings and control questions (1997) Items XX to XX shown (1997) show all problem (1997) Email notification to one of multiple vendors ? (1997) Fun with Dates - finally resolved but.... (1997) PIXO support (1997)