• Hey all,

    I’m building a shop for my mate’s DIY shop and I’m using WP e-Commerce.

    I was quite shocked to see there wasn’t a straight forward way to have a search results page. So after searching A LOT, I found a decent solution, which I’m very happy to be able to share here.

    Paste this code in your search.php between your DIVS:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    That produces an unordered list of products based on whatever you type in the standard WordPress search box. PLEASE NOTE this is not a unified search, although I think that by writing another QUERY below all this code you might be able to get results for normal WP posts. Haven’t tried it but I will.

    I’m an not 100% sure who coded the above but I found it here: http://wpworks.wordpress.com/2011/08/25/wordpress-wp-ecommerce-search-page-with-related-products-hack/. The only problem with the code in that link (or at least for me) is that the Product Permalinks for each result weren’t correct. In my version I cleaned up the code a little bit and changed the permalinks to work.

    For those who are using the Gold Cart plugin and want the Live Search results to work together with the ability to input text and hit enter, you need to go to the Gold Cart plugin folder and find the Live Search PHP file. There, locate the input and change the name and id to “s”.

    If you have any questions feel free to ask and I’ll try to help asap.

    Cheers

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter elmediano

    (@elmediano)

    Oops just realised the forum rules only let you paste up to 10 lines of code, so I have used Pastebin as requested:

    http://pastebin.com/8yFUFpCa

    thanks……… a lot

    enkulu

    (@enkulu)

    Hi

    If this works, then fantastic and thanks!
    But please could you clarify ” between your DIVS”

    There are quite a few DIVS on that page.

    Thanks

    enkulu

    (@enkulu)

    Not to worry I figured it out!

    Thanks your code worked great!

    Ciao.

    Thread Starter elmediano

    (@elmediano)

    No worries. Glad it works for you guys!

    Hi,
    by any chance you mean the ‘searchform.php’?
    I can find the ‘search.php’ in my theme folder.

    Maybe someone can give me some direction.
    (I am using the ‘Basis Theme’ with WP 3.3.2)

    Thanks!

    Hello hello
    Thanks for help on this.
    I was able to create a pretty good Search Engine with this.
    One question:
    Anyone have an easy way to paginate it?

    One comment:
    I used

    <?php echo get_the_post_thumbnail($rsp[0],’thumbnail’);?

    For the image as this will ensure the set product image will appear. **Note I’ve a customized WP Ecommerce theme

    Cheers

    I have some problem on wp e-commerce product search. I tried two product search plugins these plugins are not working. can any one have some ideas
    how to make a custom search for only products.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[WP e-Commerce] Product Search Results (WORKING)’ is closed to new replies.