Disable Table Switcher

  • Posts: 56
  • Thank you received: 4
  • Hikashop Business
4 years 6 months ago #312145

-- HikaShop version -- : 4.2.2
-- Joomla version -- : 3.9.12

Hello, I updated to 4.2.2 and a "Table Switcher" appeared on all of my Product Listing pages and Related Products modules. I could not find a global setting to disable the table switcher so i had to disable it individually on each Product Listing Menu Item. It was in the DIV settings. Is there a global setting somewhere?

I cannot however find the option to turn it off in the related items module, I checked the joomla module manager, Related Items module, and while there are div settings, the option is not there to turn the Table Switcher off. How can I turn this off?



Thanks


Matt

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

  • Posts: 4508
  • Thank you received: 610
  • MODERATOR
4 years 6 months ago #312174

Hello,

I will help you to fix this issue, you have just 2 little modification todo, follow me step by step :
=> Navigate in your website (thanks to Filezilla by example)
Step 1°
- Open this folder : YourWebsite\administrator\components\com_hikashop\views\menus\tmpl
- Open the file : options_display_div.php
- Around line 85, you will see this :
if(!isset($this->element)) $this->element = 1; ?>
- Modify it, to have this :
if(!isset($this->element)) $this->element = 0; ?>

Step 2°
- Open this folder : YourWebsite\components\com_hikashop\views\product\tmpl
- Open the file : listing_div.php
- Around line 15, you will see this :
$switchMode = !$enableCarousel && (int)$this->params->get('enable_switcher', 1) && (!$this->module || hikaInput::get()->getVar('hikashop_front_end_main', 0));
- Modify it, to have this :
$switchMode = !$enableCarousel && (int)$this->params->get('enable_switcher', 0) && (!$this->module || hikaInput::get()->getVar('hikashop_front_end_main', 0));


Awaiting returns from you to see if that solve your issue for the related module in product page.
Regards

Last edit: 4 years 6 months ago by Philip.

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

  • Posts: 56
  • Thank you received: 4
  • Hikashop Business
4 years 6 months ago #312200

Thank Philip, I found the code for step 2 but i could not find the code "if(!isset($this->element)) $this->element = 1; ?>" in your step 1. Could you confirm this code is correct?


Matt

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

  • Posts: 4508
  • Thank you received: 610
  • MODERATOR
4 years 6 months ago #312201

Hello,

sorry, my bad the tag

'[', ']'
have been "swallowed" by forum code system...
the line you have to find is this :
if(!isset($this->element['enable_switcher'])) $this->element['enable_switcher'] = 1; ?>
For :
if(!isset($this->element['enable_switcher'])) $this->element['enable_switcher'] = 0; ?>

Regards

Last edit: 4 years 6 months ago by Philip.

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

  • Posts: 56
  • Thank you received: 4
  • Hikashop Business
4 years 6 months ago #312240

Well I made the changes but unfortunately it threw an error : 0 syntax error, unexpected 'defined' (T_STRING)

So I restored a backup, re-upgraded Hikashop, and the Table switcher never showed up this time...

I assume you guys just made changed to the update to address this.. Guess we are good to go

Thank you


Matt

The following user(s) said Thank You: Philip

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

Time to create page: 0.063 seconds
Powered by Kunena Forum