Akopia Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] How to Return loop list of all categories in a select form?



******    message to minivend-users from "Gideon van Gelder" <gideon@swingmaster.nl>     ******

Hi,

The first 50 item-thing is result from mv_matchlimit, which
is set by default to 50. All you need to do is add a
/ml=100000, or something and you're off to go.

This is what I do:

<select name="mv_searchspec">
<option value="" selected>Select a category:
<option value="">_________________

[loop search="fi=myfile.asc/sf=4/tf=4/rf=4/ra=yes/un=yes/ml=100000"]
<option value="[loop-code]">[loop-code]
              [/loop]
  </select>

Just substitute the "4" with your category-column name/number and you're
done.
Don't get confused by the [loop-code]. Since you're only returning col. 4,
those values are your "code". To return other fields as well, just take out
the rf=4 and replace loop-code with loop-field category.
If you want to scan products.asc, you don't need the fi=/.

Whoopee ! Hope this works for you.

Ciao,

-Gideon

> ******    message to minivend-users from Chris Daniel
<krskrem@speedfactory.net>     ******
>
> Hello list,
>
> First of all , Thanks Marty Vance for the code related to showing items
> in a table.
> It works great!
> 3 across is enough, although it will do all kinds of stuff, I played
> with it for hours.:)
>
> Next thing, I don't know how I finally figured out this thing, except
> reading almost every mail list on the subject and the docs a few more
> times.
>
> I want to do a select list of all categories, when I do this:
>
>
> <form name="form1" action="[process-search]" method=POST>
> <select MV="loop"
>         MV.PREPEND="[sort products:category]"
>         MV.SEARCH="sf=category/fi=products.asc/ra=yes"
>         name="mv_searchspec">
>   [loop-change category]
>   [condition][loop-field category][/condition]
>     <option value="[loop-data products category]"> [loop-data products
> category]
>   [/loop-change category]
>
> </select>
> <input type="submit" name="mv_todo" value="go">
> </form>
>
> I get a select list of all the categories in the first 50 items only,
> not all of them. I have over 2000 items today, with more added all the
> time.
>
> It works good, only unique items are shown, and it actually gets the
> right results when you search . But it only does the first 50 items.
> If you cant tell , I am amazed.:)
>
> I tried [tag each products] [/tag] in a text version of same kind of
> thing but that takes to long.
>
> Is there another way to get all the categories from the database into my
>
> select form?
> Another thing , I want to use a default first item, but when I place
> something in that area , it gets caught up in the loop and is repeated.
>
> Chris
>
>
>
> -
> To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
> email with 'UNSUBSCRIBE minivend-users' in the body to
Majordomo@minivend.com.
> Archive of past messages: http://www.minivend.com/minivend/minivend-list


-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: