X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Improved Search Function (https://forum.x-cart.com/showthread.php?t=4415)

burtsTechie 09-19-2006 07:09 AM

Re: Improved Search Function
 
I'm looking for something similar to longhorn180, but hopefully a bit simpler. I'm looking to do a couple drop-down lists to choose items based upon their extra fields.

Example: extra field [country of origin] has only 5 entries, extra field [style] has only 5 entries and extra field [fabric type] has only 5 entries. You can have a t-shirt [style] from France [country of origin] that's made of Cotton [fabric type]. A series of drop down lists populated from extra fields would allow the customer to quickly select any combination among the general categories. Perhaps the customer wants to look at all cotton shirts, or all of the site's French-made clothes, or all 100% cotton items - drop down just one list and leave the others as is.

It would eliminate any text errors by the customer, which seems to be longhorn180's issue.

Is this idea possible with the standard search? I've played with coding before, but don't know anything about PHP and I'm just learning X-Cart! Any help is appreciated!

sushob 09-19-2006 12:15 PM

Re: Improved Search Function
 
Quote:

Originally Posted by intel352
good luck, let us know how it goes


Quick and painless!
Quote:

Originally Posted by X-Cart
The simple search feature is not broken. By default, the simple search equals the advanced one with the following settings:

Search for pattern -> Exact phrase
Search in -> Product title, Short description, Detailed description
Advanced search options -> Empty

If you want to search for all words in the simple mode, you should modify the '<xcart_dir>/skin1/customer/search.tpl' template (for example, via the "Administration/Edit templates" section of the store admin area) in the way as shown below:

insert the next line:

<input type="hidden" name="posted_data[including]" value="all" />

after the following one:

<input type="hidden" name="posted_data[by_fulldescr]" value="Y" />


Worked like a charm!

I also re-applied the mod to search by SKU, and disabled short and full descriptions, in the simple search box. This seems to work best with my title format.

I guess 25 support points is about as cheap as it gets for a nice search feature. :-)

intel352 09-19-2006 01:00 PM

Re: Improved Search Function
 
I'm glad to see you got it straightened out ;-)

alphastara 09-27-2006 04:24 PM

Re: Improved Search Function
 
Anyone found that with 4.0.19 and this mod, it doesn't log search statistics? Take a look at my post of this thread:
http://forum.x-cart.com/showthread.php?t=20337&p=143057

chastie 10-13-2006 10:31 AM

Re: Full source
 
Quote:

Originally Posted by leighj
For those who've asked... all of it
WARNING If you mess up your X-cart don't cry to me... this was applied to a 4.0.16 search.php



Works GREAT on 4.0.19 - thanks!!!!

trickyjoe 10-16-2006 03:27 AM

Re: Improved Search Function
 
Could anyone tell me if there is a verison of leighj search or simlar that searches product options as well as the normal stuff?

Impact_1 10-21-2006 03:38 PM

Re: Improved Search Function
 
No news for 4.1.3 yet?

applcenter 11-05-2006 02:00 AM

Re: Improved Search Function
 
Can the search function be modified to add wildcards? I have numerous sku's that are not consitant between manufacturers causing visitors to not find like items. For instance depending on manufacturer a white refrigerator will have a "Q" or "WH" or "W" or "P" at the end of the model number. I would like to have the search to return whatever matches the first 4 characters reguardless of what is entered.

xgarb 11-16-2006 06:00 AM

Re: Improved Search Function
 
1 Attachment(s)
For anyone looking for a quick solution for 4.0.18 (and possibly 0.19)

unzip and copy attached to /include/search.php

References for this are....
just the instructions at the bottom of http://forum.x-cart.com/showpost.php?p=98217&postcount=152
the code from.. http://forum.x-cart.com/showpost.php?p=98220&postcount=153
with the 4.0.18 alteration.. http://forum.x-cart.com/showpost.php?p=128493&postcount=200

Works for me.. not perfect but loads better than standard.

Thanks guys!
xgarb

fhiremark 11-16-2006 01:18 PM

Re: Improved Search Function
 
Thanks xgarb, that made it alot easier. I was reading this thread and there are so many snippets everywhere that compiling everything together made it alot easier.

Ok, lets hope it works now.


All times are GMT -8. The time now is 08:29 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.