Results 1 to 9 of 9
  1. #1
    Join Date
    Nov 2006
    Posts
    105
    Plugin Contributions
    0

    help question How does the Search Process Work?

    I am trying to determine the sequence of pages, modules & functions that interact during an advanced search. In other words, what page links to what page, etc. and in what order?

    I'm trying to deconstruct the process so I can embed a search on define page/ez page. If I can figure out the proper code, I can simulate (hard-code) a search on the page.

    Thanks.
    DMFelder | Visit GreatApparelForYou.com for Chicago Direct to Garment printing and Chicago Screen Printing and for Funny Tees and shirts go to gafy.com. We also have Eco-Friendly Printing services.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: How does the Search Process Work?

    Your multitude of other threads on this same topic contain more information than what you've posted in yet another (this) thread.
    http://www.zen-cart.com/forum/showthread.php?t=116385
    http://www.zen-cart.com/forum/showthread.php?t=116368
    http://www.zen-cart.com/forum/showthread.php?t=114787
    http://www.zen-cart.com/forum/showth...499#post651499
    http://www.zen-cart.com/forum/showthread.php?t=114932

    One thing that's not been made clear in your posts is what you mean by "embed a search" or "hard-code a search on the page".

    Another thing that's missing is the "why" behind your questions. I say this because it's *very* common around here for people to jump to their own conclusions about what's the best solution to their "problem" ... without ever explaining the "problem" they're trying to solve or the need they're trying to meet. Thus they end up going down a bizarre path or getting unsatisfactory responses etc.
    Incomplete "requirements" specifications lead to incomplete responses and in the case of hired work, unsatisfactory results or blown budgets or unhappy relationships.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Nov 2006
    Posts
    105
    Plugin Contributions
    0

    Default Re: How does the Search Process Work?

    Sorry that I left you with that impression, DrByte. I have read many MANY of your posts over the last few years and I greatly respect your work.

    My entire project began with a misunderstanding of the ZenCart search features. I thought I could key everything off of a category rather than a product. When it became painfully obvious that was NOT the case, the race began.

    My point was not to ask the same question multiple times, but ask different questions as I figured this out on my own.

    My original issue is/was to search via categories rather than products. After little support, I posted a "want ad" but received no responses. I discovered on my own a way to do it, so I "closed" the thread. I have since been requested to share how I did it.

    Once I tackled that issue, I moved on to "how to display a subset of category images on a page with a custom header and footer." I figured out a way to manage the custom header and footer part on my own, so I was left with a singular question: how to embed a search within a page. I thought that was clarified in my "purple" post.

    Ultimately, the responses I received did not solve my problem, so I moved on to better understand the search process so I could hard code a page that displayed a subset of category images based on keywords within the category title and description fields. (This, to me, is an entirely different question, hence a different entry.)

    Bottom line, sorry to upset. Like everyone here, we have timelines, so waiting weeks typically will not work. I seem to have found a solution that works for me by creating custom headers and footers for the advance_search_result page. This has involved hard-coding links with search criteria, dissecting the URL path, extracting the keyword, and hard coding a bunch of IF KEYWORD = X clauses to redirect the header/footer files. This is most certainly less than ideal, but I had no other alternatives.

    If there is anyone out there that can help with creating a page that contains a custom header & footer, and can load a subset of categories and category images based on category title and description, I'd love some input.

    Again, I've solved it as described above, but it's far from efficient. I'd like a better way to do this without all the custom code, but fundamentally, I was unable to take command of the search feature.

    Thanks and sorry again.
    DMFelder | Visit GreatApparelForYou.com for Chicago Direct to Garment printing and Chicago Screen Printing and for Funny Tees and shirts go to gafy.com. We also have Eco-Friendly Printing services.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: How does the Search Process Work?

    You are correct that the search has always been product-centric.

    The queries for the search are handled in /includes/modules/pages/advanced_search/header_php.php

    The queries for handling product listings are largely driven by the logic in the /includes/index_filters files.

    To change the layout of the results delivered by the product search, one would have to adjust the main product-listing, which is handled by the array of output data built by /includes/modules/YOUR_TEMPLATE/product_listing.php and displayed via the /includes/templates/YOUR_TEMPLATE/common/tpl_columnar_display.php (which probably should not be edited without a full understanding of why, since it is used by *many* templates).

    By "subset of category images", I suspect you mean you'd like to see something like a listing of subcategory icons, but have the actual list of selected categories be driven by a set of search results instead of by a parent category. Doing that requires, as you've discovered, changing code in several places. The simplest approach would be to adjust the advanced_search/header_php.php file to check whether you're searching "categories" or "products". Then if "categories" is selected, build the appropriate query and stuff its results into the $categories variable (similar to the way the /includes/modules/pages/index/main_template_vars.php in lines 62-126), and then use tpl_modules_category_row.php to render the output (or maybe a modified tpl_index_categories.php).
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Nov 2006
    Posts
    105
    Plugin Contributions
    0

    Default Re: How does the Search Process Work?

    Thank you for the feedback, Good Doctor. I have probably traveled down the wrong path, so if you get a moment, perhaps you could provide a little feedback.

    The website is still rough: gafy.com/newweb

    When the index page loads, it displays every category icon. These represent all of our designs. Many of these icons have multiple classifications (new, all, shirts for girls, oneliners, etc.) so they cross-over into multiple subsets.

    For an example, the "Bad Hare Day" design is classified with keywords: all, one-liners, and shirts for girls.

    What I need is a way to create a page with a custom header/footer that only displays the designs within the subset. Since I did not know how to put the results within the custom page (embedded), I hacked up the advanced_search_results/header_php file and created unique headers for all hard-coded searches. You will see this if you click on the top links.

    Ideally, I wouldn't reflect the search code in the URL, and I wouldn't have to dissect the same URL to load unique headers and footers.

    Anyway, you suggested that I could populate the "$categories" variable and then display it within the new page. I really don't know how to do that, OR make a DB or Function call to display the results.

    If you have any ideas, I would be grateful to hear them.

    Thank you.
    DMFelder | Visit GreatApparelForYou.com for Chicago Direct to Garment printing and Chicago Screen Printing and for Funny Tees and shirts go to gafy.com. We also have Eco-Friendly Printing services.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: How does the Search Process Work?

    It would be a lot easier if you used categories for your major groups/themes.
    And then instead of having hundreds of categories each containing the same 18 products as every other category, make your current "categories" into "products", and use attributes to control the selection of desired variations.

    Then you wouldn't have to fiddle with creating custom search scripts just to create subcats for shopping.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Nov 2006
    Posts
    105
    Plugin Contributions
    0

    Default Re: How does the Search Process Work?

    Thank you for your response, DrByte.

    If I did what you suggest, how could I manage the cross-over items?

    Cross-Over = Categories (Designs) that fall into multiple classifications.

    It seems that if I used the top-level category, I'd still end up with a need to use a search routine to isolate the cross-overs ("Shirts for Girls", for example, that by definition appear in multiple groups).
    DMFelder | Visit GreatApparelForYou.com for Chicago Direct to Garment printing and Chicago Screen Printing and for Funny Tees and shirts go to gafy.com. We also have Eco-Friendly Printing services.

  8. #8
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: How does the Search Process Work?

    Maybe you can use linked products?
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  9. #9
    Join Date
    Nov 2006
    Posts
    105
    Plugin Contributions
    0

    Default Re: How does the Search Process Work?

    Thanks for the suggestion. I thought about that, but I don't think I can accomplish a major goal by leveraging linked products--or perhaps products in general. If I used linked products, I think I would need attribute-dependent attributes--which Zen-Cart does not currently support.

    One requirement is that the shopper can see all of his/her options when they get to the design page. Another is that he/she can see the image change as they select a style and color.

    Zen-Cart provides the ability to load attribute images, but only one image per attribute. Thus, if I define a product by two attributes (style AND color), I can only use one image unless I do some hefty coding. I have over 200 images for each design (style x color).

    I am interested, though, in how you might suggest I use linked products. Over the last week, I have come very far with the test site. Please have a look:

    gafy.com/newweb

    1) Click on the top links to see my search issue/solution.

    2) Go to the design "I Was Talking to the Sheep" and you will see how I integrated an image that changes each time you change the color selection (I have test images loaded).

    You will quickly see my requirements, but...I am SO WILLING TO LISTEN TO FEEDBACK because I know it's less than ideal/efficient.

    Thanks!
    DMFelder | Visit GreatApparelForYou.com for Chicago Direct to Garment printing and Chicago Screen Printing and for Funny Tees and shirts go to gafy.com. We also have Eco-Friendly Printing services.

 

 

Similar Threads

  1. How does the product notification work?
    By Akayss in forum General Questions
    Replies: 0
    Last Post: 14 Nov 2008, 02:05 PM
  2. How does the PHPBB Bridge work ?
    By Protostack in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 14 Jul 2008, 01:25 AM
  3. How does the code for the category link work?
    By dealbyethan.com in forum General Questions
    Replies: 0
    Last Post: 11 Apr 2007, 05:21 PM
  4. How does the stylesheet work?
    By Hess in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 17 May 2006, 12:21 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