Skip to main content

MapX plugin to show categories only

More
11 years 5 months ago #199615 by maujbigo
-- HikaShop version -- : 2.4
-- Joomla version -- : 3.4.1

Hi, I am using the xmap plugin with mapx as per the hikashop documentation.
It all works fine except that I want to only show categories and not products on my site map.
I used the field 'maximum products' in the plugin configuration and set it to 0 (zero) but it still displays all the products.

I am not sure it was intended to not display products if setting up that parameter to 0 but it didn't.
So I modified the plugin file
Change line 266 From
if(!empty($products)){
To
if(!empty($products) && $this->max_product > 0){
And it does the trick.

Please clarify if that is the correct way the plugin should work.

Thanks

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

More
11 years 5 months ago #199626 by Xavier
Hi,

Yes it seems to be a good solution, you can too simply add the code:
Code:
if($this->max_product == '0') return;
Right after:
Code:
function printListProduct(&$xmap, &$parent, $filterType, $parentListing ){

This way it avoid to execute any MySQL requests related on the products.

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

Time to create page: 0.157 seconds
Powered by Kunena Forum