Thread: Search mod.

Results 1 to 4 of 4

Threaded View

  1. #1
    Join Date
    Mar 2009
    Posts
    10
    Plugin Contributions
    0

    Default Search mod.

    Hello,

    I've been working for a while on a search modification. Normally when a user selects ONLY a category or a manufacturer in advanced search there is an error "at least one input missing".

    I wanted to change it so that when the client selects only category/manufacturer the script shows all products from that category/manufacturer. (Or is it the default behaviour of Zen Cart and my install is broken?)

    To do that I created a slight modification in the core files:

    includes/modules/pages/advanced_search_result/header.php

    Code:
      if (isset($_GET['pfrom']) ) {
        $pfrom = $_GET['pfrom'];
      }
    
      if (isset($_GET['pto']) ) {
        $pto = $_GET['pto'];
      }
    changed to: (if price is not defined, take as default 0-999)

    Code:
      if (isset($_GET['pfrom']) ) {
        $pfrom = $_GET['pfrom'];
    	if ( $pfrom == '' ) { $pfrom = '0'; }
      }
    
      if (isset($_GET['pto']) ) {
        $pto = $_GET['pto'];
    	if ( $pto == '' ) { $pto = '999'; }
      }
    And at the end of this file I 'reset' the two variables, so they don't show in the user's browser:

    Code:
    $pfrom='';
    $pto='';
    I also modified the includes/modules/pages/advanced_search/jscript_main.php to skip the price range check. Now, everything works fine, except that I can't browse any other page of results than the first one. When I think of it it's fine becouse I reseted the variables, but on second thought if I define a price range by entering it in the boxes I can browse all pages.

    My question would be: Where can I actually find the part of the code that is responsible for the generation of 'page 2..3..' links?

    Or maybe my logic is wrong in the first place and it's impossible to do it that way?

    Address of the website: http://salonbielizny.eu (you can check out the searches)

    Thanks in advance for any clues!
    Last edited by Vall; 5 Mar 2009 at 03:13 PM. Reason: added more information

 

 

Similar Threads

  1. Search Configuration Keys - Admin mod
    By torvista in forum All Other Contributions/Addons
    Replies: 11
    Last Post: 11 Oct 2010, 12:14 PM
  2. Search Admin Mod
    By limelites in forum General Questions
    Replies: 2
    Last Post: 21 May 2009, 01:04 PM
  3. Orders - Improved Search mod for 1.38?
    By xman888 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 17 Feb 2008, 09:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg