| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | Mark Forums Read | User manuals | Login |
Default Search Module / Tutorial | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Default Search Module / Tutorial
I originally asked this question a few months ago.
Changing the default search parameter from 'any words' to 'all words' I see now that this has been added as a module tutorial/walk-through in the developer section. I followed it along to the best of my understanding but when I redeployed the store, it got hung op on Step 6 of 13. I am wondering if I did something wrong and if someone can help me out here. I created a simple module as outlined here: http://devs.x-cart.com/en/getting_started/step_1_-_creating_simplest_module.html After creating the module I uploaded it and redeployed the store. The empty module is showing up just fine. Now, this next series of steps is confusing me: http://devs.x-cart.com/en/customization_examples/resetting_the_search_parameter_from_any_word_to_al l_words.html Step 2. Says "In this module, add a new class:" Do I add this at the bottom of the simple module file (Main.php), just after this chunk of code... Code:
__________________
X-Cart Business 5.4.1.29 |
|||||||
#2
|
|||||||
|
|||||||
Re: Default Search Module / Tutorial
I don't know if this was the issue but I did find an error in syntax here:
http://devs.x-cart.com/en/customization_examples/resetting_the_search_parameter_from_any_word_to_al l_words.html Code:
The bold & underlined forward slash between <YOUR-DEVELOPER-ID>/<YOUR-MODULE-ID> should be a back slash, no?
__________________
X-Cart Business 5.4.1.29 |
|||||||
#3
|
|||||||
|
|||||||
Re: Default Search Module / Tutorial
Also, this new Main.php file is simply in a directory I created called "DefaultSearch"
/classes/XLite/Module/Brando/DefaultSearch If that is where the file is, should the namespace simply be namespace XLite\Module\Brando\DefaultSearch; or does it have to be namespace XLite\Module\Brando\DefaultSearch\View\Form\Produc t\Search\Customer; as shown in the walk-through?
__________________
X-Cart Business 5.4.1.29 |
|||||||
#4
|
|||||||||
|
|||||||||
Re: Default Search Module / Tutorial
Quote:
Quote:
No, you should create the following new file and enter its contents as per the documentation: classes/XLite/Module/YOUR-DEVELOPER-ID/YOUR-MODULE-ID/View/Form/Product/Search/Customer/SimpleForm.php Quote:
Yes, it should be a back slash. Thank you for finding this! Quote:
The namespace should match the path to the file. For "classes/XLite/Module/Brando/DefaultSearch/Main.php" the namespace should be "XLite\Module\Brando\DefaultSearch", and the class name should be "Main". For "classes/XLite/Module/Brando/DefaultSearch/View/Form/Product/Search/Customer/SimpleForm.php" the namespace should be "XLite\Module\Brando\DefaultSearch\View\Form\Produ ct\Search\Customer", and the class name should be "SimpleForm".
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
|
#5
|
|||||||
|
|||||||
Re: Default Search Module / Tutorial
Quote:
The documentation only says Code:
Could you please update the documentation with the needed corrections? http://devs.x-cart.com/en/customization_examples/resetting_the_search_parameter_from_any_word_to_al l_words.html
__________________
X-Cart Business 5.4.1.29 |
|||||||
#6
|
|||||||||
|
|||||||||
Re: Default Search Module / Tutorial
Quote:
I've asked the person who wrote the article to tweak it. Thank you!
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
|
#7
|
|||||||
|
|||||||
Re: Default Search Module / Tutorial
Quote:
Thank you. I also figured it out and got it to work. I appreciate your help and clarity. I am curious though- why so many empty directories?
__________________
X-Cart Business 5.4.1.29 |
|||||||
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|