Post by panagos » Sat Feb 24, 2018 5:14 pm

Happy to announce the release of the updated Multi-store Combined Search plugin for all versions of opencart, from 1.5.4.x to 3.x.x.x

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
So, for example, if you have three stores:
  • DefaultStore.com, products A, B and C
  • SecondStore.com, products A, B and D
  • ThirdStore.com, products A, C, E
When landed on DefaultStore.com and searching for product D, you will be presented with a link to secondstore.com

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.
To enable search all stores by default

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
Version 1.0.0.5 (2016-05-05)
  • Added support for opencart 2.2.0.0
Version 1.0.0.4 (2015-May-02)
  • Added support for SEO friendly URLs
  • Added support for earlier version 1.5.4.1
Supporting versions:
  • v1.5.6.4
  • v1.5.4.1
Version 1.0.0.0
Supported OpenCart Versions:
  • v1.5.6.1

--
Soteri Panagou
Freelance Developer and Opencart Zealot

http://www.opencart.com/index.php?route ... @gmail.com


New member

Posts

Joined
Sun Oct 25, 2015 3:01 am

Who is online

Users browsing this forum: No registered users and 13 guests