Hi Michael, Van: "Dr. Michael Streubel" <suppressed> > Hi Interchangers, > > in my store, I want some of the categories in the category menu > to retrieve its data not from the database but from a remote server > via a web service. So I implemented a new search type which > is working fine as far as the data search is concerned. All data > structures are well defined and well set as far as I can see. > > Now consider the following test loop: > > [loop search=" > bs=1 > em=1 > su=1 > ml=2 > fi=products_test > st=.... new search_type .... > tf=categoryid > sf=categoryid > se=189461 > "] > [loop-code] > [loop-field title] > [/loop] > > As mentioned, the search works successfully. However, when > it comes to iteration, the system still tries to use > the database instead of retrieving information > (in order to determine values of [loop-code],[loop-field title]) > from the in-memory data. > > How can I teach IC to not touch the database in this case ? > (BTW, I still need and use a searchfile (fi) to get attribute names > for my data structures. But I don't think that's the cause > of the problem). The [loop-field title] causes the database to be called. It is a direct query. In a normal search (not your search) you can access "In Memory" variables by the tags: [loop-param name_of_your_variable] or by [loop-pos 0] , [loop-pos 1], [loop-pos 2] etc. The "name_of_your_variable" and positions 0, 1, 2 refer to fields in the search definition given by "rf" or "mv_return_fields". It needs something like: rf=code,title Regards, Bas _______________________________________________ interchange-users mailing list suppressed http://www.icdevgroup.org/mailman/listinfo/interchange-users
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.