Re: removelineitems

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 32460
interpreted = N
texte = On your shoppingcart page you said you have this code:******* Your Shopping Cart[Include file=Fresh_Header.inc] [removelineitem cart=[cart]&index=[lineindex]&sku=2168][text]basket=[math]0[lineitems]+[quantity][/lineitems][/math][/text] [SetHeader cart=[cart]]header40=[basket][/SetHeader]lineindex=[lineindex] basket=[basket]
header40=[header40]

Shopping Cart

You have just added an item to your shopping cart. blah blah blah...*******So then what do you get for this line- lineindex=[lineindex] ?-John chas wrote:> --- You wrote: > but then where is the value of [lineindex] in that [removelineitem] coming from? Are > you passing it from the previous page Chas? > How does that [removelineitem] know to remove only that discount lineitem? (I don't > see from the code Chas posted where he is getting the proper value for [lineindex] > from?) > > -John > --- end of quote --- > > pretty mysterious to me as well...I'm seem not to be passing any value > > I am guessing that the value of the [lineindex] is held in some variable since it is the last line of the Invoice.tpl. If someone goes back to the shoppingcart.tpl then here's what happens: > > > > > > Your Shopping Cart > > [Include file=Fresh_Header.inc] > > [removelineitem cart=[cart]&index=[lineindex]] > > this removes the - value discount line. > > but... > > If a customer does the following things leaving a discounted invoice.tpl > > 1 - Change Quantities or Shipping = the - value discount line is flushed out first thing on shoppingcart.tpl > great! > > 2- shop some more = the old - value discount line is flushed out when the shoppingcart.tpl is reached. > this is OK. > > 3 - Back on the browser from Invoice.tpl to Shoppingcart.tpl = the - value discount line is of course not visible.. (but its in the cart) > 1a- Then if you go forward on the browser another discount line is added AND the quantity value of the first - value discount jumps to it's [lineindex] value. This is a problem... > > Obviously, I can manually remove the line... But I would like it if no matter how many time a person changes the quantity of selection, that the appropriate discount comes up. And if I can be certain of the the value of that - discount value I can do it. > > TIA > > Charley Conquest > Fresh Music > > Here is the code on the Invoice.tpl that adds the discount in the first place. > >

Final Invoice

> [ Change Quantities or Shipping | > Shop Some More ]
>

Your Final Invoice Contains the Following Items

> Your Order Number is #[cart]

> > [addlineitem cart=[cart]&sku=2168&db=products.db&]password=dude66&textD=[URL]Fresh Discount[/URL]&quantity=1&price=[lookup db=discount.db&value=[header40]&lookInField=quant&returnField=discamnt¬Found=nope][/addlineitem] > > #2168 is a unique discount sku > > C > > ------------------------------------------------------------- > 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: removelineitems (chas@valley.net (chas) 2000)
  2. Re: removelineitems (John Butler 2000)
  3. Re: removelineitems (chas@valley.net (chas) 2000)
  4. Re: removelineitems (John Butler 2000)
  5. Re: removelineitems (chas@valley.net (chas) 2000)
  6. Re: removelineitems (John Butler 2000)
  7. Re: removelineitems (Kenneth Grome 2000)
  8. Re: removelineitems (chas@valley.net (chas) 2000)
  9. Re: removelineitems (John Butler 2000)
  10. Re: removelineitems (John Butler 2000)
  11. Re: removelineitems (chas@valley.net (chas) 2000)
  12. removelineitems (chas@valley.net (chas) 2000)
On your shoppingcart page you said you have this code:******* Your Shopping Cart[Include file=Fresh_Header.inc] [removelineitem cart=[cart]&index=[lineindex]&sku=2168][text]basket=[math]0[lineitems]+[quantity][/lineitems][/math][/text] [SetHeader cart=[cart]]header40=[basket][/SetHeader]lineindex=[lineindex] basket=[basket]
header40=[header40]

Shopping Cart

You have just added an item to your shopping cart. blah blah blah...*******So then what do you get for this line- lineindex=[lineindex] ?-John chas wrote:> --- You wrote: > but then where is the value of [lineindex] in that [removelineitem] coming from? Are > you passing it from the previous page Chas? > How does that [removelineitem] know to remove only that discount lineitem? (I don't > see from the code Chas posted where he is getting the proper value for [lineindex] > from?) > > -John > --- end of quote --- > > pretty mysterious to me as well...I'm seem not to be passing any value > > I am guessing that the value of the [lineindex] is held in some variable since it is the last line of the Invoice.tpl. If someone goes back to the shoppingcart.tpl then here's what happens: > > > > > > Your Shopping Cart > > [Include file=Fresh_Header.inc] > > [removelineitem cart=[cart]&index=[lineindex]] > > this removes the - value discount line. > > but... > > If a customer does the following things leaving a discounted invoice.tpl > > 1 - Change Quantities or Shipping = the - value discount line is flushed out first thing on shoppingcart.tpl > great! > > 2- shop some more = the old - value discount line is flushed out when the shoppingcart.tpl is reached. > this is OK. > > 3 - Back on the browser from Invoice.tpl to Shoppingcart.tpl = the - value discount line is of course not visible.. (but its in the cart) > 1a- Then if you go forward on the browser another discount line is added AND the quantity value of the first - value discount jumps to it's [lineindex] value. This is a problem... > > Obviously, I can manually remove the line... But I would like it if no matter how many time a person changes the quantity of selection, that the appropriate discount comes up. And if I can be certain of the the value of that - discount value I can do it. > > TIA > > Charley Conquest > Fresh Music > > Here is the code on the Invoice.tpl that adds the discount in the first place. > >

Final Invoice

> [ [cart]>Change Quantities or Shipping | > [cart]>Shop Some More ]
>

Your Final Invoice Contains the Following Items

> Your Order Number is #[cart]

> > [addlineitem cart=[cart]&sku=2168&db=products.db&]password=dude66&textD=[url]Fresh Discount[/URL]&quantity=1&price=[lookup db=discount.db&value=[header40]&lookInField=quant&returnField=discamnt¬Found=nope][/addlineitem] > > #2168 is a unique discount sku > > C > > ------------------------------------------------------------- > 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 Butler

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:

WebCatalog2 Feature Feedback (1996) WebDNA version? (2007) Displaying text and populating form fields (again) (2005) Re:no [search] with NT (1997) Nested tags count question (1997) [shownext max=?] armed (1997) WebMerchant? (1998) New Site WebCat (1997) japanese characters (1997) Determining Method (2000) Spamming this list! (2000) adding up in a db (1997) Authenticate (1999) frames & carts (1997) [shownext max=?] armed (1997) Weird problems with [SHOWIF]s (1997) looking for developers with solutions (2000) Sort Order on a page search (1997) Bug Report, maybe (1997) For those of you not on the WebCatalog Beta... (1997)