https://www.opencart.com/index.php?rout ... n_id=16340
Multi-store Combined Search [VQMOD]
What does it do
The default opencart behaviour is to limit a store's search function to search for products only in the current store's product catalogue.
This plugin extends this behaviour by allowing customers to now search across:
- The current store
- Any other store (including the default store)
- All stores
- DefaultStore.com, products A, B and C
- SecondStore.com, products A, B and D
- ThirdStore.com, products A, C, E
This means that the link that is generated for each search result is also context aware.
How to install it
- Unzip and upload the "vqmod" folder to the root of your OpenCart install. No files are overwritten and it's required to have vqmod installed.
Note: If you want to enabled "search all stores" by default, you need to apply the following change to the /catalog/view/javascript/common.js as follows:
Code: Select all
$('.button-search').bind('click', function() {
url = $('base').attr('href') + 'index.php?route=product/search';
var filter_name = $('input[name=\'filter_name\']').attr('value');
if (filter_name) {
url += '&filter_name=' + encodeURIComponent(filter_name);
}
/** ****************************** START: ADDED BY SOTERI ******************** **/
url += "&selected_store_id=-1";
/** ****************************** END ADDED BY SOTERI ******************** **/
location = url;
});
$('#header input[name=\'filter_name\']').bind('keydown', function(e) {
if (e.keyCode == 13) {
url = $('base').attr('href') + 'index.php?route=product/search';
var filter_name = $('input[name=\'filter_name\']').attr('value');
if (filter_name) {
url += '&filter_name=' + encodeURIComponent(filter_name);
}
/** ****************************** START: ADDED BY SOTERI ******************** **/
url += "&selected_store_id=-1";
/** ****************************** END ADDED BY SOTERI ******************** **/
location = url;
}
});
Support
panagos@gmail.com
History
Version 1.0.0.6 (2018-02-24)
- Added support for opencart 3.0.0.0 and 3.0.2.0
- Added support for opencart 2.2.0.0
- Added support for SEO friendly URLs
- Added support for earlier version 1.5.4.1
- v1.5.6.4
- v1.5.4.1
Supported OpenCart Versions:
- v1.5.6.1