[ic] Display Quantity Flypage++

Steve Graham interchange-users@interchange.redhat.com
Thu Feb 28 01:02:00 2002


Hello,

Regarding displaying quantity breaks in the flypage:

This code should work if I can figure out how to make the comparison to the 
two strings. $tt1 & $tt2 ->Help!
Ideally this should skip displaying the prices if the discount doesn't 
change.
>From what I can read in the docs the explicit if may only allow 1 variable 
to be set before the compare, but I noticed the minimal comment about [if 
explicit args] in the docs, but could not find examples.

[tmp tp1][item-price noformat=1][/tmp]
[loop prefix=break list="1,2,3,4,5,6,10,12,15,20,24,25,36,48,50,72,100,144"]
  [tmp tp2] [price code="[item-code]" quantity="[break-code]" noformat=1] 
[/tmp]

[if explicit]
   [condition]
     $tt1 = '[scratch]';
     $tt2 = '[scratch]';
     return 1 if $tt1 ne $tt2;
     return 0;
   [/condition]
       Quantity [break-code]+  
       [price code="[item-code]" quantity="[break-code]"] <br>
       [tmp tp1][price code="[item-code]" quantity="[break-code]" 
noformat=1]
       [/tmp]
  [/if]
[/loop]


Thanks,
Steve


>From: Mike Heins <mheins@redhat.com>
>Reply-To: interchange-users@interchange.redhat.com
>To: interchange-users@interchange.redhat.com
>Subject: Re: [ic] Display Quantity Discount in Flypage
>Date: Tue, 26 Feb 2002 23:03:21 -0500
>
>Quoting Steve Graham (dtlgc@hotmail.com):
> > Hello,
> >
> > I would like to display all the different quantity breaks each item has, 
>and
> > if it doesn't have any don't display, in each items flypage. I have IC 
>4.8.3
> > calculating the prices correctly with commonadjust, now I want to show 
>the
> > potential buyers the qty breaks.
> >
> > I see that [item-price q1], [item-price q5] etc... will show the breaks, 
>but
> > I have discounts of 1,2,3,5,6,10,12,15,20,25....various up to to 250 opr
> > more.
> > If an item has only breaks at say 1,6,12 then I don't want to display 
>all
> > the redundant breaks in-between.
>
>Well, if you are expecting Interchange to intuit them for you it can't.
>You can tell it what they are, though, and loop through them:
>
>[loop prefix=item list="os28004"]
>     [loop prefix=break list="1,6,12"]
>	SKU [item-code] quantity [break-code]:
>		[price code="[item-code]" quantity="[break-code]"]
>     [/loop]
>[/loop]
>
>This is not the type of thing you want to do on long lists -- it is too
>database-intensive.
>
>--
>Red Hat, Inc., 3005 Nichols Rd., Hamilton, OH  45013
>phone +1.513.523.7621      <mheins@redhat.com>
>
>Clothes make the man.  Naked people have little or no influence on
>society.  -- Mark Twain
>_______________________________________________
>interchange-users mailing list
>interchange-users@interchange.redhat.com
>http://interchange.redhat.com/mailman/listinfo/interchange-users




_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.