[ic] user-dependent products.txt

interchange-users@lists.akopia.com interchange-users@lists.akopia.com
Thu May 17 12:01:01 2001


 hi list
 
here´s a problem that has me stumped but someone else could possibly (and
hopefully) solve with a quick glance.
 
I have a pulldown menu generated from the area.txt which retrieves the data
from the products.txt.. but to complicate things :) we would like to specify
a set list of products dependent on who the user is logged in as... 
eg. we have a products.txt with 100 articles.. all of which are viewable by
USERA but 50 viewable by USERB
 
here´s the pulldown:
 
 <FORM NAME="myform">
 <SELECT NAME="dest" SIZE=1 ONCHANGE="leapto(this.form)">
 <option SELECTED value=""><font color=ffffff>Choose a product:</option>
 [loop search="
 	fi=area.txt
 	tf=sort
 	ra=yes
 	rf=code,name
 	un=yes
 
 		sf=which_page
 			op=rm
 	[if scratch page_class]
 		se=all|[scratch page_class][set page_class][/set]
 	[else]
 		se=all|@@MV_PAGE@@
 	[/else]
 	[/if]
 " prefix=box]
 <option value="[area 
 		href=scan
 		search='
 		sf=category
 		se=[box-code]
		va=category=[box-code]
 		']">[box-param name]</option>
 [/loop]
 </select>
 </form>
 

the above pulldown (in menu.html) is only processed AFTER!! the user logs in


So the bit i´m stumped at it..
Do i specify in the login page which menu.html gets loaded dependent on 
who´s logged in?
Or do i put a restriction in the pulldown menu with some kind of fancy if
logged/then loop? 
Or do i filter the return of ALL products in the results.html? 
And lastly is what i´d like to do at all possible with minivend and if so
then how?
 
any clues or hints much appreciated!
 
thanks,
alasdair


-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net