Du bist nicht angemeldet. Der Zugriff auf einige Boards wurde daher deaktiviert.

#1 12. April 2013 10:56

Publisher
probiert CMS/ms aus
Registriert: 07. Januar 2011
Beiträge: 45

Produkte Modul Multpile Fragmentsuche

Hallo Miteinander

CMSMS 1.9.4.3.
Products 2.15.1

Modul eingebunden mittels:

[== smarty ==]
{Products action='search' searchfield='branche,ort,handwerker_alles'}

Suchtemplate Code:

[== smarty ==]
{* search template *}
{* valid fields are:
   {$actionid}cd_submit    - (string) for a submit button
   {$actionid}cd_cancel    - (string) for a cancel button
   {$actionid}cd_prodname  - (string) for text field to search against product name
   {$actionid}cd_proddesc  - (string) for text field to search against product description.
   {$actionid}cd_propprice - (select) for price searching.
     options must be of type string with high low limits separated by a :
     i.e:   1000:2000
     a special value of -1 can be used to indicate any price.
   {$actionid}cd_allany    - (int) to indicate wether all of the 
     conditions much match, or if any one of them may.
   {$actionid}cd_propvalue - (string) property values.
*}

<div id="prod_searchform">
{$formstart}

{* *}
<div class="row">
  <p class="row_prompt">{$mod->Lang('search_expr')}:</p>
  <p class="row_input">
    <select name="{$actionid}cd_allany">
      <option value="0">{$mod->Lang('all')}</option>
      <option value="1">{$mod->Lang('any')}</option>
    </select>
  </p>
</div>


{if isset($searchprops)}
{foreach from=$searchprops key='propname' item='obj'}
<div class="row">
  <p class="row_prompt">{$obj->prompt}:</p>
  <p class="row_input">
    {if $obj->type == 'textbox' OR
        $obj->type == 'textarea'}
      <input type="text" name="{$actionid}cd_propvalue[{$propname}]" size="40" maxlength="40"/>
    {else if $obj->type == 'dropdown'}
      <select name="{$actionid}cd_propvalue[{$propname}]">
      {html_options options=$obj->options}
      </select>
    {/if}
  </p>
</div>
{/foreach}
{/if}

<div class="row">
  <p class="row_prompt"></p>
  <p class="row_input">
    <input type="submit" name="{$actionid}cd_submit" value="{$mod->Lang('submit')}"/>
    <input type="submit" name="{$actionid}cd_cancel" value="{$mod->Lang('cancel')}"/>
  </p>
</div>


{$formend}
</div>{* prod_searchform *}

Wenn ich bei den 3 übergebenen Suchfeldern einzeln fragmentmässig Suche (nur ein Wortteil) Dann findet es die passenden Einträge. Aber wenn ich Wortteile in mehr als ein Feld eintrage findet er nichts mehr.
Wie könnte man das fixen?

Danke schon im Voraus für die Antworten!


Bin interessiert an gegenseiteige Hilfe über MSN, Skype oder Google Chat.
Habe fortgeschrittene CMS MS Kenntnisse. Schreibt mir eine PN!  smile

Offline