[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] [mv 3.12] Multi-level, multipage sorts tamed!
****** message to minivend-users from "Gideon van Gelder" <gideon@swingmaster.nl> ******
Hi Ed,
Well, this is the spirit! Thank you very much for these great tips:
maybe we SHOULD just share knowledge like this more often amongst the
list, not just ask questions and answer them (include me as well,
I'm not trying affending anyone)
As Ed wrote, I couldn't agree more, don't give up!
-Gideon
> ****** message to minivend-users from Ed LaFrance
<edlafrance@printexusa.com> ******
>
> Time to give something back to the list -
>
> On our printing supplies site, is it easy to get search results of 100 or
> more items, and the sorting or results was never quite right. I had seen
> messages in the list archives from others who had the same problems:
>
> - The [sort] tag only works on the contents of the current results page,
> so groupings (like categories) repeat themselves from page to page when
> using the [more-list];
>
> - Sorting by item code didn't seem to work one way or another;
>
> - mv_sort_field didn't seem to work like it was supposed to;
>
> Lots of variations on these problems, no real comprehensive solutions that
> I could find.
>
> Here's what is working great for me:
>
> In a search form:
>
> <FORM METHOD="POST" ACTION="[process-search]">
> <input type="hidden" name="mv_sort_field" value="category,0">
> <input type="hidden" name="mv_sort_option" value="f,f">
> <INPUT MAXLENGTH="30" NAME="mv_searchspec" SIZE="13" VALUE=""><BR>
> <INPUT TYPE="submit" VALUE="Search">
> </FORM>
>
> Note that mv_sort_field's value is "category,0" - this is a two-level
sort,
> first by the category field of the products database, then by the code
> field within each category. value="category,code" does not work - it
> returns a server error, even if you define it along with all your other
> products field names using mv_field_names, so you have to specify code by
> its column number in the database, which is normally 0. mv_sort_option is
> set to "f,f" - one "f" (ignore case) for each sort field. The docs say
> that I should be able to stack these form elements:
>
> <input type="hidden" name="mv_sort_field" value="category">
> <input type="hidden" name="mv_sort_field" value="0">
> <input type="hidden" name="mv_sort_option" value="f">
> <input type="hidden" name="mv_sort_option" value="f">
>
> But I always got an error of some sort when I did!
>
> One-click searches (a couple of different examples):
>
> <A HREF="[area scan
> di=category
> tf=category,0
> to=f,f
> df=yes
> dl=2000 Series Ink]">2000 Series Inks</A>
>
> [page href=scan arg="
> sp=browse1
> ml=6
> df=yes
> tf=category,0
> to=f,f
> sf=category
> se=Supplies
> "]Supplies[/page]
>
>
> ...where tf=mv_sort_field and to=mv_sort_option.
>
> These work pretty much as you would expect.
>
> A final note - if you are going to use mv_sort_field, remove the [sort]
tag
> from your target page (usually results.html); it will just mess things up.
>
> The above methods work great, even with results which generate
> [more-list]'s of 20 pages or more. If you use [on-change] to group your
> results, by category for example, sort by your group field first, and
> everything will come out exactly as you want it, nice and tidy.
>
> I hope these tips will be helpul to someone. Never give up!
>
> - Ed LaFrance
>
>
>
> -
> PRINTEX Marking Technologies
> 12113 Kirkham Rd.
> Poway, CA 92064 U.S.A.
> (858) 513-2418
> (800) 982-1928
> (858) 513-2419 fax
> edlafrance@printexusa.com
> http://www.printexusa.com
>
>
> -
> 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