Re: [include ...] behavior
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 13860
interpreted = N
texte = Thanks, Grant. I have a few questions and I'm including the specific codebelow.At 2:07 AM 10/10/97, you wrote:>>What kind of reasons might there be this scenario: an [include ...] to not>>work properly but the pasting the exact contents of that included functions>>fine?>>Depends on what you're trying to do. Can you be more specific? I'll rub>my crystal monitor here and imagine...>>1) You're using an [include] inside a math expression, and you use BBEdit>to create the include file>2) You've nested the [include]s really really deep>3) Your included file uses [cart], and for some reason the cart# just>doesn't make it through>>Answers:>1) BBEdit has the annoying habit of adding an extra carriage return to the>end of a file, thus messing up the [math] context because carriage return>is illegalI am using BBEdit. This info helps, and I definitely notice that behavior,but it didn't resolve the problem.>2) Stack space being limited, the [include] just uses up so much that>there's none left, and can't execute any more WebDNAI am nesting includes. How deep is really really deep? Is there a way toadjust stack space? Is there a way to know when this takes place other thanby guessing based on incorrect results?>3) Change it to [include file=xx&cart=[cart]]Didn't change things.Here's my code, along with commentary about the part that is not working.(In our store, there are different prices for nonsubscribers andsubscribers, as well as quantity pricing, which is available to both):*** in ShoppingCart.tmpl ******************************[orderfile cart=[cart]]nosub: [format .2f][math]0[lineitems]+([math][quantity]*[includeincs/nosubpricecalc.inc][/math])[/lineitems][/math][/format]
sub(inc): [format .2f][math]0[lineitems]+([math][quantity]*[includefile=incs/subpricecalc.inc&cart=[cart]][/math])[/lineitems][/math][/format]
sub(spelledout): [format .2f][math]0[lineitems]+([math][quantity]*[SHOWIF[lookupdb=upline.db&lookInField=sku&value=[sku]&returnField=subprice]>[includeIncs/nosubpricecalc.inc]][include Incs/nosubpricecalc.inc][/SHOWIF][HIDEIF[lookupdb=upline.db&lookInField=sku&value=[sku]&returnField=subprice]>[includeIncs/nosubpricecalc.inc]][lookupdb=upline.db&lookInField=sku&value=[sku]&returnField=subprice][/HIDEIF][/math])[/lineitems][/math][/format]
[/orderfile]*** in Incs/nosubpricecalc.inc ******************************[math][lookupdb=upline.db&lookInField=sku&value=[sku]&returnField=price]-[SEARCHdb=break.db&eqSKUdatarq=[URL][SKU][/URL]&QuanType=num&Quansort=1&Quansdir=de&leQuandatarq=[Quantity]&max=1][FOUNDITEMS][Break][/FOUNDITEMS][/SEARCH][/math]*** in Incs/subpricecalc.inc ******************************[SHOWIF [lookupdb=upline.db&lookInField=sku&value=[sku]&returnField=subprice]>[includeincs/nosubpricecalc.inc][include incs/nosubpricecalc.inc][/SHOWIF][HIDEIF[lookupdb=upline.db&lookInField=sku&value=[sku]&returnField=subprice]>[includeIncs/nosubpricecalc.inc][lookupdb=upline.db&lookInField=sku&value=[sku]&returnField=subprice][/HIDEIF]*** end of code ***********Any ideas?Yours in Success,Luke Melia___________________________________________________________________________For software for Network Marketers, check out http://www.kaizensoft.comUpline is Online: http://www.upline.com___________________________________________________________________________ ============================ Luke Melia|| Was it for this my |||| life I sought? || Snail Mail:|| Maybe so and || 106 South St. Suite 209|| maybe not... || Charlottesville, VA 22902 ===========PHISH============ (804) 963-2608
Associated Messages, from the most recent to the oldest:
Thanks, Grant. I have a few questions and I'm including the specific codebelow.At 2:07 AM 10/10/97, you wrote:>>What kind of reasons might there be this scenario: an [include ...] to not>>work properly but the pasting the exact contents of that included functions>>fine?>>Depends on what you're trying to do. Can you be more specific? I'll rub>my crystal monitor here and imagine...>>1) You're using an
[include] inside a math expression, and you use BBEdit>to create the include file>2) You've nested the
[include]s really really deep>3) Your included file uses
[cart], and for some reason the cart# just>doesn't make it through>>Answers:>1) BBEdit has the annoying habit of adding an extra carriage return to the>end of a file, thus messing up the
[math] context because carriage return>is illegalI am using BBEdit. This info helps, and I definitely notice that behavior,but it didn't resolve the problem.>2) Stack space being limited, the
[include] just uses up so much that>there's none left, and can't execute any more WebDNAI am nesting includes. How deep is really really deep? Is there a way toadjust stack space? Is there a way to know when this takes place other thanby guessing based on incorrect results?>3) Change it to [include file=xx&cart=
[cart]]Didn't change things.Here's my code, along with commentary about the part that is not working.(In our store, there are different prices for nonsubscribers andsubscribers, as well as quantity pricing, which is available to both):*** in ShoppingCart.tmpl ******************************[orderfile cart=
[cart]]nosub: [format .2f]
[math]0
[lineitems]+(
[math][quantity]*[includeincs/nosubpricecalc.inc][/math])[/lineitems][/math][/format]
sub(inc): [format .2f]
[math]0
[lineitems]+(
[math][quantity]*[includefile=incs/subpricecalc.inc&cart=
[cart]][/math])[/lineitems][/math][/format]
sub(spelledout): [format .2f]
[math]0
[lineitems]+(
[math][quantity]*[SHOWIF[lookupdb=upline.db&lookInField=sku&value=[sku]&returnField=subprice]>[includeIncs/nosubpricecalc.inc]][include Incs/nosubpricecalc.inc][/SHOWIF][HIDEIF[lookupdb=upline.db&lookInField=sku&value=[sku]&returnField=subprice]>[includeIncs/nosubpricecalc.inc]][lookupdb=upline.db&lookInField=sku&value=[sku]&returnField=subprice][/HIDEIF][/math])[/lineitems][/math][/format]
[/orderfile]*** in Incs/nosubpricecalc.inc ******************************
[math][lookupdb=upline.db&lookInField=sku&value=[sku]&returnField=price]-[SEARCHdb=break.db&eqSKUdatarq=
[url][SKU][/URL]&QuanType=num&Quansort=1&Quansdir=de&leQuandatarq=[Quantity]&max=1]
[founditems][Break][/FOUNDITEMS][/SEARCH][/math]*** in Incs/subpricecalc.inc ******************************[SHOWIF [lookupdb=upline.db&lookInField=sku&value=[sku]&returnField=subprice]>[includeincs/nosubpricecalc.inc][include incs/nosubpricecalc.inc][/SHOWIF][HIDEIF[lookupdb=upline.db&lookInField=sku&value=[sku]&returnField=subprice]>[includeIncs/nosubpricecalc.inc][lookupdb=upline.db&lookInField=sku&value=[sku]&returnField=subprice][/HIDEIF]*** end of code ***********Any ideas?Yours in Success,Luke Melia___________________________________________________________________________For software for Network Marketers, check out http://www.kaizensoft.comUpline is Online: http://www.upline.com___________________________________________________________________________ ============================ Luke Melia|| Was it for this my |||| life I sought? || Snail Mail:|| Maybe so and || 106 South St. Suite 209|| maybe not... || Charlottesville, VA 22902 ===========PHISH============ (804) 963-2608
Luke Melia
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:
RE: Symantec VIsual Page 1.0.3 (1997)
SET (1998)
Using Applescript to process WebCatalog functions (1998)
Showif probably dumb question (1997)
Adding Multiple files to a cart at once (1998)
Grepping URL-Encoded Text (2004)
SPAM (OT) (2004)
system crashes, event log (1997)
need help with textA field (1998)
Signal Raised Error (1997)
Problems setting MIME Headers (1998)
E-mail loop ! (1997)
Am I going senile? (Price recalc based on quantity) (1997)
WebCommerce: Folder organization ? (1997)
Erotic Sites (1997)
WebCat2 - Getting to the browser's username/password data (1997)
customizing the color of user's pages (1997)
Virtual hosting and webcatNT (1997)
Email Scavengers (2003)
SSL and reg web* (1997)