Display of Social Network Plugin based on Category

  • Posts: 42
  • Thank you received: 2
9 years 9 months ago #224303

-- HikaShop version -- : 2.6.0
-- Joomla version -- : 2.5.27
-- PHP version -- : 5.4.43

Good Day!
Is it possible to control the display (toggle on/off) of the Social Network Plugin based on a product's category? For example, I would like to have the social links displayed for all products in my "Retail" category, but not for products in the "Wholesale" category. Thanks in advance.

Matt


It's amazing how the omission of a semicolon can absolutely ruin an otherwise pleasant evening.
Last edit: 9 years 8 months ago by spoonbow.

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

  • Posts: 84306
  • Thank you received: 13701
  • MODERATOR
9 years 9 months ago #224312

Hi,

There is no option for that, but the modification to support it should be quite simple.
Edit the file "show_block_social" via the menu Display>Views and add such code at the beginning:
<?php if(in_array(XXX,array_keys($this->categories))) return; ?>
where XXX is to be replaced by the id of the category for which you don't want to display the social network buttons.

The following user(s) said Thank You: spoonbow

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

  • Posts: 42
  • Thank you received: 2
9 years 9 months ago #224397

Fabulous! Thanks for the information and the quick reply, Nicolas!


It's amazing how the omission of a semicolon can absolutely ruin an otherwise pleasant evening.

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

Time to create page: 0.060 seconds
Powered by Kunena Forum