Akopia Akopia Services

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

Re: [mv] Dynamic LEFTSIDE DB driven



******    message to minivend-users from Johan Landman <johan@datatex.co.za>     ******

Hi Barry I have done something similar.

I am very new to minivend so it might not be by far the best way,
but it works for me. Hope it can help. Maybe one of the old mvendors
can help us to improve this code!

I have products grouped by department and by categories within each
department. What I have in my leftside page is two drop down boxes.
In the one you select the department and in the other you select the
category within that department. Once you have selected the department,
the category drop down is rebuild. It all happens pretty quickly. This
is link to a couple of files. I include some samples below. In my
department.asc i have the description of the department and the name of a
file that is used to build the category dropdown. After selecting the
category the normal search with this info is called and the results appear.
Obviously you must also include the department and category fields in your
product database to search on.

All files are generated by a back order and stock processing system.

****department.asc***** might look like this
code    name
DEPA    depa <- this is the file name
DEPB    depb

*****depa.asc**** might look like this
name
CATA
CATB

****THIS is the code that I use in my left side*****

   <FORM ACTION="[process-target main]" METHOD=POST>
      <INPUT TYPE="hidden" NAME="mv_search_field" VALUE="department">
      <INPUT TYPE="hidden" NAME="mv_doit" VALUE="search">
      <INPUT TYPE="hidden" NAME="mv_searchspec" VALUE="XXXXXXXX">
               <SELECT MV="loop"
                        MV.PREPEND="[sort department:name]"
                        MV.SEARCH="ra=yes/fi=department.asc/ml=1000"
                        onChange="this.form.submit()"
                        MV.OPTION="productcat"
                        NAME="productcat">
                        <OPTION VALUE="[loop-code]"> [loop-data department
name]
                </SELECT>
    </FORM>

   <FORM ACTION="[process-target main]" METHOD=POST>
      <INPUT TYPE="hidden" NAME="mv_search_field" VALUE="department">
      <INPUT TYPE="hidden" NAME="mv_searchspec" VALUE="[data
table=department col=name key='[valu
e productcat]']">
      <INPUT TYPE="hidden" NAME="mv_search_field" VALUE="category">
      <INPUT TYPE="hidden" NAME="mv_doit" VALUE="search">
      <SELECT MV="loop"
         MV.PREPEND="[sort [value productcat]:name]"
         MV.SEARCH="ra=yes/fi=[value productcat].asc/ml=1000"
         onChange="this.form.submit()"
         MV.OPTION="[value productcat]"
         NAME="mv_searchspec">
         <OPTION VALUE="[loop-code]"> [loop-code]
      </SELECT>
    </FORM>


Good luck
johan

-
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: