MapX plugin to show categories only

  • Posts: 147
  • Thank you received: 6
9 years 7 months ago #199615

-- 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.

  • Posts: 13201
  • Thank you received: 2322
9 years 7 months ago #199626

Hi,

Yes it seems to be a good solution, you can too simply add the code:

if($this->max_product == '0') return;
Right after:
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.050 seconds
Powered by Kunena Forum