Re: quantity minimum problem

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 12411
interpreted = N
texte = >Perhaps I am making this out to be more complicated than it is.It sounds about right to me. HTML aften forces things to be more complicated than any of us would like, though.>To cut to the chase, all I really want is for certain products to have >quantity minimums, when reaching the invoice.tmpl page which shows the >cart that they are about to purchase.Yes, and my technique does this, as far as I can tell. It cleans up any bad numbers the visitor entered on the previous page, and changes the order file before they see it displayed.>On the cart.tmpl page, there is a option for the quantity. For >certain items, they have to put in a minimum. But of course, there are >going to be people who will put in less than the minimum. I want to be able >to prevent this by having a default quantity that shows up on the >invoice.tmpl page, if they indeed put in less than they are supposed to.Yes, and if they type in a number too small, you can't do anything about it until they arrive at the next page.>This means I should have the quantity permanently set on the cart.tmpl page >instead of the inovice.tmpl page. I assume then that I have to do something >a certain field on my store.tmpl (where all my products are listed) page so >that the quantities on the cart.tmpl page, show up correctly.I suggest you add an extra field to your product database that indicates the minimum order quantity for that product. That way you can pre-type the minimum number into the textarea field. Then of course later you must verify they didn't type a lower number, so there you must bump the number up to the minimum after you learn what number they typed.I've never seen your sequence of pages, so I'll guess the order from what you've said:New catalog database field called minimum-- cart.tmpl -- [lineitems] [/lineItems]-- invoice.tmpl -- [lineitems] [showif [quantity]<[minimum]] [SetLineItem cart=[cart]&index=[lineindex]&db=catalog.txt]quantity=[minimum][/SetLineItem] [/showif] [/lineitems] [OrderFile ShoppingCarts/[cart]] [lineitems] ...[sku], [price], [quantity] [/lineitems] [/OrderFile]WebCatalog should be smart enough to see that [minimum] tag and realize that inside the context of a [lineitems] loop, it should go look up the database value that corresponds to that particular lineitem's sku, and return the field value for [minimum]. If it's not smart enough to do that, then you may need to change that to a [lookup] that explicitly performs a lookup for the sku of that lineitem.In case anyone was wondering why we require you to specify a database when you $Add to your shopping cart, that's why: WebCatalog needs to know what database to look in when it's trying to display things like [title] or [description] inside a lineitems loop. It can't just guess what those values are, because for all we know, you have dozens of different stores with their own databases.Grant Hulbert, V.P. Engineering | ===== Tools for WebWarriors ===== Pacific Coast Software | WebCatalog Pro, WebCommerce Solution 11770 Bernardo Plaza Court | SiteEdit Pro, SiteCheck, PhotoMaster San Diego, CA 92128 | SiteGuard 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com Associated Messages, from the most recent to the oldest:

    
  1. Re: quantity minimum problem (Grant Hulbert 1997)
  2. Re: quantity minimum problem (Kevin Furuta 1997)
  3. Re: quantity minimum problem (Grant Hulbert 1997)
  4. Re: quantity minimum problem (Kevin Furuta 1997)
  5. Re: quantity minimum problem (Grant Hulbert 1997)
  6. Re: quantity minimum problem (Kevin Furuta 1997)
  7. Re: quantity minimum problem (Kenneth Grome 1997)
  8. quantity minimum problem (Kevin Furuta 1997)
>Perhaps I am making this out to be more complicated than it is.It sounds about right to me. HTML aften forces things to be more complicated than any of us would like, though.>To cut to the chase, all I really want is for certain products to have >quantity minimums, when reaching the invoice.tmpl page which shows the >cart that they are about to purchase.Yes, and my technique does this, as far as I can tell. It cleans up any bad numbers the visitor entered on the previous page, and changes the order file before they see it displayed.>On the cart.tmpl page, there is a option for the quantity. For >certain items, they have to put in a minimum. But of course, there are >going to be people who will put in less than the minimum. I want to be able >to prevent this by having a default quantity that shows up on the >invoice.tmpl page, if they indeed put in less than they are supposed to.Yes, and if they type in a number too small, you can't do anything about it until they arrive at the next page.>This means I should have the quantity permanently set on the cart.tmpl page >instead of the inovice.tmpl page. I assume then that I have to do something >a certain field on my store.tmpl (where all my products are listed) page so >that the quantities on the cart.tmpl page, show up correctly.I suggest you add an extra field to your product database that indicates the minimum order quantity for that product. That way you can pre-type the minimum number into the textarea field. Then of course later you must verify they didn't type a lower number, so there you must bump the number up to the minimum after you learn what number they typed.I've never seen your sequence of pages, so I'll guess the order from what you've said:New catalog database field called minimum-- cart.tmpl -- [lineitems] [/lineItems]-- invoice.tmpl -- [lineitems] [showif [quantity]<[minimum]] [SetLineItem cart=[cart]&index=[lineindex]&db=catalog.txt]quantity=[minimum][/SetLineItem] [/showif] [/lineitems] [OrderFile ShoppingCarts/[cart]] [lineitems] ...[sku], [price], [quantity] [/lineitems] [/OrderFile]WebCatalog should be smart enough to see that [minimum] tag and realize that inside the context of a [lineitems] loop, it should go look up the database value that corresponds to that particular lineitem's sku, and return the field value for [minimum]. If it's not smart enough to do that, then you may need to change that to a [lookup] that explicitly performs a lookup for the sku of that lineitem.In case anyone was wondering why we require you to specify a database when you $Add to your shopping cart, that's why: WebCatalog needs to know what database to look in when it's trying to display things like [title] or [description] inside a lineitems loop. It can't just guess what those values are, because for all we know, you have dozens of different stores with their own databases.Grant Hulbert, V.P. Engineering | ===== Tools for WebWarriors ===== Pacific Coast Software | WebCatalog Pro, WebCommerce Solution 11770 Bernardo Plaza Court | SiteEdit Pro, SiteCheck, PhotoMaster San Diego, CA 92128 | SiteGuard 619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com Grant Hulbert

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:

WebCat2b12 CGI Mac - [shownext] problem (1997) WebDNA creates DUPLICATE SHOPPING CART NUMBERS (2004) Problems mit mysql (2004) So many lookers, hey smith micro (2003) WebCat2b15MacPlugin - [protect] (1997) modified storedbuilder (was: show me your store) (2003) [WebDNA] Question about server performance ... (2008) Announcement-WebCatalog 2.0 Released (1997) [WebDNA] Error 500 with SUMM=T (2017) Best way to handle 404 errors with WebDNA and Web* V (2003) emailer (1997) Cart Number sequence (1997) Forms Search Questions (1997) Emailer Timing out (1999) Malformed Pages (1999) Writefile outside WebSTAR hierarchy? (1997) [LOOKUP] (1997) What is this error message? (2006) PCS Emailer's role ? (1997) HTML encoding in URLs (1997)