- Posts: 15
- Thank you received: 0
How to enable Filter module in vendor page?
- quangnguyen
-
Topic Author
- Offline
Less
More
10 years 8 months ago #226389
by quangnguyen
How to enable Filter module in vendor page? was created by quangnguyen
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!
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!
Please Log in or Create an account to join the conversation.
10 years 8 months ago #226449
by Jerome
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.
Replied by Jerome on topic How to enable Filter module in vendor page?
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 :
By
Then in the file "components/com_hikashop/views/product/view.html.php", replace
By
(that modification will be include in the next HikaShop release).
And finally, you can override the view "vendormarket / showcontainer_default" and replace
By
Regards,
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 :
Code:
}else{
$url = preg_replace('#&return_url=[^&]+#i','',$url);
}
Code:
}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
Code:
if(hikashop_level(2) && JRequest::getVar('hikashop_front_end_main',0) && JRequest::getVar('task','listing')!='show'){
Code:
if(hikashop_level(2) && JRequest::getVar('hikashop_front_end_main',0) && (JRequest::getVar('task','listing') != 'show' || JRequest::getVar('force_using_filters', 0) === 1)) {
And finally, you can override the view "vendormarket / showcontainer_default" and replace
Code:
<div class="hikamarket_submodules" id="hikamarket_submodules" style="clear:both">
<?php
if(!empty($this->modules)) {
Code:
<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.148 seconds