Page 1 of 3 123 LastLast
Results 1 to 10 of 22
  1. #1
    Join Date
    Dec 2007
    Location
    New Jersey
    Posts
    76
    Plugin Contributions
    0

    customer issue Expanding search to work with my custom product-type

    i have created new product type, based on the book, but very very different. I have added many fields to my product_type_XXXX_extra field and have that working perfectly, and even have added a filter similar to the author name in the book product. well and good, one filter down, and a process to continue adding (there are 30 criteria which can be filtered in this manner.) 30 drop down menus is a lot, and a lot of work to write session for all.

    what i need: add each of the fields in the PRODUCT_TYPE_XXXX_EXTRA field i made into the standard search. i know text based searches are hard, i know it will take some php scripting, I am not afraid of that. but I do not know:

    1. which .php pages will i need to over-ride
    2. where are the search filter pages located in the ZC system

    i think it has something to do with the alpha filter.... am I on right track?

    by the way, kudos to the ZC team for making the over-ride system as proficient as it is. Nice work!
    hmmn. really?

  2. #2
    Join Date
    Dec 2007
    Location
    New Jersey
    Posts
    76
    Plugin Contributions
    0

    Default Re: Adding new Field in admin for products

    is anyone out there interested in this question? am i asking it in the wrong place?
    hmmn. really?

  3. #3
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Expanding search to work with my custom product-type

    The search is largely handled by the files in the /includes/index_filters folder.
    Check out the music-type filters present there for some examples of how the search was expanded for those purposes.
    .
    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.

  4. #4
    Join Date
    Dec 2007
    Location
    New Jersey
    Posts
    76
    Plugin Contributions
    0

    Default Re: Expanding search to work with my custom product-type

    ahh, yes. i understand this, because i was able to successfully create a drop down menu that returns a list of items with a single selector.

    this is nice, and very useful. but i need to add a text based search, one where I can type contents of a new field, and have that field be indexed and searched just as all the others are.

    i can pick from a drop down menu, and it makes its selection and it is lovely. but! if i type the exact same search criteria, this fails to return a result. it's not really a bug, of course, but it appears buggy to users who don't know.

    i need to edit those SQL queries to include the new tables, but I don't know which ones to change....
    hmmn. really?

  5. #5
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Expanding search to work with my custom product-type

    It's going to take some time to figure out what you need and how to code it.
    The search is handled by those files and the /includes/modules/pages/advanced_search_results/header_php.php file.

    If you're not certain that you'll be able to figure it out yourself, I suggest posting an ad asking for paid help in the Commercial Help Wanted area so that you can get someone to spend focused time on rewriting the queries as you desire.
    .
    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.

  6. #6
    Join Date
    Dec 2007
    Location
    New Jersey
    Posts
    76
    Plugin Contributions
    0

    Default Re: Expanding search to work with my custom product-type

    thanks for pointing out the file i need to look at. I wasn't sure about the ZC system. i have spent the last several hours going through many of the posts in this forum requesting similar information, and i had just discovered that others have success in modifying includes/languages/english/advanced_search.php.

    i am absolutely certain that I can rewrite the SQL queries to give me exactly what I am looking for. In fact, I have already planned out exacly what they should be.

    It's not difficult, just joining additional table and columns to the original search. The trick is knowing where to place the query and have it show up!
    hmmn. really?

  7. #7
    Join Date
    Dec 2007
    Location
    New Jersey
    Posts
    76
    Plugin Contributions
    0

    Default Solution

    I have been working on a solution to the issue of not being able to do a search on text, specifically the book_author or whatever it may be for whatever custom product type you have.

    I had two issues to contend with First was dealing with writing new search filters. I generated new pages in zen to deal with alternative search filters not included in core structure. Then I generated new product listings because I didn't like the variaton i was getting (the diff between all and category listing - i based new pages first on the products-all page). I am pleased that all my products are showing up with the grid layout, a preferable and cleaner look.

    Then I got a bit creative. I have now a test site where I search on multiple specialized filters, using flash (and pure html in another test) to push variables to the filters, which will allow me to do multi-level searches on products.

    in other words, now I can look for: BOOK TYPE & BOOK SIZE and only get returns that match both criteria. I can extend this to search for - for example -

    SHOES >> WOMENS >> BLACK

    and really drill down the results. It's a fun piece of code, and I may make a contribution if there is any interest.

    oh, yeah, BTW - One Interesting Note - when I posted the question about which pages in the over-ride system to modify, no one even mentioned that you cannot override the advanced search pages. I guess that's what the wiki's for...
    hmmn. really?

  8. #8
    Join Date
    Aug 2004
    Location
    Fountain Hills, AZ
    Posts
    515
    Plugin Contributions
    1

    help question Re: Expanding search to work with my custom product-type

    I have been working on the search in conjunction with the new product type I have added. I was successful within advanced search; however on my home page when someone attempts to do a basic text search, the systems takes forever now to return the search results. The results "are" returned, however someone with a slow connection could actually be timed out by this. I've looked at my code and I can't figure out what would be doing this.

    A further note: On the Advanced Search page - the text search works perfectly! So that must mean that the mods done to the advanced search results file were done correctly, but what is driving the search results specifically for the search box in the header of the site? I thought it would be the same files. I'm really baffled by this and my customer is less than thrilled to put it mildly.

    Can anyone suggest a good way for me to track down exactly what is creating the delay created by the home page search box? I have the error details turned on and it doesn't return any errors - I've check my sql processes at the time I do the search and I just can't seem to identify which query is bogging down.

    I think I need a little push in the right direction here from the core developers. Any light at the end of the tunnel would be great.

    Here is the link to the site -mysite Feel free to first search on the home page (use the box in the header - I have a Google search enabled to give folks an alternative till this is fixed). After trying your search on the home page - and do something really simple, like the name of a product, then go to the advanced search and try the exact same search. You will see my dilemma.

    Thanks so much for any help or ideas anyone can lend my way.

    Ruth

  9. #9
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Expanding search to work with my custom product-type

    The header search box is very simple and only uses 2 parameters, ie:
    http://www.onegoodpair.com/index.php?main_page=advanced_search_result&search_in_description=1&keyword=leath er

    The advanced search adds several more parameters, like this:
    http://www.onegoodpair.com/index.php?main_page=advanced_search_result&keyword=leather&search_in_description =1&categories_id=&inc_subcat=1&manufacturers_id=&departments_id=&styles_id=&pfro m=&pto=&dfrom=&dto=

    This is normal behavior.

    However, if you start paring things down and removing parameters from the URL, you'll discover that something's amiss with how you're handling the blank departments_id parameter:
    http://www.onegoodpair.com/index.php?main_page=advanced_search_result&keyword=leather&search_in_description =1&departments_id=
    vs
    http://www.onegoodpair.com/index.php?main_page=advanced_search_result&keyword=leather&search_in_description =1&categories_id=&inc_subcat=1&manufacturers_id=&styles_id=&pfrom=&pto=&dfrom=&d to=


    I suspect you're including certain SQL search criteria if the departments_id parameter exists, but you're not first checking to see whether it's valid vs blank etc, thus throwing your SQL query into chaos.
    .
    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.

  10. #10
    Join Date
    Aug 2004
    Location
    Fountain Hills, AZ
    Posts
    515
    Plugin Contributions
    1

    Default Re: Expanding search to work with my custom product-type

    Quote Originally Posted by DrByte View Post
    The header search box is very simple and only uses 2 parameters, ie:
    http://www.onegoodpair.com/index.php...eyword=leather

    The advanced search adds several more parameters, like this:
    http://www.onegoodpair.com/index.php...o=&dfrom=&dto=

    This is normal behavior.

    However, if you start paring things down and removing parameters from the URL, you'll discover that something's amiss with how you're handling the blank departments_id parameter:
    http://www.onegoodpair.com/index.php...epartments_id=
    vs
    http://www.onegoodpair.com/index.php...o=&dfrom=&dto=


    I suspect you're including certain SQL search criteria if the departments_id parameter exists, but you're not first checking to see whether it's valid vs blank etc, thus throwing your SQL query into chaos.
    If you were here I would kiss you!!! ...LOL - just for answering me. I can't tell you how bald I am trying to figure this out. I really believe it's the old... you can't see the forest for the trees. You work on something for so long... that it all blurs together. The baffling part is how great the text search works on the advanced page.. in a split second!

    I will pull these files back down and take a look at what I've done and post the code.. the changes are minimal, but you're right.. I don't remember doing the "else if" - hopefully I can see what I need to do looking at it from this point of view.

    Again.. thank you so much for being there!! I'm not the greatest PHP coder that's for sure, but most of the time, if I noodle with something long enough I can figure it out. That's what happens when you are totally self taught I guess.

    Ruth

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Replies: 0
    Last Post: 8 Dec 2011, 10:28 PM
  2. How do I change the search feature to look through custom product-type fields?
    By ssmith.cp in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 20 May 2010, 07:28 PM
  3. template_func.php not working with custom product type
    By dbrewster in forum Bug Reports
    Replies: 11
    Last Post: 28 Sep 2006, 04:20 AM
  4. Custom product type with custom PRODUCT_PRICE_DISCOUNT_PREFIX
    By dbrewster in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 18 May 2006, 06:54 PM

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