HikashopToggleFields on product summary page

  • Posts: 503
  • Thank you received: 21
  • Hikashop Business
5 years 8 months ago #295427

-- url of the page with the problem -- : jouwnaambord.nl/naamborden-algemeen/rvs-naambordjes
-- HikaShop version -- : 3.5.0
-- Joomla version -- : 3.8.8
-- PHP version -- : 7.0

Hi,

On any product summary page in the sourcecode there are HikashopToggleFields active unwanted, I can't figure out why they are there. See screenshots. How to remove these customfields from these pages?

f.e.: jouwnaambord.nl/naamborden-algemeen/rvs-naambordjes

Attachments:

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

  • Posts: 81378
  • Thank you received: 13037
  • MODERATOR
5 years 8 months ago #295450

Hi,

That's because, on a products listing, even if you have turned off the display of the custom item fields, HikaShop needs to load the custom item fields from the database to know if it can display the add to cart button or the "choose options" button.
And when the custom item fields are loaded, the javascript for the "display limited to" setting will be added to the page.

Change the line:
if(!empty($productClass->itemFields)) {
to:
if(!empty($productClass->itemFields) && $this->params->get('display_custom_item_fields', 0)) {
in the file components/com_hikashop/views/product/view.html.php and that will avoid loading the javascript of the custom item fields when they are not to be displayed on the listings.
Please let us know how it works so that we can add that improvements in the next release of HikaShop.

The following user(s) said Thank You: michelpouli

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

  • Posts: 503
  • Thank you received: 21
  • Hikashop Business
5 years 8 months ago #295456

Hi Nicolas,

Thanks! That works indeed.

The following user(s) said Thank You: nicolas

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

Time to create page: 0.058 seconds
Powered by Kunena Forum