- Posts: 9
- Thank you received: 0
Display only categories of vendor in vendor page
- phanhuutri
-
Topic Author
- Offline
Less
More
10 years 8 months ago #225859
by phanhuutri
Display only categories of vendor in vendor page was created by phanhuutri
-- url of the page with the problem -- :
ilaza.vn
-- HikaShop version -- : 2.6.0
-- HikaMarket version -- : 1.6.7
-- Joomla version -- : 3.4
-- PHP version -- : 5.5
Hello,
Please guide me how to display only categories of vendor in vendor page. Example: Vendor A create 3 categories: A1, A2, A3 in A category. Vendor B create 3 categories: B1, B2, B3, when user select vendor A, I want only show categories of A vendor. Please let me know which module I need use. Thanks you very much.
Regards,
Tri
-- HikaShop version -- : 2.6.0
-- HikaMarket version -- : 1.6.7
-- Joomla version -- : 3.4
-- PHP version -- : 5.5
Hello,
Please guide me how to display only categories of vendor in vendor page. Example: Vendor A create 3 categories: A1, A2, A3 in A category. Vendor B create 3 categories: B1, B2, B3, when user select vendor A, I want only show categories of A vendor. Please let me know which module I need use. Thanks you very much.
Regards,
Tri
Please Log in or Create an account to join the conversation.
10 years 8 months ago #225906
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 Display only categories of vendor in vendor page
Hi,
The HikaMarket category class have a function "processListing".
When a category listing module is displayed in the vendor page ; that function can alter the content of the module.
The processing is only made when the setting "Synchronize" is on.
If the setting "only with products" is set in the category listing module configuration, HikaMarket will filter the category to only display thus which have products of the current vendor.
There is also some commented/unpublished code in that function in order to change dynamically the "main category" and target the vendor category instead:
You can place that code just below
in order to activate the feature.
And I'll see to publish that in the next HikaMarket release.
Regards,
The HikaMarket category class have a function "processListing".
When a category listing module is displayed in the vendor page ; that function can alter the content of the module.
The processing is only made when the setting "Synchronize" is on.
If the setting "only with products" is set in the category listing module configuration, HikaMarket will filter the category to only display thus which have products of the current vendor.
There is also some commented/unpublished code in that function in order to change dynamically the "main category" and target the vendor category instead:
Code:
if((int)$filter_type == 0) {
$vendorClass = hikamarket::get('class.vendor');
$rootCategory = $vendorClass->getRootCategory($vendor_id);
if(empty($rootCategory))
return;
if(isset($filters['category_parent_id'])) {
$filters['category_parent_id'] = 'a.category_parent_id = ' . (int)$rootCategory;
} else {
foreach($filters as &$filter) {
if(substr($filter, 0, 23) != 'a.category_parent_id = ')
continue;
$filter = 'a.category_parent_id = ' . (int)$rootCategory;
break;
}
unset($filter);
}
}
Code:
$filter_type = $view->params->get('filter_type');
$filter_only_products = $view->params->get('only_if_products',0);
$vendor_id = hikamarket::getCID('vendor_id');
And I'll see to publish that in the next HikaMarket release.
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.
Less
More
- Posts: 15
- Thank you received: 0
10 years 8 months ago #226931
by quangnguyen
Replied by quangnguyen on topic Display only categories of vendor in vendor page
sorry when up old topic! but you can tell me where can i add this commented/unpublished code?
i find in mod_hikashop, mod_hikamarket but nothing at all.
can i add before yours update? because i need it.
i find in mod_hikashop, mod_hikamarket but nothing at all.
can i add before yours update? because i need it.
Please Log in or Create an account to join the conversation.
10 years 8 months ago #226933
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 Display only categories of vendor in vendor page
Hi,
And don't worry, it's not an old topic ; it just have one week !
Regards,
The HikaMarket category class is with the other HikaMarket classes, in the folder "administrator/components/com_hikamarket/classes/".The HikaMarket category class have a function "processListing".
And don't worry, it's not an old topic ; it just have one week !
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.
Less
More
- Posts: 15
- Thank you received: 0
10 years 8 months ago - 10 years 8 months ago #226977
by quangnguyen
Replied by quangnguyen on topic Display only categories of vendor in vendor page
Hi Jerome!
sorry but i don't see folder name 'classes' in com_hikamarket
there are 3 folder in com_hikamarket is views, controllers and fields.
my hikamarket version is: HikaMarket Multivendor: 1.6.7
my hikashop version is: HikaShop Business: 2.6.0
sorry but i don't see folder name 'classes' in com_hikamarket
there are 3 folder in com_hikamarket is views, controllers and fields.
my hikamarket version is: HikaMarket Multivendor: 1.6.7
my hikashop version is: HikaShop Business: 2.6.0
Last edit: 10 years 8 months ago by quangnguyen.
Please Log in or Create an account to join the conversation.
10 years 8 months ago #226978
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 Display only categories of vendor in vendor page
Hi,
Regards,
administrator/components/com_hikamarket/classes/
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.215 seconds