| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Changing default search to All Words | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Website crashed while changing default search to All Words
Hi there,
Our website crashed while we were trying to change the default search parameter from 'any words' to 'all words' following this thread and the tutorials on that topic: https://forum.x-cart.com/showthread.php?t=74262 http://devs.x-cart.com/en/getting_st...st_module.html http://devs.x-cart.com/en/customizat... l_words.html We created "<YOUR-DEVELOPER-ID>/<YOUR-MODULE-ID>" directory inside the "<Our website>\XLite\Module" directory. We then created Main.php as per the instruction in the first tutorial. We then created "SimpleForm.php" as per the second tutorial. We then redeployed the store through Cache Management in the Admin section. Unfortunately it got to step 6 and then it said "Fatal Error". We then accidentally closed that tab and now our website has crashed and we cannot even access our Admin.php. Please, what can we do now? Thank you. John
__________________
John XCart Business v.5.4.1.48 |
|||||||
#2
|
|||||||||
|
|||||||||
Re: Changing default search to All Words
As far as I know, the issue has been fixed.
When such problem happens again, just rebuild cache in your X-Cart store manually, as follows: 1) Close all your web-site's pages (if any is opened in your browser). 2) Remove var/run folder and var/.rebuildStarted file in your X-Cart installation. 3) Open the X-Cart admin page in your browser, in order to initiate the cache re-generation process( for example: http://www.sportingoutbacksupplies.com.au/admin.php).
__________________
Sincerely yours, Sergey Fomin X-Cart team Chief support group engineer === Check this out. Totally revamped X-Cart hosting http://www.x-cart.com/hosting.html Follow us: https://twitter.com/x_cart / https://www.facebook.com/xcart / https://www.instagram.com/xcart |
|||||||||
#3
|
|||||||
|
|||||||
Re: Changing default search to All Words
Hi Seyfin,
Thank you very much. Yes, thank goodness, the X-Cart support group engineer fixed the problem for us and the website is now up and running again. Phew! Do you know why in the process of changing the default search parameter from 'any words' to 'all words' by following the below thread and the tutorials on that topic, and then redeploying the store caused a "Fatal Error" to our website? https://forum.x-cart.com/showthread.php?t=74262 http://devs.x-cart.com/en/getting_st...st_module.html http://devs.x-cart.com/en/customizat... l_words.html Does it have anything to do with the fact that we are using PHP5.5, instead of 5.3? Thank you. John
__________________
John XCart Business v.5.4.1.48 |
|||||||
#4
|
|||||||||
|
|||||||||
Re: Changing default search to All Words
Actually, if you follow the tutorials carefully, the new custom module should not cause any errors. Can you pack the custom module you created and upload it to the File Area >> My Files section in your personal Helpdesk? I will look at the code of the custom module.
__________________
Sincerely yours, Sergey Fomin X-Cart team Chief support group engineer === Check this out. Totally revamped X-Cart hosting http://www.x-cart.com/hosting.html Follow us: https://twitter.com/x_cart / https://www.facebook.com/xcart / https://www.instagram.com/xcart |
|||||||||
#5
|
|||||||||
|
|||||||||
Re: Changing default search to All Words
I am attaching a sample custom module, both for 5.2 and 5.3 versions. This custom module changes the default behavior so the search is performed by "all words" instead of "any word". You can install it in your X-Cart store.
__________________
Sincerely yours, Sergey Fomin X-Cart team Chief support group engineer === Check this out. Totally revamped X-Cart hosting http://www.x-cart.com/hosting.html Follow us: https://twitter.com/x_cart / https://www.facebook.com/xcart / https://www.instagram.com/xcart |
|||||||||
#6
|
|||||||
|
|||||||
Re: Changing default search to All Words
Hi Sergey,
Thank you for your emails. Please excuse my ignorance. I just want to clarify a few more things so that I don't screw up again (once bitten, twice shy)! Firstly, our version is X-Cart Business 5.2.16 so we should use the attached sample custom module for 5.2 version, is that right? Secondly, I would like to clarify where to put the files "Main.php" and "SimpleForm.php". Currently, I already have an existing directory "sportingoutbacksupplies.com/classes/XLite/Module/", should I then just create new directories "XCartDevs/ChangeSearchDefaults" inside the above existing directory, and then put in the file "Main.php". Similarly, should I then create new directories "/view/Form/Product/Search/Customer" inside the newly-created directories above, and then put in the file "SimpleForm.php"? Thirdly, yesterday just before the website crash on redeploying the store, when I copied the texts as per the tutorials for "Main.php" and "SimpleForm.php", all the backslashes disappeared after I saved the respective files. I then had to type in double backslashes so that when I saved the files, one backslashes remained. Do you know whether it's because my website is using an incompatible PHP version (I'm using PHP5.5)? Thank you again. Cheers, John
__________________
John XCart Business v.5.4.1.48 |
|||||||
#7
|
|||||||||
|
|||||||||
Re: Changing default search to All Words
1) You should install the attached sample custom module for 5.2 version.
Just install the module using the "Upload add-on" button, and you do not need to create any files manually. 2) If you upload/create the module's files manually, the you should create the following directories: classes/XLite/Module/XCartDevs/ChangeSearchDefaults classes/XLite/Module/XCartDevs/ChangeSearchDefaults/View/Form/Product/Search/Customer And put the "Main.php" and "SimpleForm.php" files into respective directories. 3) As for the 3rd question: how did you edit and save the respective files, what file editor did you use?
__________________
Sincerely yours, Sergey Fomin X-Cart team Chief support group engineer === Check this out. Totally revamped X-Cart hosting http://www.x-cart.com/hosting.html Follow us: https://twitter.com/x_cart / https://www.facebook.com/xcart / https://www.instagram.com/xcart |
|||||||||
#8
|
|||||||||
|
|||||||||
Re: Changing default search to All Words
Please note, the name of the directories is important, so when creating the directories use the same names with upper-case characters as shown below:
classes/XLite/Module/XCartDevs/ChangeSearchDefaults classes/XLite/Module/XCartDevs/ChangeSearchDefaults/View/Form/Product/Search/Customer
__________________
Sincerely yours, Sergey Fomin X-Cart team Chief support group engineer === Check this out. Totally revamped X-Cart hosting http://www.x-cart.com/hosting.html Follow us: https://twitter.com/x_cart / https://www.facebook.com/xcart / https://www.instagram.com/xcart |
|||||||||
#9
|
|||||||
|
|||||||
Re: Changing default search to All Words
Hi Sergey,
It works!! Your "Upload add-on" of the sample module you gave works perfectly! Thank you very much! As for the question of what file editor we used that removed the backslashes, to be honest, we are not sure! We saw the terms "Unix LF" and "Text Editor" when we created a new Main.php and SimpleForm.php files. Does that make sense? Thanks again, John
__________________
John XCart Business v.5.4.1.48 |
|||||||
#10
|
|||||||||
|
|||||||||
Re: Changing default search to All Words
The disappearing backslashes issue might be related to the built-in Text Editor that you use within your web-site Control Panel to edit files. I would not recommend you to use that to edit X-Cart files. Instead, I would recommend you to use FTP and FileZilla to edit files on your web-site.
__________________
Sincerely yours, Sergey Fomin X-Cart team Chief support group engineer === Check this out. Totally revamped X-Cart hosting http://www.x-cart.com/hosting.html Follow us: https://twitter.com/x_cart / https://www.facebook.com/xcart / https://www.instagram.com/xcart |
|||||||||
|
|
|||
X-Cart forums © 2001-2020
|