Skip to main content

Additional information

More
12 years 1 week ago #173080 by MWALTHER
-- url of the page with the problem -- : walliser-weine.ch
-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.3.4
-- PHP version -- : 5.4
-- Browser(s) name and version -- : all
-- Error-message(debug-mod must be tuned on) -- : none

Hi,
How can i disregard the msg "additional information" (Zusätzliche Informationen) from my category overview page? I have specified some extra fields and this information is also showing up properly when i open a certain category. But his information should not show up in the category overviews.

Thanks for your feedback.

Regards

Markus

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

More
12 years 1 week ago #173093 by Mohamed Thelji
Hello Markus,
If you have a category custom field, the solution will probably be to un-publish it for the front-end by setting the "Front-end" option to NO via "Hikashop->Display->Custom fields->YourCategoryCustomField".

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

More
12 years 3 days ago #173862 by MWALTHER
Replied by MWALTHER on topic Additional information
Hi,

But then it is not showing up on my category listing as per attachement.

Is there another solution?

Thanks

Markus

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

More
12 years 2 days ago #174110 by nicolas
Replied by nicolas on topic Additional information
Hi,

You need to change the code:
Code:
if(!empty($this->fields)){?> <div id="hikashop_category_custom_info_main" class="hikashop_category_custom_info_main"> <h4><?php echo JText::_('CATEGORY_ADDITIONAL_INFORMATION');?></h4> <table width="100%"> <?php $this->fieldsClass->prefix = ''; foreach($this->fields as $fieldName => $oneExtraField) { if(!empty($this->element->$fieldName)){ ?> <tr class="hikashop_category_custom_<?php echo $oneExtraField->field_namekey;?>_line"> <td class="key"> <span id="hikashop_category_custom_name_<?php echo $oneExtraField->field_id;?>" class="hikashop_category_custom_name"> <?php echo $this->fieldsClass->getFieldName($oneExtraField);?> </span> </td> <td> <span id="hikashop_category_custom_value_<?php echo $oneExtraField->field_id;?>" class="hikashop_category_custom_value"> <?php echo $this->fieldsClass->show($oneExtraField,$this->element->$fieldName); ?> </span> </td> </tr> <?php } }?> </table> </div> <?php }
with the code:
Code:
if(!empty($this->fields)){ ?> <?php ob_start(); $this->fieldsClass->prefix = ''; foreach($this->fields as $fieldName => $oneExtraField) { if(!empty($this->element->$fieldName)){ ?> <tr class="hikashop_category_custom_<?php echo $oneExtraField->field_namekey;?>_line"> <td class="key"> <span id="hikashop_category_custom_name_<?php echo $oneExtraField->field_id;?>" class="hikashop_category_custom_name"> <?php echo $this->fieldsClass->getFieldName($oneExtraField);?> </span> </td> <td> <span id="hikashop_category_custom_value_<?php echo $oneExtraField->field_id;?>" class="hikashop_category_custom_value"> <?php echo $this->fieldsClass->show($oneExtraField,$this->element->$fieldName); ?> </span> </td> </tr> <?php } } $custom_fields_html = ob_get_clean(); if(!empty($custom_fields_html)){ ?> <div id="hikashop_category_custom_info_main" class="hikashop_category_custom_info_main"> <h4><?php echo JText::_('CATEGORY_ADDITIONAL_INFORMATION');?></h4> <table width="100%"> <?php echo $custom_fields_html; ?> </table> </div> <?php } }
in the file "listing" of the view "category" via the menu Display>Views and that should fix that issue.

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

More
11 years 11 months ago - 11 years 11 months ago #174516 by MWALTHER
Replied by MWALTHER on topic Additional information
Hi Nicolas

now i dont get anything anymore. Did i screw up something?

Thanks for your help.

My php-file Looks as follows:
Code:
<?php /** * @package HikaShop for Joomla! * @version 2.3.3 * @author hikashop.com * @copyright (C) 2010-2014 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?><?php ob_start(); if(version_compare(JVERSION,'1.6','<')){ $title = 'show_page_title'; }else{ $title = 'show_page_heading'; } $titleType='h1'; if($this->module){ $title = 'showtitle'; $titleType='h2'; } if($this->params->get($title) && JRequest::getVar('hikashop_front_end_main',0)){ if($this->module){ $heading = $this->params->get('title'); }else{ $heading = $this->params->get('page_title'); if($this->params->get('page_heading')){ $heading = $this->params->get('page_heading'); } } ?> <<?php echo $titleType; ?>> <?php echo $heading; ?> </<?php echo $titleType; ?>> <?php } if(!$this->module){ if(isset($this->element->category_canonical) && !empty($this->element->category_canonical)){ $canonicalUrl = hikashop_cleanURL($this->element->category_canonical); $doc = JFactory::getDocument(); $doc->addCustomTag( '<link rel="canonical" href="'.$canonicalUrl.'" />' ); } if(($this->params->get('show_image') && !empty($this->element->file_path))|| ($this->params->get('show_description')&&!empty($this->element->category_description))){ ?> <div class="hikashop_category_description"> <?php if($this->params->get('show_image') && !empty($this->element->file_path)){ jimport('joomla.filesystem.file'); if(JFile::exists($this->image->getPath($this->element->file_path,false))){ ?> <img src="<?php echo $this->image->getPath($this->element->file_path); ?>" class="hikashop_category_image"/> <?php } } if($this->params->get('show_description',1)&&!empty($this->element->category_description)){ ?> <div class="hikashop_category_description_content"> <?php echo JHTML::_('content.prepare',$this->element->category_description); ?> </div> <?php } ?> </div> <?php } if(!empty($this->fields)){ ?> <?php ob_start(); $this->fieldsClass->prefix = ''; foreach($this->fields as $fieldName => $oneExtraField) { if(!empty($this->element->$fieldName)){ ?> <tr class="hikashop_category_custom_<?php echo $oneExtraField->field_namekey;?>_line"> <td class="key"> <span id="hikashop_category_custom_name_<?php echo $oneExtraField->field_id;?>" class="hikashop_category_custom_name"> <?php echo $this->fieldsClass->getFieldName($oneExtraField);?> </span> </td> <td> <span id="hikashop_category_custom_value_<?php echo $oneExtraField->field_id;?>" class="hikashop_category_custom_value"> <?php echo $this->fieldsClass->show($oneExtraField,$this->element->$fieldName); ?> </span> </td> </tr> <?php } } $custom_fields_html = ob_get_clean(); if(!empty($custom_fields_html)){ ?> <div id="hikashop_category_custom_info_main" class="hikashop_category_custom_info_main"> <h4><?php echo JText::_('CATEGORY_ADDITIONAL_INFORMATION');?></h4> <table width="100%"> <?php echo $custom_fields_html; ?> </table> </div> <?php } } $layout_type = $this->params->get('layout_type'); if(empty($layout_type) || $layout_type=='table') $layout_type = 'div'; $html = $this->loadTemplate($layout_type); if(!empty($html)) echo '<div class="hikashop_subcategories_listing">'.$html.'</div>'; if(!$this->module){ if(!empty($this->modules)){ $html = ''; jimport('joomla.application.module.helper'); foreach($this->modules as $module){ $html .= JModuleHelper::renderModule($module); } if(!empty($html)){ echo '<div class="hikashop_submodules" style="clear:both">'.$html.'</div>'; } } } $html = ob_get_clean(); if(!empty($html)){ $category_id = 0; if(!empty($this->element->category_id)) $category_id = $this->element->category_id; if(!empty($this->row->category_id)) $category_id = $this->row->category_id; ?> <div id="<?php echo $this->params->get('main_div_name');?>" class="hikashop_category_information hikashop_categories_listing_main hikashop_category_listing_<?php echo $category_id; ?>"> <?php echo $html; ?> </div> <?php } ?>
Last edit: 11 years 11 months ago by Jerome. Reason: [code] is nice ! - please use it !

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

More
11 years 11 months ago #174576 by nicolas
Replied by nicolas on topic Additional information
Hi,

Please turn on the "error reporting" option of your joomla configuration and look at the page again. That should display an error message explaining on which line the problem. Please copy/paste the error message so that we can see it.

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

More
11 years 11 months ago #174613 by MWALTHER
Replied by MWALTHER on topic Additional information
Hi,

I get the msg:
error: syntax error, unexpected end of file in /home/walliser/public_html/shop/templates/yoo_frequency/html/com_hikashop/category/listing.php on line 129

I am sure i screwed up something, maybe deleted some entries by mistake :woohoo:

Thanks for your help.

Regards
Marklus

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

More
11 years 11 months ago - 11 years 11 months ago #174628 by Jerome
Replied by Jerome on topic Additional information
Hi,

You have a "}" missing.
I guess just before
Code:
$layout_type = $this->params->get('layout_type');
In order to close
Code:
if(!$this->module){

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Last edit: 11 years 11 months ago by Jerome.

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

More
11 years 11 months ago - 11 years 11 months ago #174755 by MWALTHER
Replied by MWALTHER on topic Additional information
Hi Jerome

I cannot see any difference.
Is my file complete?
Code:
<?php /** * @package HikaShop for Joomla! * @version 2.3.3 * @author hikashop.com * @copyright (C) 2010-2014 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?><?php ob_start(); if(version_compare(JVERSION,'1.6','<')){ $title = 'show_page_title'; }else{ $title = 'show_page_heading'; } $titleType='h1'; if($this->module){ $title = 'showtitle'; $titleType='h2'; } if($this->params->get($title) && JRequest::getVar('hikashop_front_end_main',0)){ if($this->module){ $heading = $this->params->get('title'); }else{ $heading = $this->params->get('page_title'); if($this->params->get('page_heading')){ $heading = $this->params->get('page_heading'); } } ?> <<?php echo $titleType; ?>> <?php echo $heading; ?> </<?php echo $titleType; ?>> <?php } if(!$this->module){ if(isset($this->element->category_canonical) && !empty($this->element->category_canonical)){ $canonicalUrl = hikashop_cleanURL($this->element->category_canonical); $doc = JFactory::getDocument(); $doc->addCustomTag( '<link rel="canonical" href="'.$canonicalUrl.'" />' ); } if(($this->params->get('show_image') && !empty($this->element->file_path))|| ($this->params->get('show_description')&&!empty($this->element->category_description))){ ?> <div class="hikashop_category_description"> <?php if($this->params->get('show_image') && !empty($this->element->file_path)){ jimport('joomla.filesystem.file'); if(JFile::exists($this->image->getPath($this->element->file_path,false))){ ?> <img src="<?php echo $this->image->getPath($this->element->file_path); ?>" class="hikashop_category_image"/> <?php } } if($this->params->get('show_description',1)&&!empty($this->element->category_description)){ ?> <div class="hikashop_category_description_content"> <?php echo JHTML::_('content.prepare',$this->element->category_description); ?> </div> <?php } ?> </div> <?php } if(!empty($this->fields)){ ?> <?php ob_start(); $this->fieldsClass->prefix = ''; foreach($this->fields as $fieldName => $oneExtraField) { if(!empty($this->element->$fieldName)){ ?> <tr class="hikashop_category_custom_<?php echo $oneExtraField->field_namekey;?>_line"> <td class="key"> <span id="hikashop_category_custom_name_<?php echo $oneExtraField->field_id;?>" class="hikashop_category_custom_name"> <?php echo $this->fieldsClass->getFieldName($oneExtraField);?> </span> </td> <td> <span id="hikashop_category_custom_value_<?php echo $oneExtraField->field_id;?>" class="hikashop_category_custom_value"> <?php echo $this->fieldsClass->show($oneExtraField,$this->element->$fieldName); ?> </span> </td> </tr> <?php } } $custom_fields_html = ob_get_clean(); if(!empty($custom_fields_html)){ ?> <div id="hikashop_category_custom_info_main" class="hikashop_category_custom_info_main"> <h4><?php echo JText::_('CATEGORY_ADDITIONAL_INFORMATION');?></h4> <table width="100%"> <?php echo $custom_fields_html; ?> </table> </div> <?php } } $layout_type = $this->params->get('layout_type'); if(empty($layout_type) || $layout_type=='table') $layout_type = 'div'; $html = $this->loadTemplate($layout_type); if(!empty($html)) echo '<div class="hikashop_subcategories_listing">'.$html.'</div>'; if(!$this->module){ if(!empty($this->modules)){ $html = ''; jimport('joomla.application.module.helper'); foreach($this->modules as $module){ $html .= JModuleHelper::renderModule($module); } if(!empty($html)){ echo '<div class="hikashop_submodules" style="clear:both">'.$html.'</div>'; } } } $html = ob_get_clean(); if(!empty($html)){ $category_id = 0; if(!empty($this->element->category_id)) $category_id = $this->element->category_id; if(!empty($this->row->category_id)) $category_id = $this->row->category_id; ?> <div id="<?php echo $this->params->get('main_div_name');?>" class="hikashop_category_information hikashop_categories_listing_main hikashop_category_listing_<?php echo $category_id; ?>"> <?php echo $html; ?> </div> <?php } ?>
Last edit: 11 years 11 months ago by Xavier. Reason: Please use [code][/code] tags

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

More
11 years 11 months ago - 11 years 11 months ago #174761 by MWALTHER
Replied by MWALTHER on topic Additional information
Hi again,

I am sorry, i guess i have to use the PHP-view from the template i am using. The previous was from beeze3.

This is from my current template:
\category\listing
Code:
<?php /** * @package HikaShop for Joomla! * @version 2.3.3 * @author hikashop.com * @copyright (C) 2010-2014 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?><?php ob_start(); if(version_compare(JVERSION,'1.6','<')){ $title = 'show_page_title'; }else{ $title = 'show_page_heading'; } $titleType='h1'; if($this->module){ $title = 'showtitle'; $titleType='h2'; } if($this->params->get($title) && JRequest::getVar('hikashop_front_end_main',0)){ if($this->module){ $heading = $this->params->get('title'); }else{ $heading = $this->params->get('page_title'); if($this->params->get('page_heading')){ $heading = $this->params->get('page_heading'); } } ?> <<?php echo $titleType; ?>> <?php echo $heading; ?> </<?php echo $titleType; ?>> <?php } if(!$this->module){ if(isset($this->element->category_canonical) && !empty($this->element->category_canonical)){ $canonicalUrl = hikashop_cleanURL($this->element->category_canonical); $doc = JFactory::getDocument(); $doc->addCustomTag( '<link rel="canonical" href="'.$canonicalUrl.'" />' ); } if(($this->params->get('show_image') && !empty($this->element->file_path))|| ($this->params->get('show_description')&&!empty($this->element->category_description))){ ?> <div class="hikashop_category_description"> <?php if($this->params->get('show_image') && !empty($this->element->file_path)){ jimport('joomla.filesystem.file'); if(JFile::exists($this->image->getPath($this->element->file_path,false))){ ?> <img src="<?php echo $this->image->getPath($this->element->file_path); ?>" class="hikashop_category_image"/> <?php } } if($this->params->get('show_description',1)&&!empty($this->element->category_description)){ ?> <div class="hikashop_category_description_content"> <?php echo JHTML::_('content.prepare',$this->element->category_description); ?> </div> <?php } ?> </div> <?php } if(!empty($this->fields)){ ?> <div id="hikashop_category_custom_info_main" class="hikashop_category_custom_info_main"> <h4><?php echo JText::_('CATEGORY_ADDITIONAL_INFORMATION');?></h4> <table width="100%"> <?php $this->fieldsClass->prefix = ''; foreach($this->fields as $fieldName => $oneExtraField) { if(!empty($this->element->$fieldName)){ ?> <tr class="hikashop_category_custom_<?php echo $oneExtraField->field_namekey;?>_line"> <td class="key"> <span id="hikashop_category_custom_name_<?php echo $oneExtraField->field_id;?>" class="hikashop_category_custom_name"> <?php echo $this->fieldsClass->getFieldName($oneExtraField);?> </span> </td> <td> <span id="hikashop_category_custom_value_<?php echo $oneExtraField->field_id;?>" class="hikashop_category_custom_value"> <?php echo $this->fieldsClass->show($oneExtraField,$this->element->$fieldName); ?> </span> </td> </tr> <?php } }?> </table> </div> <?php } } $layout_type = $this->params->get('layout_type'); if(empty($layout_type) || $layout_type=='table') $layout_type = 'div'; $html = $this->loadTemplate($layout_type); if(!empty($html)) echo '<div class="hikashop_subcategories_listing">'.$html.'</div>'; if(!$this->module){ if(!empty($this->modules)){ $html = ''; jimport('joomla.application.module.helper'); foreach($this->modules as $module){ $html .= JModuleHelper::renderModule($module); } if(!empty($html)){ echo '<div class="hikashop_submodules" style="clear:both">'.$html.'</div>'; } } } $html = ob_get_clean(); if(!empty($html)){ $category_id = 0; if(!empty($this->element->category_id)) $category_id = $this->element->category_id; if(!empty($this->row->category_id)) $category_id = $this->row->category_id; ?> <div id="<?php echo $this->params->get('main_div_name');?>" class="hikashop_category_information hikashop_categories_listing_main hikashop_category_listing_<?php echo $category_id; ?>"> <?php echo $html; ?> </div> <?php } ?>
Last edit: 11 years 11 months ago by Xavier. Reason: Please use [code][/code] tags

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

More
11 years 11 months ago #174763 by MWALTHER
Replied by MWALTHER on topic Additional information
The error msg with debugger on is:

Parse error: syntax error, unexpected end of file in /home/walliser/public_html/shop/templates/yoo_frequency/html/com_hikashop/category/listing.php on line 129

Can i delete my changes (delete button) an will i get the original file again?

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

More
11 years 11 months ago #174774 by MWALTHER
Replied by MWALTHER on topic Additional information
Many thanks, everything fine with the complete file :cheer:

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

More
11 years 11 months ago #174776 by MWALTHER
Replied by MWALTHER on topic Additional information

MWALTHER wrote: Many thanks, everything fine with the complete file :cheer:

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

More
11 years 11 months ago #174756 by Xavier
Replied by Xavier on topic Additional information
Hi,

As Jérome said, you have a mising "}". Please use that content:
Code:
<?php /** * @package HikaShop for Joomla! * @version 2.3.3 * @author hikashop.com * @copyright (C) 2010-2014 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?><?php ob_start(); if(version_compare(JVERSION,'1.6','<')){ $title = 'show_page_title'; }else{ $title = 'show_page_heading'; } $titleType='h1'; if($this->module){ $title = 'showtitle'; $titleType='h2'; } if($this->params->get($title) && JRequest::getVar('hikashop_front_end_main',0)){ if($this->module){ $heading = $this->params->get('title'); }else{ $heading = $this->params->get('page_title'); if($this->params->get('page_heading')){ $heading = $this->params->get('page_heading'); } } ?> <<?php echo $titleType; ?>> <?php echo $heading; ?> </<?php echo $titleType; ?>> <?php } if(!$this->module){ if(isset($this->element->category_canonical) && !empty($this->element->category_canonical)){ $canonicalUrl = hikashop_cleanURL($this->element->category_canonical); $doc = JFactory::getDocument(); $doc->addCustomTag( '<link rel="canonical" href="'.$canonicalUrl.'" />' ); } if(($this->params->get('show_image') && !empty($this->element->file_path))|| ($this->params->get('show_description')&&!empty($this->element->category_description))){ ?> <div class="hikashop_category_description"> <?php if($this->params->get('show_image') && !empty($this->element->file_path)){ jimport('joomla.filesystem.file'); if(JFile::exists($this->image->getPath($this->element->file_path,false))){ ?> <img src="<?php echo $this->image->getPath($this->element->file_path); ?>" class="hikashop_category_image"/> <?php } } if($this->params->get('show_description',1)&&!empty($this->element->category_description)){ ?> <div class="hikashop_category_description_content"> <?php echo JHTML::_('content.prepare',$this->element->category_description); ?> </div> <?php } ?> </div> <?php } if(!empty($this->fields)){ ?> <?php ob_start(); $this->fieldsClass->prefix = ''; foreach($this->fields as $fieldName => $oneExtraField) { if(!empty($this->element->$fieldName)){ ?> <tr class="hikashop_category_custom_<?php echo $oneExtraField->field_namekey;?>_line"> <td class="key"> <span id="hikashop_category_custom_name_<?php echo $oneExtraField->field_id;?>" class="hikashop_category_custom_name"> <?php echo $this->fieldsClass->getFieldName($oneExtraField);?> </span> </td> <td> <span id="hikashop_category_custom_value_<?php echo $oneExtraField->field_id;?>" class="hikashop_category_custom_value"> <?php echo $this->fieldsClass->show($oneExtraField,$this->element->$fieldName); ?> </span> </td> </tr> <?php } } $custom_fields_html = ob_get_clean(); if(!empty($custom_fields_html)){ ?> <div id="hikashop_category_custom_info_main" class="hikashop_category_custom_info_main"> <h4><?php echo JText::_('CATEGORY_ADDITIONAL_INFORMATION');?></h4> <table width="100%"> <?php echo $custom_fields_html; ?> </table> </div> <?php } } } $layout_type = $this->params->get('layout_type'); if(empty($layout_type) || $layout_type=='table') $layout_type = 'div'; $html = $this->loadTemplate($layout_type); if(!empty($html)) echo '<div class="hikashop_subcategories_listing">'.$html.'</div>'; if(!$this->module){ if(!empty($this->modules)){ $html = ''; jimport('joomla.application.module.helper'); foreach($this->modules as $module){ $html .= JModuleHelper::renderModule($module); } if(!empty($html)){ echo '<div class="hikashop_submodules" style="clear:both">'.$html.'</div>'; } } } $html = ob_get_clean(); if(!empty($html)){ $category_id = 0; if(!empty($this->element->category_id)) $category_id = $this->element->category_id; if(!empty($this->row->category_id)) $category_id = $this->row->category_id; ?> <div id="<?php echo $this->params->get('main_div_name');?>" class="hikashop_category_information hikashop_categories_listing_main hikashop_category_listing_<?php echo $category_id; ?>"> <?php echo $html; ?> </div> <?php } ?>

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

Time to create page: 0.268 seconds
Powered by Kunena Forum