How to enable Filter module in vendor page?

  • Posts: 15
  • Thank you received: 0
8 years 10 months ago #226389

Hi,
I have a vendor list, when user click into vendor name, it will show up product list, i using vendor page and Modules under the vendor page is a product list( to show product list in vendor page)
how i can add a filter module to vendor page(child page of vendor list page) to apply for product list of this vendor?
thanks!

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 10 months ago #226449

Hi,

Using an HikaShop filter module on the vendor page is possible but it requires few modifications in HikaShop.
The HikaShop filters have been design to be displayed only on the HikaShop listing pages and not in other components.
So, even if you can display the module, it will redirect the customer to an HikaShop product listing (depending the module configuration).

First, in the view "product / filter", you have to edit the view in order to authorize the submission of the filters on the HikaMarket vendor page.
The easier will be to replace :

	}else{
		$url = preg_replace('#&return_url=[^&]+#i','',$url);
	}
By
	}else{
		$url = preg_replace('#&return_url=[^&]+#i','',$url);
	}
	if(JRequest::getVar('option','') == 'com_hikamarket' && JRequest::getVar('ctrl','') == 'vendor') {
		$url = hikashop_currentURL();
		$url = preg_replace('#&return_url=[^&]+#i','',$url);
	}

Then in the file "components/com_hikashop/views/product/view.html.php", replace
if(hikashop_level(2) && JRequest::getVar('hikashop_front_end_main',0) && JRequest::getVar('task','listing')!='show'){
By
if(hikashop_level(2) && JRequest::getVar('hikashop_front_end_main',0) && (JRequest::getVar('task','listing') != 'show' || JRequest::getVar('force_using_filters', 0) === 1)) {
(that modification will be include in the next HikaShop release).

And finally, you can override the view "vendormarket / showcontainer_default" and replace
	<div class="hikamarket_submodules" id="hikamarket_submodules" style="clear:both">
<?php
if(!empty($this->modules)) {
By
	<div class="hikamarket_submodules" id="hikamarket_submodules" style="clear:both">
<?php
if(!empty($this->modules)) {
	JRequest::setVar('force_using_filters', 1);

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Moderators: Obsidev
Time to create page: 0.061 seconds
Powered by Kunena Forum